@@ -1613,14 +1613,17 @@ interface UriInterface
1613
1613
* Section 4.1. The method concatenates the various components of the URI,
1614
1614
* using the appropriate delimiters:
1615
1615
*
1616
- * - If a scheme is present, "://" MUST append the value.
1617
- * - If the authority information is present, that value will be
1618
- * concatenated.
1619
- * - If the path is rootless and the authority information is present, the
1620
- * path MUST be prefixed by a "/" character. Otherwise, the path can be
1621
- * concatenated without additional delimiters.
1622
- * - If a query string is present, it MUST be prefixed by a "?" character.
1623
- * - If a URI fragment is present, it MUST be prefixed by a "#" character.
1616
+ * - If a scheme is present, it MUST be suffixed by ":".
1617
+ * - If an authority is present, it MUST be prefixed by "//".
1618
+ * - The path can be concatenated without delimiters. But there are two
1619
+ * cases where the path has to be adjusted to make the URI reference
1620
+ * valid as PHP does not allow to throw an exception in __toString():
1621
+ * - If the path is rootless and an authority is present, the path MUST
1622
+ * be prefixed by "/".
1623
+ * - If the path is starting with more than one "/" and no authority is
1624
+ * present, the starting slashes MUST be reduced to one.
1625
+ * - If a query is present, it MUST be prefixed by "?".
1626
+ * - If a fragment is present, it MUST be prefixed by "#".
1624
1627
*
1625
1628
* @see http://tools.ietf.org/html/rfc3986#section-4.1
1626
1629
* @return string
0 commit comments