Skip to content

Commit

Permalink
2867 Fixes a problem with passing unicode to url_for
Browse files Browse the repository at this point in the history
Forces the file_url to be ascii as it appears that for some reason, and only
occassionally OFS returns unicode instead of str.  We don't want to fix OFS
as it is scheduled for removal and we can fix routes as it is already out of
date.
  • Loading branch information
rossjones committed Aug 16, 2012
1 parent 18f95bf commit c73b6f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckan/controllers/storage.py
Expand Up @@ -187,7 +187,7 @@ def file(self, label):
fapp = FileApp(filepath, headers=None, **headers)
return fapp(request.environ, self.start_response)
else:
h.redirect_to(file_url)
h.redirect_to(file_url.encode('ascii','ignore'))


class StorageAPIController(BaseController):
Expand Down

0 comments on commit c73b6f0

Please sign in to comment.