Don't assert that requests have a host header

This commit is contained in:
2025-12-18 10:37:28 +01:00
parent 02d8206e9d
commit 7f0c638b62
3 changed files with 7 additions and 4 deletions
+2 -1
View File
@@ -1434,7 +1434,8 @@ int chttp_get_param_i(CHTTP_String body, CHTTP_String str)
bool chttp_match_host(CHTTP_Request *req, CHTTP_String domain, int port)
{
int idx = chttp_find_header(req->headers, req->num_headers, CHTTP_STR("Host"));
assert(idx != -1); // Requests without the host header are always rejected
if (idx < 0)
return false;
char tmp[1<<8];
if (port > -1 && port != 80) {