Artifacts Associated With Ticket a976e76ba
Ticket change [8c5b296297] (rid 258000) by serhiy.storchaka on 2026-10-14 13:42:29:
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized to:
<nowiki>[http::register]</nowiki> documents <i>useSockThread</i> and <i>endToEndProxy</i> as independent options, but <i>endToEndProxy</i> only works when <i>useSockThread</i> is also true. Otherwise the request does not go through the configured proxy at all: http connects directly to the target server. <verbatim> package require http namespace eval my {variable socketCmd ::socket} proc mysock {args} {puts "openCmd: $args"; $::my::socketCmd {*}$args} http::register xs 443 mysock ::my::socketCmd 0 1 http::config -proxyhost 127.0.0.1 -proxyport 3128 http::geturl xs://example.invalid/ </verbatim> This prints <tt>openCmd: -async example.invalid 443</tt> and fails with <tt>couldn't open socket: Name or service not known</tt>: it tries to connect to the target host directly instead of to the proxy. With <tt>... ::my::socketCmd 1 1</tt> it sends <tt>CONNECT example.invalid:443</tt> to the proxy as expected. The cause: http::geturl passes <tt>-type $token</tt> to the socket command only if <i>useSockThread</i> is true (library/http/http.tcl, <tt>if {$useSockThread}</tt> before <tt>set state(openCmd)</tt>). Without the token, http::socketAsCallback cannot see state(protoProxyConn), treats the connection as not proxied and calls http::AltSocket. - foundin initialized to: "9.0.5, 9.1.0"
- login: "serhiy.storchaka"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "serhiy.storchaka"
- subsystem initialized to: "29. http Package"
- title initialized to:
http: endToEndProxy without useSockThread bypasses the proxy
- type initialized to: "Bug"