emit last-modified headers on nodes and ways
authorSteve Coast <steve@asklater.com>
Mon, 21 Jan 2008 17:41:57 +0000 (17:41 +0000)
committerSteve Coast <steve@asklater.com>
Mon, 21 Jan 2008 17:41:57 +0000 (17:41 +0000)
app/controllers/node_controller.rb
app/controllers/way_controller.rb

index d3f1ce7f65808dee854c4407b3fe4dc952739e1f..1aef6a8a57e6f5750174188bd5571e0a4b6c2b50 100644 (file)
@@ -28,8 +28,8 @@ class NodeController < ApplicationController
   def read
     begin
       node = Node.find(params[:id])
-
       if node.visible
+        response.headers['Last-Modified'] = node.timestamp.rfc822
         render :text => node.to_xml.to_s, :content_type => "text/xml"
        else
         render :text => "", :status => :gone
index 413c65d1cd55f9f812670a09d302bc9c0a61e59f..c1bbe5f72f13f220ca6d72df484cd70be60a2d20 100644 (file)
@@ -32,6 +32,8 @@ class WayController < ApplicationController
     begin
       way = Way.find(params[:id])
 
+      response.headers['Last-Modified'] = way.timestamp.rfc822
+
       if way.visible
         render :text => way.to_xml.to_s, :content_type => "text/xml"
       else