Skip to content

Commit ea12beb

Browse files
committed
http/request: Cleanup CONNECT proxy code
1 parent ca946c7 commit ea12beb

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

http/request.lua

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -416,10 +416,8 @@ function request_methods:go(timeout)
416416
local connect_request = new_connect(proxy, authority)
417417
connect_request.proxy = false
418418
connect_request.version = 1.1 -- TODO: CONNECT over HTTP/2
419-
if tls then
420-
if connect_request.tls then
421-
error("NYI: TLS over TLS")
422-
end
419+
if connect_request.tls then
420+
error("NYI: TLS over TLS")
423421
end
424422
-- Perform CONNECT request
425423
local headers, stream, errno = connect_request:go(deadline and deadline-monotime())
@@ -437,9 +435,10 @@ function request_methods:go(timeout)
437435
local sock = stream.connection:take_socket()
438436
local err, errno2
439437
connection, err, errno2 = client.negotiate(sock, {
438+
host = host;
440439
tls = tls;
441440
ctx = self.ctx;
442-
sendname = self.sendname ~= nil and self.sendname or host;
441+
sendname = self.sendname;
443442
version = self.version;
444443
h2_settings = default_h2_settings;
445444
}, deadline and deadline-monotime())

0 commit comments

Comments
 (0)