Commit fbb61c20 authored by Martijn Pieters's avatar Martijn Pieters

Added 'WEBDAV_SOURCE_PORT' environment var to requests coming through the

WebDAV source port; now objects like the CookieCrumbler can adjust their
behaviour when being accessed through the WebDAV port.
parent afb0beb0
......@@ -102,6 +102,11 @@ class WebDAVSrcHandler( zhttp_handler ):
Munge the request to ensure that we call manage_FTPGet.
"""
env = zhttp_handler.get_environment( self, request )
# Set a flag to indicate this request came through the WebDAV source
# port server.
env['WEBDAV_SOURCE_PORT'] = 1
if env['REQUEST_METHOD'] == 'GET':
path_info = env['PATH_INFO']
path_info = os.path.join( path_info, 'manage_FTPget' )
......
......@@ -102,6 +102,11 @@ class WebDAVSrcHandler( zhttp_handler ):
Munge the request to ensure that we call manage_FTPGet.
"""
env = zhttp_handler.get_environment( self, request )
# Set a flag to indicate this request came through the WebDAV source
# port server.
env['WEBDAV_SOURCE_PORT'] = 1
if env['REQUEST_METHOD'] == 'GET':
path_info = env['PATH_INFO']
path_info = os.path.join( path_info, 'manage_FTPget' )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment