|
From: SVN c. m. f. t. SWORD-A. p. <swo...@li...> - 2012-03-17 10:23:47
|
Revision: 478
http://sword-app.svn.sourceforge.net/sword-app/?rev=478&view=rev
Author: richard-jones
Date: 2012-03-17 10:23:41 +0000 (Sat, 17 Mar 2012)
Log Message:
-----------
add Content-Type header which was missing from get_container request (requests for the deposit receipt)
Modified Paths:
--------------
sss/branches/sss-2/sss/pylons_sword_controller.py
sss/branches/sss-2/sss/webpy.py
Modified: sss/branches/sss-2/sss/pylons_sword_controller.py
===================================================================
--- sss/branches/sss-2/sss/pylons_sword_controller.py 2012-03-17 10:22:59 UTC (rev 477)
+++ sss/branches/sss-2/sss/pylons_sword_controller.py 2012-03-17 10:23:41 UTC (rev 478)
@@ -682,6 +682,8 @@
# now actually get hold of the representation of the container and send it to the client
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()
return cont
except SwordError as e:
Modified: sss/branches/sss-2/sss/webpy.py
===================================================================
--- sss/branches/sss-2/sss/webpy.py 2012-03-17 10:22:59 UTC (rev 477)
+++ sss/branches/sss-2/sss/webpy.py 2012-03-17 10:23:41 UTC (rev 478)
@@ -788,6 +788,8 @@
# now actually get hold of the representation of the container and send it to the client
cont = ss.get_container(path, accept_parameters)
+ if cont is not None:
+ web.header("Content-Type", accept_parameters.content_type.mimetype())
return cont
except SwordError as e:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|