Changeset 344 for draft-ietf-httpbis
- Timestamp:
- 11/11/08 02:47:01 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest-roy/p1-messaging.html
r342 r344 518 518 <li class="tocline1">1.1 <a href="#intro.requirements">Requirements</a></li> 519 519 <li class="tocline1">1.2 <a href="#notation">Syntax Notation</a><ul class="toc"> 520 <li class="tocline1">1.2.1 <a href="#notation.abnf">A ugmented BNF</a><ul class="toc">520 <li class="tocline1">1.2.1 <a href="#notation.abnf">ABNF Extensions</a><ul class="toc"> 521 521 <li class="tocline1">1.2.1.1 <a href="#rfc.section.1.2.1.1">#rule</a></li> 522 522 <li class="tocline1">1.2.1.2 <a href="#implied.LWS">implied *LWS</a></li> … … 683 683 <p id="rfc.section.1.1.p.2">An implementation is not compliant if it fails to satisfy one or more of the <em class="bcp14">MUST</em> or <em class="bcp14">REQUIRED</em> level requirements for the protocols it implements. An implementation that satisfies all the <em class="bcp14">MUST</em> or <em class="bcp14">REQUIRED</em> level and all the <em class="bcp14">SHOULD</em> level requirements for its protocols is said to be "unconditionally compliant"; one that satisfies all the <em class="bcp14">MUST</em> level requirements but not all the <em class="bcp14">SHOULD</em> level requirements for its protocols is said to be "conditionally compliant." 684 684 </p> 685 <div id="rfc.iref.g.1"></div> 686 <div id="rfc.iref.g.2"></div> 687 <div id="rfc.iref.g.3"></div> 688 <div id="rfc.iref.g.4"></div> 689 <div id="rfc.iref.g.5"></div> 690 <div id="rfc.iref.g.6"></div> 691 <div id="rfc.iref.g.7"></div> 692 <div id="rfc.iref.g.8"></div> 693 <div id="rfc.iref.g.9"></div> 694 <div id="rfc.iref.g.10"></div> 695 <div id="rfc.iref.g.11"></div> 696 <div id="rfc.iref.g.12"></div> 685 697 <h2 id="rfc.section.1.2"><a href="#rfc.section.1.2">1.2</a> <a id="notation" href="#notation">Syntax Notation</a></h2> 686 <p id="rfc.section.1.2.p.1">This specification uses the Augmented Backus-Naur Form (ABNF) notation of <a href="#RFC5234" id="rfc.xref.RFC5234.1"><cite title="Augmented BNF for Syntax Specifications: ABNF">[RFC5234]</cite></a>, including its core ABNF syntax rules: ALPHA (letters), CR (carriage return), DIGIT (decimal digits), DQUOTE (double quote),687 HEXDIG (hexadecimal digits), LF (line feed), and SP (space).688 </p>689 698 <div id="core.rules"> 690 <p id="rfc.section.1.2.p. 2"> The following rules are used throughout this specification to describe basic parsing constructs. The US-ASCII coded character691 set is defined by ANSI X3.4-1986 <a href="#USASCII" id="rfc.xref.USASCII.1"><cite title="Coded Character Set -- 7-bit American Standard Code for Information Interchange">[USASCII]</cite></a>.699 <p id="rfc.section.1.2.p.1"> This specification uses the Augmented Backus-Naur Form (ABNF) notation of <a href="#RFC5234" id="rfc.xref.RFC5234.1"><cite title="Augmented BNF for Syntax Specifications: ABNF">[RFC5234]</cite></a>. The following core rules are included by reference, as defined in <a href="#RFC5234" id="rfc.xref.RFC5234.2"><cite title="Augmented BNF for Syntax Specifications: ABNF">[RFC5234]</cite></a>, <a href="http://tools.ietf.org/html/rfc5234#section-B.1">Appendix B.1</a>: ALPHA (letters), CHAR (any <a href="#USASCII" id="rfc.xref.USASCII.1"><cite title="Coded Character Set -- 7-bit American Standard Code for Information Interchange">[USASCII]</cite></a> character, excluding NUL), CR (carriage return), CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote), 700 HEXDIG (hexadecimal 0-9/A-F/a-f), HTAB (horizontal tab), LF (line feed), OCTET (any 8-bit sequence of data), and SP (space). 692 701 </p> 693 702 </div> 694 <div id="rfc.figure.u.1"></div><pre class="inline"><span id="rfc.iref.g.1"></span><span id="rfc.iref.g.2"></span><span id="rfc.iref.g.3"></span><span id="rfc.iref.g.4"></span><span id="rfc.iref.g.5"></span><span id="rfc.iref.g.6"></span><span id="rfc.iref.g.7"></span><span id="rfc.iref.g.8"></span><span id="rfc.iref.g.9"></span><span id="rfc.iref.g.10"></span> <a href="#core.rules" class="smpl">OCTET</a> = %x00-FF 695 ; any 8-bit sequence of data 696 <a href="#core.rules" class="smpl">CHAR</a> = %x01-7F 697 ; any US-ASCII character, excluding NUL 698 <a href="#core.rules" class="smpl">ALPHA</a> = %x41-5A / %x61-7A 699 ; A-Z / a-z 700 <a href="#core.rules" class="smpl">DIGIT</a> = %x30-39 701 ; any US-ASCII digit "0".."9" 702 <a href="#core.rules" class="smpl">CTL</a> = %x00-1F / %x7F 703 ; (octets 0 - 31) and DEL (127) 704 <a href="#core.rules" class="smpl">CR</a> = %x0D 705 ; US-ASCII CR, carriage return (13) 706 <a href="#core.rules" class="smpl">LF</a> = %x0A 707 ; US-ASCII LF, linefeed (10) 708 <a href="#core.rules" class="smpl">SP</a> = %x20 709 ; US-ASCII SP, space (32) 710 <a href="#core.rules" class="smpl">HTAB</a> = %x09 711 ; US-ASCII HT, horizontal-tab (9) 712 <a href="#core.rules" class="smpl">DQUOTE</a> = %x22 713 ; US-ASCII double-quote mark (34) 714 </pre><h3 id="rfc.section.1.2.1"><a href="#rfc.section.1.2.1">1.2.1</a> <a id="notation.abnf" href="#notation.abnf">Augmented BNF</a></h3> 715 <p id="rfc.section.1.2.1.p.1">All of the mechanisms specified in this document are described in both prose and an augmented Backus-Naur Form (ABNF) based 716 on that defined in <a href="#RFC5234" id="rfc.xref.RFC5234.2"><cite title="Augmented BNF for Syntax Specifications: ABNF">[RFC5234]</cite></a>. Implementors will need to be familiar with the notation in order to understand this specification. The extensions to ABNF 717 used in this specification are described below. 703 <h3 id="rfc.section.1.2.1"><a href="#rfc.section.1.2.1">1.2.1</a> <a id="notation.abnf" href="#notation.abnf">ABNF Extensions</a></h3> 704 <p id="rfc.section.1.2.1.p.1">Two extensions to the ABNF rules of <a href="#RFC5234" id="rfc.xref.RFC5234.3"><cite title="Augmented BNF for Syntax Specifications: ABNF">[RFC5234]</cite></a> are used to improve readability. [The current plan is to remove these extensions prior to the last call draft.] 718 705 </p> 719 706 <h4 id="rfc.section.1.2.1.1"><a href="#rfc.section.1.2.1.1">1.2.1.1</a> #rule … … 722 709 least <n> and at most <m> elements, each separated by one or more commas (",") and <em class="bcp14">OPTIONAL</em> linear white space (LWS). This makes the usual form of lists very easy; a rule such as 723 710 </p> 724 <div id="rfc.figure.u. 2"></div><pre class="text"> ( *<a href="#rule.LWS" class="smpl">LWS</a> element *( *<a href="#rule.LWS" class="smpl">LWS</a> "," *<a href="#rule.LWS" class="smpl">LWS</a> element ))</pre><p id="rfc.section.1.2.1.1.p.2">can be shown as </p>725 <div id="rfc.figure.u. 3"></div><pre class="text"> 1#element</pre><p id="rfc.section.1.2.1.1.p.3">Wherever this construct is used, null elements are allowed, but do not contribute to the count of elements present. That is,711 <div id="rfc.figure.u.1"></div><pre class="text"> ( *<a href="#rule.LWS" class="smpl">LWS</a> element *( *<a href="#rule.LWS" class="smpl">LWS</a> "," *<a href="#rule.LWS" class="smpl">LWS</a> element ))</pre><p id="rfc.section.1.2.1.1.p.2">can be shown as </p> 712 <div id="rfc.figure.u.2"></div><pre class="text"> 1#element</pre><p id="rfc.section.1.2.1.1.p.3">Wherever this construct is used, null elements are allowed, but do not contribute to the count of elements present. That is, 726 713 "(element), , (element) " is permitted, but counts as only two elements. Therefore, where at least one element is required, 727 714 at least one non-null element <em class="bcp14">MUST</em> be present. Default values are 0 and infinity so that "#element" allows any number, including zero; "1#element" requires at … … 737 724 <h3 id="rfc.section.1.2.2"><a href="#rfc.section.1.2.2">1.2.2</a> <a id="basic.rules" href="#basic.rules">Basic Rules</a></h3> 738 725 <div id="rule.CRLF"> 739 <p id="rfc.section.1.2.2.p.1"> HTTP/1.1 defines the sequence CRLF as the end-of-line marker for all protocol elements except the entity-body (see <a href="#tolerant.applications" title="Tolerant Applications">Appendix A</a> for tolerant applications). The end-of-line marker within an entity-body is defined by its associated media type, as described726 <p id="rfc.section.1.2.2.p.1">HTTP/1.1 defines the sequence CRLF as the end-of-line marker for all protocol elements except the entity-body (see <a href="#tolerant.applications" title="Tolerant Applications">Appendix A</a> for tolerant applications). The end-of-line marker within an entity-body is defined by its associated media type, as described 740 727 in <a href="p3-payload.html#media.types" title="Media Types">Section 3.3</a> of <a href="#Part3" id="rfc.xref.Part3.2"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>. 741 728 </p> 742 729 </div> 743 <div id="rfc.figure.u.4"></div><pre class="inline"><span id="rfc.iref.g.11"></span> <a href="#rule.CRLF" class="smpl">CRLF</a> = <a href="#core.rules" class="smpl">CR</a> LF 744 </pre><div id="rule.LWS"> 745 <p id="rfc.section.1.2.2.p.3"> HTTP/1.1 header field values can be folded onto multiple lines if the continuation line begins with a space or horizontal 730 <div id="rule.LWS"> 731 <p id="rfc.section.1.2.2.p.2"> HTTP/1.1 header field values can be folded onto multiple lines if the continuation line begins with a space or horizontal 746 732 tab. All linear white space, including folding, has the same semantics as SP. A recipient <em class="bcp14">MAY</em> replace any linear white space with a single SP before interpreting the field value or forwarding the message downstream. 747 733 </p> 748 734 </div> 749 <div id="rfc.figure.u. 5"></div><pre class="inline"><span id="rfc.iref.g.12"></span> <a href="#rule.LWS" class="smpl">LWS</a> = [<a href="#rule.CRLF" class="smpl">CRLF</a>] 1*( <a href="#core.rules" class="smpl">SP</a> / <a href="#core.rules" class="smpl">HTAB</a> )735 <div id="rfc.figure.u.3"></div><pre class="inline"><span id="rfc.iref.g.13"></span> <a href="#rule.LWS" class="smpl">LWS</a> = [<a href="#core.rules" class="smpl">CRLF</a>] 1*( <a href="#core.rules" class="smpl">SP</a> / <a href="#core.rules" class="smpl">HTAB</a> ) 750 736 </pre><div id="rule.TEXT"> 751 <p id="rfc.section.1.2.2.p. 5"> The TEXT rule is only used for descriptive field contents and values that are not intended to be interpreted by the message737 <p id="rfc.section.1.2.2.p.4"> The TEXT rule is only used for descriptive field contents and values that are not intended to be interpreted by the message 752 738 parser. Words of *TEXT <em class="bcp14">MAY</em> contain characters from character sets other than ISO-8859-1 <a href="#ISO-8859-1" id="rfc.xref.ISO-8859-1.1"><cite title="Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1">[ISO-8859-1]</cite></a> only when encoded according to the rules of <a href="#RFC2047" id="rfc.xref.RFC2047.1"><cite title="MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text">[RFC2047]</cite></a>. 753 739 </p> 754 740 </div> 755 <div id="rfc.figure.u. 6"></div><pre class="inline"><span id="rfc.iref.g.13"></span> <a href="#rule.TEXT" class="smpl">TEXT</a> = %x20-7E / %x80-FF / <a href="#rule.LWS" class="smpl">LWS</a>741 <div id="rfc.figure.u.4"></div><pre class="inline"><span id="rfc.iref.g.14"></span> <a href="#rule.TEXT" class="smpl">TEXT</a> = %x20-7E / %x80-FF / <a href="#rule.LWS" class="smpl">LWS</a> 756 742 ; any <a href="#core.rules" class="smpl">OCTET</a> except <a href="#core.rules" class="smpl">CTL</a>s, but including <a href="#rule.LWS" class="smpl">LWS</a> 757 </pre><p id="rfc.section.1.2.2.p. 7">A CRLF is allowed in the definition of TEXT only as part of a header field continuation. It is expected that the folding LWS743 </pre><p id="rfc.section.1.2.2.p.6">A CRLF is allowed in the definition of TEXT only as part of a header field continuation. It is expected that the folding LWS 758 744 will be replaced with a single SP before interpretation of the TEXT value. 759 745 </p> 760 <div id="rule.HEXDIG"> 761 <p id="rfc.section.1.2.2.p.8"> Hexadecimal numeric characters are used in several protocol elements.</p> 762 </div> 763 <div id="rfc.figure.u.7"></div><pre class="inline"><span id="rfc.iref.g.14"></span> <a href="#rule.HEXDIG" class="smpl">HEXDIG</a> = "A" / "B" / "C" / "D" / "E" / "F" 764 / "a" / "b" / "c" / "d" / "e" / "f" / <a href="#core.rules" class="smpl">DIGIT</a> 765 </pre><div id="rule.token.separators"> 766 <p id="rfc.section.1.2.2.p.10"> Many HTTP/1.1 header field values consist of words separated by LWS or special characters. These special characters <em class="bcp14">MUST</em> be in a quoted string to be used within a parameter value (as defined in <a href="#transfer.codings" title="Transfer Codings">Section 3.3</a>). 746 <div id="rule.token.separators"> 747 <p id="rfc.section.1.2.2.p.7"> Many HTTP/1.1 header field values consist of words separated by LWS or special characters. These special characters <em class="bcp14">MUST</em> be in a quoted string to be used within a parameter value (as defined in <a href="#transfer.codings" title="Transfer Codings">Section 3.3</a>). 767 748 </p> 768 749 </div> 769 <div id="rfc.figure.u. 8"></div><pre class="inline"><span id="rfc.iref.g.15"></span><span id="rfc.iref.g.16"></span><span id="rfc.iref.g.17"></span> <a href="#rule.token.separators" class="smpl">separators</a> = "(" / ")" / "<" / ">" / "@"750 <div id="rfc.figure.u.5"></div><pre class="inline"><span id="rfc.iref.g.15"></span><span id="rfc.iref.g.16"></span><span id="rfc.iref.g.17"></span> <a href="#rule.token.separators" class="smpl">separators</a> = "(" / ")" / "<" / ">" / "@" 770 751 / "," / ";" / ":" / "\" / <a href="#core.rules" class="smpl">DQUOTE</a> 771 752 / "/" / "[" / "]" / "?" / "=" … … 779 760 <a href="#rule.token.separators" class="smpl">token</a> = 1*<a href="#rule.token.separators" class="smpl">tchar</a> 780 761 </pre><div id="rule.comment"> 781 <p id="rfc.section.1.2.2.p. 12"> Comments can be included in some HTTP header fields by surrounding the comment text with parentheses. Comments are only allowed762 <p id="rfc.section.1.2.2.p.9"> Comments can be included in some HTTP header fields by surrounding the comment text with parentheses. Comments are only allowed 782 763 in fields containing "comment" as part of their field value definition. In all other fields, parentheses are considered part 783 764 of the field value. 784 765 </p> 785 766 </div> 786 <div id="rfc.figure.u. 9"></div><pre class="inline"><span id="rfc.iref.g.18"></span><span id="rfc.iref.g.19"></span> <a href="#rule.comment" class="smpl">comment</a> = "(" *( <a href="#rule.comment" class="smpl">ctext</a> / <a href="#rule.quoted-pair" class="smpl">quoted-pair</a> / <a href="#rule.comment" class="smpl">comment</a> ) ")"767 <div id="rfc.figure.u.6"></div><pre class="inline"><span id="rfc.iref.g.18"></span><span id="rfc.iref.g.19"></span> <a href="#rule.comment" class="smpl">comment</a> = "(" *( <a href="#rule.comment" class="smpl">ctext</a> / <a href="#rule.quoted-pair" class="smpl">quoted-pair</a> / <a href="#rule.comment" class="smpl">comment</a> ) ")" 787 768 <a href="#rule.comment" class="smpl">ctext</a> = <any <a href="#rule.TEXT" class="smpl">TEXT</a> excluding "(" and ")"> 788 769 </pre><div id="rule.quoted-string"> 789 <p id="rfc.section.1.2.2.p.1 4"> A string of text is parsed as a single word if it is quoted using double-quote marks.</p>770 <p id="rfc.section.1.2.2.p.11"> A string of text is parsed as a single word if it is quoted using double-quote marks.</p> 790 771 </div> 791 <div id="rfc.figure.u. 10"></div><pre class="inline"><span id="rfc.iref.g.20"></span><span id="rfc.iref.g.21"></span> <a href="#rule.quoted-string" class="smpl">quoted-string</a> = ( <a href="#core.rules" class="smpl">DQUOTE</a> *(<a href="#rule.quoted-string" class="smpl">qdtext</a> / <a href="#rule.quoted-pair" class="smpl">quoted-pair</a> ) <a href="#core.rules" class="smpl">DQUOTE</a> )772 <div id="rfc.figure.u.7"></div><pre class="inline"><span id="rfc.iref.g.20"></span><span id="rfc.iref.g.21"></span> <a href="#rule.quoted-string" class="smpl">quoted-string</a> = ( <a href="#core.rules" class="smpl">DQUOTE</a> *(<a href="#rule.quoted-string" class="smpl">qdtext</a> / <a href="#rule.quoted-pair" class="smpl">quoted-pair</a> ) <a href="#core.rules" class="smpl">DQUOTE</a> ) 792 773 <a href="#rule.quoted-string" class="smpl">qdtext</a> = <any <a href="#rule.TEXT" class="smpl">TEXT</a> excluding <a href="#core.rules" class="smpl">DQUOTE</a> and "\"> 793 774 </pre><div id="rule.quoted-pair"> 794 <p id="rfc.section.1.2.2.p.1 6"> The backslash character ("\") <em class="bcp14">MAY</em> be used as a single-character quoting mechanism only within quoted-string and comment constructs.775 <p id="rfc.section.1.2.2.p.13"> The backslash character ("\") <em class="bcp14">MAY</em> be used as a single-character quoting mechanism only within quoted-string and comment constructs. 795 776 </p> 796 777 </div> 797 <div id="rfc.figure.u. 11"></div><pre class="inline"><span id="rfc.iref.g.22"></span><span id="rfc.iref.g.23"></span> <a href="#rule.quoted-pair" class="smpl">quoted-text</a> = %x01-09 /778 <div id="rfc.figure.u.8"></div><pre class="inline"><span id="rfc.iref.g.22"></span><span id="rfc.iref.g.23"></span> <a href="#rule.quoted-pair" class="smpl">quoted-text</a> = %x01-09 / 798 779 %x0B-0C / 799 780 %x0E-FF ; Characters excluding NUL, <a href="#core.rules" class="smpl">CR</a> and <a href="#core.rules" class="smpl">LF</a> … … 801 782 </pre><h3 id="rfc.section.1.2.3"><a href="#rfc.section.1.2.3">1.2.3</a> <a id="abnf.dependencies" href="#abnf.dependencies">ABNF Rules defined in other Parts of the Specification</a></h3> 802 783 <p id="rfc.section.1.2.3.p.1">The ABNF rules below are defined in other parts:</p> 803 <div id="rfc.figure.u. 12"></div><pre class="inline"> <a href="#abnf.dependencies" class="smpl">request-header</a> = <request-header, defined in <a href="#Part2" id="rfc.xref.Part2.1"><cite title="HTTP/1.1, part 2: Message Semantics">[Part2]</cite></a>, <a href="p2-semantics.html#request.header.fields" title="Request Header Fields">Section 4</a>>784 <div id="rfc.figure.u.9"></div><pre class="inline"> <a href="#abnf.dependencies" class="smpl">request-header</a> = <request-header, defined in <a href="#Part2" id="rfc.xref.Part2.1"><cite title="HTTP/1.1, part 2: Message Semantics">[Part2]</cite></a>, <a href="p2-semantics.html#request.header.fields" title="Request Header Fields">Section 4</a>> 804 785 <a href="#abnf.dependencies" class="smpl">response-header</a> = <response-header, defined in <a href="#Part2" id="rfc.xref.Part2.2"><cite title="HTTP/1.1, part 2: Message Semantics">[Part2]</cite></a>, <a href="p2-semantics.html#response.header.fields" title="Response Header Fields">Section 6</a>> 805 </pre><div id="rfc.figure.u.1 3"></div><pre class="inline"> <a href="#abnf.dependencies" class="smpl">accept-params</a> = <accept-params, defined in <a href="#Part3" id="rfc.xref.Part3.3"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>, <a href="p3-payload.html#header.accept" title="Accept">Section 6.1</a>>786 </pre><div id="rfc.figure.u.10"></div><pre class="inline"> <a href="#abnf.dependencies" class="smpl">accept-params</a> = <accept-params, defined in <a href="#Part3" id="rfc.xref.Part3.3"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>, <a href="p3-payload.html#header.accept" title="Accept">Section 6.1</a>> 806 787 <a href="#abnf.dependencies" class="smpl">entity-body</a> = <entity-body, defined in <a href="#Part3" id="rfc.xref.Part3.4"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>, <a href="p3-payload.html#entity.body" title="Entity Body">Section 4.2</a>> 807 788 <a href="#abnf.dependencies" class="smpl">entity-header</a> = <entity-header, defined in <a href="#Part3" id="rfc.xref.Part3.5"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>, <a href="p3-payload.html#entity.header.fields" title="Entity Header Fields">Section 4.1</a>> 808 </pre><div id="rfc.figure.u.1 4"></div><pre class="inline"> <a href="#abnf.dependencies" class="smpl">Cache-Control</a> = <Cache-Control, defined in <a href="#Part6" id="rfc.xref.Part6.1"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>, <a href="p6-cache.html#header.pragma" title="Pragma">Section 16.4</a>>789 </pre><div id="rfc.figure.u.11"></div><pre class="inline"> <a href="#abnf.dependencies" class="smpl">Cache-Control</a> = <Cache-Control, defined in <a href="#Part6" id="rfc.xref.Part6.1"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>, <a href="p6-cache.html#header.pragma" title="Pragma">Section 16.4</a>> 809 790 <a href="#abnf.dependencies" class="smpl">Pragma</a> = <Pragma, defined in <a href="#Part6" id="rfc.xref.Part6.2"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>, <a href="p6-cache.html#header.pragma" title="Pragma">Section 16.4</a>> 810 791 <a href="#abnf.dependencies" class="smpl">Warning</a> = <Warning, defined in <a href="#Part6" id="rfc.xref.Part6.3"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>, <a href="p6-cache.html#header.warning" title="Warning">Section 16.6</a>> … … 819 800 "path-absolute", "query", and "authority" from <a href="#RFC3986" id="rfc.xref.RFC3986.3"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>: 820 801 </p> 821 <div id="rfc.figure.u.1 5"></div><pre class="inline"><span id="rfc.iref.g.24"></span><span id="rfc.iref.g.25"></span><span id="rfc.iref.g.26"></span><span id="rfc.iref.g.27"></span><span id="rfc.iref.g.28"></span><span id="rfc.iref.g.29"></span><span id="rfc.iref.g.30"></span> <a href="#uri" class="smpl">absolute-URI</a> = <absolute-URI, defined in <a href="#RFC3986" id="rfc.xref.RFC3986.4"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="http://tools.ietf.org/html/rfc3986#section-4.3">Section 4.3</a>>802 <div id="rfc.figure.u.12"></div><pre class="inline"><span id="rfc.iref.g.24"></span><span id="rfc.iref.g.25"></span><span id="rfc.iref.g.26"></span><span id="rfc.iref.g.27"></span><span id="rfc.iref.g.28"></span><span id="rfc.iref.g.29"></span><span id="rfc.iref.g.30"></span> <a href="#uri" class="smpl">absolute-URI</a> = <absolute-URI, defined in <a href="#RFC3986" id="rfc.xref.RFC3986.4"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="http://tools.ietf.org/html/rfc3986#section-4.3">Section 4.3</a>> 822 803 <a href="#uri" class="smpl">authority</a> = <authority, defined in <a href="#RFC3986" id="rfc.xref.RFC3986.5"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="http://tools.ietf.org/html/rfc3986#section-3.2">Section 3.2</a>> 823 804 <a href="#uri" class="smpl">fragment</a> = <fragment, defined in <a href="#RFC3986" id="rfc.xref.RFC3986.6"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="http://tools.ietf.org/html/rfc3986#section-3.5">Section 3.5</a>> … … 841 822 for identifiers using the http or https URI schemes. 842 823 </p> 843 <div id="rfc.figure.u.1 6"></div><pre class="inline"><span id="rfc.iref.g.31"></span> <a href="#http.uri" class="smpl">http-URI</a> = "http:" "//" <a href="#uri" class="smpl">authority</a> <a href="#uri" class="smpl">path-abempty</a> [ "?" <a href="#uri" class="smpl">query</a> ]824 <div id="rfc.figure.u.13"></div><pre class="inline"><span id="rfc.iref.g.31"></span> <a href="#http.uri" class="smpl">http-URI</a> = "http:" "//" <a href="#uri" class="smpl">authority</a> <a href="#uri" class="smpl">path-abempty</a> [ "?" <a href="#uri" class="smpl">query</a> ] 844 825 </pre><p id="rfc.section.2.1.1.p.3">If the port is empty or not given, port 80 is assumed. The semantics are that the identified resource is located at the server 845 826 listening for TCP connections on that port of that host, and the Request-URI for the resource is path-absolute (<a href="#request-uri" title="Request-URI">Section 5.1.2</a>). The use of IP addresses in URLs <em class="bcp14">SHOULD</em> be avoided whenever possible (see <a href="#RFC1900" id="rfc.xref.RFC1900.1"><cite title="Renumbering Needs Work">[RFC1900]</cite></a>). If the path-absolute is not present in the URL, it <em class="bcp14">MUST</em> be given as "/" when used as a Request-URI for a resource (<a href="#request-uri" title="Request-URI">Section 5.1.2</a>). If a proxy receives a host name which is not a fully qualified domain name, it <em class="bcp14">MAY</em> add its domain to the host name it received. If a proxy receives a fully qualified domain name, the proxy <em class="bcp14">MUST NOT</em> change the host name. … … 860 841 <li>An empty path-absolute is equivalent to an path-absolute of "/".</li> 861 842 </ul> 862 <p id="rfc.section.2.1.2.p.2">Characters other than those in the "reserved" set (see <a href="#RFC3986" id="rfc.xref.RFC3986.12"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="http://tools.ietf.org/html/rfc3986#section-2.2">Section 2.2</a>) are equivalent to their ""%" <a href="# rule.HEXDIG" class="smpl">HEXDIG</a> <a href="#rule.HEXDIG" class="smpl">HEXDIG</a>" encoding.843 <p id="rfc.section.2.1.2.p.2">Characters other than those in the "reserved" set (see <a href="#RFC3986" id="rfc.xref.RFC3986.12"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="http://tools.ietf.org/html/rfc3986#section-2.2">Section 2.2</a>) are equivalent to their ""%" <a href="#core.rules" class="smpl">HEXDIG</a> <a href="#core.rules" class="smpl">HEXDIG</a>" encoding. 863 844 </p> 864 845 <p id="rfc.section.2.1.2.p.3">For example, the following three URIs are equivalent:</p> 865 <div id="rfc.figure.u.1 7"></div><pre class="text"> http://example.com:80/~smith/home.html846 <div id="rfc.figure.u.14"></div><pre class="text"> http://example.com:80/~smith/home.html 866 847 http://EXAMPLE.com/%7Esmith/home.html 867 848 http://EXAMPLE.com:/%7esmith/home.html … … 877 858 server (O). 878 859 </p> 879 <div id="rfc.figure.u.1 8"></div><pre class="drawing"> request chain ------------------------>860 <div id="rfc.figure.u.15"></div><pre class="drawing"> request chain ------------------------> 880 861 UA -------------------v------------------- O 881 862 <----------------------- response chain … … 888 869 cannot understand the contents of the messages. 889 870 </p> 890 <div id="rfc.figure.u.1 9"></div><pre class="drawing"> request chain -------------------------------------->871 <div id="rfc.figure.u.16"></div><pre class="drawing"> request chain --------------------------------------> 891 872 UA -----v----- A -----v----- B -----v----- C -----v----- O 892 873 <------------------------------------- response chain … … 903 884 O (via C) for a request which has not been cached by UA or A. 904 885 </p> 905 <div id="rfc.figure.u. 20"></div><pre class="drawing"> request chain ---------->886 <div id="rfc.figure.u.17"></div><pre class="drawing"> request chain ----------> 906 887 UA -----v----- A -----v----- B - - - - - - C - - - - - - O 907 888 <--------- response chain … … 936 917 </p> 937 918 <p id="rfc.section.3.1.p.2">The version of an HTTP message is indicated by an HTTP-Version field in the first line of the message. HTTP-Version is case-sensitive.</p> 938 <div id="rfc.figure.u. 21"></div><pre class="inline"><span id="rfc.iref.g.32"></span><span id="rfc.iref.g.33"></span> <a href="#http.version" class="smpl">HTTP-Version</a> = <a href="#http.version" class="smpl">HTTP-Prot-Name</a> "/" 1*<a href="#core.rules" class="smpl">DIGIT</a> "." 1*<a href="#core.rules" class="smpl">DIGIT</a>919 <div id="rfc.figure.u.18"></div><pre class="inline"><span id="rfc.iref.g.32"></span><span id="rfc.iref.g.33"></span> <a href="#http.version" class="smpl">HTTP-Version</a> = <a href="#http.version" class="smpl">HTTP-Prot-Name</a> "/" 1*<a href="#core.rules" class="smpl">DIGIT</a> "." 1*<a href="#core.rules" class="smpl">DIGIT</a> 939 920 <a href="#http.version" class="smpl">HTTP-Prot-Name</a> = %x48.54.54.50 ; "HTTP", case-sensitive 940 921 </pre><p id="rfc.section.3.1.p.4">Note that the major and minor numbers <em class="bcp14">MUST</em> be treated as separate integers and that each <em class="bcp14">MAY</em> be incremented higher than a single digit. Thus, HTTP/2.4 is a lower version than HTTP/2.13, which in turn is lower than HTTP/12.3. … … 960 941 <h3 id="rfc.section.3.2.1"><a href="#rfc.section.3.2.1">3.2.1</a> <a id="full.date" href="#full.date">Full Date</a></h3> 961 942 <p id="rfc.section.3.2.1.p.1">HTTP applications have historically allowed three different formats for the representation of date/time stamps:</p> 962 <div id="rfc.figure.u. 22"></div><pre class="text"> Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123943 <div id="rfc.figure.u.19"></div><pre class="text"> Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 963 944 Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format 964 945 Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format … … 975 956 time zone, and <em class="bcp14">MUST</em> be assumed when reading the asctime format. HTTP-date is case sensitive and <em class="bcp14">MUST NOT</em> include additional LWS beyond that specifically included as SP in the grammar. 976 957 </p> 977 <div id="rfc.figure.u.2 3"></div><pre class="inline"><span id="rfc.iref.g.34"></span><span id="rfc.iref.g.35"></span><span id="rfc.iref.g.36"></span><span id="rfc.iref.g.37"></span><span id="rfc.iref.g.38"></span><span id="rfc.iref.g.39"></span><span id="rfc.iref.g.40"></span><span id="rfc.iref.g.41"></span><span id="rfc.iref.g.42"></span><span id="rfc.iref.g.43"></span><span id="rfc.iref.g.44"></span><span id="rfc.iref.g.45"></span> <a href="#full.date" class="smpl">HTTP-date</a> = <a href="#full.date" class="smpl">rfc1123-date</a> / <a href="#full.date" class="smpl">obsolete-date</a>958 <div id="rfc.figure.u.20"></div><pre class="inline"><span id="rfc.iref.g.34"></span><span id="rfc.iref.g.35"></span><span id="rfc.iref.g.36"></span><span id="rfc.iref.g.37"></span><span id="rfc.iref.g.38"></span><span id="rfc.iref.g.39"></span><span id="rfc.iref.g.40"></span><span id="rfc.iref.g.41"></span><span id="rfc.iref.g.42"></span><span id="rfc.iref.g.43"></span><span id="rfc.iref.g.44"></span><span id="rfc.iref.g.45"></span> <a href="#full.date" class="smpl">HTTP-date</a> = <a href="#full.date" class="smpl">rfc1123-date</a> / <a href="#full.date" class="smpl">obsolete-date</a> 978 959 <a href="#full.date" class="smpl">obsolete-date</a> = <a href="#full.date" class="smpl">rfc850-date</a> / <a href="#full.date" class="smpl">asctime-date</a> 979 960 <a href="#full.date" class="smpl">rfc1123-date</a> = <a href="#full.date" class="smpl">wkday</a> "," <a href="#core.rules" class="smpl">SP</a> date1 <a href="#core.rules" class="smpl">SP</a> time <a href="#core.rules" class="smpl">SP</a> GMT … … 1034 1015 is a property of the message, not of the original entity. 1035 1016 </p> 1036 <div id="rfc.figure.u.2 4"></div><pre class="inline"><span id="rfc.iref.g.46"></span><span id="rfc.iref.g.47"></span> <a href="#transfer.codings" class="smpl">transfer-coding</a> = "chunked" / <a href="#transfer.codings" class="smpl">transfer-extension</a>1017 <div id="rfc.figure.u.21"></div><pre class="inline"><span id="rfc.iref.g.46"></span><span id="rfc.iref.g.47"></span> <a href="#transfer.codings" class="smpl">transfer-coding</a> = "chunked" / <a href="#transfer.codings" class="smpl">transfer-extension</a> 1037 1018 <a href="#transfer.codings" class="smpl">transfer-extension</a> = <a href="#rule.token.separators" class="smpl">token</a> *( ";" <a href="#transfer.codings" class="smpl">parameter</a> ) 1038 1019 </pre><div id="rule.parameter"> 1039 1020 <p id="rfc.section.3.3.p.3"> Parameters are in the form of attribute/value pairs.</p> 1040 1021 </div> 1041 <div id="rfc.figure.u.2 5"></div><pre class="inline"><span id="rfc.iref.g.48"></span><span id="rfc.iref.g.49"></span><span id="rfc.iref.g.50"></span> <a href="#transfer.codings" class="smpl">parameter</a> = <a href="#rule.parameter" class="smpl">attribute</a> "=" <a href="#rule.parameter" class="smpl">value</a>1022 <div id="rfc.figure.u.22"></div><pre class="inline"><span id="rfc.iref.g.48"></span><span id="rfc.iref.g.49"></span><span id="rfc.iref.g.50"></span> <a href="#transfer.codings" class="smpl">parameter</a> = <a href="#rule.parameter" class="smpl">attribute</a> "=" <a href="#rule.parameter" class="smpl">value</a> 1042 1023 <a href="#rule.parameter" class="smpl">attribute</a> = <a href="#rule.token.separators" class="smpl">token</a> 1043 1024 <a href="#rule.parameter" class="smpl">value</a> = <a href="#rule.token.separators" class="smpl">token</a> / <a href="#rule.quoted-string" class="smpl">quoted-string</a> … … 1064 1045 necessary for the recipient to verify that it has received the full message. 1065 1046 </p> 1066 <div id="rfc.figure.u.2 6"></div><pre class="inline"><span id="rfc.iref.g.51"></span><span id="rfc.iref.g.52"></span><span id="rfc.iref.g.53"></span><span id="rfc.iref.g.54"></span><span id="rfc.iref.g.55"></span><span id="rfc.iref.g.56"></span><span id="rfc.iref.g.57"></span><span id="rfc.iref.g.58"></span><span id="rfc.iref.g.59"></span> <a href="#chunked.transfer.encoding" class="smpl">Chunked-Body</a> = *<a href="#chunked.transfer.encoding" class="smpl">chunk</a>1047 <div id="rfc.figure.u.23"></div><pre class="inline"><span id="rfc.iref.g.51"></span><span id="rfc.iref.g.52"></span><span id="rfc.iref.g.53"></span><span id="rfc.iref.g.54"></span><span id="rfc.iref.g.55"></span><span id="rfc.iref.g.56"></span><span id="rfc.iref.g.57"></span><span id="rfc.iref.g.58"></span><span id="rfc.iref.g.59"></span> <a href="#chunked.transfer.encoding" class="smpl">Chunked-Body</a> = *<a href="#chunked.transfer.encoding" class="smpl">chunk</a> 1067 1048 <a href="#chunked.transfer.encoding" class="smpl">last-chunk</a> 1068 1049 <a href="#chunked.transfer.encoding" class="smpl">trailer-part</a> 1069 <a href="# rule.CRLF" class="smpl">CRLF</a>1050 <a href="#core.rules" class="smpl">CRLF</a> 1070 1051 1071 <a href="#chunked.transfer.encoding" class="smpl">chunk</a> = <a href="#chunked.transfer.encoding" class="smpl">chunk-size</a> [ <a href="#chunked.transfer.encoding" class="smpl">chunk-extension</a> ] <a href="# rule.CRLF" class="smpl">CRLF</a>1072 <a href="#chunked.transfer.encoding" class="smpl">chunk-data</a> <a href="# rule.CRLF" class="smpl">CRLF</a>1073 <a href="#chunked.transfer.encoding" class="smpl">chunk-size</a> = 1*<a href="# rule.HEXDIG" class="smpl">HEXDIG</a>1074 <a href="#chunked.transfer.encoding" class="smpl">last-chunk</a> = 1*("0") [ <a href="#chunked.transfer.encoding" class="smpl">chunk-extension</a> ] <a href="# rule.CRLF" class="smpl">CRLF</a>1052 <a href="#chunked.transfer.encoding" class="smpl">chunk</a> = <a href="#chunked.transfer.encoding" class="smpl">chunk-size</a> [ <a href="#chunked.transfer.encoding" class="smpl">chunk-extension</a> ] <a href="#core.rules" class="smpl">CRLF</a> 1053 <a href="#chunked.transfer.encoding" class="smpl">chunk-data</a> <a href="#core.rules" class="smpl">CRLF</a> 1054 <a href="#chunked.transfer.encoding" class="smpl">chunk-size</a> = 1*<a href="#core.rules" class="smpl">HEXDIG</a> 1055 <a href="#chunked.transfer.encoding" class="smpl">last-chunk</a> = 1*("0") [ <a href="#chunked.transfer.encoding" class="smpl">chunk-extension</a> ] <a href="#core.rules" class="smpl">CRLF</a> 1075 1056 1076 1057 <a href="#chunked.transfer.encoding" class="smpl">chunk-extension</a>= *( ";" <a href="#chunked.transfer.encoding" class="smpl">chunk-ext-name</a> [ "=" <a href="#chunked.transfer.encoding" class="smpl">chunk-ext-val</a> ] ) … … 1078 1059 <a href="#chunked.transfer.encoding" class="smpl">chunk-ext-val</a> = <a href="#rule.token.separators" class="smpl">token</a> / <a href="#rule.quoted-string" class="smpl">quoted-string</a> 1079 1060 <a href="#chunked.transfer.encoding" class="smpl">chunk-data</a> = 1*<a href="#core.rules" class="smpl">OCTET</a> ; a sequence of chunk-size octets 1080 <a href="#chunked.transfer.encoding" class="smpl">trailer-part</a> = *(<a href="#abnf.dependencies" class="smpl">entity-header</a> <a href="# rule.CRLF" class="smpl">CRLF</a>)1061 <a href="#chunked.transfer.encoding" class="smpl">trailer-part</a> = *(<a href="#abnf.dependencies" class="smpl">entity-header</a> <a href="#core.rules" class="smpl">CRLF</a>) 1081 1062 </pre><p id="rfc.section.3.3.1.p.3">The chunk-size field is a string of hex digits indicating the size of the chunk-data in octets. The chunked encoding is ended 1082 1063 by any chunk whose size is zero, followed by the trailer, which is terminated by an empty line. … … 1101 1082 </p> 1102 1083 <p id="rfc.section.3.3.1.p.7">A process for decoding the "chunked" transfer-coding can be represented in pseudo-code as:</p> 1103 <div id="rfc.figure.u.2 7"></div><pre class="text"> length := 01084 <div id="rfc.figure.u.24"></div><pre class="text"> length := 0 1104 1085 read chunk-size, chunk-extension (if any) and CRLF 1105 1086 while (chunk-size > 0) { … … 1123 1104 space. By convention, the products are listed in order of their significance for identifying the application. 1124 1105 </p> 1125 <div id="rfc.figure.u.2 8"></div><pre class="inline"><span id="rfc.iref.g.60"></span><span id="rfc.iref.g.61"></span> <a href="#product.tokens" class="smpl">product</a> = <a href="#rule.token.separators" class="smpl">token</a> ["/" <a href="#product.tokens" class="smpl">product-version</a>]1106 <div id="rfc.figure.u.25"></div><pre class="inline"><span id="rfc.iref.g.60"></span><span id="rfc.iref.g.61"></span> <a href="#product.tokens" class="smpl">product</a> = <a href="#rule.token.separators" class="smpl">token</a> ["/" <a href="#product.tokens" class="smpl">product-version</a>] 1126 1107 <a href="#product.tokens" class="smpl">product-version</a> = <a href="#rule.token.separators" class="smpl">token</a> 1127 1108 </pre><p id="rfc.section.3.4.p.3">Examples:</p> 1128 <div id="rfc.figure.u.2 9"></div><pre class="text"> User-Agent: CERN-LineMode/2.15 libwww/2.17b31109 <div id="rfc.figure.u.26"></div><pre class="text"> User-Agent: CERN-LineMode/2.15 libwww/2.17b3 1129 1110 Server: Apache/0.8.4 1130 1111 </pre><p id="rfc.section.3.4.p.5">Product tokens <em class="bcp14">SHOULD</em> be short and to the point. They <em class="bcp14">MUST NOT</em> be used for advertising or other non-essential information. Although any token character <em class="bcp14">MAY</em> appear in a product-version, this token <em class="bcp14">SHOULD</em> only be used for a version identifier (i.e., successive versions of the same product <em class="bcp14">SHOULD</em> only differ in the product-version portion of the product value). … … 1133 1114 <h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a> <a id="message.types" href="#message.types">Message Types</a></h2> 1134 1115 <p id="rfc.section.4.1.p.1">HTTP messages consist of requests from client to server and responses from server to client.</p> 1135 <div id="rfc.figure.u. 30"></div><pre class="inline"><span id="rfc.iref.g.62"></span> <a href="#message.types" class="smpl">HTTP-message</a> = <a href="#request" class="smpl">Request</a> / <a href="#response" class="smpl">Response</a> ; HTTP/1.1 messages1116 <div id="rfc.figure.u.27"></div><pre class="inline"><span id="rfc.iref.g.62"></span> <a href="#message.types" class="smpl">HTTP-message</a> = <a href="#request" class="smpl">Request</a> / <a href="#response" class="smpl">Response</a> ; HTTP/1.1 messages 1136 1117 </pre><p id="rfc.section.4.1.p.3">Request (<a href="#request" title="Request">Section 5</a>) and Response (<a href="#response" title="Response">Section 6</a>) messages use the generic message format of <a href="#RFC5322" id="rfc.xref.RFC5322.2"><cite title="Internet Message Format">[RFC5322]</cite></a> for transferring entities (the payload of the message). Both types of message consist of a start-line, zero or more header 1137 1118 fields (also known as "headers"), an empty line (i.e., a line with nothing preceding the CRLF) indicating the end of the header 1138 1119 fields, and possibly a message-body. 1139 1120 </p> 1140 <div id="rfc.figure.u. 31"></div><pre class="inline"><span id="rfc.iref.g.63"></span><span id="rfc.iref.g.64"></span> <a href="#message.types" class="smpl">generic-message</a> = <a href="#message.types" class="smpl">start-line</a>1141 *(<a href="#message.headers" class="smpl">message-header</a> <a href="# rule.CRLF" class="smpl">CRLF</a>)1142 <a href="# rule.CRLF" class="smpl">CRLF</a>1121 <div id="rfc.figure.u.28"></div><pre class="inline"><span id="rfc.iref.g.63"></span><span id="rfc.iref.g.64"></span> <a href="#message.types" class="smpl">generic-message</a> = <a href="#message.types" class="smpl">start-line</a> 1122 *(<a href="#message.headers" class="smpl">message-header</a> <a href="#core.rules" class="smpl">CRLF</a>) 1123 <a href="#core.rules" class="smpl">CRLF</a> 1143 1124 [ <a href="#message.body" class="smpl">message-body</a> ] 1144 1125 <a href="#message.types" class="smpl">start-line</a> = <a href="#request-line" class="smpl">Request-Line</a> / <a href="#status-line" class="smpl">Status-Line</a> … … 1156 1137 forms. 1157 1138 </p> 1158 <div id="rfc.figure.u. 32"></div><pre class="inline"><span id="rfc.iref.g.65"></span><span id="rfc.iref.g.66"></span><span id="rfc.iref.g.67"></span><span id="rfc.iref.g.68"></span> <a href="#message.headers" class="smpl">message-header</a> = <a href="#message.headers" class="smpl">field-name</a> ":" [ <a href="#message.headers" class="smpl">field-value</a> ]1139 <div id="rfc.figure.u.29"></div><pre class="inline"><span id="rfc.iref.g.65"></span><span id="rfc.iref.g.66"></span><span id="rfc.iref.g.67"></span><span id="rfc.iref.g.68"></span> <a href="#message.headers" class="smpl">message-header</a> = <a href="#message.headers" class="smpl">field-name</a> ":" [ <a href="#message.headers" class="smpl">field-value</a> ] 1159 1140 <a href="#message.headers" class="smpl">field-name</a> = <a href="#rule.token.separators" class="smpl">token</a> 1160 1141 <a href="#message.headers" class="smpl">field-value</a> = *( <a href="#message.headers" class="smpl">field-content</a> / <a href="#rule.LWS" class="smpl">LWS</a> ) … … 1187 1168 header field (<a href="#header.transfer-encoding" id="rfc.xref.header.transfer-encoding.2" title="Transfer-Encoding">Section 8.7</a>). 1188 1169 </p> 1189 <div id="rfc.figure.u.3 3"></div><pre class="inline"><span id="rfc.iref.g.69"></span> <a href="#message.body" class="smpl">message-body</a> = <a href="#abnf.dependencies" class="smpl">entity-body</a>1170 <div id="rfc.figure.u.30"></div><pre class="inline"><span id="rfc.iref.g.69"></span> <a href="#message.body" class="smpl">message-body</a> = <a href="#abnf.dependencies" class="smpl">entity-body</a> 1190 1171 / <entity-body encoded as per <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a>> 1191 1172 </pre><p id="rfc.section.4.3.p.3">Transfer-Encoding <em class="bcp14">MUST</em> be used to indicate any transfer-codings applied by an application to ensure safe and proper transfer of the message. Transfer-Encoding … … 1255 1236 to the entity being transferred. These header fields apply only to the message being transmitted. 1256 1237 </p> 1257 <div id="rfc.figure.u.3 4"></div><pre class="inline"><span id="rfc.iref.g.70"></span> <a href="#general.header.fields" class="smpl">general-header</a> = <a href="#abnf.dependencies" class="smpl">Cache-Control</a> ; <a href="#Part6" id="rfc.xref.Part6.5"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>, <a href="p6-cache.html#header.cache-control" title="Cache-Control">Section 16.2</a>1238 <div id="rfc.figure.u.31"></div><pre class="inline"><span id="rfc.iref.g.70"></span> <a href="#general.header.fields" class="smpl">general-header</a> = <a href="#abnf.dependencies" class="smpl">Cache-Control</a> ; <a href="#Part6" id="rfc.xref.Part6.5"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>, <a href="p6-cache.html#header.cache-control" title="Cache-Control">Section 16.2</a> 1258 1239 / <a href="#header.connection" class="smpl">Connection</a> ; <a href="#header.connection" id="rfc.xref.header.connection.1" title="Connection">Section 8.1</a> 1259 1240 / <a href="#header.date" class="smpl">Date</a> ; <a href="#header.date" id="rfc.xref.header.date.1" title="Date">Section 8.3</a> … … 1272 1253 resource, the identifier of the resource, and the protocol version in use. 1273 1254 </p> 1274 <div id="rfc.figure.u.3 5"></div><pre class="inline"><span id="rfc.iref.g.71"></span> <a href="#request" class="smpl">Request</a> = <a href="#request-line" class="smpl">Request-Line</a> ; <a href="#request-line" title="Request-Line">Section 5.1</a>1255 <div id="rfc.figure.u.32"></div><pre class="inline"><span id="rfc.iref.g.71"></span> <a href="#request" class="smpl">Request</a> = <a href="#request-line" class="smpl">Request-Line</a> ; <a href="#request-line" title="Request-Line">Section 5.1</a> 1275 1256 *(( <a href="#general.header.fields" class="smpl">general-header</a> ; <a href="#general.header.fields" title="General Header Fields">Section 4.5</a> 1276 1257 / <a href="#abnf.dependencies" class="smpl">request-header</a> ; <a href="#Part2" id="rfc.xref.Part2.7"><cite title="HTTP/1.1, part 2: Message Semantics">[Part2]</cite></a>, <a href="p2-semantics.html#request.header.fields" title="Request Header Fields">Section 4</a> 1277 / <a href="#abnf.dependencies" class="smpl">entity-header</a> ) <a href="# rule.CRLF" class="smpl">CRLF</a>) ; <a href="#Part3" id="rfc.xref.Part3.9"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>, <a href="p3-payload.html#entity.header.fields" title="Entity Header Fields">Section 4.1</a>1278 <a href="# rule.CRLF" class="smpl">CRLF</a>1258 / <a href="#abnf.dependencies" class="smpl">entity-header</a> ) <a href="#core.rules" class="smpl">CRLF</a>) ; <a href="#Part3" id="rfc.xref.Part3.9"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>, <a href="p3-payload.html#entity.header.fields" title="Entity Header Fields">Section 4.1</a> 1259 <a href="#core.rules" class="smpl">CRLF</a> 1279 1260 [ <a href="#message.body" class="smpl">message-body</a> ] ; <a href="#message.body" title="Message Body">Section 4.3</a> 1280 1261 </pre><h2 id="rfc.section.5.1"><a href="#rfc.section.5.1">5.1</a> <a id="request-line" href="#request-line">Request-Line</a></h2> … … 1282 1263 elements are separated by SP characters. No CR or LF is allowed except in the final CRLF sequence. 1283 1264 </p> 1284 <div id="rfc.figure.u.3 6"></div><pre class="inline"><span id="rfc.iref.g.72"></span> <a href="#request-line" class="smpl">Request-Line</a> = <a href="#method" class="smpl">Method</a> <a href="#core.rules" class="smpl">SP</a> <a href="#request-uri" class="smpl">Request-URI</a> <a href="#core.rules" class="smpl">SP</a> <a href="#http.version" class="smpl">HTTP-Version</a> <a href="#rule.CRLF" class="smpl">CRLF</a>1265 <div id="rfc.figure.u.33"></div><pre class="inline"><span id="rfc.iref.g.72"></span> <a href="#request-line" class="smpl">Request-Line</a> = <a href="#method" class="smpl">Method</a> <a href="#core.rules" class="smpl">SP</a> <a href="#request-uri" class="smpl">Request-URI</a> <a href="#core.rules" class="smpl">SP</a> <a href="#http.version" class="smpl">HTTP-Version</a> <a href="#core.rules" class="smpl">CRLF</a> 1285 1266 </pre><h3 id="rfc.section.5.1.1"><a href="#rfc.section.5.1.1">5.1.1</a> <a id="method" href="#method">Method</a></h3> 1286 1267 <p id="rfc.section.5.1.1.p.1">The Method token indicates the method to be performed on the resource identified by the Request-URI. The method is case-sensitive.</p> 1287 <div id="rfc.figure.u.3 7"></div><pre class="inline"><span id="rfc.iref.g.73"></span><span id="rfc.iref.g.74"></span> <a href="#method" class="smpl">Method</a> = <a href="#rule.token.separators" class="smpl">token</a>1268 <div id="rfc.figure.u.34"></div><pre class="inline"><span id="rfc.iref.g.73"></span><span id="rfc.iref.g.74"></span> <a href="#method" class="smpl">Method</a> = <a href="#rule.token.separators" class="smpl">token</a> 1288 1269 </pre><h3 id="rfc.section.5.1.2"><a href="#rfc.section.5.1.2">5.1.2</a> <a id="request-uri" href="#request-uri">Request-URI</a></h3> 1289 1270 <p id="rfc.section.5.1.2.p.1">The Request-URI is a Uniform Resource Identifier (<a href="#uri" title="Uniform Resource Identifiers">Section 2.1</a>) and identifies the resource upon which to apply the request. 1290 1271 </p> 1291 <div id="rfc.figure.u.3 8"></div><pre class="inline"><span id="rfc.iref.g.75"></span> <a href="#request-uri" class="smpl">Request-URI</a> = "*"1272 <div id="rfc.figure.u.35"></div><pre class="inline"><span id="rfc.iref.g.75"></span> <a href="#request-uri" class="smpl">Request-URI</a> = "*" 1292 1273 / <a href="#uri" class="smpl">absolute-URI</a> 1293 1274 / ( <a href="#uri" class="smpl">path-absolute</a> [ "?" <a href="#uri" class="smpl">query</a> ] ) … … 1297 1278 apply to a resource. One example would be 1298 1279 </p> 1299 <div id="rfc.figure.u.3 9"></div><pre class="text"> OPTIONS * HTTP/1.11280 <div id="rfc.figure.u.36"></div><pre class="text"> OPTIONS * HTTP/1.1 1300 1281 </pre><p id="rfc.section.5.1.2.p.5">The absolute-URI form is <em class="bcp14">REQUIRED</em> when the request is being made to a proxy. The proxy is requested to forward the request or service it from a valid cache, 1301 1282 and return the response. Note that the proxy <em class="bcp14">MAY</em> forward the request on to another proxy or directly to the server specified by the absolute-URI. In order to avoid request … … 1303 1284 Request-Line would be: 1304 1285 </p> 1305 <div id="rfc.figure.u. 40"></div><pre class="text"> GET http://www.example.org/pub/WWW/TheProject.html HTTP/1.11286 <div id="rfc.figure.u.37"></div><pre class="text"> GET http://www.example.org/pub/WWW/TheProject.html HTTP/1.1 1306 1287 </pre><p id="rfc.section.5.1.2.p.7">To allow for transition to absolute-URIs in all requests in future versions of HTTP, all HTTP/1.1 servers <em class="bcp14">MUST</em> accept the absolute-URI form in requests, even though HTTP/1.1 clients will only generate them in requests to proxies. 1307 1288 </p> … … 1312 1293 server would create a TCP connection to port 80 of the host "www.example.org" and send the lines: 1313 1294 </p> 1314 <div id="rfc.figure.u. 41"></div><pre class="text"> GET /pub/WWW/TheProject.html HTTP/1.11295 <div id="rfc.figure.u.38"></div><pre class="text"> GET /pub/WWW/TheProject.html HTTP/1.1 1315 1296 Host: www.example.org 1316 1297 </pre><p id="rfc.section.5.1.2.p.11">followed by the remainder of the Request. Note that the absolute path cannot be empty; if none is present in the original 1317 1298 URI, it <em class="bcp14">MUST</em> be given as "/" (the server root). 1318 1299 </p> 1319 <p id="rfc.section.5.1.2.p.12">The Request-URI is transmitted in the format specified in <a href="#http.uri" title="http URI scheme">Section 2.1.1</a>. If the Request-URI is encoded using the "% <a href="# rule.HEXDIG" class="smpl">HEXDIG</a> <a href="#rule.HEXDIG" class="smpl">HEXDIG</a>" encoding (<a href="#RFC3986" id="rfc.xref.RFC3986.13"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="http://tools.ietf.org/html/rfc3986#section-2.4">Section 2.4</a>), the origin server <em class="bcp14">MUST</em> decode the Request-URI in order to properly interpret the request. Servers <em class="bcp14">SHOULD</em> respond to invalid Request-URIs with an appropriate status code.1300 <p id="rfc.section.5.1.2.p.12">The Request-URI is transmitted in the format specified in <a href="#http.uri" title="http URI scheme">Section 2.1.1</a>. If the Request-URI is encoded using the "% <a href="#core.rules" class="smpl">HEXDIG</a> <a href="#core.rules" class="smpl">HEXDIG</a>" encoding (<a href="#RFC3986" id="rfc.xref.RFC3986.13"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="http://tools.ietf.org/html/rfc3986#section-2.4">Section 2.4</a>), the origin server <em class="bcp14">MUST</em> decode the Request-URI in order to properly interpret the request. Servers <em class="bcp14">SHOULD</em> respond to invalid Request-URIs with an appropriate status code. 1320 1301 </p> 1321 1302 <p id="rfc.section.5.1.2.p.13">A transparent proxy <em class="bcp14">MUST NOT</em> rewrite the "path-absolute" part of the received Request-URI when forwarding it to the next inbound server, except as noted … … 1350 1331 <h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a> <a id="response" href="#response">Response</a></h1> 1351 1332 <p id="rfc.section.6.p.1">After receiving and interpreting a request message, a server responds with an HTTP response message.</p> 1352 <div id="rfc.figure.u. 42"></div><pre class="inline"><span id="rfc.iref.g.76"></span> <a href="#response" class="smpl">Response</a> = <a href="#status-line" class="smpl">Status-Line</a> ; <a href="#status-line" title="Status-Line">Section 6.1</a>1333 <div id="rfc.figure.u.39"></div><pre class="inline"><span id="rfc.iref.g.76"></span> <a href="#response" class="smpl">Response</a> = <a href="#status-line" class="smpl">Status-Line</a> ; <a href="#status-line" title="Status-Line">Section 6.1</a> 1353 1334 *(( <a href="#general.header.fields" class="smpl">general-header</a> ; <a href="#general.header.fields" title="General Header Fields">Section 4.5</a> 1354 1335 / <a href="#abnf.dependencies" class="smpl">response-header</a> ; <a href="#Part2" id="rfc.xref.Part2.9"><cite title="HTTP/1.1, part 2: Message Semantics">[Part2]</cite></a>, <a href="p2-semantics.html#response.header.fields" title="Response Header Fields">Section 6</a> 1355 / <a href="#abnf.dependencies" class="smpl">entity-header</a> ) <a href="# rule.CRLF" class="smpl">CRLF</a>) ; <a href="#Part3" id="rfc.xref.Part3.10"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>, <a href="p3-payload.html#entity.header.fields" title="Entity Header Fields">Section 4.1</a>1356 <a href="# rule.CRLF" class="smpl">CRLF</a>1336 / <a href="#abnf.dependencies" class="smpl">entity-header</a> ) <a href="#core.rules" class="smpl">CRLF</a>) ; <a href="#Part3" id="rfc.xref.Part3.10"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>, <a href="p3-payload.html#entity.header.fields" title="Entity Header Fields">Section 4.1</a> 1337 <a href="#core.rules" class="smpl">CRLF</a> 1357 1338 [ <a href="#message.body" class="smpl">message-body</a> ] ; <a href="#message.body" title="Message Body">Section 4.3</a> 1358 1339 </pre><h2 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a> <a id="status-line" href="#status-line">Status-Line</a></h2> … … 1361 1342 CRLF sequence. 1362 1343 </p> 1363 <div id="rfc.figure.u.4 3"></div><pre class="inline"><span id="rfc.iref.g.77"></span> <a href="#status-line" class="smpl">Status-Line</a> = <a href="#http.version" class="smpl">HTTP-Version</a> <a href="#core.rules" class="smpl">SP</a> <a href="#status.code.and.reason.phrase" class="smpl">Status-Code</a> <a href="#core.rules" class="smpl">SP</a> <a href="#status.code.and.reason.phrase" class="smpl">Reason-Phrase</a> <a href="#rule.CRLF" class="smpl">CRLF</a>1344 <div id="rfc.figure.u.40"></div><pre class="inline"><span id="rfc.iref.g.77"></span> <a href="#status-line" class="smpl">Status-Line</a> = <a href="#http.version" class="smpl">HTTP-Version</a> <a href="#core.rules" class="smpl">SP</a> <a href="#status.code.and.reason.phrase" class="smpl">Status-Code</a> <a href="#core.rules" class="smpl">SP</a> <a href="#status.code.and.reason.phrase" class="smpl">Reason-Phrase</a> <a href="#core.rules" class="smpl">CRLF</a> 1364 1345 </pre><h3 id="rfc.section.6.1.1"><a href="#rfc.section.6.1.1">6.1.1</a> <a id="status.code.and.reason.phrase" href="#status.code.and.reason.phrase">Status Code and Reason Phrase</a></h3> 1365 1346 <p id="rfc.section.6.1.1.p.1">The Status-Code element is a 3-digit integer result code of the attempt to understand and satisfy the request. These codes … … 1378 1359 <li>5xx: Server Error - The server failed to fulfill an apparently valid request</li> 1379 1360 </ul> 1380 <div id="rfc.figure.u.4 4"></div><pre class="inline"><span id="rfc.iref.g.78"></span><span id="rfc.iref.g.79"></span><span id="rfc.iref.g.80"></span> <a href="#status.code.and.reason.phrase" class="smpl">Status-Code</a> = 3<a href="#core.rules" class="smpl">DIGIT</a>1361 <div id="rfc.figure.u.41"></div><pre class="inline"><span id="rfc.iref.g.78"></span><span id="rfc.iref.g.79"></span><span id="rfc.iref.g.80"></span> <a href="#status.code.and.reason.phrase" class="smpl">Status-Code</a> = 3<a href="#core.rules" class="smpl">DIGIT</a> 1381 1362 <a href="#status.code.and.reason.phrase" class="smpl">Reason-Phrase</a> = *<<a href="#rule.TEXT" class="smpl">TEXT</a>, excluding <a href="#core.rules" class="smpl">CR</a>, <a href="#core.rules" class="smpl">LF</a>> 1382 1363 </pre><h1 id="rfc.section.7"><a href="#rfc.section.7">7.</a> <a id="connections" href="#connections">Connections</a></h1> … … 1569 1550 </p> 1570 1551 <p id="rfc.section.8.1.p.2">The Connection header has the following grammar:</p> 1571 <div id="rfc.figure.u.4 5"></div><pre class="inline"><span id="rfc.iref.g.81"></span><span id="rfc.iref.g.82"></span> <a href="#header.connection" class="smpl">Connection</a> = "Connection" ":" 1#(<a href="#header.connection" class="smpl">connection-token</a>)1552 <div id="rfc.figure.u.42"></div><pre class="inline"><span id="rfc.iref.g.81"></span><span id="rfc.iref.g.82"></span> <a href="#header.connection" class="smpl">Connection</a> = "Connection" ":" 1#(<a href="#header.connection" class="smpl">connection-token</a>) 1572 1553 <a href="#header.connection" class="smpl">connection-token</a> = <a href="#rule.token.separators" class="smpl">token</a> 1573 1554 </pre><p id="rfc.section.8.1.p.4">HTTP/1.1 proxies <em class="bcp14">MUST</em> parse the Connection header field before a message is forwarded and, for each connection-token in this field, remove any header … … 1581 1562 of the response. For example, 1582 1563 </p> 1583 <div id="rfc.figure.u.4 6"></div><pre class="text"> Connection: close1564 <div id="rfc.figure.u.43"></div><pre class="text"> Connection: close 1584 1565 </pre><p id="rfc.section.8.1.p.8">in either the request or the response header fields indicates that the connection <em class="bcp14">SHOULD NOT</em> be considered `persistent' (<a href="#persistent.connections" title="Persistent Connections">Section 7.1</a>) after the current request/response is complete. 1585 1566 </p> … … 1597 1578 or, in the case of the HEAD method, the size of the entity-body that would have been sent had the request been a GET. 1598 1579 </p> 1599 <div id="rfc.figure.u.4 7"></div><pre class="inline"><span id="rfc.iref.g.83"></span> <a href="#header.content-length" class="smpl">Content-Length</a> = "Content-Length" ":" 1*<a href="#core.rules" class="smpl">DIGIT</a>1580 <div id="rfc.figure.u.44"></div><pre class="inline"><span id="rfc.iref.g.83"></span> <a href="#header.content-length" class="smpl">Content-Length</a> = "Content-Length" ":" 1*<a href="#core.rules" class="smpl">DIGIT</a> 1600 1581 </pre><p id="rfc.section.8.2.p.3">An example is</p> 1601 <div id="rfc.figure.u.4 8"></div><pre class="text"> Content-Length: 34951582 <div id="rfc.figure.u.45"></div><pre class="text"> Content-Length: 3495 1602 1583 </pre><p id="rfc.section.8.2.p.5">Applications <em class="bcp14">SHOULD</em> use this field to indicate the transfer-length of the message-body, unless this is prohibited by the rules in <a href="#message.length" title="Message Length">Section 4.4</a>. 1603 1584 </p> … … 1614 1595 as orig-date in <a href="http://tools.ietf.org/html/rfc5322#section-3.6.1">Section 3.6.1</a> of <a href="#RFC5322" id="rfc.xref.RFC5322.4"><cite title="Internet Message Format">[RFC5322]</cite></a>. The field value is an HTTP-date, as described in <a href="#full.date" title="Full Date">Section 3.2.1</a>; it <em class="bcp14">MUST</em> be sent in rfc1123-date format. 1615 1596 </p> 1616 <div id="rfc.figure.u.4 9"></div><pre class="inline"><span id="rfc.iref.g.84"></span> <a href="#header.date" class="smpl">Date</a> = "Date" ":" <a href="#full.date" class="smpl">HTTP-date</a>1597 <div id="rfc.figure.u.46"></div><pre class="inline"><span id="rfc.iref.g.84"></span> <a href="#header.date" class="smpl">Date</a> = "Date" ":" <a href="#full.date" class="smpl">HTTP-date</a> 1617 1598 </pre><p id="rfc.section.8.3.p.3">An example is</p> 1618 <div id="rfc.figure.u. 50"></div><pre class="text"> Date: Tue, 15 Nov 1994 08:12:31 GMT1599 <div id="rfc.figure.u.47"></div><pre class="text"> Date: Tue, 15 Nov 1994 08:12:31 GMT 1619 1600 </pre><p id="rfc.section.8.3.p.5">Origin servers <em class="bcp14">MUST</em> include a Date header field in all responses, except in these cases: 1620 1601 </p> … … 1652 1633 a single IP address. 1653 1634 </p> 1654 <div id="rfc.figure.u. 51"></div><pre class="inline"><span id="rfc.iref.g.85"></span> <a href="#header.host" class="smpl">Host</a> = "Host" ":" <a href="#uri" class="smpl">uri-host</a> [ ":" <a href="#uri" class="smpl">port</a> ] ; <a href="#http.uri" title="http URI scheme">Section 2.1.1</a>1635 <div id="rfc.figure.u.48"></div><pre class="inline"><span id="rfc.iref.g.85"></span> <a href="#header.host" class="smpl">Host</a> = "Host" ":" <a href="#uri" class="smpl">uri-host</a> [ ":" <a href="#uri" class="smpl">port</a> ] ; <a href="#http.uri" title="http URI scheme">Section 2.1.1</a> 1655 1636 </pre><p id="rfc.section.8.4.p.3">A "host" without any trailing port information implies the default port for the service requested (e.g., "80" for an HTTP 1656 1637 URL). For example, a request on the origin server for <http://www.example.org/pub/WWW/> would properly include: 1657 1638 </p> 1658 <div id="rfc.figure.u. 52"></div><pre class="text"> GET /pub/WWW/ HTTP/1.11639 <div id="rfc.figure.u.49"></div><pre class="text"> GET /pub/WWW/ HTTP/1.1 1659 1640 Host: www.example.org 1660 1641 </pre><p id="rfc.section.8.4.p.5">A client <em class="bcp14">MUST</em> include a Host header field in all HTTP/1.1 request messages. If the requested URI does not include an Internet host name … … 1671 1652 and/or a comma-separated list of extension transfer-coding names with optional accept parameters (as described in <a href="#transfer.codings" title="Transfer Codings">Section 3.3</a>). 1672 1653 </p> 1673 <div id="rfc.figure.u.5 3"></div><pre class="inline"><span id="rfc.iref.g.86"></span><span id="rfc.iref.g.87"></span> <a href="#header.te" class="smpl">TE</a> = "TE" ":" #( <a href="#header.te" class="smpl">t-codings</a> )1654 <div id="rfc.figure.u.50"></div><pre class="inline"><span id="rfc.iref.g.86"></span><span id="rfc.iref.g.87"></span> <a href="#header.te" class="smpl">TE</a> = "TE" ":" #( <a href="#header.te" class="smpl">t-codings</a> ) 1674 1655 <a href="#header.te" class="smpl">t-codings</a> = "trailers" / ( <a href="#transfer.codings" class="smpl">transfer-extension</a> [ <a href="#abnf.dependencies" class="smpl">accept-params</a> ] ) 1675 1656 </pre><p id="rfc.section.8.5.p.3">The presence of the keyword "trailers" indicates that the client is willing to accept trailer fields in a chunked transfer-coding, … … 1677 1658 </p> 1678 1659 <p id="rfc.section.8.5.p.4">Examples of its use are:</p> 1679 <div id="rfc.figure.u.5 4"></div><pre class="text"> TE: deflate1660 <div id="rfc.figure.u.51"></div><pre class="text"> TE: deflate 1680 1661 TE: 1681 1662 TE: trailers, deflate;q=0.5 … … 1714 1695 with chunked transfer-coding. 1715 1696 </p> 1716 <div id="rfc.figure.u.5 5"></div><pre class="inline"><span id="rfc.iref.g.88"></span> <a href="#header.trailer" class="smpl">Trailer</a> = "Trailer" ":" 1#<a href="#message.headers" class="smpl">field-name</a>1697 <div id="rfc.figure.u.52"></div><pre class="inline"><span id="rfc.iref.g.88"></span> <a href="#header.trailer" class="smpl">Trailer</a> = "Trailer" ":" 1#<a href="#message.headers" class="smpl">field-name</a> 1717 1698 </pre><p id="rfc.section.8.6.p.3">An HTTP/1.1 message <em class="bcp14">SHOULD</em> include a Trailer header field in a message using chunked transfer-coding with a non-empty trailer. Doing so allows the recipient 1718 1699 to know which header fields to expect in the trailer. … … 1734 1715 transfer-coding is a property of the message, not of the entity. 1735 1716 </p> 1736 <div id="rfc.figure.u.5 6"></div><pre class="inline"><span id="rfc.iref.g.89"></span> <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> = "Transfer-Encoding" ":" 1#<a href="#transfer.codings" class="smpl">transfer-coding</a>1717 <div id="rfc.figure.u.53"></div><pre class="inline"><span id="rfc.iref.g.89"></span> <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> = "Transfer-Encoding" ":" 1#<a href="#transfer.codings" class="smpl">transfer-coding</a> 1737 1718 </pre><p id="rfc.section.8.7.p.3">Transfer-codings are defined in <a href="#transfer.codings" title="Transfer Codings">Section 3.3</a>. An example is: 1738 1719 </p> 1739 <div id="rfc.figure.u.5 7"></div><pre class="text"> Transfer-Encoding: chunked1720 <div id="rfc.figure.u.54"></div><pre class="text"> Transfer-Encoding: chunked 1740 1721 </pre><p id="rfc.section.8.7.p.5">If multiple encodings have been applied to an entity, the transfer-codings <em class="bcp14">MUST</em> be listed in the order in which they were applied. Additional information about the encoding parameters <em class="bcp14">MAY</em> be provided by other entity-header fields not defined by this specification. 1741 1722 </p> … … 1747 1728 to use if the server finds it appropriate to switch protocols. The server <em class="bcp14">MUST</em> use the Upgrade header field within a 101 (Switching Protocols) response to indicate which protocol(s) are being switched. 1748 1729 </p> 1749 <div id="rfc.figure.u.5 8"></div><pre class="inline"><span id="rfc.iref.g.90"></span> <a href="#header.upgrade" class="smpl">Upgrade</a> = "Upgrade" ":" 1#<a href="#product.tokens" class="smpl">product</a>1730 <div id="rfc.figure.u.55"></div><pre class="inline"><span id="rfc.iref.g.90"></span> <a href="#header.upgrade" class="smpl">Upgrade</a> = "Upgrade" ":" 1#<a href="#product.tokens" class="smpl">product</a> 1750 1731 </pre><p id="rfc.section.8.8.p.3">For example,</p> 1751 <div id="rfc.figure.u.5 9"></div><pre class="text"> Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x111732 <div id="rfc.figure.u.56"></div><pre class="text"> Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11 1752 1733 </pre><p id="rfc.section.8.8.p.5">The Upgrade header field is intended to provide a simple mechanism for transition from HTTP/1.1 to some other, incompatible 1753 1734 protocol. It does so by allowing the client to advertise its desire to use another protocol, such as a later version of HTTP … … 1778 1759 of all senders along the request/response chain. 1779 1760 </p> 1780 <div id="rfc.figure.u. 60"></div><pre class="inline"><span id="rfc.iref.g.91"></span><span id="rfc.iref.g.92"></span><span id="rfc.iref.g.93"></span><span id="rfc.iref.g.94"></span><span id="rfc.iref.g.95"></span><span id="rfc.iref.g.96"></span> <a href="#header.via" class="smpl">Via</a> = "Via" ":" 1#( <a href="#header.via" class="smpl">received-protocol</a> <a href="#header.via" class="smpl">received-by</a> [ <a href="#rule.comment" class="smpl">comment</a> ] )1761 <div id="rfc.figure.u.57"></div><pre class="inline"><span id="rfc.iref.g.91"></span><span id="rfc.iref.g.92"></span><span id="rfc.iref.g.93"></span><span id="rfc.iref.g.94"></span><span id="rfc.iref.g.95"></span><span id="rfc.iref.g.96"></span> <a href="#header.via" class="smpl">Via</a> = "Via" ":" 1#( <a href="#header.via" class="smpl">received-protocol</a> <a href="#header.via" class="smpl">received-by</a> [ <a href="#rule.comment" class="smpl">comment</a> ] ) 1781 1762 <a href="#header.via" class="smpl">received-protocol</a> = [ <a href="#header.via" class="smpl">protocol-name</a> "/" ] <a href="#header.via" class="smpl">protocol-version</a> 1782 1763 <a href="#header.via" class="smpl">protocol-name</a> = <a href="#rule.token.separators" class="smpl">token</a> … … 1801 1782 server at www.example.com. The request received by www.example.com would then have the following Via header field: 1802 1783 </p> 1803 <div id="rfc.figure.u. 61"></div><pre class="text"> Via: 1.0 fred, 1.1 p.example.net (Apache/1.1)1784 <div id="rfc.figure.u.58"></div><pre class="text"> Via: 1.0 fred, 1.1 p.example.net (Apache/1.1) 1804 1785 </pre><p id="rfc.section.8.9.p.9">Proxies and gateways used as a portal through a network firewall <em class="bcp14">SHOULD NOT</em>, by default, forward the names and ports of hosts within the firewall region. This information <em class="bcp14">SHOULD</em> only be propagated if explicitly enabled. If not enabled, the received-by host of any host behind the firewall <em class="bcp14">SHOULD</em> be replaced by an appropriate pseudonym for that host. 1805 1786 </p> … … 1807 1788 For example, 1808 1789 </p> 1809 <div id="rfc.figure.u. 62"></div><pre class="text"> Via: 1.0 ricky, 1.1 ethel, 1.1 fred, 1.0 lucy1790 <div id="rfc.figure.u.59"></div><pre class="text"> Via: 1.0 ricky, 1.1 ethel, 1.1 fred, 1.0 lucy 1810 1791 </pre><p id="rfc.section.8.9.p.12">could be collapsed to</p> 1811 <div id="rfc.figure.u.6 3"></div><pre class="text"> Via: 1.0 ricky, 1.1 mertz, 1.0 lucy1792 <div id="rfc.figure.u.60"></div><pre class="text"> Via: 1.0 ricky, 1.1 mertz, 1.0 lucy 1812 1793 </pre><p id="rfc.section.8.9.p.14">Applications <em class="bcp14">SHOULD NOT</em> combine multiple entries unless they are all under the same organizational control and the hosts have already been replaced 1813 1794 by pseudonyms. Applications <em class="bcp14">MUST NOT</em> combine entries which have different received-protocol values. … … 2106 2087 them for the discovery of many of the problems that this document attempts to rectify. 2107 2088 </p> 2108 <p id="rfc.section.11.p.7">This specification makes heavy use of the augmented BNF and generic constructs defined by David H. Crocker for <a href="#RFC5234" id="rfc.xref.RFC5234. 3"><cite title="Augmented BNF for Syntax Specifications: ABNF">[RFC5234]</cite></a>. Similarly, it reuses many of the definitions provided by Nathaniel Borenstein and Ned Freed for MIME <a href="#RFC2045" id="rfc.xref.RFC2045.3"><cite title="Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies">[RFC2045]</cite></a>. We hope that their inclusion in this specification will help reduce past confusion over the relationship between HTTP and2089 <p id="rfc.section.11.p.7">This specification makes heavy use of the augmented BNF and generic constructs defined by David H. Crocker for <a href="#RFC5234" id="rfc.xref.RFC5234.4"><cite title="Augmented BNF for Syntax Specifications: ABNF">[RFC5234]</cite></a>. Similarly, it reuses many of the definitions provided by Nathaniel Borenstein and Ned Freed for MIME <a href="#RFC2045" id="rfc.xref.RFC2045.3"><cite title="Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies">[RFC2045]</cite></a>. We hope that their inclusion in this specification will help reduce past confusion over the relationship between HTTP and 2109 2090 Internet mail message formats. 2110 2091 </p> … … 2771 2752 <ul class="ind"> 2772 2753 <li class="indline1"><tt>absolute-URI</tt> <a class="iref" href="#rfc.iref.g.25"><b>2.1</b></a></li> 2773 <li class="indline1"> <tt>ALPHA</tt> <a class="iref" href="#rfc.iref.g.3"><b>1.2</b></a></li>2754 <li class="indline1">ALPHA <a class="iref" href="#rfc.iref.g.1"><b>1.2</b></a></li> 2774 2755 <li class="indline1"><tt>asctime-date</tt> <a class="iref" href="#rfc.iref.g.38"><b>3.2.1</b></a></li> 2775 2756 <li class="indline1"><tt>attribute</tt> <a class="iref" href="#rfc.iref.g.49"><b>3.3</b></a></li> 2776 2757 <li class="indline1"><tt>authority</tt> <a class="iref" href="#rfc.iref.g.26"><b>2.1</b></a></li> 2777 <li class="indline1"> <tt>CHAR</tt> <a class="iref" href="#rfc.iref.g.2"><b>1.2</b></a></li>2758 <li class="indline1">CHAR <a class="iref" href="#rfc.iref.g.2"><b>1.2</b></a></li> 2778 2759 <li class="indline1"><tt>chunk</tt> <a class="iref" href="#rfc.iref.g.52"><b>3.3.1</b></a></li> 2779 2760 <li class="indline1"><tt>chunk-data</tt> <a class="iref" href="#rfc.iref.g.58"><b>3.3.1</b></a></li> … … 2787 2768 <li class="indline1"><tt>connection-token</tt> <a class="iref" href="#rfc.iref.g.82"><b>8.1</b></a></li> 2788 2769 <li class="indline1"><tt>Content-Length</tt> <a class="iref" href="#rfc.iref.g.83"><b>8.2</b></a></li> 2789 <li class="indline1"> <tt>CR</tt> <a class="iref" href="#rfc.iref.g.6"><b>1.2</b></a></li>2790 <li class="indline1"> <tt>CRLF</tt> <a class="iref" href="#rfc.iref.g.11"><b>1.2.2</b></a></li>2770 <li class="indline1">CR <a class="iref" href="#rfc.iref.g.3"><b>1.2</b></a></li> 2771 <li class="indline1">CRLF <a class="iref" href="#rfc.iref.g.4"><b>1.2</b></a></li> 2791 2772 <li class="indline1"><tt>ctext</tt> <a class="iref" href="#rfc.iref.g.19"><b>1.2.2</b></a></li> 2792 <li class="indline1"> <tt>CTL</tt> <a class="iref" href="#rfc.iref.g.5"><b>1.2</b></a></li>2773 <li class="indline1">CTL <a class="iref" href="#rfc.iref.g.5"><b>1.2</b></a></li> 2793 2774 <li class="indline1"><tt>Date</tt> <a class="iref" href="#rfc.iref.g.84"><b>8.3</b></a></li> 2794 2775 <li class="indline1"><tt>date1</tt> <a class="iref" href="#rfc.iref.g.39"><b>3.2.1</b></a></li> 2795 2776 <li class="indline1"><tt>date2</tt> <a class="iref" href="#rfc.iref.g.40"><b>3.2.1</b></a></li> 2796 2777 <li class="indline1"><tt>date3</tt> <a class="iref" href="#rfc.iref.g.41"><b>3.2.1</b></a></li> 2797 <li class="indline1"> <tt>DIGIT</tt> <a class="iref" href="#rfc.iref.g.4"><b>1.2</b></a></li>2798 <li class="indline1"> <tt>DQUOTE</tt> <a class="iref" href="#rfc.iref.g.10"><b>1.2</b></a></li>2778 <li class="indline1">DIGIT <a class="iref" href="#rfc.iref.g.6"><b>1.2</b></a></li> 2779 <li class="indline1">DQUOTE <a class="iref" href="#rfc.iref.g.7"><b>1.2</b></a></li> 2799 2780 <li class="indline1"><tt>extension-code</tt> <a class="iref" href="#rfc.iref.g.79"><b>6.1.1</b></a></li> 2800 2781 <li class="indline1"><tt>extension-method</tt> <a class="iref" href="#rfc.iref.g.74"><b>5.1.1</b></a></li> … … 2804 2785 <li class="indline1"><tt>general-header</tt> <a class="iref" href="#rfc.iref.g.70"><b>4.5</b></a></li> 2805 2786 <li class="indline1"><tt>generic-message</tt> <a class="iref" href="#rfc.iref.g.63"><b>4.1</b></a></li> 2806 <li class="indline1"> <tt>HEXDIG</tt> <a class="iref" href="#rfc.iref.g.14"><b>1.2.2</b></a></li>2787 <li class="indline1">HEXDIG <a class="iref" href="#rfc.iref.g.8"><b>1.2</b></a></li> 2807 2788 <li class="indline1"><tt>Host</tt> <a class="iref" href="#rfc.iref.g.85"><b>8.4</b></a></li> 2808 <li class="indline1"> <tt>HTAB</tt> <a class="iref" href="#rfc.iref.g.9"><b>1.2</b></a></li>2789 <li class="indline1">HTAB <a class="iref" href="#rfc.iref.g.9"><b>1.2</b></a></li> 2809 2790 <li class="indline1"><tt>HTTP-date</tt> <a class="iref" href="#rfc.iref.g.34"><b>3.2.1</b></a></li> 2810 2791 <li class="indline1"><tt>HTTP-message</tt> <a class="iref" href="#rfc.iref.g.62"><b>4.1</b></a></li> … … 2813 2794 <li class="indline1"><tt>HTTP-Version</tt> <a class="iref" href="#rfc.iref.g.32"><b>3.1</b></a></li> 2814 2795 <li class="indline1"><tt>last-chunk</tt> <a class="iref" href="#rfc.iref.g.54"><b>3.3.1</b></a></li> 2815 <li class="indline1"> <tt>LF</tt> <a class="iref" href="#rfc.iref.g.7"><b>1.2</b></a></li>2816 <li class="indline1"><tt>LWS</tt> <a class="iref" href="#rfc.iref.g.1 2"><b>1.2.2</b></a></li>2796 <li class="indline1">LF <a class="iref" href="#rfc.iref.g.10"><b>1.2</b></a></li> 2797 <li class="indline1"><tt>LWS</tt> <a class="iref" href="#rfc.iref.g.13"><b>1.2.2</b></a></li> 2817 2798 <li class="indline1"><tt>message-body</tt> <a class="iref" href="#rfc.iref.g.69"><b>4.3</b></a></li> 2818 2799 <li class="indline1"><tt>message-header</tt> <a class="iref" href="#rfc.iref.g.65"><b>4.2</b></a></li> … … 2820 2801 <li class="indline1"><tt>month</tt> <a class="iref" href="#rfc.iref.g.45"><b>3.2.1</b></a></li> 2821 2802 <li class="indline1"><tt>obsolete-date</tt> <a class="iref" href="#rfc.iref.g.36"><b>3.2.1</b></a></li> 2822 <li class="indline1"> <tt>OCTET</tt> <a class="iref" href="#rfc.iref.g.1"><b>1.2</b></a></li>2803 <li class="indline1">OCTET <a class="iref" href="#rfc.iref.g.11"><b>1.2</b></a></li> 2823 2804 <li class="indline1"><tt>parameter</tt> <a class="iref" href="#rfc.iref.g.48"><b>3.3</b></a></li> 2824 2805 <li class="indline1"><tt>path-absolute</tt> <a class="iref" href="#rfc.iref.g.27"><b>2.1</b></a></li> … … 2844 2825 <li class="indline1"><tt>rfc850-date</tt> <a class="iref" href="#rfc.iref.g.37"><b>3.2.1</b></a></li> 2845 2826 <li class="indline1"><tt>separators</tt> <a class="iref" href="#rfc.iref.g.17"><b>1.2.2</b></a></li> 2846 <li class="indline1"> <tt>SP</tt> <a class="iref" href="#rfc.iref.g.8"><b>1.2</b></a></li>2827 <li class="indline1">SP <a class="iref" href="#rfc.iref.g.12"><b>1.2</b></a></li> 2847 2828 <li class="indline1"><tt>start-line</tt> <a class="iref" href="#rfc.iref.g.64"><b>4.1</b></a></li> 2848 2829 <li class="indline1"><tt>Status-Code</tt> <a class="iref" href="#rfc.iref.g.78"><b>6.1.1</b></a></li> … … 2851 2832 <li class="indline1"><tt>tchar</tt> <a class="iref" href="#rfc.iref.g.16"><b>1.2.2</b></a></li> 2852 2833 <li class="indline1"><tt>TE</tt> <a class="iref" href="#rfc.iref.g.86"><b>8.5</b></a></li> 2853 <li class="indline1"><tt>TEXT</tt> <a class="iref" href="#rfc.iref.g.1 3"><b>1.2.2</b></a></li>2834 <li class="indline1"><tt>TEXT</tt> <a class="iref" href="#rfc.iref.g.14"><b>1.2.2</b></a></li> 2854 2835 <li class="indline1"><tt>time</tt> <a class="iref" href="#rfc.iref.g.42"><b>3.2.1</b></a></li> 2855 2836 <li class="indline1"><tt>token</tt> <a class="iref" href="#rfc.iref.g.15"><b>1.2.2</b></a></li> … … 2995 2976 <li class="indline1"><em>RFC4288</em> <a class="iref" href="#rfc.xref.RFC4288.1">9.3</a>, <a class="iref" href="#RFC4288"><b>12.2</b></a></li> 2996 2977 <li class="indline1"><em>RFC4395</em> <a class="iref" href="#rfc.xref.RFC4395.1">9.2</a>, <a class="iref" href="#RFC4395"><b>12.2</b></a></li> 2997 <li class="indline1"><em>RFC5234</em> <a class="iref" href="#rfc.xref.RFC5234.1">1.2</a>, <a class="iref" href="#rfc.xref.RFC5234.2">1.2.1</a>, <a class="iref" href="#rfc.xref.RFC5234.3">11</a>, <a class="iref" href="#RFC5234"><b>12.1</b></a></li> 2978 <li class="indline1"><em>RFC5234</em> <a class="iref" href="#rfc.xref.RFC5234.1">1.2</a>, <a class="iref" href="#rfc.xref.RFC5234.2">1.2</a>, <a class="iref" href="#rfc.xref.RFC5234.3">1.2.1</a>, <a class="iref" href="#rfc.xref.RFC5234.4">11</a>, <a class="iref" href="#RFC5234"><b>12.1</b></a><ul class="ind"> 2979 <li class="indline1"><em>Appendix B.1</em> <a class="iref" href="#rfc.xref.RFC5234.2">1.2</a></li> 2980 </ul> 2981 </li> 2998 2982 <li class="indline1"><em>RFC5322</em> <a class="iref" href="#rfc.xref.RFC5322.1">1</a>, <a class="iref" href="#rfc.xref.RFC5322.2">4.1</a>, <a class="iref" href="#rfc.xref.RFC5322.3">4.2</a>, <a class="iref" href="#rfc.xref.RFC5322.4">8.3</a>, <a class="iref" href="#rfc.xref.RFC5322.5">8.9</a>, <a class="iref" href="#RFC5322"><b>12.2</b></a><ul class="ind"> 2999 2983 <li class="indline1"><em>Section 2.1</em> <a class="iref" href="#rfc.xref.RFC5322.3">4.2</a></li>
Note: See TracChangeset
for help on using the changeset viewer.