#14602: bug in wsgi handler in trunk
-------------------------------------+--------------------------------------
Reporter: wkornewald | Owner: nobody
Status: new | Milestone: 1.3
Component: Core framework | Version: SVN
Resolution: | Keywords:
Stage: Accepted | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-------------------------------------+--------------------------------------
Comment (by wkornewald):
As an alternative, the following patch makes it work on App Engine:
{{{
diff -r d45c568421e5 django/core/handlers/wsgi.py
--- a/django/core/handlers/wsgi.py Tue Nov 02 13:58:12 2010 +0100
+++ b/django/core/handlers/wsgi.py Tue Nov 02 14:57:24 2010 +0100
@@ -134,7 +134,8 @@
self.META['SCRIPT_NAME'] = script_name
self.method = environ['REQUEST_METHOD'].upper()
self._post_parse_error = False
- if isinstance(self.environ['wsgi.input'], socket._fileobject):
+ if type(socket._fileobject) is type and \
+ isinstance(self.environ['wsgi.input'],
socket._fileobject):
# Under development server 'wsgi.input' is an instance of
# socket._fileobject which hangs indefinitely on reading
bytes past
# available count. To prevent this it's wrapped in
LimitedStream
}}}
But this is just a workaround. Is this OK or should I try to fix this a
custom WSGIHandler that has a custom WSGIRequest? Could that result in
incompatibility issues with 3rd-party runserver alternatives? I'm not
really familiar with this part of Django's code.
--
Ticket URL: <http://code.djangoproject.com/ticket/14602#comment:6>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.