www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris D.Peterson <cpeter...@aventail.com>
Subject mod_proxy/7958: A blank page will occasionally show up when using mod-proxy.
Date Fri, 29 Jun 2001 21:09:34 GMT

>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
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Fri Jun 29 14:10:01 PDT 2001
>Originator:     cpeterson@aventail.com
>Release:        1.3.20
2 ~>uname -a
SunOS *** 5.8 Generic_108528-06 sun4u sparc SUNW,Ultra-60

This should not be OS dependant, should occur everwhere.
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)
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

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.
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.
 [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