Skip to content

Commit

Permalink
Fixed the problem with the trailing backslash in Session on Win32
Browse files Browse the repository at this point in the history
This is a quick fix - still need to investigate how the slash
gets there.
  • Loading branch information
grisha committed Jan 19, 2004
1 parent 450b236 commit 0d2e832
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/python/mod_python/Session.py
Expand Up @@ -54,7 +54,7 @@
#
# Originally developed by Gregory Trubetskoy.
#
# $Id: Session.py,v 1.10 2004/01/14 03:20:02 grisha Exp $
# $Id: Session.py,v 1.11 2004/01/19 18:53:01 grisha Exp $

import apache, Cookie
import _apache
Expand Down Expand Up @@ -197,6 +197,12 @@ def make_cookie(self):
# the path where *Handler directive was specified
dirpath = self._req.hlist.directory
c.path = dirpath[len(docroot):]

# XXX Not sure why, but on Win32 hlist.directory
# may contain a trailing \ - need to investigate,
# this value is given to us directly by httpd
if os.name == 'nt' and c.path[-1] == '\\':
c.path = c.path[:-1]

return c

Expand Down

0 comments on commit 0d2e832

Please sign in to comment.