Skip to content

Commit

Permalink
use Time#httpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Jul 27, 2008
1 parent b480887 commit 1e8d503
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/thin/headers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def []=(key, value)
@sent[key] = true
value = case value
when Time
value.rfc822
value.httpdate
when NilClass
return
else
Expand Down
2 changes: 1 addition & 1 deletion spec/headers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1e8d503

Please sign in to comment.