do not replace all the occurences of target in location header
This commit is contained in:
parent
1257afb1e9
commit
2d11ea7de5
|
@ -38,7 +38,7 @@ class MandayeFilter(object):
|
|||
# Modify headers
|
||||
if response.headers.has_key('location'):
|
||||
response.headers.addheader('location',
|
||||
re.sub(r'http(s*)://%s' % env["target"].hostname,
|
||||
re.sub(r'^http(s*)://%s' % env["target"].hostname,
|
||||
r"%s://%s" % (env["mandaye.scheme"], env["HTTP_HOST"]),
|
||||
response.headers.getheader('location'),
|
||||
flags=re.IGNORECASE)
|
||||
|
@ -131,4 +131,3 @@ class MandayeFilter(object):
|
|||
"""
|
||||
if request.msg and not isinstance(request.msg, basestring):
|
||||
request.msg = request.msg.read()
|
||||
|
||||
|
|
Reference in New Issue