summaryrefslogtreecommitdiffstats
path: root/modules/proxy
diff options
context:
space:
mode:
authorBill Stoddard <stoddard@apache.org>2002-01-03 21:38:04 +0100
committerBill Stoddard <stoddard@apache.org>2002-01-03 21:38:04 +0100
commitdd4b6e71aa4644f52beec234964885cf41343af1 (patch)
treedc4f8a3eda1b5b953c353a9be7ed3e94d077ae4a /modules/proxy
parentFix seg fault in HTTP_IN when trying to handle the LimitRequestBody (diff)
downloadapache2-dd4b6e71aa4644f52beec234964885cf41343af1.tar.xz
apache2-dd4b6e71aa4644f52beec234964885cf41343af1.zip
Use ap_getline() in favor of ap_proxy_string_read() in ap_proxy_http_process_response().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92723 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/proxy')
-rw-r--r--modules/proxy/proxy_http.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c
index 81fd0a510a..7e729c544e 100644
--- a/modules/proxy/proxy_http.c
+++ b/modules/proxy/proxy_http.c
@@ -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