httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject cvs commit: apache-1.3/src/modules/proxy proxy_cache.c
Date Thu, 05 Sep 2002 19:53:35 GMT
jim         2002/09/05 12:53:35

  Modified:    src/modules/proxy proxy_cache.c
  Log:
  Hmm... We need to also address the fact that the response may have
  no Content-Length at all, but the cached info does (think 304). We
  also need to update the cache file if we update/use the old c-l
  value (the previously stored values are bogus).
  
  Revision  Changes    Path
  1.89      +4 -1      apache-1.3/src/modules/proxy/proxy_cache.c
  
  Index: proxy_cache.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/proxy/proxy_cache.c,v
  retrieving revision 1.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- proxy_cache.c	5 Sep 2002 14:19:19 -0000	1.88
  +++ proxy_cache.c	5 Sep 2002 19:53:35 -0000	1.89
  @@ -1563,13 +1563,16 @@
               /* recall at this point that c->len is already set from resp_hdrs.
                  If Content-Length was NULL, then c->len is -1, otherwise it's
                  set to whatever the value was. */
  -            if (c->len == 0) {
  +            if (c->len == 0 || c->len == -1) {
                   const char *c_clen_str;
                   off_t c_clen;
                   if ( (c_clen_str = ap_table_get(c->hdrs, "Content-Length")) &&
                      ( (c_clen = ap_strtol(c_clen_str, NULL, 10)) > 0) ) {
                           ap_table_set(resp_hdrs, "Content-Length", c_clen_str);
                           c->len = c_clen;
  +                        ap_proxy_sec2hex(c->len, buff + 17 * (6));
  +                        buff[17 * (7) - 1] = '\n';
  +                        buff[17 * (7)] = '\0';
                   }
               }
               if (!ap_proxy_table_replace(c->hdrs, resp_hdrs)) {
  
  
  

Mime
View raw message