[mod_python] Re: Strange HTTP Response

Iwasso 80s iwasso80s at gmail.com
Mon Oct 3 17:10:52 EDT 2005


I think we finally resolved the problem -- sort of.

We were using the util.redirect.  However, the problem went away after
replacing it with these two lines:

req.headers_out['Location'] = newPath
return apache.HTTP_TEMPORARY_REDIRECT

The primary difference between, the two methods is that util.redirect
uses a 302 and HTTP_TEMPORARY_REDIRECT returns a 307 response code.

The only problem is that IE on Mac doesn't seem to like 307 response
codes.  We're sticking with this for the time being.  However, does
anyone have any thoughts on what's causing this?  302 shouldn't be
causing these kinds of problems, no?

If you want to see the problem/solution first hand, here's the URL: 
http://www.iwasso80s.com/

If anyone has any thoughts, we'd really appreciate it.


On 9/28/05, Iwasso 80s <iwasso80s at gmail.com> wrote:
> We've been having a very strange problem with some variants of IE (on
> Windows 98, Server 2003) and Safari (OS X 10.3).  If you aggressively
> click around our site one of two things will often happen: the body of
> the page will return "0" as the entire result set of the request; or
> it will return "0" followed by what appears to be the header data (see
> attached gif).  All other requests will return quickly and without
> errors.
>
> Some interesting data points:
>
> If we reduce the keep-alive settings on Apache it seems to get worse
> (meaning more likely to respond with a "0").  However, if we increase
> the keep-alive setting to say around 15 seconds and aggressively click
> around the site, the Apache server will become unresponsive.  I'm
> assuming all the procs are getting used up before the keep-alive on
> available procs has expired (although, that behavior seems fishy as
> well).  Throughout all of these tests the cpu, io, etc is only
> marginally taxed and no errors are reported in the error log.  We set
> up a super simple testing page, with no db, etc and the problem still
> persists.
> Our config:
>
> Debian Etch (fully updated)
>  Apache 2.0.54
>  Python 2.3
>  Mod_python 3.1
>  Clearsilver .9 (but we aren't using cgi functionality)
>
> We'd really appreciate any help we could get.
>
> Thanks in advance for your patience and consideration.
>
>
>



More information about the Mod_python mailing list