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/07 19:31:59 UTC

DO NOT REPLY [Bug 14364] New: - Mod_cache doesn't mod_cache doesn't handle properly Transfer-Encoding: chunked directive

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

Mod_cache doesn't mod_cache doesn't handle properly Transfer-Encoding: chunked directive

           Summary: Mod_cache doesn't mod_cache doesn't handle properly
                    Transfer-Encoding: chunked directive
           Product: Apache httpd-2.0
           Version: 2.0.43
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: Other
         Component: mod_cache
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: jlrenard@generali.fr


We are using an Apache 2.0.43 in reverse proxy mode on a linux redhat 7.2 
server with mod_cache and mod_disk_cache enabled.

A problem appears when we are requesting files on a server where an Accept-
Range: bytes parameter is present in the response because mod_proxy replace the 
Content-Lenght directive by a Transfer-Encoding: chunked directive and 
mod_cache doesn't handle it properly.

Here is a trace of our requests :

=> Sent from client
GET /images/ima10.gif HTTP/1.1
Host: www.bk.generali.fr

=> Response from the IIS Server
HTTP/1.1 200 OK
Server: Microsoft-IIS/4.0
Date: Thu, 07 Nov 2002 17:27:36 GMT
Content-Type: image/gif
Accept-Ranges: bytes
Last-Modified: Tue, 29 Jan 2002 18:43:37 GMT
ETag: "aac7b4dcf4a8c11:e15"
Content-Length: 1388

=>Response sent by mod_proxy with mod_cache disabled 
=>(Content-Length diretive have been replaced with transfer-Encoding: chuncked 
directive)
HTTP/1.1 200 OK
Date: Thu, 07 Nov 2002 17:24:21 GMT
Server: Microsoft-IIS/4.0
Content-Type: image/gif
Accept-Ranges: bytes
Last-Modified: Tue, 29 Jan 2002 18:43:37 GMT
ETag: "aac7b4dcf4a8c11:e15"
Transfer-Encoding: chunked

=>Response sent by mod_proxy with mod_cache enable
HTTP/1.1 200 OK
Date: Thu, 07 Nov 2002 17:38:53 GMT
Server: Microsoft-IIS/4.0
Content-Type: image/gif
Accept-Ranges: bytes
Last-Modified: Tue, 29 Jan 2002 18:43:37 GMT
ETag: "aac7b4dcf4a8c11:e15"
Transfer-Encoding: chunked

=>extract for errorlog file for this request : 
=> mod_cache consider this file as a stream, because content-length directive
=> has been removed by mod_proxy
=> mod_cache DOES NOT HANDLE PROPERLY Transfer-Encoding: chunked DIRECTIVE. 
[Thu Nov 07 18:39:27 2002] [debug] mod_cache.c(118): cache: 
URL /images/ima10.gif is being handled by disk
[Thu Nov 07 18:39:27 2002] [debug] mod_cache.c(202): cache: no cache - add 
cache_in filter and DECLINE
[Thu Nov 07 18:39:27 2002] [debug] proxy_http.c(109): proxy: HTTP: 
canonicalising URL //www.bk.generali.fr/images/ima10.gif
[Thu Nov 07 18:39:27 2002] [debug] mod_proxy.c(442): Trying to run 
scheme_handler against proxy
[Thu Nov 07 18:39:27 2002] [debug] proxy_http.c(1061): proxy: HTTP: serving URL 
http://www.bk.generali.fr/images/ima10.gif
[Thu Nov 07 18:39:27 2002] [debug] proxy_http.c(221): proxy: HTTP connecting 
http://www.bk.generali.fr/images/ima10.gif to www.bk.generali.fr:80
[Thu Nov 07 18:39:27 2002] [debug] proxy_util.c(1167): proxy: HTTP: fam 2 
socket created to connect to 10.6.11.14
[Thu Nov 07 18:39:27 2002] [debug] proxy_http.c(370): proxy: socket is connected
[Thu Nov 07 18:39:27 2002] [debug] proxy_http.c(404): proxy: connection 
complete to 10.6.11.14:8880 (10.6.11.14)
[Thu Nov 07 18:39:27 2002] [debug] proxy_http.c(902): proxy: start body send
[Thu Nov 07 18:39:27 2002] [debug] mod_cache.c(436): cache: running CACHE_IN 
filter
[Thu Nov 07 18:39:27 2002] [debug] mod_cache.c(650): cache: not caching 
streamed response for /images/ima10.gif because length > CacheMaxStreamingBuffer
[Thu Nov 07 18:39:27 2002] [debug] proxy_http.c(961): proxy: end body send

