mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 20:30:23 +00:00
Add a test for early errors that occur on the request-line
This commit is contained in:
parent
92672b49af
commit
3da9a6eef9
2 changed files with 52 additions and 6 deletions
|
@ -1108,8 +1108,10 @@ connection_hd_is_close(Conn) ->
|
|||
-spec error_terminate(cowboy:http_status(), #state{}, _) -> no_return().
|
||||
error_terminate(StatusCode, State=#state{ref=Ref, peer=Peer, in_state=StreamState}, Reason) ->
|
||||
PartialReq = case StreamState of
|
||||
#ps_request_line{} ->
|
||||
#{};
|
||||
#ps_request_line{} -> #{
|
||||
ref => Ref,
|
||||
peer => Peer
|
||||
};
|
||||
#ps_header{method=Method, path=Path, qs=Qs,
|
||||
version=Version, headers=ReqHeaders} -> #{
|
||||
ref => Ref,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue