Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.1]Support llhttp #5594

Merged
merged 7 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ file(GLOB_RECURSE SRC_LIST FOLLOW_SYMLINKS src/*.c src/*.cc
thirdparty/hiredis/net.c
thirdparty/hiredis/read.c
thirdparty/hiredis/sds.c
thirdparty/swoole_http_parser.c
thirdparty/llhttp/api.c
thirdparty/llhttp/http.c
thirdparty/llhttp/llhttp.c
thirdparty/multipart_parser.c
)
file(GLOB_RECURSE HEAD_FILES FOLLOW_SYMLINKS include/*.h)
Expand All @@ -66,7 +68,7 @@ add_definitions(-DHAVE_CONFIG_H)
# test
#add_definitions(-DSW_USE_THREAD_CONTEXT)

include_directories(BEFORE ./include ./include/wrapper ext-src/ thirdparty/ ./)
include_directories(BEFORE ./include ./include/wrapper ext-src/ thirdparty/ thirdparty/llhttp ./)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)

# find OpenSSL
Expand Down
6 changes: 5 additions & 1 deletion config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,9 @@ EOF
thirdparty/php/standard/proc_open.cc"

swoole_source_file="$swoole_source_file \
thirdparty/swoole_http_parser.c \
thirdparty/llhttp/api.c \
thirdparty/llhttp/http.c \
thirdparty/llhttp/llhttp.c \
thirdparty/multipart_parser.c"

if test "$PHP_NGHTTP2_DIR" = "no"; then
Expand Down Expand Up @@ -1300,6 +1302,7 @@ EOF
include/*.h \
stubs/*.h \
thirdparty/*.h \
thirdparty/llhttp/*.h \
thirdparty/nghttp2/*.h])

PHP_REQUIRE_CXX()
Expand Down Expand Up @@ -1333,6 +1336,7 @@ EOF
PHP_ADD_BUILD_DIR($ext_builddir/thirdparty/php/standard)
PHP_ADD_BUILD_DIR($ext_builddir/thirdparty/php/curl)
PHP_ADD_BUILD_DIR($ext_builddir/thirdparty/php84/curl)
PHP_ADD_BUILD_DIR($ext_builddir/thirdparty/llhttp)
if test "$PHP_NGHTTP2_DIR" = "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/thirdparty/nghttp2)
fi
Expand Down
4 changes: 2 additions & 2 deletions core-tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ project(core_tests)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -g")

file(GLOB_RECURSE SOURCE_FILES FOLLOW_SYMLINKS src/*.cpp deps/llhttp/src/*.c)
file(GLOB_RECURSE SOURCE_FILES FOLLOW_SYMLINKS src/*.cpp ../thirdparty/llhttp/*.c)

add_definitions(-DHAVE_CONFIG_H)

set(core_tests_includes ./include/ ../thirdparty ../thirdparty/hiredis ./deps/llhttp/include /usr/local/include)
set(core_tests_includes ./include/ ../thirdparty ../thirdparty/hiredis ../thirdparty/llhttp /usr/local/include)
set(core_tests_libraries)
set(core_tests_link_directories /usr/local/lib)

Expand Down
Loading
Loading