Skip to content

Commit

Permalink
[#1797,webstore,bugfix][xs]: make sure x-accel-redirect header is asc…
Browse files Browse the repository at this point in the history
…ii as http protocol requires ascii (or close to ascii).
  • Loading branch information
rufuspollock committed Mar 1, 2012
1 parent 687c5a1 commit a85d825
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ckan/controllers/webstore.py
Expand Up @@ -8,7 +8,8 @@ def _make_redirect(self, id, url=''):
index_name = 'ckan-%s' % g.site_id
query_string = request.environ['QUERY_STRING']
redirect = "/elastic/%s/%s%s?%s" % (index_name, id, url, query_string)
response.headers['X-Accel-Redirect'] = redirect
# headers must be ascii strings
response.headers['X-Accel-Redirect'] = str(redirect)

def read(self, id, url=''):
context = {'model': model, 'session': model.Session,
Expand Down

0 comments on commit a85d825

Please sign in to comment.