]> granicus.if.org Git - apache/commitdiff
Remove the setting of the status line from the cache in mod_disk_cache,
authorBrian Pane <brianp@apache.org>
Sat, 14 Sep 2002 04:51:55 +0000 (04:51 +0000)
committerBrian Pane <brianp@apache.org>
Sat, 14 Sep 2002 04:51:55 +0000 (04:51 +0000)
because this was causing 200s to be sent on responses that were really
304s
Submitted by: Kris Verbeeck <Kris.Verbeeck@ubizen.com>
Reviewed by:   Brian Pane

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96803 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/experimental/mod_disk_cache.c

diff --git a/CHANGES b/CHANGES
index 15d07aede8a8922068048fa175fbf43293b79853..22344d10a40c8ccf4f621483d133768e0cd0a205 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+Changes with Apache 2.0.42
+
+  *) Fixed mod_disk_cache's generation of 304s
+     [Kris Verbeeck <Kris.Verbeeck@ubizen.com>]
+
 Changes with Apache 2.0.41
 
   *) Add support for using fnmatch patterns in the final path
index 5b0a4eeeb04c384a425f07a0403de556e3d82555..f028f45f518cf0f5f17c35e4c829f0b4e6321c9b 100644 (file)
@@ -484,17 +484,15 @@ static apr_status_t read_headers(cache_handle_t *h, request_rec *r)
 
     r->status = atoi(urlbuff);                           /* Save status line into request rec  */
 
-    rv = apr_file_gets(&urlbuff[0], urllen, dobj->hfd);               /* Read status line */
+    /* Read and ignore the status line (This request might result in a
+     * 304, so we don't necessarily want to retransmit a 200 from the cache.)
+     */
+    rv = apr_file_gets(&urlbuff[0], urllen, dobj->hfd);
     if (rv != APR_SUCCESS) {
         /* XXX log message */
        return rv;
     }
 
-    if ((temp = strchr(&urlbuff[0], '\n')) != NULL)       /* trim off new line character */
-       *temp = '\0';              /* overlay it with the null terminator */
-
-    r->status_line = apr_pstrdup(r->pool, urlbuff);            /* Save status line into request rec  */
-
     h->req_hdrs = apr_table_make(r->pool, 20);
     
     /*