http: handle no space before reasonphrase
This commit is contained in:
parent
3fae3e3be7
commit
4ca479fc01
1 changed files with 2 additions and 2 deletions
|
@ -174,8 +174,8 @@ int http_msg_decode(struct http_msg **msgp, struct mbuf *mb, bool req)
|
|||
}
|
||||
}
|
||||
else {
|
||||
if (re_regex(s.p, s.l, "HTTP/[0-9.]+ [0-9]+ [^]*",
|
||||
&msg->ver, &scode, &msg->reason) ||
|
||||
if (re_regex(s.p, s.l, "HTTP/[0-9.]+ [0-9]+[ ]*[^]*",
|
||||
&msg->ver, &scode, NULL, &msg->reason) ||
|
||||
msg->ver.p != s.p + 5) {
|
||||
err = EBADMSG;
|
||||
goto out;
|
||||
|
|
Loading…
Add table
Reference in a new issue