mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-16 05:00:24 +00:00
Add cowboy_http_req:port/1.
Returns the port given in the Host header if present, otherwise the default port of 443 for HTTPS and 80 for HTTP is returned.
This commit is contained in:
parent
cc663df5db
commit
6c1f73c53c
6 changed files with 84 additions and 43 deletions
|
@ -50,6 +50,7 @@
|
|||
peer = undefined :: undefined | {Address::ip_address(), Port::ip_port()},
|
||||
host = undefined :: undefined | cowboy_dispatcher:path_tokens(),
|
||||
raw_host = undefined :: undefined | string(),
|
||||
port = undefined :: undefined | ip_port(),
|
||||
path = undefined :: undefined | '*' | cowboy_dispatcher:path_tokens(),
|
||||
raw_path = undefined :: undefined | string(),
|
||||
qs_vals = undefined :: undefined | list({Name::string(), Value::string() | true}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue