httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@hyperreal.org
Subject cvs commit: apache-1.3/src/modules/proxy mod_proxy.c
Date Tue, 21 Jul 1998 15:39:44 GMT
martin      98/07/21 08:39:44

  Modified:    .        STATUS
               src      CHANGES
               src/modules/proxy mod_proxy.c
  Log:
  Added Max-Forwards: trace support to the proxy
  
  Revision  Changes    Path
  1.446     +3 -1      apache-1.3/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.445
  retrieving revision 1.446
  diff -u -u -r1.445 -r1.446
  --- STATUS	1998/07/20 23:38:34	1.445
  +++ STATUS	1998/07/21 15:39:39	1.446
  @@ -269,6 +269,8 @@
   
    In progress:
   
  +    * Martin's busy adding Via: support to the proby
  +
       * Ben's ASP work... All agree it sounds cool.
   
       * DDA's adding a tray application to the Windoze version for ease of
  @@ -433,7 +435,7 @@
           2) Expect
           3) byte range error handling
           4) update the Accept-Encoding parser to allow q-values
  -        5) would be nice if the proxy used Via and Max-Forwards, even as
  +        5) would be nice if the proxy used Via, even as
   	   HTTP/1.0
   
       * #ifdef __EMX__ --> #ifdef OS2.
  
  
  
  1.975     +4 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.974
  retrieving revision 1.975
  diff -u -u -r1.974 -r1.975
  --- CHANGES	1998/07/21 10:20:24	1.974
  +++ CHANGES	1998/07/21 15:39:40	1.975
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3.2
   
  +  *) Add support for the Max-Forwards: header line required by RFC2068 for
  +     the TRACE method. This allows apache to TRACE along a chain of proxies
  +     up to a predetermined depth. [Martin Kraemer]
  +
     *) Fix SHARED_CORE rule: The CFLAGS_SHLIB variable is no longer doubled
        (compilers complained) and the .so.V.R.P filename extension was adjusted
        to correctly reflect the 1.3.2 version.
  
  
  
  1.56      +17 -0     apache-1.3/src/modules/proxy/mod_proxy.c
  
  Index: mod_proxy.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/proxy/mod_proxy.c,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -u -r1.55 -r1.56
  --- mod_proxy.c	1998/07/09 19:45:55	1.55
  +++ mod_proxy.c	1998/07/21 15:39:42	1.56
  @@ -290,9 +290,26 @@
       int i, rc;
       struct cache_req *cr;
       int direct_connect = 0;
  +    const char *maxfwd_str;
   
       if (!r->proxyreq || strncmp(r->filename, "proxy:", 6) != 0)
   	return DECLINED;
  +
  +    if (r->method_number == M_TRACE &&
  +	(maxfwd_str = ap_table_get(r->headers_in, "Max-Forwards")) != NULL) {
  +	int maxfwd = strtol(maxfwd_str, NULL, 10);
  +	if (maxfwd < 1) {
  +	    int access_status;
  +	    r->proxyreq = 0;
  +	    if ((access_status = ap_send_http_trace(r)))
  +		ap_die(access_status, r);
  +	    else
  +		ap_finalize_request_protocol(r);
  +	    return OK;
  +	}
  +	ap_table_setn(r->headers_in, "Max-Forwards", 
  +		      ap_psprintf(r->pool, "%d", (maxfwd > 0) ? maxfwd-1 : 0));
  +    }
   
       if ((rc = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR)))
   	return rc;
  
  
  

Mime
View raw message