You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Uri class is able to parse malformed URIs but this results in Uri::__toString() generating a malformed URI. Attempting to pass that URI back into Uri will yield a InvalidArgumentException.
Current behavior
Certain malformed URIs do not round-trip through \Laminas\Diactoros\Uri.
How to reproduce
<?phprequire('vendor/autoload.php');
$value = 'http://invalid:%20https://example.com';
$uri = new \Laminas\Diactoros\Uri($value);
$uri2 = new \Laminas\Diactoros\Uri($uri->__toString()); // Exception is thrown here.
Expected behavior
Either both constructors throw, or neither.
Note: This issue also exists in guzzlehttp/psr7 and was reported at guzzle/psr7#583.
The text was updated successfully, but these errors were encountered:
Lets see how guzzle will handle this, after my latest hassle with php-http/discovery I would prefer to keep this in-sync.
We might also want to cross-post this to https://github.com/php-http/psr7-integration-tests (which is used by diactoros as well).
Bug Report
Summary
The
Uri
class is able to parse malformed URIs but this results inUri::__toString()
generating a malformed URI. Attempting to pass that URI back into Uri will yield aInvalidArgumentException
.Current behavior
Certain malformed URIs do not round-trip through
\Laminas\Diactoros\Uri
.How to reproduce
Expected behavior
Either both constructors throw, or neither.
Note: This issue also exists in guzzlehttp/psr7 and was reported at guzzle/psr7#583.
The text was updated successfully, but these errors were encountered: