Fix for trans.redirect not setting cookies/headers. Broken in https://github.com/galaxyproject/galaxy/pull/6561

This commit is contained in:
Daniel Blankenberg
2019-04-04 13:11:42 -04:00
parent ecc9c233c3
commit f03256ca20
+2 -2
View File
@@ -433,7 +433,7 @@ class Response(object):
Create a new Response defaulting to HTML content and "200 OK" status
"""
self.status = "200 OK"
self.headers = HeaderDict({"content-type": "text/html"})
self.headers = HeaderDict({"content-type": "text/html; charset=UTF-8"})
self.cookies = SimpleCookie()
def set_content_type(self, type_):
@@ -451,7 +451,7 @@ class Response(object):
"""
if "\n" in url or "\r" in url:
raise webob.exc.HTTPInternalServerError("Invalid redirect URL encountered.")
raise webob.exc.HTTPFound(location=url)
raise webob.exc.HTTPFound(location=url, headers=self.wsgi_headeritems())
def wsgi_headeritems(self):
"""