Permalink
Browse files

[fix] libnet: http header fields are case-insensitive

See: http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html
I just modified the """parser""" to handle "Etag" the same way as "ETag"
(the first being sent by CouchDb), but didn't modify the rest, although
the parser could fail in numerous cases.
  • Loading branch information...
1 parent 42e49a9 commit e15eb4380dabeff7a86c7d6ce98c27b195aac58b Thomas Refis committed Sep 2, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 libnet/requestdef.ml
View
@@ -248,7 +248,7 @@ let response_header_of_string = function
| "Last-Modified" -> `Last_Modified
| "Accept-Ranges" -> `Accept_Ranges
| "Age" -> `Age
- | "ETag" -> `ETag
+ | "ETag" | "Etag" -> `ETag
| "Location" -> `Location
| "Proxy-Authenticate" -> `Proxy_Authenticate
| "Retry-After" -> `Retry_After

0 comments on commit e15eb43

Please sign in to comment.