httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ch...@apache.org
Subject cvs commit: apache-1.3/src/modules/proxy proxy_http.c
Date Fri, 28 Sep 2001 05:28:59 GMT
chuck       01/09/27 22:28:59

  Modified:    src      CHANGES
               src/modules/proxy proxy_http.c
  Log:
  Honor Pragma: no-cache for HTTP 1.0. The 1.3 proxy rewrite and 2.0 code
  already handles both cases (Pragma: and Cache-Control:)
  PR: 5668
  Submitted by:	Kim Bisgaard <kib@dmi.dk>
  Reviewed by:	Chuck Murcko
  
  Revision  Changes    Path
  1.1715    +3 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1714
  retrieving revision 1.1715
  diff -u -r1.1714 -r1.1715
  --- CHANGES	2001/09/27 18:12:03	1.1714
  +++ CHANGES	2001/09/28 05:28:52	1.1715
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.21
   
  +  *) mod_proxy - fix for Pragma: nocache (HTTP/1.0 only)
  +     [Kim Bisgaard <kib@dmi.dk>] PR #5668
  +
     *) PORT: Some Cygwin changes, esp. improvements for dynamic loading,
        and cleanups. [Stipe Tolj <tolj@wapme-systems.de>]
   
  
  
  
  1.76      +9 -1      apache-1.3/src/modules/proxy/proxy_http.c
  
  Index: proxy_http.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/proxy/proxy_http.c,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- proxy_http.c	2001/09/24 22:35:37	1.75
  +++ proxy_http.c	2001/09/28 05:28:59	1.76
  @@ -171,7 +171,7 @@
   		       const char *proxyhost, int proxyport)
   {
       const char *strp;
  -    char *strp2;
  +    char *strp2, *pragma;
       const char *err, *desthost;
       int i, j, sock, len, backasswards;
       array_header *reqhdrs_arr;
  @@ -472,6 +472,14 @@
   	ap_table_set(resp_hdrs, "Location", proxy_location_reverse_map(r, datestr));
       if ((datestr = ap_table_get(resp_hdrs, "URI")) != NULL)
   	ap_table_set(resp_hdrs, "URI", proxy_location_reverse_map(r, datestr));
  +
  + /* If "Pragma: no-cache" set nocache and make reply un-buffered to
  + /* ensure timely delivery */
  +    if (((pragma = ap_table_get(resp_hdrs, "Pragma")) != NULL &&
  +        ap_proxy_liststr(pragma, "no-cache"))) {
  +        nocache = 1;
  +        r->connection->client->flags &= ~B_WR;
  +    }
   
   /* check if NoCache directive on this host */
       if (nocache == 0) {
  
  
  

Mime
View raw message