Repository navigation
Conversation
The cURL transport read the proxy password from proxy.pass and the stream transport from proxy.password, so a configuration that worked with one transport silently sent no proxy credentials with the other. cURL built "host:port" even when either was missing, while the stream transport then silently connected without the proxy. The socket transport ignored the proxy options without any notice. Accept both password option names in both transports, require proxy.host and proxy.port when proxy.enabled is set, and raise a warning in the socket transport, which cannot use a proxy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
The proxy support backported from the CMS (b05ab82) made the transports disagree about the proxy options:
proxy.pass, the stream transport fromproxy.password; a configuration that worked with one transport sent no proxy credentials with the other, silently. The stream transport also sent no credentials when the password was empty, cURL did.host:porteven when either was missing (:8080,proxy:); the stream transport then silently connected without the proxy (while still sending the full URI in the request line).proxy.*entirely, so with that transport selected requests bypassed the configured proxy without any notice.CURLOPT_PROXY/CURLOPT_PROXYUSERPWD, unlike the rest of the file.Now both cURL and stream:
proxy.pass(canonical, as in the CMS) andproxy.password(alias);proxy.useris set;InvalidArgumentExceptionwhenproxy.enabledis set withoutproxy.hostorproxy.port, instead of sending a broken or proxy-less request.The stream transport passes the proxy as
tcp://host:port, the form PHP documents. The socket transport raises anE_USER_WARNINGwhenproxy.enabledis set and still connects directly, which keeps 4.x behaviour apart from the notice. Throwing instead would be the stricter choice (for 5.x, if the socket transport stays).Testing Instructions
Tests/Transport/ProxyOptionsTest.php(new). The stub server doubles as the proxy: PHP's built-in server answers a request with an absolute URI in the request line, and the stub reports the URI and theProxy-Authorizationheader it received (jhttp_stub.phpnow echoes the request headers, the same line as in #86).proxy.passand withproxy.password: the request goes through the proxy with the right credentials (before: cURL withproxy.passwordand stream withproxy.passsent none);InvalidArgumentException;proxy.enabled: oneE_USER_WARNING, request still served.Documentation Changes Required
docs/classes/TransportInterface.md: theproxy.*options are added to the options table, and the socket note says that it cannot use a proxy.🤖 Generated with Claude Code