=>Response sent by mod_proxy with mod_cache enable and CacheMaxStreamingBuffer 
=>directive set to 65536 in httpd.conf
=>File is now put in the cache, but no cache is possible for file greater
=>than 64Kbytes
HTTP/1.1 200 OK
Date: Thu, 07 Nov 2002 17:59:55 GMT
Server: Microsoft-IIS/4.0
Content-Type: image/gif
Accept-Ranges: bytes
Last-Modified: Tue, 29 Jan 2002 18:43:37 GMT
ETag: "aac7b4dcf4a8c11:e15"
Transfer-Encoding: chunked

=>extract for errorlog file for this request : 
=>This file is now put in cache.
[Thu Nov 07 18:59:55 2002] [debug] mod_cache.c(118): cache: 
URL /images/ima10.gif is being handled by disk
[Thu Nov 07 18:59:55 2002] [debug] mod_cache.c(202): cache: no cache - add 
cache_in filter and DECLINE
[Thu Nov 07 18:59:55 2002] [debug] proxy_http.c(109): proxy: HTTP: 
canonicalising URL //www.bk.generali.fr/images/ima10.gif
[Thu Nov 07 18:59:55 2002] [debug] mod_proxy.c(442): Trying to run 
scheme_handler against proxy
[Thu Nov 07 18:59:55 2002] [debug] proxy_http.c(1061): proxy: HTTP: serving URL 
http://www.bk.generali.fr/images/ima10.gif
[Thu Nov 07 18:59:55 2002] [debug] proxy_http.c(221): proxy: HTTP connecting 
http://www.bk.generali.fr/images/ima10.gif to www.bk.generali.fr:80
[Thu Nov 07 18:59:55 2002] [debug] proxy_util.c(1167): proxy: HTTP: fam 2 
socket created to connect to 10.6.11.14
[Thu Nov 07 18:59:55 2002] [debug] proxy_http.c(370): proxy: socket is connected
[Thu Nov 07 18:59:55 2002] [debug] proxy_http.c(404): proxy: connection 
complete to 10.6.11.14:8880 (10.6.11.14)
[Thu Nov 07 18:59:55 2002] [debug] proxy_http.c(902): proxy: start body send
[Thu Nov 07 18:59:55 2002] [debug] mod_cache.c(436): cache: running CACHE_IN 
filter
[Thu Nov 07 18:59:55 2002] [debug] mod_cache.c(715): cache: Response length 
still unknown, setting aside content for url: /images/ima10.gif
[Thu Nov 07 18:59:55 2002] [debug] mod_cache.c(436): cache: running CACHE_IN 
filter
[Thu Nov 07 18:59:55 2002] [info] disk_cache: Caching URL 
front.www.bk.generali.fr/images/ima10.gif?
[Thu Nov 07 18:59:55 2002] [debug] mod_cache.c(786): cache: Caching 
url: /images/ima10.gif
[Thu Nov 07 18:59:55 2002] [debug] mod_cache.c(819): cache: Added date header
[Thu Nov 07 18:59:55 2002] [info] disk_cache: Caching headers for URL 
front.www.bk.generali.fr/images/ima10.gif?
[Thu Nov 07 18:59:55 2002] [info] disk_cache: Cached body for URL 
front.www.bk.generali.fr/images/ima10.gif?
[Thu Nov 07 18:59:55 2002] [debug] proxy_http.c(961): proxy: end body send

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