summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/web_server/web_server.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/web_server/web_server.c b/source4/web_server/web_server.c
index 50a01db3d4..80e479d8a7 100644
--- a/source4/web_server/web_server.c
+++ b/source4/web_server/web_server.c
@@ -103,7 +103,10 @@ static void websrv_recv(struct stream_connection *conn, uint16_t flags)
a blank line) and any post data, as indicated by the
content_length */
if (web->input.end_of_headers &&
- web->input.partial.length == web->input.content_length) {
+ web->input.partial.length >= web->input.content_length) {
+ if (web->input.partial.length > web->input.content_length) {
+ web->input.partial.data[web->input.content_length] = 0;
+ }
EVENT_FD_NOT_READABLE(web->conn->event.fde);
http_process_input(web);
}