The connection was reset

31 views
Skip to first unread message

msoulier

unread,
May 5, 2008, 2:01:09 PM5/5/08
to Django users
Hi,

I'm currently playing with my Django web interface on a windows XP box
with Python 2.5, Django 0.96. Sometimes when I send a redirect in view
code, Firefox says, "The connection was reset while the page was
loading."

Seems like an issue with the built-in web server.

Sample code:

elif request.method == 'POST':
log.debug("in a POST request")
request.session['error'] = "Operations not yet implemented"
log.debug("sending a redirect")
return HttpResponseRedirect(baseurl + 'clients/')

Has anyone else seen this?

Thanks,
Mike

msoulier

unread,
May 5, 2008, 3:37:02 PM5/5/08
to Django users
On May 5, 2:01 pm, msoulier <msoul...@gmail.com> wrote:
> Seems like an issue with the built-in web server.

In fact, if I modify handlers/wsgi.py, and print the request object
before it gets to get_response(), suddenly it's fine.

try:
request = WSGIRequest(environ)
print "DEBUG:", request
response = self.get_response(request)

So it sounds like something going into get_response was perhaps not
initialized?

Mike
Reply all
Reply to author
Forward
0 new messages