aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/connection.c')
-rw-r--r--src/microhttpd/connection.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 44f075a3..9039cecd 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -4189,24 +4189,28 @@ parse_cookie_header (struct MHD_Connection *connection)
4189#endif /* HAVE_MESSAGES */ 4189#endif /* HAVE_MESSAGES */
4190 break; 4190 break;
4191 case MHD_PARSE_COOKIE_MALFORMED: 4191 case MHD_PARSE_COOKIE_MALFORMED:
4192#ifdef HAVE_MESSAGES
4193 if (saved_tail != connection->rq.headers_received_tail) 4192 if (saved_tail != connection->rq.headers_received_tail)
4194 { 4193 {
4195 if (allow_partially_correct_cookie) 4194 if (! allow_partially_correct_cookie)
4196 MHD_DLOG (connection->daemon,
4197 _ ("The Cookie header has been only partially parsed as it "
4198 "contains malformed data.\n"));
4199 else
4200 { 4195 {
4201 /* Remove extracted values from partially broken cookie */ 4196 /* Remove extracted values from partially broken cookie */
4202 /* Memory remains allocated until the end of the request processing */ 4197 /* Memory remains allocated until the end of the request processing */
4203 connection->rq.headers_received_tail = saved_tail; 4198 connection->rq.headers_received_tail = saved_tail;
4204 saved_tail->next = NULL; 4199 saved_tail->next = NULL;
4200#ifdef HAVE_MESSAGES
4205 MHD_DLOG (connection->daemon, 4201 MHD_DLOG (connection->daemon,
4206 _ ("The Cookie header has been ignored as it contains " 4202 _ ("The Cookie header has been ignored as it contains "
4207 "malformed data.\n")); 4203 "malformed data.\n"));
4204#endif /* HAVE_MESSAGES */
4208 } 4205 }
4206#ifdef HAVE_MESSAGES
4207 else
4208 MHD_DLOG (connection->daemon,
4209 _ ("The Cookie header has been only partially parsed as it "
4210 "contains malformed data.\n"));
4211#endif /* HAVE_MESSAGES */
4209 } 4212 }
4213#ifdef HAVE_MESSAGES
4210 else 4214 else
4211 MHD_DLOG (connection->daemon, 4215 MHD_DLOG (connection->daemon,
4212 _ ("The Cookie header has malformed data.\n")); 4216 _ ("The Cookie header has malformed data.\n"));