httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject cvs commit: httpd-2.0/modules/proxy proxy_http.c
Date Fri, 31 May 2002 21:21:10 GMT
ianh        2002/05/31 14:21:10

  Modified:    modules/proxy proxy_http.c
  Log:
  add 2 new enviornment variables to deal with misbehaving backends
  "proxy-nokeepalive" which removes the Connection: line completely
  "force-proxy-request-1.0" which forces the request to be HTTP/1.0
  this allows apache to reverse proxy misbehaving appservers
  
  Revision  Changes    Path
  1.152     +9 -1      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.151
  retrieving revision 1.152
  diff -u -r1.151 -r1.152
  --- proxy_http.c	30 May 2002 07:33:59 -0000	1.151
  +++ proxy_http.c	31 May 2002 21:21:10 -0000	1.152
  @@ -449,7 +449,15 @@
           origin->keepalive = 0;
       }
   
  -    buf = apr_pstrcat(p, r->method, " ", url, " HTTP/1.1" CRLF, NULL);
  +    if ( apr_table_get(r->subprocess_env,"force-proxy-request-1.0")) {
  +        buf = apr_pstrcat(p, r->method, " ", url, " HTTP/1.0" CRLF, NULL);
  +    } else {
  +        buf = apr_pstrcat(p, r->method, " ", url, " HTTP/1.1" CRLF, NULL);
  +    }
  +    if ( apr_table_get(r->subprocess_env,"proxy-nokeepalive")) {
  +        apr_table_unset(r->headers_in, "Connection");
  +        origin->keepalive = 0;
  +    }
       ap_xlate_proto_to_ascii(buf, strlen(buf));
       e = apr_bucket_pool_create(buf, strlen(buf), p, c->bucket_alloc);
       APR_BRIGADE_INSERT_TAIL(bb, e);
  
  
  

Mime
View raw message