Received: (qmail 46274 invoked by uid 501); 29 Jun 2001 21:09:34 -0000 Message-Id: <20010629210934.46268.qmail@apache.org> Date: 29 Jun 2001 21:09:34 -0000 From: Chris D.Peterson Reply-To: cpeterson@aventail.com To: submit@bugz.apache.org Subject: A blank page will occasionally show up when using mod-proxy. X-Send-Pr-Version: 3.110 >Number: 7958 >Category: mod_proxy >Synopsis: A blank page will occasionally show up when using mod-proxy. >Confidential: no >Severity: serious >Priority: medium >Responsible: apache >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Fri Jun 29 14:10:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: cpeterson@aventail.com >Release: 1.3.20 >Organization: apache >Environment: 2 ~>uname -a SunOS *** 5.8 Generic_108528-06 sun4u sparc SUNW,Ultra-60 This should not be OS dependant, should occur everwhere. >Description: module/proxy can deliver a blank page under the following circumstance: The version in our disk cache has expired, but an If-Modified-Since request returns HTTP_NOT_MODIFIED. The proxy server then sends the client a response that has the headers received from the server we are proxing, but the body from the disk cache. Since these headers have a Content-Length of 0, a blank page is displayed in most web browsers. The problem is caused by the response headers being put into the cache record too early. This causes ap_proxy_cache_update() to return the response headers instead of the headers read from the cache file. (see proxy_cache.c, Line 1041) >How-To-Repeat: We were getting this pretty consistently when proxying for a web page served up by IIS-5. It may just be that that server is more likely to return HTTP_NOT_MODIFIED. You'll want to set your cache lifetime to a small value as this only happens when cache_check() returns DECLINED but has an expired entry in its cache. It may depended on the calling browser sending an If-modified-since header. >Fix: Take the following line of code in proxy_http.c, line 454: c->hdrs = resp_hdrs; And move it after the call to ap_proxy_cache_update(). This seems to fix the problem. >Release-Note: >Audit-Trail: >Unformatted: [In order for any reply to be added to the PR database, you need] [to include 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! ]