mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 04:30:25 +00:00
Properly parse the host/port in HTTP/2
This commit is contained in:
parent
4fed8637b6
commit
c33b4cec96
1 changed files with 1 additions and 7 deletions
|
@ -511,14 +511,8 @@ stream_init(State0=#state{ref=Ref, socket=Socket, transport=Transport, peer=Peer
|
||||||
<<":path">> := PathWithQs}, DecodeState} ->
|
<<":path">> := PathWithQs}, DecodeState} ->
|
||||||
State = State0#state{decode_state=DecodeState},
|
State = State0#state{decode_state=DecodeState},
|
||||||
Headers = maps:without([<<":method">>, <<":scheme">>, <<":authority">>, <<":path">>], Headers0),
|
Headers = maps:without([<<":method">>, <<":scheme">>, <<":authority">>, <<":path">>], Headers0),
|
||||||
%% @todo We need to parse the port out of :authority.
|
{Host, Port} = cow_http_hd:parse_host(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
|
|
||||||
{Path, Qs} = cow_http:parse_fullpath(PathWithQs),
|
{Path, Qs} = cow_http:parse_fullpath(PathWithQs),
|
||||||
|
|
||||||
Req = #{
|
Req = #{
|
||||||
ref => Ref,
|
ref => Ref,
|
||||||
pid => self(),
|
pid => self(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue