0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Use default port when not given in :authority

This commit is contained in:
Loïc Hoguin 2018-05-16 10:42:25 +02:00
parent 93e8744e22
commit d732e74dd5
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764
3 changed files with 13 additions and 2 deletions

View file

@ -334,6 +334,12 @@ port(Config) ->
Port = integer_to_binary(config(port, Config)),
Port = do_get_body("/port", Config),
Port = do_get_body("/direct/port", Config),
ExpectedPort = case config(type, Config) of
tcp -> <<"80">>;
ssl -> <<"443">>
end,
ExpectedPort = do_get_body("/port", [{<<"host">>, <<"localhost">>}], Config),
ExpectedPort = do_get_body("/direct/port", [{<<"host">>, <<"localhost">>}], Config),
ok.
qs(Config) ->