From d1fea64765f0e07b6becc093a4821868b0da0cc9 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 1 Apr 2015 14:31:21 -0500 Subject: [PATCH] Removed errata and updated UriInterface Instead of errata, we'll now address this directly in the specification. --- proposed/http-message-meta.md | 25 +------------------------ proposed/http-message.md | 12 ++++++------ 2 files changed, 7 insertions(+), 30 deletions(-) diff --git a/proposed/http-message-meta.md b/proposed/http-message-meta.md index 8f1251ea8..54e8b495e 100644 --- a/proposed/http-message-meta.md +++ b/proposed/http-message-meta.md @@ -615,29 +615,6 @@ used to populate the headers of an HTTP message. * Michael Dowling * Larry Garfield +* Evert Pot * Phil Sturgeon * Chris Wilkinson -* Evert Pot - -## 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 1fbca9961..314adb5e3 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(); @@ -1271,15 +1271,15 @@ interface UriInterface * * This method MUST retain the state of the current instance, and return * a new instance that contains the specified scheme. If the scheme - * provided includes the "://" delimiter, it MUST be removed. + * 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.