You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2002/11/08 13:14:08 UTC

DO NOT REPLY [Bug 14385] New: - Mod_proxy doesn't deliver files coming from a remote mod_cache proxy

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=14385>.
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=14385

Mod_proxy doesn't deliver files coming from a remote mod_cache proxy

           Summary: Mod_proxy doesn't deliver files coming from a remote
                    mod_cache proxy
           Product: Apache httpd-2.0
           Version: 2.0.43
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: mod_proxy
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: tcastelle@generali.fr


To be really clear, here is our architecture :

         +---------+   +---------+   +---------+
         |mod_proxy|   |mod_proxy|   |         |
CLIENT---|  2.0.43 |---|mod_cache|---|   IIS   |
         |         |   |  2.0.43 |   |         |
         +---------+   +---------+   +---------+  
              A             B             C

With mod_cache disabled on B
---------------------------- 
1) When B requests a file on the IIS Server, IIS specifies in the response the 
Accept-Range: bytes directive and the Content-Length.
2) When B sends the response to A, according to the RFC 2616, it removes the 
Content-Length from header and add a Transfer-Encoding: chunked directive.
3) Then, A delivers the same response to the CLIENT.
4) Everything seems OK in this case.

With mod_cache enabled on B
---------------------------
1) First request, the file is not on the cache. So B requests a file on the IIS 
Server, IIS specifies in the response the Accept-Range: bytes directive and the 
Content-Length.
2) On B, mod_proxy removes the Content-Length header as said before, and pass 
the response to mod_cache.
3) On B, mod_cache doesn't see any Content-Length, so it considers the response 
as a stream (see bug 14364). It caches the response on the disk, and let 
mod_proxy deliver the response, as before.
4) A delivers to the client as received from B.
5) Second request, the file is on the cache. So on B, mod_cache delivers it to 
A with a Transfer-Encoding: chunked directive BUT also add the initial Content-
Length. Why ?
6) When A responds to the CLIENT, it puts the Content-Length value to zero, 
removes the Transfer-Encoding: chunked directive and doesn't deliver the file.
7) If, in the same HTTP/1.1 session, the client ask once more for the file, 
then after a long time (15 seconds !) A delivers a "2-chunks" response, the 
second one containing the response (header+file) received from B.

Network Traces to illustrate
----------------------------
Request:
GET /images/logogfa.gif HTTP/1.1
Host: www.lea.generali.fr

1) Received by B from IIS
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Fri, 08 Nov 2002 11:53:10 GMT
Content-Type: image/gif
Accept-Ranges: bytes
Last-Modified: Thu, 04 Apr 2002 11:53:18 GMT
ETag: "0cb674fcfdbc11:abf"
Content-Length: 2011
...(data)

2-3) Receive by A from B (delivered by mod_proxy because image is not in the 
cache)
HTTP/1.1 200 OK
Date: Fri, 08 Nov 2002 12:00:12 GMT
Server: Microsoft-IIS/5.0
Content-Type: image/gif
Accept-Ranges: bytes
Last-Modified: Thu, 04 Apr 2002 11:53:18 GMT
ETag: "0cb674fcfdbc11:abf"
Transfer-Encoding: chunked
...(data)
  
4) Same response as 2-3) delivered by A to the CLIENT

5) Second request for this file. Received by A from B (delivered by mod_cache 
because it is in the cache)
HTTP/1.1 200 OK
Date: Fri, 08 Nov 2002 12:02:33 GMT
Server: Apache
Accept-Ranges: bytes
ETag: "0cb674fcfdbc11:abf"
Last-Modified: Thu, 04 Apr 2002 11:53:18 GMT
Transfer-Encoding: chunked
Content-Type: image/gif
Age: 147959900
Content-Length: 2011
X-Pad: avoid browser bug
...(data)

6) Received by the CLIENT from A (only header, no data)
HTTP/1.1 200 OK
Date: Fri, 08 Nov 2002 12:04:48 GMT
Server: Apache
Accept-Ranges: bytes
ETag: "0cb674fcfdbc11:abf"
Last-Modified: Thu, 04 Apr 2002 11:53:18 GMT
Content-Type: image/gif
Age: 282918407
X-Pad: avoid browser bug
Content-Length: 0

7) Received by the CLIENT from A, after a new request for the same file in the 
same HTTP/1.1 session than 6). It takes 15 seconds for the response to be 
delivered by A.
HTTP/1.1 200 OK
Date: Fri, 08 Nov 2002 12:08:24 GMT
Server: Apache
Transfer-Encoding: chunked
Content-Type: image/gif

734 (1st chunk size)
...(1st chunk data)
5b4 (2nd chunk size followed by 2nd chunk data)
HTTP/1.1 200 OK
Date: Fri, 08 Nov 2002 12:08:30 GMT
Server: Apache
Accept-Ranges: bytes
ETag: "0cb674fcfdbc11:abf"
Last-Modified: Thu, 04 Apr 2002 11:53:18 GMT
Transfer-Encoding: chunked
Content-Type: image/gif
Age: 498052908
Content-Length: 2011
X-Pad: avoid browser bug
...(data)
0 (last chunk)

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org