aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2007-08-08 20:12:16 +0000
committerChristian Grothoff <christian@grothoff.org>2007-08-08 20:12:16 +0000
commit268f93a9686c899d954c1892ec62aefcaa6fc4a3 (patch)
treeba42aa9ed372ba6eba047ab261997806049cdf52
parent4093a912306203b5d99c377c5629e746521b5be8 (diff)
downloadlibmicrohttpd-268f93a9686c899d954c1892ec62aefcaa6fc4a3.tar.gz
libmicrohttpd-268f93a9686c899d954c1892ec62aefcaa6fc4a3.zip
fixing mantis 1262
-rw-r--r--README1
-rw-r--r--src/daemon/connection.c7
2 files changed, 7 insertions, 1 deletions
diff --git a/README b/README
index 2d80f840..78a85961 100644
--- a/README
+++ b/README
@@ -17,7 +17,6 @@ connection.c:
17- support chunked requests from clients (#1260, ARCH, TEST) 17- support chunked requests from clients (#1260, ARCH, TEST)
18- send proper error code back if client forgot the "Host" header (#1264, TRIV) 18- send proper error code back if client forgot the "Host" header (#1264, TRIV)
19- automatically add MHD_HTTP_HEADER_DATE if client "forgot" to add one (#1261, TRIV) 19- automatically add MHD_HTTP_HEADER_DATE if client "forgot" to add one (#1261, TRIV)
20- automatically drop body from responses to "HEAD" requests (#1262, TRIV)
21 20
22For POST: 21For POST:
23========= 22=========
diff --git a/src/daemon/connection.c b/src/daemon/connection.c
index ec261963..5139ae0c 100644
--- a/src/daemon/connection.c
+++ b/src/daemon/connection.c
@@ -131,6 +131,13 @@ MHD_queue_response(struct MHD_Connection * connection,
131 MHD_increment_response_rc(response); 131 MHD_increment_response_rc(response);
132 connection->response = response; 132 connection->response = response;
133 connection->responseCode = status_code; 133 connection->responseCode = status_code;
134 if ( (connection->method != NULL) &&
135 (0 == strcasecmp(connection->method,
136 MHD_HTTP_METHOD_HEAD)) ) {
137 /* if this is a "HEAD" request, pretend that we
138 have already sent the full message body */
139 connection->messagePos = response->total_size;
140 }
134 return MHD_YES; 141 return MHD_YES;
135} 142}
136 143