httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@apache.org
Subject cvs commit: httpd-2.0/modules/proxy proxy_http.c
Date Thu, 03 Jan 2002 20:38:04 GMT
stoddard    02/01/03 12:38:04

  Modified:    modules/proxy proxy_http.c
  Log:
  Use ap_getline() in favor of ap_proxy_string_read() in ap_proxy_http_process_response().
  
  Revision  Changes    Path
  1.118     +4 -5      httpd-2.0/modules/proxy/proxy_http.c
  
  Index: proxy_http.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_http.c,v
  retrieving revision 1.117
  retrieving revision 1.118
  diff -u -r1.117 -r1.118
  --- proxy_http.c	31 Dec 2001 21:03:12 -0000	1.117
  +++ proxy_http.c	3 Jan 2002 20:38:04 -0000	1.118
  @@ -640,8 +640,7 @@
       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 @@
       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
  
  
  

Mime
View raw message