From 3da9a6eef9910946ec2500ea1f28faa71b85c855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 20 Nov 2017 16:26:37 +0100 Subject: Add a test for early errors that occur on the request-line --- src/cowboy_http.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/cowboy_http.erl') 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, -- cgit v1.2.3