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

Fix cowboy_req:peer/1

This commit is contained in:
Loïc Hoguin 2016-06-20 17:28:59 +02:00
parent 57901a7116
commit 4fed8637b6
3 changed files with 44 additions and 43 deletions

View file

@ -194,9 +194,9 @@ method(#{method := Method}) ->
version(#{version := Version}) ->
Version.
-spec peer(req()) -> {inet:ip_address(), inet:port_number()} | undefined.
peer(Req) ->
Req#http_req.peer.
-spec peer(req()) -> {inet:ip_address(), inet:port_number()}.
peer(#{peer := Peer}) ->
Peer.
-spec host(req()) -> binary().
host(#{host := Host}) ->