[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 04/04: connection.c: fixed wrong caseless HTTP method co
From: |
gnunet |
Subject: |
[libmicrohttpd] 04/04: connection.c: fixed wrong caseless HTTP method comparison |
Date: |
Sun, 13 Jun 2021 10:55:35 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 0a4537e86c880b08eca49f9ca383a1eb242a88d0
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sat Jun 12 20:46:52 2021 +0300
connection.c: fixed wrong caseless HTTP method comparison
Method strings much much be matched as case-sensitive
---
src/microhttpd/connection.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index ed1ed482..3d98f917 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -1491,9 +1491,7 @@ build_header_response (struct MHD_Connection *connection)
MHD_get_response_header (response,
MHD_HTTP_HEADER_CONTENT_LENGTH)) &&
(may_add_content_length) &&
- ( (NULL == connection->method) ||
- (! MHD_str_equal_caseless_ (connection->method,
- MHD_HTTP_METHOD_CONNECT)) ) )
+ (MHD_HTTP_MTHD_CONNECT != connection->http_mthd) )
{
/*
Here we add a content-length if one is missing; however,
@@ -4326,9 +4324,7 @@ MHD_queue_response (struct MHD_Connection *connection,
/* FIXME: if 'is_pipe' is set, TLS is off, and we have *splice*, we could
use splice()
to avoid two user-space copies... */
- if ( ( (NULL != connection->method) &&
- (MHD_str_equal_caseless_ (connection->method,
- MHD_HTTP_METHOD_HEAD)) ) ||
+ if ( (MHD_HTTP_MTHD_HEAD == connection->http_mthd) ||
(MHD_HTTP_OK > status_code) ||
(MHD_HTTP_NO_CONTENT == status_code) ||
(MHD_HTTP_NOT_MODIFIED == status_code) )
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.