httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32254] New: - mod_disk_cache fails to set right filename for proxy requests
Date Mon, 15 Nov 2004 19:51:45 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32254>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32254

           Summary: mod_disk_cache fails to set right filename for proxy
                    requests
           Product: Apache httpd-2.0
           Version: 2.0.52
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_disk_cache
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: e_val@inbox.ru


Symptoms:
When trying to use apache-2.0.52 as http-proxy (with mod_proxy, mod_cache and
mod_disk_cache loaded) one may experience unwanted 404 Not Found errors (or
probably blank pages/garbage data, see Known Issues below) while
reloading/reopening visited pages. Usually, when doing reload, your browser will
attach If-Modified-Since header to the request. In case this error occurs,
server error log will contain lines like these:

[info] [client xx.xx.xx.xx] Module bug? Request filename is missing for URI
http://www.somesite.com/page.html, referer: http://www.someothersite/otherpage.html
[error] [client xx.xx.xx.xx] File does not exist: (null), referer:
http://www.someothersite/otherpage.html

Explanation:
The roots of this error are in open_entity() function from
modules/experimantal/mod_disk_cache.c. This subroutine does not fill
h->cache_obj->info.filename field which is later used to set r->filename value
in modules/experimantal/cache_storage.c:cache_select_url(). This cause
r->filename to fail sanity checks found in
modules/proxy/mod_proxy.c:proxy_map_location() and thus be passed to
server/request.c:ap_directory_walk() which shouldn't happen for the proxy
request. Obviously, ap_directory_walk() also fails and outputs error message.
However, leaving h->cache_obj->info.filename blank seems to be ok for
non-proxied requests.

Solution:
Straightforward. open_entity() should check whether the request is being proxied
and supply h->cache_obj->info.filename for it. The appropriate patch is attached
to the next comment.

Known issues:
The proposed solution (or mod_disk_cache itself) has issues for cached data when
dealing with Content-Encoding: gzip. These two bugs can be related or unrelated
to each other: this requires further investigation.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message