Skip to content
Browse files

explicitly cast location headers to string for supporting mod_wsgi

  • Loading branch information...
1 parent f555f0c commit 98ce89875c94323f2db398e36d8441bc39643a25 richard-jones committed May 1, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 sss/pylons_sword_controller.py
View
6 sss/pylons_sword_controller.py
@@ -669,7 +669,7 @@ def _GET_media_resource(self, path=None):
else:
response.content_type = media_resource.content_type
if media_resource.packaging is not None:
- response.headers["Packaging"] = media_resource.packaging
+ response.headers["Packaging"] = str(media_resource.packaging)
f = open(media_resource.filepath, "r")
response.status_int = 200
response.status = "200 OK"
@@ -838,7 +838,7 @@ def _GET_container(self, path=None):
cont = ss.get_container(path, accept_parameters)
ssslog.info("Returning " + response.status + " from request on " + inspect.stack()[0][3])
if cont is not None:
- response.headers["Content-Type"] = accept_parameters.content_type.mimetype()
+ response.headers["Content-Type"] = str(accept_parameters.content_type.mimetype())
return cont
except SwordError as e:
@@ -1007,7 +1007,7 @@ def _GET_aggregation(self, path=None):
edit_uri = ss.get_edit_uri()
response.status_int = 303
response.status = "303 See Other"
- response.headers["Content-Location"] = edit_uri
+ response.headers["Content-Location"] = str(edit_uri)
return
def _GET_webui(self, path=None):

0 comments on commit 98ce898

Please sign in to comment.
Something went wrong with that request. Please try again.