File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -261,8 +261,8 @@ function stream_methods:read_headers(timeout)
261261 local is_trailers = self .body_read_type == " chunked"
262262 local headers = self .headers_in_progress
263263 if not headers then
264- headers = new_headers ()
265- if is_trailers then -- luacheck: ignore 542
264+ if is_trailers then
265+ headers = new_headers ()
266266 elseif self .type == " server" then
267267 if self .state == " half closed (local)" then
268268 return nil
@@ -279,6 +279,7 @@ function stream_methods:read_headers(timeout)
279279 end
280280 self .req_method = method
281281 self .peer_version = httpversion
282+ headers = new_headers ()
282283 headers :append (" :method" , method )
283284 if method == " CONNECT" then
284285 headers :append (" :authority" , path )
@@ -310,6 +311,7 @@ function stream_methods:read_headers(timeout)
310311 return nil , status_code , reason_phrase
311312 end
312313 self .peer_version = httpversion
314+ headers = new_headers ()
313315 headers :append (" :status" , status_code )
314316 -- reason phase intentionally does not exist in HTTP2; discard for consistency
315317 end
You can’t perform that action at this time.
0 commit comments