From 7670bd7daab6470176f95dfeb4edf1107700a604 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 8 Aug 2013 05:54:01 +0000 Subject: [PATCH] -fix check for early queuing of response --- src/microhttpd/connection.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index 6529e53b..c16ee571 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c @@ -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