Django

Code

Ticket #1516: patch.txt

File patch.txt, 0.7 kB (added by darrint, 3 years ago)

patch to expose mod_python SCRIPT_NAME through request.META

Line 
1 Index: django/core/handlers/modpython.py
2 ===================================================================
3 --- django/core/handlers/modpython.py   (revision 6211)
4 +++ django/core/handlers/modpython.py   (working copy)
5 @@ -102,7 +102,7 @@
6                  'REMOTE_IDENT':      self._req.connection.remote_logname,
7                  'REMOTE_USER':       self._req.user,
8                  'REQUEST_METHOD':    self._req.method,
9 -                'SCRIPT_NAME':       None, # Not supported
10 +                'SCRIPT_NAME':       self._req.subprocess_env['SCRIPT_NAME'],
11                  'SERVER_NAME':       self._req.server.server_hostname,
12                  'SERVER_PORT':       self._req.server.port,
13                  'SERVER_PROTOCOL':   self._req.protocol,