diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-08-08 05:24:57 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-08-08 05:24:57 +0000 |
commit | 37c1aa3fcf1df820ad105c4f80da4f96913d2367 (patch) | |
tree | 0c591cbe257bdcfbefc771664b2cef9e2c07525f | |
parent | 22941cd1b63afa6db6f6b71028f2a30be8fb1b5c (diff) | |
download | libmicrohttpd-37c1aa3fcf1df820ad105c4f80da4f96913d2367.tar.gz libmicrohttpd-37c1aa3fcf1df820ad105c4f80da4f96913d2367.zip |
-handle method being NULL
-rw-r--r-- | src/microhttpd/connection.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index e198b6cd..6529e53b 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -547,7 +547,8 @@ add_extra_headers (struct MHD_Connection *connection) | |||
547 | /* if not present, add content length */ | 547 | /* if not present, add content length */ |
548 | if ( (NULL == MHD_get_response_header (connection->response, | 548 | if ( (NULL == MHD_get_response_header (connection->response, |
549 | MHD_HTTP_HEADER_CONTENT_LENGTH)) && | 549 | MHD_HTTP_HEADER_CONTENT_LENGTH)) && |
550 | ( (0 != strcasecmp (connection->method, | 550 | ( (NULL == connection->method) || |
551 | (0 != strcasecmp (connection->method, | ||
551 | MHD_HTTP_METHOD_CONNECT)) || | 552 | MHD_HTTP_METHOD_CONNECT)) || |
552 | (0 != connection->response->total_size) ) ) | 553 | (0 != connection->response->total_size) ) ) |
553 | { | 554 | { |