mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-24 12:13:33 +08:00
Fix for trans.redirect not setting cookies/headers. Broken in https://github.com/galaxyproject/galaxy/pull/6561
This commit is contained in:
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user