diff options
author | Michael Adam <obnox@samba.org> | 2009-09-20 22:24:18 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2009-09-20 22:24:18 +0200 |
commit | b95f7b9ffb8bca8a2b9b7a2654602d2207299a1c (patch) | |
tree | c0585d995ce7c4d2fbb3a0a645bf30119cd92c49 /src | |
parent | fcb053a77cc892ebe92be8f7baff60f358189368 (diff) |
Print a http error when the client headers could not be retrieved.
A ususal case here is that the headers were buggy, e.g. a line
without a ":" to separate the header field name from the value.
Previous behaviour was to silently return a blank page.
Michael
Diffstat (limited to 'src')
-rw-r--r-- | src/reqs.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1597,6 +1597,11 @@ void handle_connection (int fd) if (get_all_headers (connptr->client_fd, hashofheaders) < 0) { log_message (LOG_WARNING, "Could not retrieve all the headers from the client"); + indicate_http_error (connptr, 400, "Bad Request", + "detail", + "Could not retrieve all the headers from " + "the client.", NULL); + send_http_error_message (connptr); hashmap_delete (hashofheaders); update_stats (STAT_BADCONN); destroy_conn (connptr); |