diff --git a/lib/thin/headers.rb b/lib/thin/headers.rb index ba0f95a4..3e1b9cc3 100644 --- a/lib/thin/headers.rb +++ b/lib/thin/headers.rb @@ -18,7 +18,7 @@ def []=(key, value) @sent[key] = true value = case value when Time - value.rfc822 + value.httpdate when NilClass return else diff --git a/spec/headers_spec.rb b/spec/headers_spec.rb index 87ab099e..98ee4709 100644 --- a/spec/headers_spec.rb +++ b/spec/headers_spec.rb @@ -35,6 +35,6 @@ it 'should format Time values correctly' do time = Time.now @headers['Modified-At'] = time - @headers.to_s.should include("Modified-At: #{time.rfc822}") + @headers.to_s.should include("Modified-At: #{time.httpdate}") end end \ No newline at end of file