Skip to content
Open
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
15 changes: 11 additions & 4 deletions addons/web/nx_web_http_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
/* Some portions generated by Claude Code (Opus 5). */


/**************************************************************************/
Expand Down Expand Up @@ -4208,8 +4209,11 @@ UINT temp_realm_length = 0;
"NetX HTTP Content Length",
sizeof("NetX HTTP Content Length") - 1, NX_NULL, 0);

/* Release the previous data packet. */
nx_packet_release(data_packet_ptr);
/* Release first chunked packet. */
if (server_ptr -> nx_web_http_server_request_chunked)
{
nx_packet_release(packet_ptr);
}

status = NX_UNDERFLOW;
goto put_process_end;
Expand Down Expand Up @@ -4262,8 +4266,11 @@ UINT temp_realm_length = 0;
"NetX HTTP Content Length",
sizeof("NetX HTTP Content Length") - 1, NX_NULL, 0);

/* Release the previous data packet. */
nx_packet_release(data_packet_ptr);
/* Release first chunked packet. */
if (server_ptr -> nx_web_http_server_request_chunked)
{
nx_packet_release(packet_ptr);
}

status = NX_UNDERFLOW;
goto put_process_end;
Expand Down
1 change: 1 addition & 0 deletions test/cmake/web/regression/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ set(web_test_cases
${SOURCE_DIR}/web_test/netx_web_head_basic_test.c
${SOURCE_DIR}/web_test/netx_web_post_basic_test.c
${SOURCE_DIR}/web_test/netx_web_put_basic_test.c
${SOURCE_DIR}/web_test/netx_web_put_content_length_underflow_test.c
${SOURCE_DIR}/web_test/netx_web_delete_basic_test.c
${SOURCE_DIR}/web_test/netx_web_basic_authenticate_test.c
${SOURCE_DIR}/web_test/netx_web_if_modified_since_test.c
Expand Down
2 changes: 2 additions & 0 deletions test/regression/web_test/netx_https_testcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ void netx_https_api_test(void*);
void netx_web_basic_test_application_define(void *);
void netx_web_basic_ecc_test_application_define(void *);
void netx_web_put_basic_test_application_define(void *);
void netx_web_put_content_length_underflow_test_application_define(void *);
void netx_web_post_basic_test_application_define(void *);
void netx_web_delete_basic_test_application_define(void *);
void netx_web_head_basic_test_application_define(void *);
Expand Down Expand Up @@ -142,6 +143,7 @@ TEST_ENTRY test_control_tests[] =
{netx_web_response_in_multiple_packets_test_application_define, TEST_TIMEOUT_LOW},
{netx_web_connect_three_times_test_application_define, TEST_TIMEOUT_LOW},
{netx_web_put_basic_test_application_define, TEST_TIMEOUT_LOW},
{netx_web_put_content_length_underflow_test_application_define, TEST_TIMEOUT_LOW},
{netx_web_post_basic_test_application_define, TEST_TIMEOUT_LOW},
{netx_web_head_basic_test_application_define, TEST_TIMEOUT_LOW},
{netx_web_delete_basic_test_application_define, TEST_TIMEOUT_LOW},
Expand Down
Loading