diff options
author | Brian Pane <brianp@apache.org> | 2002-09-14 06:51:55 +0200 |
---|---|---|
committer | Brian Pane <brianp@apache.org> | 2002-09-14 06:51:55 +0200 |
commit | 0ffc50f03ba3c4027062691ab8ce84e16e9a0b35 (patch) | |
tree | 959d0d9b59f0b5e268824217d0db2c4d81b6a397 /modules/experimental/mod_disk_cache.c | |
parent | 1. Eliminate perror(), it's not portable. (diff) | |
download | apache2-0ffc50f03ba3c4027062691ab8ce84e16e9a0b35.tar.xz apache2-0ffc50f03ba3c4027062691ab8ce84e16e9a0b35.zip |
Remove the setting of the status line from the cache in mod_disk_cache,
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
Diffstat (limited to 'modules/experimental/mod_disk_cache.c')
-rw-r--r-- | modules/experimental/mod_disk_cache.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/modules/experimental/mod_disk_cache.c b/modules/experimental/mod_disk_cache.c index 5b0a4eeeb0..f028f45f51 100644 --- a/modules/experimental/mod_disk_cache.c +++ b/modules/experimental/mod_disk_cache.c @@ -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); /* |