diff options
author | Loïc Hoguin <[email protected]> | 2016-06-20 17:29:25 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-06-20 17:29:25 +0200 |
commit | c33b4cec963cd2b604999c29d0c35530bb784645 (patch) | |
tree | 7466af2b90fcd47d4dc128cace7261c56874e4ee | |
parent | 4fed8637b68e0f94493f2ba9bb32296d738f0912 (diff) | |
download | cowboy-c33b4cec963cd2b604999c29d0c35530bb784645.tar.gz cowboy-c33b4cec963cd2b604999c29d0c35530bb784645.tar.bz2 cowboy-c33b4cec963cd2b604999c29d0c35530bb784645.zip |
Properly parse the host/port in HTTP/2
-rw-r--r-- | src/cowboy_http2.erl | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/cowboy_http2.erl b/src/cowboy_http2.erl index 2986c07..ffcc17f 100644 --- a/src/cowboy_http2.erl +++ b/src/cowboy_http2.erl @@ -511,14 +511,8 @@ stream_init(State0=#state{ref=Ref, socket=Socket, transport=Transport, peer=Peer <<":path">> := PathWithQs}, DecodeState} -> State = State0#state{decode_state=DecodeState}, Headers = maps:without([<<":method">>, <<":scheme">>, <<":authority">>, <<":path">>], Headers0), - %% @todo We need to parse the port out of :authority. - %% @todo We need to parse the query string out of :path. - %% @todo We need to give a way to get the socket infos. - - Host = Authority, %% @todo - Port = todo, %% @todo + {Host, Port} = cow_http_hd:parse_host(Authority), {Path, Qs} = cow_http:parse_fullpath(PathWithQs), - Req = #{ ref => Ref, pid => self(), |