mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
Disallowed successful responses for CONNECT requests
MHD currently does not support CONNECT pass-through. However, support could be added relatively easily. Contact MHD maintainers if you need CONNECT support.
This commit is contained in:
@@ -5264,6 +5264,17 @@ MHD_queue_response (struct MHD_Connection *connection,
|
||||
return MHD_NO;
|
||||
}
|
||||
}
|
||||
if ( (MHD_HTTP_MTHD_CONNECT == connection->http_mthd) &&
|
||||
(2 == status_code / 100) )
|
||||
{
|
||||
#ifdef HAVE_MESSAGES
|
||||
MHD_DLOG (daemon,
|
||||
_ ("Successful (%u) response code cannot be used to answer " \
|
||||
"\"CONNECT\" request!\n"),
|
||||
(status_code));
|
||||
#endif
|
||||
return MHD_NO;
|
||||
}
|
||||
|
||||
#ifdef HAVE_MESSAGES
|
||||
if ( (0 != (MHD_RF_INSANITY_HEADER_CONTENT_LENGTH & response->flags)) &&
|
||||
|
||||
Reference in New Issue
Block a user