Fix unknown method handling, lock on logging (#1224)

This commit is contained in:
giedriuslt
2024-05-11 10:09:23 +03:00
committed by GitHub
parent ce4714d530
commit 9e32046068
2 changed files with 5 additions and 0 deletions

View File

@ -604,6 +604,7 @@ int HTTP_ProcessPacket(http_request_t* request) {
ADDLOGF_ERROR("You gave request with NULL input");
return 0;
}
request->method = -1;
recvbuf = request->received;
for (i = 0; i < sizeof(methodNames) / sizeof(*methodNames); i++) {
if (http_startsWith(recvbuf, methodNames[i])) {