aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-08-08 05:54:01 +0000
committerChristian Grothoff <christian@grothoff.org>2013-08-08 05:54:01 +0000
commit7670bd7daab6470176f95dfeb4edf1107700a604 (patch)
tree02b02970d367063c320bbb397cab9123149ffbd9
parent37c1aa3fcf1df820ad105c4f80da4f96913d2367 (diff)
downloadlibmicrohttpd-7670bd7daab6470176f95dfeb4edf1107700a604.tar.gz
libmicrohttpd-7670bd7daab6470176f95dfeb4edf1107700a604.zip
-fix check for early queuing of response
-rw-r--r--src/microhttpd/connection.c6
1 files changed, 5 insertions, 1 deletions
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,
2681 have already sent the full message body */ 2681 have already sent the full message body */
2682 connection->response_write_position = response->total_size; 2682 connection->response_write_position = response->total_size;
2683 } 2683 }
2684 if (MHD_CONNECTION_HEADERS_PROCESSED == connection->state) 2684 if ( (MHD_CONNECTION_HEADERS_PROCESSED == connection->state) &&
2685 ( (0 == strcasecmp (connection->method,
2686 MHD_HTTP_METHOD_POST)) ||
2687 (0 == strcasecmp (connection->method,
2688 MHD_HTTP_METHOD_PUT))) )
2685 { 2689 {
2686 /* response was queued "early", 2690 /* response was queued "early",
2687 refuse to read body / footers or further 2691 refuse to read body / footers or further