Created
July 16, 2011 23:21
-
-
Save myronmarston/1086910 to your computer and use it in GitHub Desktop.
Demonstration of ETag header casing issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rack' | |
run lambda { |env| | |
[ | |
200, | |
{ 'ETag' => 'some etag value', 'Content-Type' => 'text/plain' }, | |
['ETag has been set'] | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -is http://localhost:9292/ | |
HTTP/1.1 200 OK | |
Etag: some etag value | |
Connection: Keep-Alive | |
Content-Type: text/plain | |
Date: Sat, 16 Jul 2011 23:17:23 GMT | |
Server: WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18) | |
Content-Length: 17 | |
ETag has been set |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Notice that the header is set as "ETag" but rack normalizes it to "Etag".