[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 286/335: Request parsing fixes (copy-paste error)
From: |
gnunet |
Subject: |
[libmicrohttpd] 286/335: Request parsing fixes (copy-paste error) |
Date: |
Sat, 27 Jul 2024 22:03:02 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to tag stf-m2
in repository libmicrohttpd.
commit 405f72526fb6126904b10092226988050d46fb22
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Mon Jul 22 19:09:09 2024 +0200
Request parsing fixes (copy-paste error)
---
src/mhd2/stream_process_request.c | 18 +++++++++---------
src/mhd2/stream_process_request.h | 2 +-
src/mhd2/stream_process_states.c | 2 +-
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/mhd2/stream_process_request.c
b/src/mhd2/stream_process_request.c
index 69be154e..dabef10f 100644
--- a/src/mhd2/stream_process_request.c
+++ b/src/mhd2/stream_process_request.c
@@ -2565,7 +2565,7 @@ handle_req_cookie_no_space (struct MHD_Connection
*restrict c)
MHD_INTERNAL MHD_FN_PAR_NONNULL_ALL_ void
-mhd_stream_parse_connection_headers (struct MHD_Connection *restrict c)
+mhd_stream_parse_request_headers (struct MHD_Connection *restrict c)
{
bool has_host;
bool has_trenc;
@@ -2636,13 +2636,13 @@ mhd_stream_parse_connection_headers (struct
MHD_Connection *restrict c)
size_t num_digits;
uint_fast64_t cntn_size;
- num_digits = mhd_str_to_uint64_n (f->field.nv.name.cstr,
- f->field.nv.name.len,
+ num_digits = mhd_str_to_uint64_n (f->field.nv.value.cstr,
+ f->field.nv.value.len,
&cntn_size);
if (((0 == num_digits) &&
- (0 != f->field.nv.name.len) &&
- ('9' >= f->field.nv.name.cstr[0])
- && ('0' <= f->field.nv.name.cstr[0]))
+ (0 != f->field.nv.value.len) &&
+ ('9' >= f->field.nv.value.cstr[0])
+ && ('0' <= f->field.nv.value.cstr[0]))
|| (MHD_SIZE_UNKNOWN == c->rq.cntn.cntn_size))
{
mhd_LOG_MSG (c->daemon, MHD_SC_CONTENT_LENGTH_TOO_LARGE, \
@@ -2653,7 +2653,7 @@ mhd_stream_parse_connection_headers (struct
MHD_Connection *restrict c)
ERR_RSP_REQUEST_CONTENTLENGTH_TOOLARGE);
return;
}
- else if ((f->field.nv.name.len != num_digits) ||
+ else if ((f->field.nv.value.len != num_digits) ||
(0 == num_digits))
{
mhd_LOG_MSG (c->daemon, MHD_SC_CONTENT_LENGTH_MALFORMED, \
@@ -2708,7 +2708,7 @@ mhd_stream_parse_connection_headers (struct
MHD_Connection *restrict c)
f->field.nv.name.cstr,
f->field.nv.name.len))
{
- if (mhd_str_has_token_caseless (f->field.nv.name.cstr,
+ if (mhd_str_has_token_caseless (f->field.nv.value.cstr, // TODO: compare
as size string
"close",
mhd_SSTR_LEN ("close")))
{
@@ -2718,7 +2718,7 @@ mhd_stream_parse_connection_headers (struct
MHD_Connection *restrict c)
else if ((MHD_HTTP_VERSION_1_0 == c->rq.http_ver)
&& (mhd_CONN_MUST_CLOSE != c->conn_reuse))
{
- if (mhd_str_has_token_caseless (f->field.nv.name.cstr,
+ if (mhd_str_has_token_caseless (f->field.nv.value.cstr, // TODO:
compare as size string
"keep-alive",
mhd_SSTR_LEN ("keep-alive")))
has_keepalive = true;
diff --git a/src/mhd2/stream_process_request.h
b/src/mhd2/stream_process_request.h
index 689ff73f..7e317063 100644
--- a/src/mhd2/stream_process_request.h
+++ b/src/mhd2/stream_process_request.h
@@ -129,7 +129,7 @@ MHD_FN_PAR_NONNULL_ALL_;
* @param c the connection to process
*/
MHD_INTERNAL void
-mhd_stream_parse_connection_headers (struct MHD_Connection *restrict c)
+mhd_stream_parse_request_headers (struct MHD_Connection *restrict c)
MHD_FN_PAR_NONNULL_ALL_;
/**
diff --git a/src/mhd2/stream_process_states.c b/src/mhd2/stream_process_states.c
index 5f82a360..6c9a1566 100644
--- a/src/mhd2/stream_process_states.c
+++ b/src/mhd2/stream_process_states.c
@@ -285,7 +285,7 @@ mhd_conn_process_data (struct MHD_Connection *restrict c)
mhd_assert (MHD_CONNECTION_REQ_HEADERS_RECEIVING == c->state);
break;
case MHD_CONNECTION_HEADERS_RECEIVED:
- mhd_stream_parse_connection_headers (c);
+ mhd_stream_parse_request_headers (c);
mhd_assert (c->state != MHD_CONNECTION_HEADERS_RECEIVED);
continue;
case MHD_CONNECTION_HEADERS_PROCESSED:
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] 257/335: -fix test issues, (continued)
- [libmicrohttpd] 257/335: -fix test issues, gnunet, 2024/07/27
- [libmicrohttpd] 269/335: Test with impossible values combination - replaced, gnunet, 2024/07/27
- [libmicrohttpd] 293/335: Stream close: clear the flag, gnunet, 2024/07/27
- [libmicrohttpd] 290/335: fix test, gnunet, 2024/07/27
- [libmicrohttpd] 294/335: stream_process_request: fixed reporting for ABORT actions, gnunet, 2024/07/27
- [libmicrohttpd] 280/335: fixed assert, gnunet, 2024/07/27
- [libmicrohttpd] 298/335: minimal_example2: minimal improvement, gnunet, 2024/07/27
- [libmicrohttpd] 278/335: epoll_create1(): finally use correct parameter value, gnunet, 2024/07/27
- [libmicrohttpd] 291/335: expand tests, gnunet, 2024/07/27
- [libmicrohttpd] 282/335: Missing parts of moved test, gnunet, 2024/07/27
- [libmicrohttpd] 286/335: Request parsing fixes (copy-paste error),
gnunet <=
- [libmicrohttpd] 295/335: More fixes, gnunet, 2024/07/27
- [libmicrohttpd] 285/335: test_client_server: use realistic timeouts, gnunet, 2024/07/27
- [libmicrohttpd] 288/335: Fixed copy-paste error, gnunet, 2024/07/27
- [libmicrohttpd] 296/335: Pre-init pointers to silent assert., gnunet, 2024/07/27
- [libmicrohttpd] 304/335: Fixed unpredictable behaviour of API function, gnunet, 2024/07/27
- [libmicrohttpd] 306/335: A very trivial fix, gnunet, 2024/07/27
- [libmicrohttpd] 301/335: Fixes, gnunet, 2024/07/27
- [libmicrohttpd] 307/335: sendfile() port, gnunet, 2024/07/27
- [libmicrohttpd] 314/335: fix default, gnunet, 2024/07/27
- [libmicrohttpd] 305/335: test_client_server: enabled all tests except sendfile, gnunet, 2024/07/27