From b1548c7c6dc2198a4df20b11ce8eb72e766f56b7 Mon Sep 17 00:00:00 2001 From: lijia Date: Tue, 25 Jun 2024 17:09:07 +0800 Subject: upgrade llhttp to v9.2.1, not support whitespace before header name. --- src/http_decoder.cpp | 16 ++++++++-------- test/http_pcap/http_whitespace_before_header.pcap | Bin 0 -> 1539 bytes vendor/CMakeLists.txt | 6 +++--- vendor/llhttp-release-v9.1.3.tar.gz | Bin 37771 -> 0 bytes vendor/llhttp-release-v9.2.1.tar.gz | Bin 0 -> 37786 bytes 5 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 test/http_pcap/http_whitespace_before_header.pcap delete mode 100644 vendor/llhttp-release-v9.1.3.tar.gz create mode 100644 vendor/llhttp-release-v9.2.1.tar.gz diff --git a/src/http_decoder.cpp b/src/http_decoder.cpp index 9b861d9..cc7671b 100644 --- a/src/http_decoder.cpp +++ b/src/http_decoder.cpp @@ -796,14 +796,14 @@ static const struct http_topic_exdata_compose g_topic_exdata_compose[HTTPD_TOPIC goto failed; } - printf("http decoder init succ, plugin id:%d \n", httpd_env->plugin_id); - for(int i = 0; i < HTTPD_TOPIC_INDEX_MAX; i++){ - printf("\ttopic_name:%s, topic_id:%d, ex_data_name:%s, exdata_id:%d\n", - httpd_env->topic_exdata_compose[i].topic_name, - httpd_env->topic_exdata_compose[i].sub_topic_id, - httpd_env->topic_exdata_compose[i].exdata_name, - httpd_env->topic_exdata_compose[i].exdata_id); - } + // printf("http decoder init succ, plugin id:%d \n", httpd_env->plugin_id); + // for(int i = 0; i < HTTPD_TOPIC_INDEX_MAX; i++){ + // printf("\ttopic_name:%s, topic_id:%d, ex_data_name:%s, exdata_id:%d\n", + // httpd_env->topic_exdata_compose[i].topic_name, + // httpd_env->topic_exdata_compose[i].sub_topic_id, + // httpd_env->topic_exdata_compose[i].exdata_name, + // httpd_env->topic_exdata_compose[i].exdata_id); + // } return httpd_env; failed: diff --git a/test/http_pcap/http_whitespace_before_header.pcap b/test/http_pcap/http_whitespace_before_header.pcap new file mode 100644 index 0000000..8317361 Binary files /dev/null and b/test/http_pcap/http_whitespace_before_header.pcap differ diff --git a/vendor/CMakeLists.txt b/vendor/CMakeLists.txt index 2020e8c..5a3c568 100644 --- a/vendor/CMakeLists.txt +++ b/vendor/CMakeLists.txt @@ -24,9 +24,9 @@ set_property(TARGET gmock PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/ #llhttp-9.1.3 ExternalProject_Add(llhttp PREFIX llhttp - URL ${CMAKE_CURRENT_SOURCE_DIR}/llhttp-release-v9.1.3.tar.gz - URL_MD5 f15cd242f55a38b30d3031b560d2c8ef - CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${VENDOR_BUILD} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_C_FLAGS="-fPIC") + URL ${CMAKE_CURRENT_SOURCE_DIR}/llhttp-release-v9.2.1.tar.gz + URL_MD5 355ecc90e622035e3e1693a96a0c233b + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${VENDOR_BUILD} -DBUILD_STATIC_LIBS=ON -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_C_FLAGS="-fPIC") file(MAKE_DIRECTORY ${VENDOR_BUILD}/include) diff --git a/vendor/llhttp-release-v9.1.3.tar.gz b/vendor/llhttp-release-v9.1.3.tar.gz deleted file mode 100644 index c83dbd0..0000000 Binary files a/vendor/llhttp-release-v9.1.3.tar.gz and /dev/null differ diff --git a/vendor/llhttp-release-v9.2.1.tar.gz b/vendor/llhttp-release-v9.2.1.tar.gz new file mode 100644 index 0000000..b11dd34 Binary files /dev/null and b/vendor/llhttp-release-v9.2.1.tar.gz differ -- cgit v1.2.3