www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joachim Marder <mar...@pobox.com>
Subject mod_proxy/4768: Proxy doesn't cache files containing Windows like returns (CR+LF)
Date Mon, 26 Jul 1999 11:50:11 GMT

>Number:         4768
>Category:       mod_proxy
>Synopsis:       Proxy doesn't cache files containing Windows like returns (CR+LF)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Jul 26 06:10:00 PDT 1999
>Originator:     marder@pobox.com
>Release:        1.3.4
Linux balvenie 2.2.1 #2 SMP Fri Feb 12 14:43:14 CET 1999 i686 unknown
I recently saw that mod_proxy didn't cache certain (static) HTML files.
After further investigation, I found out that mod_proxy throws them away
because the bytes sent and the bytes written to disk were different.
(cache_req.written and cache_req.len differ in ap_proxy_cache_tidy)
I then accessed Apache directly on his port, did a proxy request,
saved the result to disk and compared to the temporary file which
mod_proxy creates in the proxy folder. The only difference I found 
was that the temporary cache file contained Windows like returns
(CR+LF, which show up in emacs as ^M), but the file which Apache
returned didn't contain these returns. 

So if the Apache API filters these ^M out, but mod_proxy saves
them to the cache, them the bytes sent and the bytes written to disk
must necessarily differ, so that ap_proxy_cache_tidy will throw away
the cache file.
Create a HTML file e.g. with NotePad, put it in the document space 
of a web server, access it via Apaches mod_proxy and perform an
rgrep search in the /$APACHEROOT$/proxy folder for the URL of the file.
The file should not be present in the cache.

[In order for any reply to be added to the PR database, you need]
[to include <apbugs@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or      ]
["Re: general/1098:").  If the subject doesn't match this       ]
[pattern, your message will be misfiled and ignored.  The       ]
["apbugs" address is not added to the Cc line of messages from  ]
[the database automatically because of the potential for mail   ]
[loops.  If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request from a  ]
[developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]

View raw message