commit 268f93a9686c899d954c1892ec62aefcaa6fc4a3
parent 4093a912306203b5d99c377c5629e746521b5be8
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 8 Aug 2007 20:12:16 +0000
fixing mantis 1262
Diffstat:
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/README b/README
@@ -17,7 +17,6 @@ connection.c:
- support chunked requests from clients (#1260, ARCH, TEST)
- send proper error code back if client forgot the "Host" header (#1264, TRIV)
- automatically add MHD_HTTP_HEADER_DATE if client "forgot" to add one (#1261, TRIV)
-- automatically drop body from responses to "HEAD" requests (#1262, TRIV)
For POST:
=========
diff --git a/src/daemon/connection.c b/src/daemon/connection.c
@@ -131,6 +131,13 @@ MHD_queue_response(struct MHD_Connection * connection,
MHD_increment_response_rc(response);
connection->response = response;
connection->responseCode = status_code;
+ if ( (connection->method != NULL) &&
+ (0 == strcasecmp(connection->method,
+ MHD_HTTP_METHOD_HEAD)) ) {
+ /* if this is a "HEAD" request, pretend that we
+ have already sent the full message body */
+ connection->messagePos = response->total_size;
+ }
return MHD_YES;
}