Skip to content

Commit 86e6fcd

Browse files
committed
http/h1_request: make sure we start tls when using a https proxy
1 parent ca72142 commit 86e6fcd

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

http/h1_stream.lua

+2
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,8 @@ local ignore_fields = {
486486
["connection"] = true;
487487
["content-length"] = true;
488488
["transfer-encoding"] = true;
489+
-- should be passed as :authority instead
490+
["host"] = true;
489491
}
490492
-- Writes the given headers to the stream; optionally ends the stream at end of headers
491493
--

http/request.lua

+1
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ function request_methods:go(timeout)
454454
local old_url = self:to_uri(false)
455455
host = assert(proxy.host, "proxy is missing host")
456456
port = proxy.port or http_util.scheme_to_port[proxy.scheme]
457+
tls = (proxy.scheme == "https")
457458
-- proxy requests get a uri that includes host as their path
458459
if not cloned_headers then
459460
request_headers = request_headers:clone()

0 commit comments

Comments
 (0)