adding the Last-Modified response header to the version action
[rails.git] / app / controllers / old_relation_controller.rb
index 9307ee1ce4a8c61b5d6d29bd08f09dda14893f47..84d0b0c902c53d84ce4fd09f942ff220a9b87455 100644 (file)
@@ -25,6 +25,8 @@ class OldRelationController < ApplicationController
   def version
     begin
       old_relation = OldRelation.find(:first, :conditions => {:id => params[:id], :version => params[:version]} )
+      
+      response.headers['Last-Modified'] = old_relation.timestamp.rfc822
 
       doc = OSM::API.new.get_xml_doc
       doc.root << old_relation.to_xml_node