From 4ca479fc01aaf8e206e1896c35e49f5a37f83fd0 Mon Sep 17 00:00:00 2001 From: Richard Aas Date: Fri, 30 May 2014 08:26:51 +0000 Subject: [PATCH] http: handle no space before reasonphrase --- src/http/msg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/http/msg.c b/src/http/msg.c index c860281..ef462c9 100644 --- a/src/http/msg.c +++ b/src/http/msg.c @@ -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;