extend/cowboy — pull request #178 by klaar (2012-03-31 18:11:12+00:00)
Title: Convert request to proplist when logging.

# Before

```
=ERROR REPORT==== 31-Mar-2012::10:59:06 ===
** Handler rest_resource_etags terminating in rest_init/3
for the reason error:function_clause
** Options were []
** Request was {http_req,#Port<0.6163>,cowboy_tcp_transport,close,<0.1118.0>,
'GET',
{1,1},
undefined,
[<<"localhost">>],
undefined,<<"localhost">>,80,
[<<"resetags">>],
undefined,<<"/resetags">>,undefined,
<<"type=binary-weak-unquoted">>,[],
[{'Connection',<<"close">>},{'Host',<<"localhost">>}],
[{'Connection',[<<"close">>]}],
undefined,[],waiting,<<>>,waiting,[],<<>>,
{#Fun,crash}}
** Stacktrace: [{cowboy_http,quoted_string,2,[]},
{cowboy_http,nonempty_list,2,[]},
{cowboy_http_rest,generate_etag,2,[]},
{cowboy_http_rest,set_resp_etag,2,[]},
{cowboy_http_rest,set_resp_body,2,[]},
{cowboy_http_rest,upgrade,4,[]},
{inet,peername,1,[]}]
```

# After

```
=ERROR REPORT==== 31-Mar-2012::10:59:05 ===
** Handler http_handler_errors terminating in handle/2
for the reason error:<<"handle_before_reply">>
** Options were []
** Handler state was <<"handle_before_reply">>
** Request was [{socket,#Port<0.5640>},
{transport,cowboy_tcp_transport},
{connection,keepalive},
{pid,<0.829.0>},
{method,'GET'},
{version,{1,1}},
{peer,undefined},
{host,[<<"localhost">>]},
{host_info,undefined},
{raw_host,<<"localhost">>},
{port,80},
{path,[<<"handler_errors">>]},
{path_info,undefined},
{raw_path,<<"/handler_errors">>},
{qs_vals,[{<<"case">>,<<"handle_before_reply">>}]},
{raw_qs,<<"case=handle_before_reply">>},
{bindings,[]},
{headers,[{'Host',<<"localhost">>}]},
{p_headers,[]},
{cookies,undefined},
{meta,[]},
{body_state,waiting},
{buffer,<<>>},
{resp_state,waiting},
{resp_headers,[]},
{resp_body,<<>>},
{urldecode,{#Fun,crash}}]
** Stacktrace: [{http_handler_errors,handle,2,
[{file,"http_handler_errors.erl"},
{line,33}]},
{cowboy_http_protocol,handler_handle,3,
[{file,"src/cowboy_http_protocol.erl"},
{line,283}]}]
```