]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* proxy_http.c (ap_proxy_http_process_response): Send a valid
authorJoe Orton <jorton@apache.org>
Wed, 22 Oct 2003 16:09:58 +0000 (16:09 +0000)
committerJoe Orton <jorton@apache.org>
Wed, 22 Oct 2003 16:09:58 +0000 (16:09 +0000)
status-line even if the parsed status-line had no trailing spaces.
Remove the warning for this case as triggers for valid status-lines
too.

PR: 23998

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101516 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/proxy_http.c

index a3250865c03d693fb8dec312c24eb467c865b5c4..355094055db26c169dce53625ea79c5669c37978 100644 (file)
@@ -851,16 +851,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;
+            if (keepchar != '\0') {
+                buffer[12] = keepchar;
+            } else {
+                /* 2616 requires the space in Status-Line; the origin
+                 * server may have sent one but ap_rgetline_core will
+                 * have stripped it. */
+                buffer[12] = ' ';
+                buffer[13] = '\0';
+            }
             r->status_line = apr_pstrdup(p, &buffer[9]);