Open dtdesign opened 11 months ago
Thanks for the report. I am a little hesitent to change the behaviour here in 1.x or 2.x, but I am planning for 3.x to make some breaking changes to "fix" some spec compatibility issues, and this could be one such fix, if we can agree on a correct behaviour over on the php-http/psr7-integration-tests repo.
PHP version: 8.2.11 guzzlehttp/psr7: 2.6.1
Description The
Uri
class is able to parse malformed URIs but this results inUri::__toString()
generating a malformed URI. Attempting to pass that URI back intoUri
will yield aMalformedUriException
.How to reproduce
Line 3 throws a
GuzzleHttp\Psr7\Exception\MalformedUriException
with the following error message:Notice how the colon after the
https
was stripped.