From: Ian Holsman Date: Thu, 22 Aug 2002 15:02:49 +0000 (+0000) Subject: Add A warning when servers don't set their status line X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f3b375da3a9d45404fade9354ca9d91b7a8985b9;p=apache Add A warning when servers don't set their status line PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96484 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index fe40235005..aa1e08dd7a 100644 --- a/modules/proxy/proxy_http.c +++ b/modules/proxy/proxy_http.c @@ -737,11 +737,18 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, backasswards = 0; keepchar = buffer[12]; + if (keepchar == '\0') { + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, + r->server, "proxy: bad HTTP/%d.%d status line " + "returned by %s (%s)", major, minor, r->uri, + r->method); + } buffer[12] = '\0'; r->status = atoi(&buffer[9]); buffer[12] = keepchar; r->status_line = apr_pstrdup(p, &buffer[9]); + /* read the headers. */ /* N.B. for HTTP/1.0 clients, we have to fold line-wrapped headers*/