Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

DO NOT REPLY [Bug 14070] New: - reverse proxy cache doesn't cache for documents retrieved with Transfer-encoding: chunked

From: <bugzilla(at)apache.org>
Date: Tue Oct 29 2002 - 16:46:06 EST


DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14070>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14070

reverse proxy cache doesn't cache for documents retrieved with Transfer-encoding: chunked

           Summary: reverse proxy cache doesn't cache for documents
                    retrieved with Transfer-encoding: chunked
           Product: Apache httpd-2.0
           Version: 2.0.42
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: mod_cache
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: bjh@capgroup.com

I have Apache 2.0.42 running on a Windows 2000 machine, configured as a reverse proxy with caching, which proxies requests to a WebLogic 7.0 application server. Here is the configuration:

LoadModule cache_module modules/mod_cache.so LoadModule file_cache_module modules/mod_file_cache.so LoadModule disk_cache_module modules/mod_disk_cache.so LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so ...

<IfModule mod_cache.c>
<IfModule mod_disk_cache.c>

CacheRoot "C:\Program Files\Apache Group\Apache2\proxy" CacheSize 2000
CacheForceCompletion 100
CacheEnable disk /
CacheDefaultExpire 3600
CacheDirLevels 5
CacheDirLength 4
CacheMaxFileSize 1000000
</IfModule>
</IfModule>

<IfModule mod_proxy.c>
ProxyRequests Off
ProxyPass / http://localhost:7001/
ProxyPassReverse / http://localhost:7001/ ProxyPreserveHost On
</IfModule>

When I set Last-Modified and Expires headers from a JSP page, the apache proxy/cache is able to correctly cache the document (document is served from cache instead of the app server until the page expires). However, when pages are larger in size, the application server switches from inline content (with specified Content-Length header) to Transfer-Encoding = chunked (no Content-  header) - when this happens, pages are no longer served from the cache.

Here are what the headers look like (using wfetch.exe utility) when the cache works properly:

Do you need help?X

HTTP/1.1 200 OK\r\n
Date: Tue, 29 Oct 2002 18:47:55 GMT\r\n
Server: WebLogic WebLogic Server 7.0 SP1 Mon Sep 9 22:46:58 PDT 2002 206753\r\n Expires: Tue, 29 Oct 2002 18:47:58 GMT\r\n Cache-control: no-cache="set-cookie"\r\n Set-cookie: JSESSIONID=92Xiyh11NT29ofYs8DpqEIU68JX2OSh4OCttGVE7G4AgxaiVJAO9! 1062744203;path=/\r\n
Last-Modified: Tue, 29 Oct 2002 18:46:58 GMT\r\n Content-Type: text/html; charset=ISO-8859-1\r\n Age: 57047420\r\n
Content-Length: 468\r\n
\r\n

Here is what they look like when the cache doesn't serve from cache:

HTTP/1.1 200 OK\r\n
Date: Tue, 29 Oct 2002 18:48:01 GMT\r\n
Server: WebLogic WebLogic Server 7.0 SP1 Mon Sep 9 22:46:58 PDT 2002 206753\r\n Content-Type: text/html; charset=ISO-8859-1\r\n Expires: Tue, 29 Oct 2002 18:49:05 GMT\r\n Last-Modified: Tue, 29 Oct 2002 18:48:05 GMT\r\n Set-cookie: JSESSIONID=92XlfvInQoNJp0PerCwY31jTjizeDzRA011UvV2RXA4QQDU09fWo! 1062744203;path=/\r\n
Cache-control: no-cache="set-cookie"\r\n Transfer-Encoding: chunked\r\n
\r\n



To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org For additional commands, e-mail: bugs-help@httpd.apache.org Received on Tue Oct 29 21:45:15 2002

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 16:44:01 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library