aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2011-04-18 13:52:32 +0200
committerLoïc Hoguin <[email protected]>2011-04-18 13:52:32 +0200
commit63a92df14e25599c6903a8178b5e89acc4482645 (patch)
treee52aa7c39e54dd0729b3b435100e1294045106e1 /include
parent731d839323e74b95a326001e4e424a1f2b18902e (diff)
downloadcowboy-63a92df14e25599c6903a8178b5e89acc4482645.tar.gz
cowboy-63a92df14e25599c6903a8178b5e89acc4482645.tar.bz2
cowboy-63a92df14e25599c6903a8178b5e89acc4482645.zip
Replace port_number() by ip_port() from kernel/include/inet.hrl.
Diffstat (limited to 'include')
-rw-r--r--include/http.hrl4
-rw-r--r--include/types.hrl2
2 files changed, 3 insertions, 3 deletions
diff --git a/include/http.hrl b/include/http.hrl
index 391e79a..79bfc7b 100644
--- a/include/http.hrl
+++ b/include/http.hrl
@@ -12,6 +12,8 @@
%% ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+-include_lib("kernel/include/inet.hrl").
+
-type http_method() :: 'OPTIONS' | 'GET' | 'HEAD'
| 'POST' | 'PUT' | 'DELETE' | 'TRACE' | string().
-type http_uri() :: '*' | {absoluteURI, http | https, Host::string(),
@@ -45,7 +47,7 @@
%% Request.
method = 'GET' :: http_method(),
version = {1, 1} :: http_version(),
- peer = undefined :: undefined | {Address::inet:ip_address(), Port::port_number()},
+ peer = undefined :: undefined | {Address::ip_address(), Port::ip_port()},
host = undefined :: undefined | cowboy_dispatcher:path_tokens(),
raw_host = undefined :: undefined | string(),
path = undefined :: undefined | '*' | cowboy_dispatcher:path_tokens(),
diff --git a/include/types.hrl b/include/types.hrl
index 371dd18..10cc6f4 100644
--- a/include/types.hrl
+++ b/include/types.hrl
@@ -11,5 +11,3 @@
%% WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
%% ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
--type port_number() :: 0..65535.