[php-src] PR #22434: soap: do not overwrite the parsed host on a protocol-relative redirect
| From: | iliaal | Date: | Wed, 24 Jun 2026 11:35:31 +0000 |
| Subject: | [php-src] PR #22434: soap: do not overwrite the parsed host on a protocol-relative redirect | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-36600@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/22434
Author: iliaal
When a redirect Location is a protocol-relative reference (//host/path), php_url_parse() already
fills new_url->host, but the scheme-less redirect handling overwrote it with a copy of the
request host without releasing the parsed one. That leaks a zend_string per such redirect and pins
the redirect back to the original host instead of the one the server named. Inherit host and port
from the request URL only when new_url->host is NULL, mirroring the scheme guard directly above.
This is the PHP-8.4 (legacy php_url_parse) counterpart of the URI-parser fix in #22431.