PSR-7: quite critical UriInterface::withPath issue

50 views
Skip to first unread message

Alexander Makarov

unread,
Mar 31, 2015, 7:05:10 PM3/31/15
to php...@googlegroups.com
Hello everyone,

I don't want to hold PSR-7 acceptance but there's quite critical issue with UriInterface::withPath:


Either clarification, change of verbal requirement or method signature change is required (not sure which one).

Matthew Weier O'Phinney

unread,
Mar 31, 2015, 8:11:37 PM3/31/15
to php...@googlegroups.com

You're misreading RFC 3986. It states in the start of section 2:

"If data for a URI component would conflict with a reserved character's purpose as a delimiter, then the conflicting data must be percent-encoded before the URI is formed."

Section 2.4 continues this statement with the following clarification:

"Under normal circumstances, the only time when octets within a URI are percent-encoded is during the process of producing the URI from its component parts. This is when an implementation determines which of the reserved characters are to be used as subcomponent delimiters and which can be safely used as data. "

Section 3.3 on paths details what characters are allowed as data (the set includes the slash, among other delimiters). As such, no clarification is necessary in psr-7; rfc 3896 states what must be encoded, albeit obliquely.

Feel free to reference this thread on your github issue.

Alexander Makarov

unread,
Mar 31, 2015, 8:48:21 PM3/31/15
to php...@googlegroups.com
My bad. Thanks for clarification.
Reply all
Reply to author
Forward
0 new messages