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
This commit is contained in:
parent
fcb053a77c
commit
b95f7b9ffb
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user