Fix in http_receive_request

This commit is contained in:
2020-12-12 22:02:49 +01:00
parent dcdf91d5bf
commit 81b5a569db
2 changed files with 7 additions and 6 deletions

View File

@ -68,6 +68,7 @@ int client_request_handler(sock *client, int req_num) {
client_keep_alive = hdr_connection != NULL && strncmp(hdr_connection, "keep-alive", 10) == 0;
host = http_get_header_field(&req.hdr, "Host");
if (host == NULL) {
res.status = http_get_status(400);
goto respond;
}