From: Michael Wallner Date: Wed, 26 Oct 2005 12:22:46 +0000 (+0000) Subject: - fix parsing messages with an header that contains HTTP/1.x X-Git-Tag: RELEASE_0_17_0~19 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=072a59955470764a517651157dcc94e8ae1d858d - fix parsing messages with an header that contains HTTP/1.x --- diff --git a/http_info_api.c b/http_info_api.c index 6756b2c..dec7664 100644 --- a/http_info_api.c +++ b/http_info_api.c @@ -119,7 +119,7 @@ PHP_HTTP_API STATUS _http_info_parse_ex(const char *pre_header, http_info *info, } /* is request */ - else { + else if (!http[lenof("HTTP/1.x")] || http[lenof("HTTP/1.x")] == '\r' || http[lenof("HTTP/1.x")] == '\n') { const char *url = strchr(pre_header, ' '); info->type = IS_HTTP_REQUEST; @@ -133,6 +133,11 @@ PHP_HTTP_API STATUS _http_info_parse_ex(const char *pre_header, http_info *info, return SUCCESS; } + + /* some darn header containing HTTP/1.x */ + else { + return FAILURE; + } }