Skip to content

Commit ca72142

Browse files
committed
http/h1_stream: CONNECT requests should have a host header after all
1 parent 1f30846 commit ca72142

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

http/h1_stream.lua

+3-7
Original file line numberDiff line numberDiff line change
@@ -741,13 +741,9 @@ function stream_methods:write_headers(headers, end_stream, timeout)
741741
return nil, err, errno
742742
end
743743
elseif name == ":authority" then
744-
-- for CONNECT requests, :authority is the path
745-
if self.req_method ~= "CONNECT" then
746-
-- otherwise it's the Host header
747-
local ok, err, errno = self.connection:write_header("host", value, 0)
748-
if not ok then
749-
return nil, err, errno
750-
end
744+
local ok, err, errno = self.connection:write_header("host", value, 0)
745+
if not ok then
746+
return nil, err, errno
751747
end
752748
end
753749
end

0 commit comments

Comments
 (0)