32
32
if request.if_modified_since == timestamp:
33
33
if request.if_none_match:
34
34
if request.if_none_match == etag:
35
request.status_code = 304
35
request.emit_http_headers(["Status: 304 Not modified"])
37
request.status_code = 304
37
request.emit_http_headers(["Status: 304 Not modified"])
38
38
elif request.if_none_match == etag:
39
39
if request.if_modified_since:
40
40
if request.if_modified_since == timestamp:
41
request.status_code = 304
41
request.emit_http_headers(["Status: 304 Not modified"])
43
request.status_code = 304
43
request.emit_http_headers(["Status: 304 Not modified"])
45
45
# generate an Expires header, using 1d cache lifetime of sisterpages list
46
expires = time.time() + 24*3600
46
expires = timefuncs.formathttpdate(time.time() + 24*3600)
48
request.mimetype = 'text/plain'
49
request.expires = expires
50
request.last_modified = timestamp
51
request.headers['Etag'] = etag
48
httpheaders = ["Content-Type: text/plain; charset=UTF-8",
49
"Expires: %s" % expires,
50
"Last-Modified: %s" % timestamp,
53
53
# send the generated XML document
54
request.emit_http_headers(httpheaders)
56
baseurl = request.getBaseURL()
57
if not baseurl.endswith('/'):
54
60
# Get list of user readable pages
55
61
pages = request.rootpage.getPageList()