[erlang-questions] Erlang HTTP Client always reformats header field names to lowercase
Anish Parameswaran
anishparameswaran@REDACTED
Sun Apr 24 09:47:20 CEST 2011
Hi ,
I am new to Erlang .
I use the following code to access a web server . The web server doesn't
service
requests if the HTTP header field names are not in camel-case.
That is, the server rejects if 'authorization' is given instead of '
Authorization' in
HTTP header field.
Code :
inets:start().
http:request(get,{"http://10.37.184.222:20080/",[{"Authorization",
"Basic dGVqYXM6adcnZSMwNXQ="}]},[],[]).
*Erlang http module always sends the HTTP header field names in
lower-case*.
This is true even if the Headers are supplied as above in camel-case.
Is this is a bug ?
HTTP/1.1 and HTTP/1.0 complaint servers are supposed to handle header
field names in a case-insensitive manner. So sending header field name in
lower case is
perfectly alright . But changing a as-is supplied header filed name to
lower case makes it impossible to work with an non-complaint web server.
regards,
Anish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110424/b1cff77e/attachment.htm>
More information about the erlang-questions
mailing list