Commit 8dec110c authored by Łukasz Nowak's avatar Łukasz Nowak

Send Last-Modified header.

parent eb173dbd
...@@ -38,6 +38,7 @@ from zLOG import LOG, ERROR ...@@ -38,6 +38,7 @@ from zLOG import LOG, ERROR
from lxml import etree from lxml import etree
import json import json
import transaction import transaction
from App.Common import rfc1123_date
class WrongRequest(Exception): class WrongRequest(Exception):
pass pass
...@@ -321,6 +322,8 @@ class InstancePublisher(GenericPublisher): ...@@ -321,6 +322,8 @@ class InstancePublisher(GenericPublisher):
'There is system issue, please try again later.'})) 'There is system issue, please try again later.'}))
else: else:
self.REQUEST.response.setStatus(200) self.REQUEST.response.setStatus(200)
self.REQUEST.response.setHeader('Last-Modified',
rfc1123_date(software_instance.getModificationDate()))
self.REQUEST.response.setBody(json.dumps(d)) self.REQUEST.response.setBody(json.dumps(d))
return self.REQUEST.response return self.REQUEST.response
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment