diff options
author | Stefan Fritsch <sf@sfritsch.de> | 2011-12-27 19:43:04 +0100 |
---|---|---|
committer | Stefan Fritsch <sf@sfritsch.de> | 2011-12-27 19:43:04 +0100 |
commit | 498ea95018b369e62646a98c7d7d5413b56e170c (patch) | |
tree | b7c4798010bbb18d4d2c07f722d7fb0d38efd24c /modules/proxy/mod_proxy_http.c | |
parent | e8bb7adda7f73e53cdab823e9cab2a49ccbdf188 (diff) | |
download | apache2-498ea95018b369e62646a98c7d7d5413b56e170c.tar.gz |
Upstream tarball 2.2.17upstream/2.2.17
Diffstat (limited to 'modules/proxy/mod_proxy_http.c')
-rw-r--r-- | modules/proxy/mod_proxy_http.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index 83d4e23a..e0a8ae11 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -1473,14 +1473,13 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, if (apr_date_checkmask(buffer, "HTTP/#.# ###*")) { int major, minor; - if (2 != sscanf(buffer, "HTTP/%u.%u", &major, &minor)) { - major = 1; - minor = 1; - } + major = buffer[5] - '0'; + minor = buffer[7] - '0'; + /* If not an HTTP/1 message or * if the status line was > 8192 bytes */ - else if ((buffer[5] != '1') || (len >= sizeof(buffer)-1)) { + if ((major != 1) || (len >= sizeof(buffer)-1)) { return ap_proxyerror(r, HTTP_BAD_GATEWAY, apr_pstrcat(p, "Corrupt status line returned by remote " "server: ", buffer, NULL)); |