]> granicus.if.org Git - apache/commitdiff
Use ap_getline() in favor of ap_proxy_string_read() in ap_proxy_http_process_response().
authorBill Stoddard <stoddard@apache.org>
Thu, 3 Jan 2002 20:38:04 +0000 (20:38 +0000)
committerBill Stoddard <stoddard@apache.org>
Thu, 3 Jan 2002 20:38:04 +0000 (20:38 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92723 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/proxy_http.c

index 81fd0a510a2979e7013ae89b4c8f9f6f397040f4..7e729c544e9feab16eb3fe90c275394c8f67ca51 100644 (file)
@@ -640,8 +640,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
     char buffer[HUGE_STRING_LEN];
     request_rec *rp;
     apr_bucket *e;
-    apr_status_t rv;
-    int eos, len, backasswards;
+    int len, backasswards;
     int received_continue = 1; /* flag to indicate if we should
                                 * loop over response parsing logic
                                 * in the case that the origin told us
@@ -657,16 +656,16 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
     while (received_continue) {
         apr_brigade_cleanup(bb);
 
-        if (APR_SUCCESS != (rv = ap_proxy_string_read(origin, bb, buffer, sizeof(buffer), &eos))) {
+        len = ap_getline(buffer, sizeof(buffer), rp, 0);
+        if (len <= 0) {
             apr_socket_close(p_conn->sock);
             backend->connection = NULL;
-            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+            ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
                           "proxy: error reading status line from remote "
                           "server %s", p_conn->name);
             return ap_proxyerror(r, HTTP_BAD_GATEWAY,
                                  "Error reading from remote server");
         }
-        len = strlen(buffer);
 
        /* Is it an HTTP/1 response?
         * This is buggy if we ever see an HTTP/1.10