Author: mtredinnick
Date: 2008-08-25 21:42:39 -0500 (Mon, 25 Aug 2008)
New Revision: 8569

Modified:
   django/trunk/django/core/handlers/wsgi.py
Log:
Fixed #8490 -- Worked around a bug in flup 1.0.1 when working out the correct
path_info setting in the WSGI handler. Thanks, Mike Richardson.


Modified: django/trunk/django/core/handlers/wsgi.py
===================================================================
--- django/trunk/django/core/handlers/wsgi.py   2008-08-26 01:59:25 UTC (rev 
8568)
+++ django/trunk/django/core/handlers/wsgi.py   2008-08-26 02:42:39 UTC (rev 
8569)
@@ -76,11 +76,14 @@
     def __init__(self, environ):
         script_name = base.get_script_name(environ)
         path_info = force_unicode(environ.get('PATH_INFO', u'/'))
-        if not path_info:
+        if not path_info or path_info == script_name:
             # Sometimes PATH_INFO exists, but is empty (e.g. accessing
             # the SCRIPT_NAME URL without a trailing slash). We really need to
             # operate as if they'd requested '/'. Not amazingly nice to force
             # the path like this, but should be harmless.
+            #
+            # (The comparison of path_info to script_name is to work around an
+            # apparent bug in flup 1.0.1. Se Django ticket #8490).
             path_info = u'/'
         self.environ = environ
         self.path_info = path_info


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to