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:
parent
93e8744e22
commit
d732e74dd5
3 changed files with 13 additions and 2 deletions
|
@ -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) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue