aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fietsboek/views/detail.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/fietsboek/views/detail.py b/fietsboek/views/detail.py
index 80d112b..1808bda 100644
--- a/fietsboek/views/detail.py
+++ b/fietsboek/views/detail.py
@@ -55,7 +55,9 @@ def gpx(request):
:rtype: pyramid.response.Response
"""
track = request.context
- return Response(track.gpx_data, content_type="application/gpx+xml")
+ response = Response(track.gpx_data, content_type="application/gpx+xml")
+ response.md5_etag()
+ return response
@view_config(route_name='invalidate-share', request_method='POST', permission='track.unshare')
@@ -98,7 +100,9 @@ def badge(request):
:return: The HTTP response.
:rtype: pyramid.response.Response
"""
- return Response(request.context.image)
+ response = Response(request.context.image)
+ response.md5_etag()
+ return response
@view_config(route_name='image', http_cache=3600, permission='track.view')