diff options
author | Loïc Hoguin <[email protected]> | 2017-11-20 16:26:37 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2017-11-20 16:26:37 +0100 |
commit | 3da9a6eef9910946ec2500ea1f28faa71b85c855 (patch) | |
tree | a312852ff2977bf5db6b90482d687ab96cbae0bd /src/cowboy_http.erl | |
parent | 92672b49aff04fb129bdf488448c074eeccfdb27 (diff) | |
download | cowboy-3da9a6eef9910946ec2500ea1f28faa71b85c855.tar.gz cowboy-3da9a6eef9910946ec2500ea1f28faa71b85c855.tar.bz2 cowboy-3da9a6eef9910946ec2500ea1f28faa71b85c855.zip |
Add a test for early errors that occur on the request-line
Diffstat (limited to 'src/cowboy_http.erl')
-rw-r--r-- | src/cowboy_http.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cowboy_http.erl b/src/cowboy_http.erl index 246afbb..9b671a9 100644 --- a/src/cowboy_http.erl +++ b/src/cowboy_http.erl @@ -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, |