Skip to content

Fix SOAP client failing to follow a scheme-less redirect Location#22341

Open
iliaal wants to merge 1 commit into
php:PHP-8.5from
iliaal:fix-soap-relative-redirect
Open

Fix SOAP client failing to follow a scheme-less redirect Location#22341
iliaal wants to merge 1 commit into
php:PHP-8.5from
iliaal:fix-soap-relative-redirect

Conversation

@iliaal

@iliaal iliaal commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

On a 3xx redirect with a scheme-less Location (relative or absolute-path), the redirect handler copied scheme/host/port from the freshly parsed Location URI itself rather than the previous request URI, leaving the host NULL so the retry aborted with "Unable to parse URL". Read the inherited components and the relative-path base from the request URI, restoring the pre-refactor behaviour.

@iliaal iliaal requested a review from devnexen as a code owner June 16, 2026 21:22
iliaal added a commit to iliaal/php-src that referenced this pull request Jun 16, 2026
The HTTP redirect handler inherited scheme, host and port from the newly
parsed Location URI itself instead of the previous request URI, so a
scheme-less (relative or absolute-path) Location left the host NULL and
the retry aborted with "Unable to parse URL". Read the inherited
components and the path base from the request URI, restoring the
behaviour the URI-parser refactor changed.

Closes phpGH-22341
@iliaal iliaal force-pushed the fix-soap-relative-redirect branch from 7c36a99 to ef896b2 Compare June 16, 2026 21:22
The HTTP redirect handler inherited scheme, host and port from the newly
parsed Location URI itself instead of the previous request URI, so a
scheme-less (relative or absolute-path) Location left the host NULL and
the retry aborted with "Unable to parse URL". Read the inherited
components and the path base from the request URI, restoring the
behaviour the URI-parser refactor changed.

Closes phpGH-22341
@iliaal iliaal force-pushed the fix-soap-relative-redirect branch from ef896b2 to 581d510 Compare June 16, 2026 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant