ostinelli/misultin — Issue #69: headers normalization
Author: tereska
Created: 2011-10-30 13:32:31+00:00
State: open

I have some service that get headers from 3rd party.
Is there some automatic way of normalizing headers or I must do this on my own?
I'm talking about this fragment of code:
https://github.com/ostinelli/misultin/blob/master/src/misultin_http.erl#L579

In headers_01 example i have output like this:

```
HTTP/1.1 200 OK
Date: Sun, 30 Oct 2011 13:26:46 GMT
Server: misultin/0.8
Connection: Keep-Alive
Content-Length: 3
server: someserver
date: some date

ok
```
In headers_02 example all is OK but i need to care about proper header name formatting:

```
HTTP/1.1 200 OK
Connection: Keep-Alive
Content-Length: 3
Server: someserver
Date: some date

ok
```

Examples code:

```erlang
-module(test).
-export([headers_01/0, headers_02/0]).

headers_01() ->
misultin:start_link([
{ port, 8080 },
{ loop, fun(Req) ->
Req:respond(200, [{'server', "someserver"}, {'date', "some date"}], <<"ok\n">>) end }
]).

headers_02() ->
misultin:start_link([
{ port, 8080 },
{ loop, fun(Req) ->
Req:respond(200, [{'Server', "someserver"}, {'Date', "some date"}], <<"ok\n">>) end }
]).
```