pngtile.cache: set last_modified/cache-control in 304 response as well..
--- a/pngtile/tile.py Sat Oct 04 02:46:44 2014 +0300
+++ b/pngtile/tile.py Sat Oct 04 03:03:17 2014 +0300
@@ -170,13 +170,14 @@
ttime = None
if request.if_modified_since and mtime == request.if_modified_since:
- return Response(status=304)
-
- # render
- png = render_func(request, image)
+ response = Response(status=304)
+ else:
+ # render
+ png = render_func(request, image)
- # response
- response = Response(png, content_type='image/png')
+ response = Response(png, content_type='image/png')
+
+ # cache out
response.last_modified = mtime
if not ttime: