Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use uri-host:port to define the authority form #807

Merged
merged 2 commits into from
Mar 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions draft-ietf-httpbis-messaging-latest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@
<sourcecode type="abnf7230">
<x:ref>absolute-URI</x:ref> = &lt;absolute-URI, see <xref target="RFC3986" x:fmt="," x:sec="4.3"/>&gt;
<x:ref>authority</x:ref> = &lt;authority, see <xref target="RFC3986" x:fmt="," x:sec="3.2"/>&gt;
<x:ref>uri-host</x:ref> = &lt;host, see <xref target="RFC3986" x:fmt="," x:sec="3.2.2"/>&gt;
<x:ref>port</x:ref> = &lt;port, see <xref target="RFC3986" x:fmt="," x:sec="3.2.3"/>&gt;
<x:ref>query</x:ref> = &lt;query, see <xref target="RFC3986" x:fmt="," x:sec="3.4"/>&gt;
</sourcecode>
</section>
Expand Down Expand Up @@ -624,19 +626,24 @@ GET http://www.example.org/pub/WWW/TheProject.html HTTP/1.1
<iref item="authority-form (of request-target)"/>
<t>
The <x:dfn>authority-form</x:dfn> of request-target is only used for
CONNECT requests (<xref target="CONNECT"/>).
CONNECT requests (<xref target="CONNECT"/>). It consists of only the
<x:ref>uri-host</x:ref> and <x:ref>port</x:ref> number of the tunnel
destination, separated by a colon (":").
</t>
<sourcecode type="abnf7230"><iref primary="true" item="Grammar" subitem="authority-form"/>
<x:ref>authority-form</x:ref> = <x:ref>authority</x:ref>
<x:ref>authority-form</x:ref> = <x:ref>uri-host</x:ref> ":" <x:ref>port</x:ref>
</sourcecode>
<t>
When making a CONNECT request to establish a
tunnel through one or more proxies, a client &MUST; send only the target
URI's authority component (excluding any userinfo and its "@" delimiter) as
the request-target. For example,
When making a CONNECT request to establish a tunnel through one or more
proxies, a client &MUST; send only the host and port of the tunnel
destination as the request-target. The client obtains the host and port
from the target URI's <x:ref>authority</x:ref> component, except that the
scheme's default port is sent if the target URI elides the port.
For example, a CONNECT request to "http://www.example.com" looks like
</t>
<artwork type="message/http; msgtype=&#34;request&#34;" x:indent-with=" ">
CONNECT www.example.com:80 HTTP/1.1
Host: www.example.com
</artwork>
</section>

Expand Down Expand Up @@ -2661,7 +2668,7 @@ https://www.example.org
<x:ref>absolute-path</x:ref> = &lt;absolute-path, see <xref target="Semantics" x:fmt="," x:sec="4"/>&gt;
<x:ref>asterisk-form</x:ref> = "*"
<x:ref>authority</x:ref> = &lt;authority, see <xref target="RFC3986" x:fmt="," x:sec="3.2"/>&gt;
<x:ref>authority-form</x:ref> = authority
<x:ref>authority-form</x:ref> = uri-host ":" port
royfielding marked this conversation as resolved.
Show resolved Hide resolved

<x:ref>chunk</x:ref> = chunk-size [ chunk-ext ] CRLF chunk-data CRLF
<x:ref>chunk-data</x:ref> = 1*OCTET
Expand All @@ -2685,6 +2692,8 @@ https://www.example.org
<x:ref>obs-text</x:ref> = &lt;obs-text, see <xref target="Semantics" x:fmt="," x:sec="5.6.4"/>&gt;
<x:ref>origin-form</x:ref> = absolute-path [ "?" query ]

<x:ref>port</x:ref> = &lt;port, see <xref target="RFC3986" x:fmt="," x:sec="3.2.3"/>&gt;

<x:ref>query</x:ref> = &lt;query, see <xref target="RFC3986" x:fmt="," x:sec="3.4"/>&gt;
<x:ref>quoted-string</x:ref> = &lt;quoted-string, see <xref target="Semantics" x:fmt="," x:sec="5.6.4"/>&gt;

Expand All @@ -2700,6 +2709,8 @@ https://www.example.org
<x:ref>token</x:ref> = &lt;token, see <xref target="Semantics" x:fmt="," x:sec="5.6.2"/>&gt;
<x:ref>trailer-section</x:ref> = *( field-line CRLF )
<x:ref>transfer-coding</x:ref> = &lt;transfer-coding, see <xref target="Semantics" x:fmt="," x:sec="10.1.4"/>&gt;

<x:ref>uri-host</x:ref> = &lt;host, see <xref target="RFC3986" x:fmt="," x:sec="3.2.2"/>&gt;
</sourcecode>
</section>
<?ENDINC build/draft-ietf-httpbis-messaging-latest.abnf-appendix ?>
Expand Down Expand Up @@ -2939,6 +2950,12 @@ https://www.example.org
conflicts with the use of ranks in the <x:ref>TE</x:ref> header field.
(<xref target="transfer.coding.registry"/>)
</t>
<t>
The ABNF definition of <x:ref>authority-form</x:ref> has changed from the
more general authority component of a URI (in which port is optional) to
the specific host:port format that is required by CONNECT.
(<xref target="authority-form"/>)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also doesn't allow userinfo@ :)

</t>
</section>
</section>

Expand Down Expand Up @@ -3101,6 +3118,7 @@ https://www.example.org
<li>In <xref target="chunked.encoding"/>, clarify large chunk handling issues (<eref target="https://github.com/httpwg/http-core/issues/749"/>)</li>
<li>In <xref target="message.parsing"/>, explicitly close the connection after sending a 400 (<eref target="https://github.com/httpwg/http-core/issues/750"/>)</li>
<li>In <xref target="http.version"/>, refine version requirements for intermediaries (<eref target="https://github.com/httpwg/http-core/issues/751"/>)</li>
<li>In <xref target="authority-form"/>, changed the ABNF definition of authority-form from the authority component (in which port is optional) to the host:port format that has always been required by CONNECT (<eref target="https://github.com/httpwg/http-core/issues/806"/>)</li>
</ul>
</section>
</section>
Expand Down
2 changes: 1 addition & 1 deletion httpbis.abnf
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ asterisk-form = "*"
auth-param = token BWS "=" BWS ( token / quoted-string )
auth-scheme = token
authority = <authority, see [RFC3986], Section 3.2>
authority-form = authority
authority-form = uri-host ":" port
cache-directive = token [ "=" ( token / quoted-string ) ]
challenge = auth-scheme [ 1*SP ( token68 / [ auth-param *( OWS "," OWS auth-param ) ] ) ]
chunk = chunk-size [ chunk-ext ] CRLF chunk-data CRLF
Expand Down