commit 37c1aa3fcf1df820ad105c4f80da4f96913d2367
parent 22941cd1b63afa6db6f6b71028f2a30be8fb1b5c
Author: Christian Grothoff <christian@grothoff.org>
Date: Thu, 8 Aug 2013 05:24:57 +0000
-handle method being NULL
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
@@ -547,7 +547,8 @@ add_extra_headers (struct MHD_Connection *connection)
/* if not present, add content length */
if ( (NULL == MHD_get_response_header (connection->response,
MHD_HTTP_HEADER_CONTENT_LENGTH)) &&
- ( (0 != strcasecmp (connection->method,
+ ( (NULL == connection->method) ||
+ (0 != strcasecmp (connection->method,
MHD_HTTP_METHOD_CONNECT)) ||
(0 != connection->response->total_size) ) )
{