Changeset 135 for draft-ietf-httpbis/latest/p3-payload.html
- Timestamp:
- 01/01/08 17:15:17 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p3-payload.html
r133 r135 595 595 Set registry (<<a href="http://www.iana.org/assignments/character-sets">http://www.iana.org/assignments/character-sets</a>>). 596 596 </p> 597 <div id="rfc.figure.u.1"></div><pre class="inline"><span id="rfc.iref.g.1"></span> 597 <div id="rfc.figure.u.1"></div><pre class="inline"><span id="rfc.iref.g.1"></span> charset = token 598 598 </pre><p id="rfc.section.2.1.p.6">Although HTTP allows an arbitrary token to be used as a charset value, any token that has a predefined value within the IANA 599 599 Character Set registry <em class="bcp14">MUST</em> represent the character set defined by that registry. Applications <em class="bcp14">SHOULD</em> limit their use of character sets to those defined by the IANA registry. … … 618 618 decoded by the recipient. 619 619 </p> 620 <div id="rfc.figure.u.2"></div><pre class="inline"><span id="rfc.iref.g.2"></span> 620 <div id="rfc.figure.u.2"></div><pre class="inline"><span id="rfc.iref.g.2"></span> content-coding = token 621 621 </pre><p id="rfc.section.2.2.p.3">All content-coding values are case-insensitive. HTTP/1.1 uses content-coding values in the Accept-Encoding (<a href="#header.accept-encoding" id="rfc.xref.header.accept-encoding.1" title="Accept-Encoding">Section 5.3</a>) and Content-Encoding (<a href="#header.content-encoding" id="rfc.xref.header.content-encoding.1" title="Content-Encoding">Section 5.5</a>) header fields. Although the value describes the content-coding, what is more important is that it indicates what decoding 622 622 mechanism will be required to remove the encoding. … … 662 662 <p id="rfc.section.2.3.p.1">HTTP uses Internet Media Types <a href="#RFC4288" id="rfc.xref.RFC4288.1"><cite title="Media Type Specifications and Registration Procedures">[RFC4288]</cite></a> in the Content-Type (<a href="#header.content-type" id="rfc.xref.header.content-type.1" title="Content-Type">Section 5.9</a>) and Accept (<a href="#header.accept" id="rfc.xref.header.accept.1" title="Accept">Section 5.1</a>) header fields in order to provide open and extensible data typing and type negotiation. 663 663 </p> 664 <div id="rfc.figure.u.3"></div><pre class="inline"><span id="rfc.iref.g.4"></span><span id="rfc.iref.g.5"></span><span id="rfc.iref.g.6"></span> 665 666 664 <div id="rfc.figure.u.3"></div><pre class="inline"><span id="rfc.iref.g.4"></span><span id="rfc.iref.g.5"></span><span id="rfc.iref.g.6"></span> media-type = type "/" subtype *( ";" parameter ) 665 type = token 666 subtype = token 667 667 </pre><p id="rfc.section.2.3.p.3">Parameters <em class="bcp14">MAY</em> follow the type/subtype in the form of attribute/value pairs. 668 668 </p> 669 <div id="rfc.figure.u.4"></div><pre class="inline"><span id="rfc.iref.g.7"></span><span id="rfc.iref.g.8"></span><span id="rfc.iref.g.9"></span> 670 671 669 <div id="rfc.figure.u.4"></div><pre class="inline"><span id="rfc.iref.g.7"></span><span id="rfc.iref.g.8"></span><span id="rfc.iref.g.9"></span> parameter = attribute "=" value 670 attribute = token 671 value = token | quoted-string 672 672 </pre><p id="rfc.section.2.3.p.5">The type, subtype, and parameter attribute names are case-insensitive. Parameter values might or might not be case-sensitive, 673 673 depending on the semantics of the parameter name. Linear white space (LWS) <em class="bcp14">MUST NOT</em> be used between the type and subtype, nor between an attribute and its value. The presence or absence of a parameter might … … 720 720 a quality value of 0, then content with this parameter is `not acceptable' for the client. HTTP/1.1 applications <em class="bcp14">MUST NOT</em> generate more than three digits after the decimal point. User configuration of these values <em class="bcp14">SHOULD</em> also be limited in this fashion. 721 721 </p> 722 <div id="rfc.figure.u.5"></div><pre class="inline"><span id="rfc.iref.g.10"></span> 723 722 <div id="rfc.figure.u.5"></div><pre class="inline"><span id="rfc.iref.g.10"></span> qvalue = ( "0" [ "." 0*3DIGIT ] ) 723 | ( "1" [ "." 0*3("0") ] ) 724 724 </pre><p id="rfc.section.2.4.p.3">"Quality values" is a misnomer, since these values merely represent relative degradation in desired quality.</p> 725 725 <h2 id="rfc.section.2.5"><a href="#rfc.section.2.5">2.5</a> <a id="language.tags" href="#language.tags">Language Tags</a></h2> … … 730 730 <p id="rfc.section.2.5.p.2">The syntax and registry of HTTP language tags is the same as that defined by <a href="#RFC1766" id="rfc.xref.RFC1766.1"><cite title="Tags for the Identification of Languages">[RFC1766]</cite></a>. In summary, a language tag is composed of 1 or more parts: A primary language tag and a possibly empty series of subtags: 731 731 </p> 732 <div id="rfc.figure.u.6"></div><pre class="inline"><span id="rfc.iref.g.11"></span><span id="rfc.iref.g.12"></span><span id="rfc.iref.g.13"></span> 733 734 732 <div id="rfc.figure.u.6"></div><pre class="inline"><span id="rfc.iref.g.11"></span><span id="rfc.iref.g.12"></span><span id="rfc.iref.g.13"></span> language-tag = primary-tag *( "-" subtag ) 733 primary-tag = 1*8ALPHA 734 subtag = 1*8ALPHA 735 735 </pre><p id="rfc.section.2.5.p.4">White space is not allowed within the tag and all tags are case-insensitive. The name space of language tags is administered 736 736 by the IANA. Example tags include: … … 752 752 by the request. Some of this metainformation is <em class="bcp14">OPTIONAL</em>; some might be <em class="bcp14">REQUIRED</em> by portions of this specification. 753 753 </p> 754 <div id="rfc.figure.u.8"></div><pre class="inline"><span id="rfc.iref.g.14"></span><span id="rfc.iref.g.15"></span> 755 756 757 758 759 760 761 762 763 764 765 766 754 <div id="rfc.figure.u.8"></div><pre class="inline"><span id="rfc.iref.g.14"></span><span id="rfc.iref.g.15"></span> entity-header = Allow ; <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#header.allow" title="Allow">Section 10.1</a> 755 | Content-Encoding ; <a href="#header.content-encoding" id="rfc.xref.header.content-encoding.2" title="Content-Encoding">Section 5.5</a> 756 | Content-Language ; <a href="#header.content-language" id="rfc.xref.header.content-language.1" title="Content-Language">Section 5.6</a> 757 | Content-Length ; <a href="#Part1" id="rfc.xref.Part1.1"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#header.content-length" title="Content-Length">Section 8.2</a> 758 | Content-Location ; <a href="#header.content-location" id="rfc.xref.header.content-location.1" title="Content-Location">Section 5.7</a> 759 | Content-MD5 ; <a href="#header.content-md5" id="rfc.xref.header.content-md5.1" title="Content-MD5">Section 5.8</a> 760 | Content-Range ; <a href="#Part5" id="rfc.xref.Part5.2"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>, <a href="p5-range.html#header.content-range" title="Content-Range">Section 5.2</a> 761 | Content-Type ; <a href="#header.content-type" id="rfc.xref.header.content-type.2" title="Content-Type">Section 5.9</a> 762 | Expires ; <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.expires" title="Expires">Section 3.3</a> 763 | Last-Modified ; <a href="#Part4" id="rfc.xref.Part4.1"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a>, <a href="p4-conditional.html#header.last-modified" title="Last-Modified">Section 6.6</a> 764 | extension-header 765 766 extension-header = message-header 767 767 </pre><p id="rfc.section.3.1.p.3">The extension-header mechanism allows additional entity-header fields to be defined without changing the protocol, but these 768 768 fields cannot be assumed to be recognizable by the recipient. Unrecognized header fields <em class="bcp14">SHOULD</em> be ignored by the recipient and <em class="bcp14">MUST</em> be forwarded by transparent proxies. … … 770 770 <h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a> <a id="entity.body" href="#entity.body">Entity Body</a></h2> 771 771 <p id="rfc.section.3.2.p.1">The entity-body (if any) sent with an HTTP request or response is in a format and encoding defined by the entity-header fields.</p> 772 <div id="rfc.figure.u.9"></div><pre class="inline"><span id="rfc.iref.g.16"></span> 772 <div id="rfc.figure.u.9"></div><pre class="inline"><span id="rfc.iref.g.16"></span> entity-body = *OCTET 773 773 </pre><p id="rfc.section.3.2.p.3">An entity-body is only present in a message when a message-body is present, as described in <a href="p1-messaging.html#message.body" title="Message Body">Section 4.3</a> of <a href="#Part1" id="rfc.xref.Part1.2"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>. The entity-body is obtained from the message-body by decoding any Transfer-Encoding that might have been applied to ensure 774 774 safe and proper transfer of the message. … … 882 882 for an in-line image. 883 883 </p> 884 <div id="rfc.figure.u.11"></div><pre class="inline"><span id="rfc.iref.g.17"></span><span id="rfc.iref.g.18"></span><span id="rfc.iref.g.19"></span><span id="rfc.iref.g.20"></span> 885 886 887 888 889 890 891 892 884 <div id="rfc.figure.u.11"></div><pre class="inline"><span id="rfc.iref.g.17"></span><span id="rfc.iref.g.18"></span><span id="rfc.iref.g.19"></span><span id="rfc.iref.g.20"></span> Accept = "Accept" ":" 885 #( media-range [ accept-params ] ) 886 887 media-range = ( "*/*" 888 | ( type "/" "*" ) 889 | ( type "/" subtype ) 890 ) *( ";" parameter ) 891 accept-params = ";" "q" "=" qvalue *( accept-extension ) 892 accept-extension = ";" token [ "=" ( token | quoted-string ) ] 893 893 </pre><p id="rfc.section.5.1.p.3">The asterisk "*" character is used to group media types into ranges, with "*/*" indicating all media types and "type/*" indicating 894 894 all subtypes of that type. The media-range <em class="bcp14">MAY</em> include media type parameters that are applicable to that range. … … 951 951 to a server which is capable of representing documents in those character sets. 952 952 </p> 953 <div id="rfc.figure.u.18"></div><pre class="inline"><span id="rfc.iref.g.21"></span> 954 953 <div id="rfc.figure.u.18"></div><pre class="inline"><span id="rfc.iref.g.21"></span> Accept-Charset = "Accept-Charset" ":" 954 1#( ( charset | "*" )[ ";" "q" "=" qvalue ] ) 955 955 </pre><p id="rfc.section.5.2.p.3">Character set values are described in <a href="#character.sets" title="Character Sets">Section 2.1</a>. Each charset <em class="bcp14">MAY</em> be given an associated quality value which represents the user's preference for that charset. The default value is q=1. An 956 956 example is … … 970 970 <p id="rfc.section.5.3.p.1">The Accept-Encoding request-header field is similar to Accept, but restricts the content-codings (<a href="#content.codings" title="Content Codings">Section 2.2</a>) that are acceptable in the response. 971 971 </p> 972 <div id="rfc.figure.u.20"></div><pre class="inline"><span id="rfc.iref.g.22"></span><span id="rfc.iref.g.23"></span> 973 974 972 <div id="rfc.figure.u.20"></div><pre class="inline"><span id="rfc.iref.g.22"></span><span id="rfc.iref.g.23"></span> Accept-Encoding = "Accept-Encoding" ":" 973 #( codings [ ";" "q" "=" qvalue ] ) 974 codings = ( content-coding | "*" ) 975 975 </pre><p id="rfc.section.5.3.p.3">Examples of its use are:</p> 976 976 <div id="rfc.figure.u.21"></div><pre class="text"> Accept-Encoding: compress, gzip … … 1016 1016 as a response to the request. Language tags are defined in <a href="#language.tags" title="Language Tags">Section 2.5</a>. 1017 1017 </p> 1018 <div id="rfc.figure.u.22"></div><pre class="inline"><span id="rfc.iref.g.24"></span><span id="rfc.iref.g.25"></span> 1019 1020 1018 <div id="rfc.figure.u.22"></div><pre class="inline"><span id="rfc.iref.g.24"></span><span id="rfc.iref.g.25"></span> Accept-Language = "Accept-Language" ":" 1019 1#( language-range [ ";" "q" "=" qvalue ] ) 1020 language-range = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) | "*" ) 1021 1021 </pre><p id="rfc.section.5.4.p.3">Each language-range <em class="bcp14">MAY</em> be given an associated quality value which represents an estimate of the user's preference for the languages specified by 1022 1022 that range. The quality value defaults to "q=1". For example, … … 1060 1060 without losing the identity of its underlying media type. 1061 1061 </p> 1062 <div id="rfc.figure.u.24"></div><pre class="inline"><span id="rfc.iref.g.26"></span> 1062 <div id="rfc.figure.u.24"></div><pre class="inline"><span id="rfc.iref.g.26"></span> Content-Encoding = "Content-Encoding" ":" 1#content-coding 1063 1063 </pre><p id="rfc.section.5.5.p.3">Content codings are defined in <a href="#content.codings" title="Content Codings">Section 2.2</a>. An example of its use is 1064 1064 </p> … … 1080 1080 Note that this might not be equivalent to all the languages used within the entity-body. 1081 1081 </p> 1082 <div id="rfc.figure.u.26"></div><pre class="inline"><span id="rfc.iref.g.27"></span> 1082 <div id="rfc.figure.u.26"></div><pre class="inline"><span id="rfc.iref.g.27"></span> Content-Language = "Content-Language" ":" 1#language-tag 1083 1083 </pre><p id="rfc.section.5.6.p.3">Language tags are defined in <a href="#language.tags" title="Language Tags">Section 2.5</a>. The primary purpose of Content-Language is to allow a user to identify and differentiate entities according to the user's 1084 1084 own preferred language. Thus, if the body content is intended only for a Danish-literate audience, the appropriate field is … … 1107 1107 accessed, the server <em class="bcp14">SHOULD</em> provide a Content-Location for the particular variant which is returned. 1108 1108 </p> 1109 <div id="rfc.figure.u.29"></div><pre class="inline"><span id="rfc.iref.g.28"></span> 1110 1109 <div id="rfc.figure.u.29"></div><pre class="inline"><span id="rfc.iref.g.28"></span> Content-Location = "Content-Location" ":" 1110 ( absoluteURI | relativeURI ) 1111 1111 </pre><p id="rfc.section.5.7.p.3">The value of Content-Location also defines the base URI for the entity.</p> 1112 1112 <p id="rfc.section.5.7.p.4">The Content-Location value is not a replacement for the original requested URI; it is only a statement of the location of … … 1126 1126 attacks.) 1127 1127 </p> 1128 <div id="rfc.figure.u.30"></div><pre class="inline"><span id="rfc.iref.g.29"></span><span id="rfc.iref.g.30"></span> 1129 md5-digest= <base64 of 128 bit MD5 digest as per <a href="#RFC1864" id="rfc.xref.RFC1864.2"><cite title="The Content-MD5 Header Field">[RFC1864]</cite></a>>1128 <div id="rfc.figure.u.30"></div><pre class="inline"><span id="rfc.iref.g.29"></span><span id="rfc.iref.g.30"></span> Content-MD5 = "Content-MD5" ":" md5-digest 1129 md5-digest = <base64 of 128 bit MD5 digest as per <a href="#RFC1864" id="rfc.xref.RFC1864.2"><cite title="The Content-MD5 Header Field">[RFC1864]</cite></a>> 1130 1130 </pre><p id="rfc.section.5.8.p.3">The Content-MD5 header field <em class="bcp14">MAY</em> be generated by an origin server or client to function as an integrity check of the entity-body. Only origin servers or clients <em class="bcp14">MAY</em> generate the Content-MD5 header field; proxies and gateways <em class="bcp14">MUST NOT</em> generate it, as this would defeat its value as an end-to-end integrity check. Any recipient of the entity-body, including 1131 1131 gateways and proxies, <em class="bcp14">MAY</em> check that the digest value in this header field matches that of the entity-body as received. … … 1163 1163 the HEAD method, the media type that would have been sent had the request been a GET. 1164 1164 </p> 1165 <div id="rfc.figure.u.31"></div><pre class="inline"><span id="rfc.iref.g.31"></span> 1165 <div id="rfc.figure.u.31"></div><pre class="inline"><span id="rfc.iref.g.31"></span> Content-Type = "Content-Type" ":" media-type 1166 1166 </pre><p id="rfc.section.5.9.p.3">Media types are defined in <a href="#media.types" title="Media Types">Section 2.3</a>. An example of the field is 1167 1167 </p> … … 1385 1385 environments. 1386 1386 </p> 1387 <div id="rfc.figure.u.33"></div><pre class="inline"><span id="rfc.iref.g.32"></span> 1387 <div id="rfc.figure.u.33"></div><pre class="inline"><span id="rfc.iref.g.32"></span> MIME-Version = "MIME-Version" ":" 1*DIGIT "." 1*DIGIT 1388 1388 </pre><p id="rfc.section.A.1.p.3">MIME version "1.0" is the default for use in HTTP/1.1. However, HTTP/1.1 message parsing and semantics are defined by this 1389 1389 document and not the MIME specification. … … 1439 1439 in <a href="#RFC1806" id="rfc.xref.RFC1806.3"><cite title="Communicating Presentation Information in Internet Messages: The Content-Disposition Header">[RFC1806]</cite></a>. 1440 1440 </p> 1441 <div id="rfc.figure.u.34"></div><pre class="inline"><span id="rfc.iref.g.33"></span><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> 1442 1443 1444 1445 1446 1447 1441 <div id="rfc.figure.u.34"></div><pre class="inline"><span id="rfc.iref.g.33"></span><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> content-disposition = "Content-Disposition" ":" 1442 disposition-type *( ";" disposition-parm ) 1443 disposition-type = "attachment" | disp-extension-token 1444 disposition-parm = filename-parm | disp-extension-parm 1445 filename-parm = "filename" "=" quoted-string 1446 disp-extension-token = token 1447 disp-extension-parm = token "=" ( token | quoted-string ) 1448 1448 </pre><p id="rfc.section.B.1.p.3">An example is</p> 1449 1449 <div id="rfc.figure.u.35"></div><pre class="text"> Content-Disposition: attachment; filename="fname.ext"
Note: See TracChangeset
for help on using the changeset viewer.