Skip to content

Commit

Permalink
deps: upgrade llhttp to 6.0.9
Browse files Browse the repository at this point in the history
PR-URL: #44344
Fixes: #43115
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
  • Loading branch information
ShogunPanda authored and RafaelGSS committed Sep 5, 2022
1 parent ed52bd0 commit 1e451dc
Show file tree
Hide file tree
Showing 4 changed files with 703 additions and 290 deletions.
10 changes: 5 additions & 5 deletions deps/llhttp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
cmake_minimum_required(VERSION 3.5.1)
cmake_policy(SET CMP0069 NEW)

project(llhttp VERSION 6.0.5)
project(llhttp VERSION )
include(GNUInstallDirs)

set(CMAKE_C_STANDARD 99)

# By default build in relwithdebinfo type, supports both lowercase and uppercase
if(NOT CMAKE_CONFIGURATION_TYPES)
set(allowableBuileTypes DEBUG RELEASE RELWITHDEBINFO MINSIZEREL)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "${allowableBuileTypes}")
set(allowableBuildTypes DEBUG RELEASE RELWITHDEBINFO MINSIZEREL)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "${allowableBuildTypes}")
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RELWITHDEBINFO CACHE STRING "" FORCE)
else()
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
if(NOT CMAKE_BUILD_TYPE IN_LIST allowableBuileTypes)
message(FATEL_ERROR "Invalid build type: ${CMAKE_BUILD_TYPE}")
if(NOT CMAKE_BUILD_TYPE IN_LIST allowableBuildTypes)
message(FATAL_ERROR "Invalid build type: ${CMAKE_BUILD_TYPE}")
endif()
endif()
endif()
Expand Down
4 changes: 3 additions & 1 deletion deps/llhttp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,15 @@ make

* Python: [pallas/pyllhttp][8]
* Ruby: [metabahn/llhttp][9]
* Rust: [JackLiar/rust-llhttp][10]

### Using with CMake

If you want to use this library in a CMake project you can use the snippet below.

```
FetchContent_Declare(llhttp
URL "https://github.com/nodejs/llhttp/releases/download/v6.0.5/llhttp-release-v6.0.5.tar.gz") # Using version 6.0.5
URL "https://github.com/nodejs/llhttp/archive/refs/tags/v6.0.5.tar.gz") # Using version 6.0.5
FetchContent_MakeAvailable(llhttp)
Expand Down Expand Up @@ -178,3 +179,4 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
[7]: https://github.com/nodejs/node
[8]: https://github.com/pallas/pyllhttp
[9]: https://github.com/metabahn/llhttp
[10]: https://github.com/JackLiar/rust-llhttp
5 changes: 3 additions & 2 deletions deps/llhttp/include/llhttp.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#define LLHTTP_VERSION_MAJOR 6
#define LLHTTP_VERSION_MINOR 0
#define LLHTTP_VERSION_PATCH 7
#define LLHTTP_VERSION_PATCH 9

#ifndef LLHTTP_STRICT_MODE
# define LLHTTP_STRICT_MODE 0
Expand Down Expand Up @@ -102,7 +102,8 @@ enum llhttp_lenient_flags {
LENIENT_HEADERS = 0x1,
LENIENT_CHUNKED_LENGTH = 0x2,
LENIENT_KEEP_ALIVE = 0x4,
LENIENT_TRANSFER_ENCODING = 0x8
LENIENT_TRANSFER_ENCODING = 0x8,
LENIENT_VERSION = 0x10
};
typedef enum llhttp_lenient_flags llhttp_lenient_flags_t;

Expand Down
Loading

0 comments on commit 1e451dc

Please sign in to comment.