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.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 89955e84..704d6bcf 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -90,6 +90,19 @@
90#endif 90#endif
91 91
92/** 92/**
93 * Response text used when the request has unsupported "Transfer-Enconding:".
94 */
95#ifdef HAVE_MESSAGES
96#define REQUEST_UNSUPPORTED_TR_ENCODING \
97 "<html>" \
98 "<head><title>Unsupported Transfer-Encoding</title></head>" \
99 "<body>The Transfer-Encoding used in request is not supported.</body>" \
100 "</html>"
101#else
102#define REQUEST_UNSUPPORTED_TR_ENCODING ""
103#endif
104
105/**
93 * Response text used when the request (http header) is 106 * Response text used when the request (http header) is
94 * malformed. 107 * malformed.
95 * 108 *
@@ -3975,10 +3988,16 @@ parse_connection_headers (struct MHD_Connection *connection)
3975 &enc, 3988 &enc,
3976 NULL)) 3989 NULL))
3977 { 3990 {
3991 if (! MHD_str_equal_caseless_ (enc,
3992 "chunked"))
3993 {
3994 transmit_error_response_static (connection,
3995 MHD_HTTP_BAD_REQUEST,
3996 REQUEST_UNSUPPORTED_TR_ENCODING);
3997 return;
3998 }
3999 connection->rq.have_chunked_upload = true;
3978 connection->rq.remaining_upload_size = MHD_SIZE_UNKNOWN; 4000 connection->rq.remaining_upload_size = MHD_SIZE_UNKNOWN;
3979 if (MHD_str_equal_caseless_ (enc,
3980 "chunked"))
3981 connection->rq.have_chunked_upload = true;
3982 } 4001 }
3983 else 4002 else
3984 { 4003 {