diff --git a/proposed/http-message-meta.md b/proposed/http-message-meta.md index 157efa674..a026acb30 100644 --- a/proposed/http-message-meta.md +++ b/proposed/http-message-meta.md @@ -631,26 +631,3 @@ used to populate the headers of an HTTP message. * Evert Pot * Phil Sturgeon * Chris Wilkinson - -## 7. Votes - -## 8. Errata - -### 8.1 Scheme Delimiters - -Per [RFC 3986 section 3](https://tools.ietf.org/html/rfc3986#section-3), `:` is -considered a closing delimiter for a scheme, and `//` is considered an -opening delimeter for the URI authority. - -In the specification as accepted, `Psr\Http\Message\UriInterface` indicates that -the methods `withScheme()` and `getScheme()` should ignore a trailing `://` -delimiter for purposes of consistency. (No similar stipulation is placed on the -authority, as authority is not treated as a single segment, but rather as its -own individual segments (`user-info`, `host`, and `port`)). - -The `://` delimiter was called out specifically, as schemes are widely either -presented as the bare-word (e.g., `http`, `https`) or with that delimiter (e.g., -`http://`, `https://`), which is the combination of the scheme closing delimiter -and the authority opening delimiter. However, implementations of the methods -MUST also strip a closing `:` delimiter when presented without the opening `//` -delimiter. diff --git a/proposed/http-message.md b/proposed/http-message.md index b00adf663..49c031fe5 100644 --- a/proposed/http-message.md +++ b/proposed/http-message.md @@ -1163,10 +1163,10 @@ interface UriInterface * * If no scheme is present, this method MUST return an empty string. * - * The string returned MUST omit the trailing "://" delimiter if present. + * The string MUST omit the closing scheme delimiter (":") or the + * combination of the closing scheme delimiter and the opening authority + * delimiter ("://"), if present. * - * @see https://github.com/php-fig/fig-standards/blob/proposed/http-message-meta.md#81-scheme-delimiters - * which indicates ":" delimiters must also be omitted. * @return string The scheme of the URI. */ public function getScheme(); @@ -1270,16 +1270,16 @@ interface UriInterface * Return an instance with the specified scheme. * * This method MUST retain the state of the current instance, and return - * an instance that contains the specified scheme. If the scheme - * provided includes the "://" delimiter, it MUST be removed. + * a new instance that contains the specified scheme. If the scheme + * provided includes either the closing scheme delimiter (":") or the + * combination of the closing scheme delimiter and the opening authority + * delimiter ("://"), these strings should be removed. * * Implementations SHOULD restrict values to "http", "https", or an empty * string but MAY accommodate other schemes if required. * * An empty scheme is equivalent to removing the scheme. * - * @see https://github.com/php-fig/fig-standards/blob/proposed/http-message-meta.md#81-scheme-delimiters - * which indicates ":" delimiters must also be omitted. * @param string $scheme The scheme to use with the new instance. * @return self A new instance with the specified scheme. * @throws \InvalidArgumentException for invalid or unsupported schemes.