[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] branch master updated: Fixed header size calculation.
From: |
gnunet |
Subject: |
[libmicrohttpd] branch master updated: Fixed header size calculation. |
Date: |
Sat, 05 Jun 2021 21:16:45 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
The following commit(s) were added to refs/heads/master by this push:
new 6123b2ab Fixed header size calculation.
6123b2ab is described below
commit 6123b2ab2b9c658612df3279567dc709d8eb3220
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sat Jun 5 21:18:55 2021 +0300
Fixed header size calculation.
Previous calculation was incorrect, header size was always
negative (overflow) number.
New calculation takes into account full header size, including
the last empty line with linefeeds.
---
src/microhttpd/connection.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index b240e14a..3102b24f 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -3550,7 +3550,8 @@ MHD_connection_handle_idle (struct MHD_Connection
*connection)
if (0 == line[0])
{
connection->state = MHD_CONNECTION_HEADERS_RECEIVED;
- connection->header_size = (size_t) (line - connection->read_buffer);
+ connection->header_size = (size_t) (connection->read_buffer
+ - connection->method);
continue;
}
if (MHD_NO == process_header_line (connection,
@@ -3586,7 +3587,8 @@ MHD_connection_handle_idle (struct MHD_Connection
*connection)
if (0 == line[0])
{
connection->state = MHD_CONNECTION_HEADERS_RECEIVED;
- connection->header_size = (size_t) (line - connection->read_buffer);
+ connection->header_size = (size_t) (connection->read_buffer
+ - connection->method);
continue;
}
continue;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libmicrohttpd] branch master updated: Fixed header size calculation.,
gnunet <=