
bugzilla at apache
Jul 4, 2008, 5:16 AM
Post #1 of 1
(151 views)
Permalink
|
|
[Bug 45341] New: Apache reverse-proxy returns 304 on non-conditional GET request
|
|
https://issues.apache.org/bugzilla/show_bug.cgi?id=45341 Summary: Apache reverse-proxy returns 304 on non-conditional GET request Product: Apache httpd-2 Version: 2.2.3 Platform: PC OS/Version: Linux Status: NEW Keywords: RFC Severity: normal Priority: P2 Component: mod_cache AssignedTo: bugs[at]httpd.apache.org ReportedBy: JKirschner[at]firma.seznam.cz I'm running apache 2.2.3 as a caching reverse proxy (proxy.aa) to another server (server.aa). The problem appears when sending requests without If-Modified-Since present - the response shouldn't be 304. First, I send a request: telnet proxy.aa 8312 GET http://server.aa/request HTTP/1.1 Host: server.aa the proxy forwards to the server: GET /request HTTP/1.1 Host: server.aa Max-Forwards: 10 X-Forwarded-For: a.a.a.a X-Forwarded-Host: server.aa X-Forwarded-Server: proxy.aa Connection: Keep-Alive and receives (still everything OK): HTTP/1.1 200 OK Date: Fri, 04 Jul 2008 08:50:15 GMT Expires: Fri, 04 Jul 2008 08:52:25 GMT Last-Modified: Fri, 04 Jul 2008 08:43:47 GMT Cache-Control: max-age=130 Server: Server/2.3.1-1 (Unix, VB) Allow: GET,HEAD Accept-Ranges: none Content-Type: image/jpeg; charset=utf-8 Content-Length: 3102 Connection: close ..... THE CONTENT .... So the situation is: the proxy cached this request with max age 130s (2:10) and for every following 'request' doesn't forward and uses the cached result for 2 minutes. but than I send another request: telnet proxy.aa 8312 GET http://server.aa/creative?bannerId=618167&seqNo=4&set=sec HTTP/1.1 Host: server.aa and proxy.aa forwards to server.aa: GET /request HTTP/1.1 Host: server.aa If-Modified-Since: Fri, 04 Jul 2008 08:43:47 GMT Max-Forwards: 10 X-Forwarded-For: 10.0.2.236 X-Forwarded-Host: server.aa X-Forwarded-Server: proxy.aa Connection: Keep-Alive the server returns 304, because the content is still the same: HTTP/1.1 304 Not modified Date: Fri, 04 Jul 2008 08:52:25 GMT Server: Server/2.3.1-1 (Unix, VB) Allow: GET,HEAD Accept-Ranges: none Connection: close and I receive: HTTP/1.1 304 Not modified Date: Fri, 04 Jul 2008 08:52:37 GMT Server: Server/2.3.1-1 (Unix, VB) Which is, I think, an error - from the client point of view. Client sends a non-conditional request and receives 304 - not modified. How is this possible? The only idea, I've got is, that it is caused by missing Expires: or Cache-Control: max-age= in response from server.aa. But still, a 304 response on request without If-Modified-Since command. The proxy (incomplete) configuration: Listen 8312 LoadModule authz_default_module /usr/lib/apache2/modules/mod_authz_default.so LoadModule authz_host_module /usr/lib/apache2/modules/mod_authz_host.so LoadModule cache_module /usr/lib/apache2/modules/mod_cache.so LoadModule disk_cache_module /usr/lib/apache2/modules/mod_disk_cache.so LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so LoadModule mime_magic_module /usr/lib/apache2/modules/mod_mime_magic.so LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so LoadModule proxy_connect_module /usr/lib/apache2/modules/mod_proxy_connect.so LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so LoadModule setenvif_module /usr/lib/apache2/modules/mod_setenvif.so LoadModule forwardedfor_module /usr/lib/apache2/modules/mod_forwardedfor.so UseCanonicalName Off CacheRoot /home/xxxxxxxx CacheEnable disk /creative CacheDirLevels 5 CacheDirLength 3 CacheDefaultExpire 3600 ProxyTimeout 1 NameVirtualHost *:8312 <VirtualHost *:8312> ProxyPass / http://server.aa:80/ </VirtualHost> -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: bugs-unsubscribe[at]httpd.apache.org For additional commands, e-mail: bugs-help[at]httpd.apache.org
|