aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cowboy_http_req.erl6
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}}.