From b6169e095e1c77a196b73f9e4f3f6ce324496a20 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Tue, 9 Oct 2012 13:59:24 +0200 Subject: [PATCH] Do not send Last-Modified for index.html Since index.html does not change it will always be set on last modification date, we could send it if it was based also on public/version file. --- lib/travis/web/app/files.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/travis/web/app/files.rb b/lib/travis/web/app/files.rb index 2d8f5374..e93b7e53 100644 --- a/lib/travis/web/app/files.rb +++ b/lib/travis/web/app/files.rb @@ -10,7 +10,9 @@ class Travis::Web::App def index proc do |env| - Rack::File.new(nil).tap { |f| f.path = 'public/index.html' }.serving(env) + status, headers, body = Rack::File.new(nil).tap { |f| f.path = 'public/index.html' }.serving(env) + headers.delete 'Last-Modified' + [status, headers, body] end end end