diff options
author | Loïc Hoguin <[email protected]> | 2011-05-14 18:46:50 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2011-05-14 18:46:50 +0200 |
commit | c7069e7fb90470929bce9757615b317f409b205d (patch) | |
tree | 2dffd4f9b8c25f4a45e437b34a07ebfed6ba454c /src/cowboy_http_req.erl | |
parent | 95006c3291fb4e359b09cd9b3986ba425484c9e9 (diff) | |
download | cowboy-c7069e7fb90470929bce9757615b317f409b205d.tar.gz cowboy-c7069e7fb90470929bce9757615b317f409b205d.tar.bz2 cowboy-c7069e7fb90470929bce9757615b317f409b205d.zip |
Add the Server header in the HTTP replies.
Diffstat (limited to 'src/cowboy_http_req.erl')
-rw-r--r-- | src/cowboy_http_req.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cowboy_http_req.erl b/src/cowboy_http_req.erl index 0956022..875a6dd 100644 --- a/src/cowboy_http_req.erl +++ b/src/cowboy_http_req.erl @@ -188,7 +188,8 @@ reply(Code, Headers, Body, Req=#http_req{socket=Socket, {<<"Connection">>, atom_to_connection(Connection)}, {<<"Content-Length">>, list_to_binary(integer_to_list(iolist_size(Body)))}, - {<<"Date">>, cowboy_clock:rfc1123()} + {<<"Date">>, cowboy_clock:rfc1123()}, + {<<"Server">>, <<"Cowboy">>} ]), Transport:send(Socket, [Head, Body]), {ok, Req#http_req{resp_state=done}}. @@ -200,7 +201,8 @@ chunked_reply(Code, Headers, Req=#http_req{socket=Socket, transport=Transport, Head = response_head(Code, Headers, [ {<<"Connection">>, <<"close">>}, {<<"Transfer-Encoding">>, <<"chunked">>}, - {<<"Date">>, cowboy_clock:rfc1123()} + {<<"Date">>, cowboy_clock:rfc1123()}, + {<<"Server">>, <<"Cowboy">>} ]), Transport:send(Socket, Head), {ok, Req#http_req{resp_state=chunks}}. |