Skip to content

Commit 5e34540

Browse files
ShogunPandaRafaelGSS
authored andcommitted
http: do not allow OBS fold in headers by default
PR-URL: nodejs-private/node-private#557 Refs: nodejs-private/node-private#556 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> CVE-ID: CVE-2024-27982
1 parent bd8f10a commit 5e34540

File tree

6 files changed

+1030
-601
lines changed

6 files changed

+1030
-601
lines changed

deps/llhttp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.5.1)
22
cmake_policy(SET CMP0069 NEW)
33

4-
project(llhttp VERSION 8.1.1)
4+
project(llhttp VERSION 8.1.2)
55
include(GNUInstallDirs)
66

77
set(CMAKE_C_STANDARD 99)

deps/llhttp/README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,17 +345,34 @@ make
345345

346346
### Using with CMake
347347

348-
If you want to use this library in a CMake project you can use the snippet below.
348+
If you want to use this library in a CMake project as a shared library, you can use the snippet below.
349349

350350
```
351351
FetchContent_Declare(llhttp
352-
URL "https://github.com/nodejs/llhttp/archive/refs/tags/v6.0.5.tar.gz") # Using version 6.0.5
352+
URL "https://github.com/nodejs/llhttp/archive/refs/tags/release/v8.1.0.tar.gz")
353353
354354
FetchContent_MakeAvailable(llhttp)
355355
356-
target_link_libraries(${EXAMPLE_PROJECT_NAME} ${PROJECT_LIBRARIES} llhttp ${PROJECT_NAME})
356+
# Link with the llhttp_shared target
357+
target_link_libraries(${EXAMPLE_PROJECT_NAME} ${PROJECT_LIBRARIES} llhttp_shared ${PROJECT_NAME})
357358
```
358359

360+
If you want to use this library in a CMake project as a static library, you can set some cache variables first.
361+
362+
```
363+
FetchContent_Declare(llhttp
364+
URL "https://github.com/nodejs/llhttp/archive/refs/tags/release/v8.1.0.tar.gz")
365+
366+
set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "")
367+
set(BUILD_STATIC_LIBS ON CACHE INTERNAL "")
368+
FetchContent_MakeAvailable(llhttp)
369+
370+
# Link with the llhttp_static target
371+
target_link_libraries(${EXAMPLE_PROJECT_NAME} ${PROJECT_LIBRARIES} llhttp_static ${PROJECT_NAME})
372+
```
373+
374+
_Note that using the git repo directly (e.g., via a git repo url and tag) will not work with FetchContent_Declare because [CMakeLists.txt](./CMakeLists.txt) requires string replacements (e.g., `_RELEASE_`) before it will build._
375+
359376
## Building on Windows
360377

361378
### Installation

deps/llhttp/include/llhttp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#define LLHTTP_VERSION_MAJOR 8
55
#define LLHTTP_VERSION_MINOR 1
6-
#define LLHTTP_VERSION_PATCH 1
6+
#define LLHTTP_VERSION_PATCH 2
77

88
#ifndef LLHTTP_STRICT_MODE
99
# define LLHTTP_STRICT_MODE 0

0 commit comments

Comments
 (0)