mirror of
https://github.com/curl/curl.git
synced 2026-08-25 01:33:31 +03:00
proxy: fix automatic tunnel mode with "connect to host"
Fix a regression in curl 8.21.0-rc3: Check whether the host and the "connect
to host" are equal before initializing the proxy. If they are equal, switching
to tunnel mode is not necessary.
Follow-up to 73daec6
Closes #22110
This commit is contained in:
parent
cb7efe1c35
commit
810d9535e1
3 changed files with 28 additions and 13 deletions
|
|
@ -50,7 +50,8 @@ http-proxy
|
|||
</name>
|
||||
|
||||
<command>
|
||||
http://www.example.com.%TESTNUMBER/%TESTNUMBER --connect-to ::connect.example.com.%TESTNUMBER:%HTTPPORT -x %HOSTIP:%PROXYPORT
|
||||
http://www.example.com.%TESTNUMBER/%TESTNUMBER --connect-to ::connect.example.com.%TESTNUMBER:%HTTPPORT -x %HOSTIP:%PROXYPORT --next
|
||||
http://www.example.com.%TESTNUMBER:%HTTPPORT/%TESTNUMBER --connect-to ::www.example.com.%TESTNUMBER:%HTTPPORT -x %HOSTIP:%PROXYPORT
|
||||
</command>
|
||||
<features>
|
||||
proxy
|
||||
|
|
@ -59,12 +60,18 @@ proxy
|
|||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<proxy crlf="headers">
|
||||
<proxy crlf="yes">
|
||||
CONNECT connect.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
|
||||
Host: connect.example.com.%TESTNUMBER:%HTTPPORT
|
||||
User-Agent: curl/%VERSION
|
||||
Proxy-Connection: Keep-Alive
|
||||
|
||||
GET http://www.example.com.%TESTNUMBER:%HTTPPORT/%TESTNUMBER HTTP/1.1
|
||||
Host: www.example.com.%TESTNUMBER:%HTTPPORT
|
||||
User-Agent: curl/%VERSION
|
||||
Accept: */*
|
||||
Proxy-Connection: Keep-Alive
|
||||
|
||||
</proxy>
|
||||
<protocol crlf="headers">
|
||||
GET /%TESTNUMBER HTTP/1.1
|
||||
|
|
|
|||
|
|
@ -54,18 +54,25 @@ socks5
|
|||
proxy
|
||||
</features>
|
||||
<command>
|
||||
http://www.example.com.%TESTNUMBER/%TESTNUMBER --connect-to ::connect.example.com.%TESTNUMBER:%HTTPPORT -x %HOSTIP:%PROXYPORT --preproxy socks5://%HOSTIP:%SOCKSPORT
|
||||
http://www.example.com.%TESTNUMBER/%TESTNUMBER --connect-to ::connect.example.com.%TESTNUMBER:%HTTPPORT -x %HOSTIP:%PROXYPORT --preproxy socks5://%HOSTIP:%SOCKSPORT --next
|
||||
http://www.example.com.%TESTNUMBER:%HTTPPORT/%TESTNUMBER --connect-to ::www.example.com.%TESTNUMBER:%HTTPPORT -x %HOSTIP:%PROXYPORT --preproxy socks5://%HOSTIP:%SOCKSPORT
|
||||
</command>
|
||||
</client>
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<proxy crlf="headers">
|
||||
<proxy crlf="yes">
|
||||
CONNECT connect.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
|
||||
Host: connect.example.com.%TESTNUMBER:%HTTPPORT
|
||||
User-Agent: curl/%VERSION
|
||||
Proxy-Connection: Keep-Alive
|
||||
|
||||
GET http://www.example.com.%TESTNUMBER:%HTTPPORT/%TESTNUMBER HTTP/1.1
|
||||
Host: www.example.com.%TESTNUMBER:%HTTPPORT
|
||||
User-Agent: curl/%VERSION
|
||||
Accept: */*
|
||||
Proxy-Connection: Keep-Alive
|
||||
|
||||
</proxy>
|
||||
<protocol crlf="headers">
|
||||
GET /%TESTNUMBER HTTP/1.1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue