yhirose 6 years ago
parent
commit
8a348f17fd
4 changed files with 12 additions and 6 deletions
  1. 6 0
      .github/workflows/test.yaml
  2. 1 1
      README.md
  3. 3 3
      httplib.h
  4. 2 2
      test/Makefile

+ 6 - 0
.github/workflows/test.yaml

@@ -13,5 +13,11 @@ jobs:
     steps:
     - name: checkout
       uses: actions/checkout@v1
+    - name: brotli-ubuntu
+      run: sudo apt-get install -y libbrotli-dev
+      if: matrix.os == 'ubuntu-latest'
+    - name: brotli-macOS
+      run: brew install brotli
+      if: matrix.os == 'macOS-latest'
     - name: make
       run: cd test && make

+ 1 - 1
README.md

@@ -526,7 +526,7 @@ OpenSSL Support
 
 SSL support is available with `CPPHTTPLIB_OPENSSL_SUPPORT`. `libssl` and `libcrypto` should be linked.
 
-NOTE: cpp-httplib supports 1.1.1 (until 2023-09-11) and 1.0.2 (2019-12-31).
+NOTE: cpp-httplib currently supports only version 1.1.1.
 
 ```c++
 #define CPPHTTPLIB_OPENSSL_SUPPORT

+ 3 - 3
httplib.h

@@ -204,9 +204,9 @@ using socket_t = int;
 #include <iostream>
 #include <sstream>
 
-// #if OPENSSL_VERSION_NUMBER < 0x1010100fL
-// #error Sorry, OpenSSL versions prior to 1.1.1 are not supported
-// #endif
+#if OPENSSL_VERSION_NUMBER < 0x1010100fL
+#error Sorry, OpenSSL versions prior to 1.1.1 are not supported
+#endif
 
 #if OPENSSL_VERSION_NUMBER < 0x10100000L
 #include <openssl/crypto.h>

+ 2 - 2
test/Makefile

@@ -2,13 +2,13 @@
 #CXX = clang++
 CXXFLAGS = -ggdb -O0 -std=c++11 -DGTEST_USE_OWN_TR1_TUPLE -I.. -I. -Wall -Wextra -Wtype-limits -Wconversion
 
-OPENSSL_DIR = /usr/local/opt/openssl
+OPENSSL_DIR = /usr/local/opt/openssl@1.1
 OPENSSL_SUPPORT = -DCPPHTTPLIB_OPENSSL_SUPPORT -I$(OPENSSL_DIR)/include -L$(OPENSSL_DIR)/lib -lssl -lcrypto
 
 ZLIB_SUPPORT = -DCPPHTTPLIB_ZLIB_SUPPORT -lz
 
 BROTLI_DIR = /usr/local/opt/brotli
-# BROTLI_SUPPORT = -DCPPHTTPLIB_BROTLI_SUPPORT -I$(BROTLI_DIR)/include -L$(BROTLI_DIR)/lib -lbrotlicommon-static -lbrotlienc-static -lbrotlidec-static
+BROTLI_SUPPORT = -DCPPHTTPLIB_BROTLI_SUPPORT -I$(BROTLI_DIR)/include -L$(BROTLI_DIR)/lib -lbrotlicommon -lbrotlienc -lbrotlidec
 
 all : test
 	./test