Ignore:
Timestamp:
Jan 1, 2008, 9:15:17 AM (12 years ago)
Author:
julian.reschke@…
Message:

Consistent indentation for all ABNF rules (addresses #36)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • draft-ietf-httpbis/latest/p3-payload.html

    r133 r135  
    595595         Set registry (&lt;<a href="http://www.iana.org/assignments/character-sets">http://www.iana.org/assignments/character-sets</a>&gt;).
    596596      </p>
    597       <div id="rfc.figure.u.1"></div><pre class="inline"><span id="rfc.iref.g.1"></span>    charset = token
     597      <div id="rfc.figure.u.1"></div><pre class="inline"><span id="rfc.iref.g.1"></span>  charset = token
    598598</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
    599599         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.
     
    618618         decoded by the recipient.
    619619      </p>
    620       <div id="rfc.figure.u.2"></div><pre class="inline"><span id="rfc.iref.g.2"></span>    content-coding   = token
     620      <div id="rfc.figure.u.2"></div><pre class="inline"><span id="rfc.iref.g.2"></span>  content-coding   = token
    621621</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&nbsp;5.3</a>) and Content-Encoding (<a href="#header.content-encoding" id="rfc.xref.header.content-encoding.1" title="Content-Encoding">Section&nbsp;5.5</a>) header fields. Although the value describes the content-coding, what is more important is that it indicates what decoding
    622622         mechanism will be required to remove the encoding.
     
    662662      <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&nbsp;5.9</a>) and Accept (<a href="#header.accept" id="rfc.xref.header.accept.1" title="Accept">Section&nbsp;5.1</a>) header fields in order to provide open and extensible data typing and type negotiation.
    663663      </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>    media-type     = type "/" subtype *( ";" parameter )
    665     type           = token
    666     subtype        = token
     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
    667667</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.
    668668      </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>    parameter               = attribute "=" value
    670     attribute               = token
    671     value                   = token | quoted-string
     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
    672672</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,
    673673         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
     
    720720         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.
    721721      </p>
    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") ] )
     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") ] )
    724724</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>
    725725      <h2 id="rfc.section.2.5"><a href="#rfc.section.2.5">2.5</a>&nbsp;<a id="language.tags" href="#language.tags">Language Tags</a></h2>
     
    730730      <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:
    731731      </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>     language-tag  = primary-tag *( "-" subtag )
    733      primary-tag   = 1*8ALPHA
    734      subtag        = 1*8ALPHA
     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
    735735</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
    736736         by the IANA. Example tags include:
     
    752752         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.
    753753      </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>    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&nbsp;5.5</a>
    756                    | Content-Language         ; <a href="#header.content-language" id="rfc.xref.header.content-language.1" title="Content-Language">Section&nbsp;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&nbsp;5.7</a>
    759                    | Content-MD5              ; <a href="#header.content-md5" id="rfc.xref.header.content-md5.1" title="Content-MD5">Section&nbsp;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&nbsp;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
     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&nbsp;5.5</a>
     756                 | Content-Language         ; <a href="#header.content-language" id="rfc.xref.header.content-language.1" title="Content-Language">Section&nbsp;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&nbsp;5.7</a>
     759                 | Content-MD5              ; <a href="#header.content-md5" id="rfc.xref.header.content-md5.1" title="Content-MD5">Section&nbsp;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&nbsp;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
    767767</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
    768768         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.
     
    770770      <h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a>&nbsp;<a id="entity.body" href="#entity.body">Entity Body</a></h2>
    771771      <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>    entity-body    = *OCTET
     772      <div id="rfc.figure.u.9"></div><pre class="inline"><span id="rfc.iref.g.16"></span>  entity-body    = *OCTET
    773773</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
    774774         safe and proper transfer of the message.
     
    882882         for an in-line image.
    883883      </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>    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 ) ]
     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 ) ]
    893893</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
    894894         all subtypes of that type. The media-range <em class="bcp14">MAY</em> include media type parameters that are applicable to that range.
     
    951951         to a server which is capable of representing documents in those character sets.
    952952      </p>
    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 ] )
     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 ] )
    955955</pre><p id="rfc.section.5.2.p.3">Character set values are described in <a href="#character.sets" title="Character Sets">Section&nbsp;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
    956956         example is
     
    970970      <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&nbsp;2.2</a>) that are acceptable in the response.
    971971      </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>    Accept-Encoding  = "Accept-Encoding" ":"
    973                        #( codings [ ";" "q" "=" qvalue ] )
    974     codings          = ( content-coding | "*" )
     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 | "*" )
    975975</pre><p id="rfc.section.5.3.p.3">Examples of its use are:</p>
    976976      <div id="rfc.figure.u.21"></div><pre class="text">    Accept-Encoding: compress, gzip
     
    10161016         as a response to the request. Language tags are defined in <a href="#language.tags" title="Language Tags">Section&nbsp;2.5</a>.
    10171017      </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>    Accept-Language = "Accept-Language" ":"
    1019                       1#( language-range [ ";" "q" "=" qvalue ] )
    1020     language-range  = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) | "*" )
     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 ) ) | "*" )
    10211021</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
    10221022         that range. The quality value defaults to "q=1". For example,
     
    10601060         without losing the identity of its underlying media type.
    10611061      </p>
    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
     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
    10631063</pre><p id="rfc.section.5.5.p.3">Content codings are defined in <a href="#content.codings" title="Content Codings">Section&nbsp;2.2</a>. An example of its use is
    10641064      </p>
     
    10801080         Note that this might not be equivalent to all the languages used within the entity-body.
    10811081      </p>
    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
     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
    10831083</pre><p id="rfc.section.5.6.p.3">Language tags are defined in <a href="#language.tags" title="Language Tags">Section&nbsp;2.5</a>. The primary purpose of Content-Language is to allow a user to identify and differentiate entities according to the user's
    10841084         own preferred language. Thus, if the body content is intended only for a Danish-literate audience, the appropriate field is
     
    11071107         accessed, the server <em class="bcp14">SHOULD</em> provide a Content-Location for the particular variant which is returned.
    11081108      </p>
    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 )
     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 )
    11111111</pre><p id="rfc.section.5.7.p.3">The value of Content-Location also defines the base URI for the entity.</p>
    11121112      <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
     
    11261126         attacks.)
    11271127      </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>     Content-MD5   = "Content-MD5" ":" md5-digest
    1129      md5-digest   = &lt;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>&gt;
     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    = &lt;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>&gt;
    11301130</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
    11311131         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.
     
    11631163         the HEAD method, the media type that would have been sent had the request been a GET.
    11641164      </p>
    1165       <div id="rfc.figure.u.31"></div><pre class="inline"><span id="rfc.iref.g.31"></span>    Content-Type   = "Content-Type" ":" media-type
     1165      <div id="rfc.figure.u.31"></div><pre class="inline"><span id="rfc.iref.g.31"></span>  Content-Type   = "Content-Type" ":" media-type
    11661166</pre><p id="rfc.section.5.9.p.3">Media types are defined in <a href="#media.types" title="Media Types">Section&nbsp;2.3</a>. An example of the field is
    11671167      </p>
     
    13851385         environments.
    13861386      </p>
    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
     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
    13881388</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
    13891389         document and not the MIME specification.
     
    14391439         in <a href="#RFC1806" id="rfc.xref.RFC1806.3"><cite title="Communicating Presentation Information in Internet Messages: The Content-Disposition Header">[RFC1806]</cite></a>.
    14401440      </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>     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 )
     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 )
    14481448</pre><p id="rfc.section.B.1.p.3">An example is</p>
    14491449      <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.