From 6c1f73c53c9260d99f71676b400a27f0a853f584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 4 May 2011 12:05:57 +0200 Subject: 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. --- include/http.hrl | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/http.hrl b/include/http.hrl index 79bfc7b..52eeb12 100644 --- a/include/http.hrl +++ b/include/http.hrl @@ -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}), -- cgit v1.2.3