aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/connection.c')
-rw-r--r--src/microhttpd/connection.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index dee41218..eb161ce7 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -115,6 +115,18 @@
115#endif 115#endif
116 116
117/** 117/**
118 * Response text used when the request HTTP chunked encoding is
119 * malformed.
120 */
121#ifdef HAVE_MESSAGES
122#define REQUEST_CONTENTLENGTH_MALFORMED \
123 "<html><head><title>Request malformed</title></head>" \
124 "<body>Your HTTP request has wrong value for <b>Content-Length</b> header.</body></html>"
125#else
126#define REQUEST_CHUNKED_MALFORMED ""
127#endif
128
129/**
118 * Response text used when there is an internal server error. 130 * Response text used when there is an internal server error.
119 * 131 *
120 * Intentionally empty here to keep our memory footprint 132 * Intentionally empty here to keep our memory footprint
@@ -3505,8 +3517,9 @@ parse_connection_headers (struct MHD_Connection *connection)
3505 _ ( 3517 _ (
3506 "Failed to parse `Content-Length' header. Closing connection.\n")); 3518 "Failed to parse `Content-Length' header. Closing connection.\n"));
3507#endif 3519#endif
3508 CONNECTION_CLOSE_ERROR (connection, 3520 transmit_error_response_static (connection,
3509 NULL); 3521 MHD_HTTP_BAD_REQUEST,
3522 REQUEST_CONTENTLENGTH_MALFORMED);
3510 return; 3523 return;
3511 } 3524 }
3512 } 3525 }