-fix check for early queuing of response

This commit is contained in:
Christian Grothoff
2013-08-08 05:54:01 +00:00
parent 37c1aa3fcf
commit 7670bd7daa
+5 -1
View File
@@ -2681,7 +2681,11 @@ MHD_queue_response (struct MHD_Connection *connection,
have already sent the full message body */
connection->response_write_position = response->total_size;
}
if (MHD_CONNECTION_HEADERS_PROCESSED == connection->state)
if ( (MHD_CONNECTION_HEADERS_PROCESSED == connection->state) &&
( (0 == strcasecmp (connection->method,
MHD_HTTP_METHOD_POST)) ||
(0 == strcasecmp (connection->method,
MHD_HTTP_METHOD_PUT))) )
{
/* response was queued "early",
refuse to read body / footers or further