Closed nicolas-grekas closed 1 year ago
if i understand correctly, PSR7 is a bit underspecified in that regard. would it be possible to amend PSR-7 to make it the official behaviour? maybe with a SHOULD for the current version and a MUST for a new major version?
That could be a path forward for PSR-7 yes @dbu. For now, I'm advising ppl to contribute these edge cases to https://github.com/php-http/psr7-integration-tests/. Like with https://github.com/php-cache/integration-tests/, this would give a reference test suite to validate implementations, and spot+define behaviors for unspecified cases.
Fix #206
Yes, this is unspecified by the PSR, but the current behavior produces broken URLs, and other mainstream implementations do the same: encoding characters that must be, while preventing double-encoding. I think this makes sense. It's more useful than an exception.