X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=http_info_api.c;h=dec76648b09613262cf01a3202cdb537e7c559c0;hb=92f5e5a5df0bff3d8076c1f5ed73590b40849501;hp=6756b2c544e5fe52d92e3cb7d7e2612cffd2b3d6;hpb=e83a7438dc70ed96630887246a1d3aefcf155b1c;p=m6w6%2Fext-http 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; + } }