Skip to content

Commit

Permalink
Capitalize the T in the ETag header, add a test for it.
Browse files Browse the repository at this point in the history
  • Loading branch information
nogweii authored and cloudhead committed Apr 2, 2010
1 parent 8455a3b commit 939faef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/toto.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def call env
"no-cache, must-revalidate" "no-cache, must-revalidate"
end end


@response['Etag'] = Digest::SHA1.hexdigest(response[:body]) @response['ETag'] = Digest::SHA1.hexdigest(response[:body])


@response.status = response[:status] @response.status = response[:status]
@response.finish @response.finish
Expand Down
1 change: 1 addition & 0 deletions test/toto_test.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
asserts("content type is set properly") { topic.content_type }.equals "text/html" asserts("content type is set properly") { topic.content_type }.equals "text/html"
should("include a couple of article") { topic.body }.includes_elements("#articles li", 3) should("include a couple of article") { topic.body }.includes_elements("#articles li", 3)
should("include an archive") { topic.body }.includes_elements("#archives li", 2) should("include an archive") { topic.body }.includes_elements("#archives li", 2)
asserts("Etag header present") { topic.headers["Etag"] }
end end
end end


Expand Down

0 comments on commit 939faef

Please sign in to comment.