Ignore:
Timestamp:
Jun 7, 2009, 10:47:37 PM (10 years ago)
Author:
julian.reschke@…
Message:

Rephrase "Content-Type" discussion so that it is clear that leaving it out can be better than server-side guessing, and that HTTP itself does not rule out client-side sniffing (related to #155)

File:
1 edited

Legend:

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

    r588 r592  
    722722</artwork></figure>
    723723<t>
    724    Content-Type specifies the media type of the underlying data.
     724   Content-Type specifies the media type of the underlying data. Any HTTP/1.1
     725   message containing an entity-body &SHOULD; include a Content-Type header
     726   field defining the media type of that body, unless that information is
     727   unknown.  If the Content-Type header field is not present, it indicates that
     728   the sender does not know the media type of the data; recipients &MAY;
     729   either assume that it is "application/octet-stream" (<xref target="RFC2046" x:fmt="," x:sec="4.5.1"/>)
     730   or examine the content to determine its type.
     731</t>
     732<t>
    725733   Content-Encoding may be used to indicate any additional content
    726734   codings applied to the data, usually for the purpose of data
    727    compression, that are a property of the requested resource. There is
     735   compression, that are a property of the requested resource.  There is
    728736   no default encoding.
    729737</t>
    730738<t>
    731    Any HTTP/1.1 message containing an entity-body &SHOULD; include a
    732    Content-Type header field defining the media type of that body. If
    733    and only if the media type is not given by a Content-Type field, the
    734    recipient &MAY; attempt to guess the media type via inspection of its
    735    content and/or the name extension(s) of the URI used to identify the
    736    resource. If the media type remains unknown, the recipient &SHOULD;
    737    treat it as type "application/octet-stream" (<xref target="RFC2046" x:fmt="," x:sec="4.5.1"/>).
     739   Note that neither the interpretation of the data type of a message nor
     740   the behaviors caused by it are defined by HTTP; this
     741   potentially includes examination of the content to override any
     742   indicated type ("sniffing")<iref item="Content Type Sniffing"/>.
    738743</t>
    739744</section>
     
    29602965      "Content-Location isn't special"
    29612966    </t>
     2967    <t>
     2968      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/155"/>:
     2969      "Content Sniffing"
     2970    </t>
    29622971  </list>
    29632972</t>
Note: See TracChangeset for help on using the changeset viewer.