1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Update srs_protocol_http_stack.cpp

This commit is contained in:
Yan Naing Tun 2025-03-04 12:49:10 +08:00 committed by GitHub
parent 8b5741882b
commit f6238c2fc3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2861,8 +2861,14 @@ reexecute:
ch = *p;
c = TOKEN(ch);
if (!c)
break;
if (!c) {
// Add this fix to explicitly reject space in header field names
if (ch == ' ') {
SET_ERRNO(HPE_INVALID_HEADER_TOKEN);
goto error;
}
break;
}
switch (parser->header_state) {
case h_general: {