* WGs marked with an * asterisk has had at least one new draft made available during the last 5 days

Changeset 2739


Ignore:
Timestamp:
2015-05-30 00:02:56 (2 months ago)
Author:
julian.reschke@gmx.de
Message:

update XSLTs, add RFC 7540/1

Files:
6 added
13 edited

Legend:

Unmodified
Added
Removed
  • rfc2629xslt/clean-for-DTD.xslt

    r2738 r2739  
    4848<!-- generate DTD-valid output, override all values imported from rfc2629.xslt --> 
    4949<xsl:output doctype-system="rfc2629.dtd" doctype-public="" method="xml" version="1.0" encoding="UTF-8" cdata-section-elements="artwork" /> 
     50 
     51<!-- Workaround for http://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/297 --> 
     52<xsl:param name="xml2rfc-ext-strip-vbare">false</xsl:param> 
    5053 
    5154<!-- kick into cleanup mode --> 
     
    791794<xsl:template match="spanx/@anchor" mode="cleanup"/> 
    792795 
     796<!-- Workaround for http://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/297 --> 
     797<xsl:template match="spanx[@style='vbare']" mode="cleanup"> 
     798  <xsl:choose> 
     799    <xsl:when test="$xml2rfc-ext-strip-vbare='true'"> 
     800      <xsl:apply-templates mode="cleanup"/> 
     801    </xsl:when> 
     802    <xsl:otherwise> 
     803      <spanx style="vbare"> 
     804        <xsl:apply-templates mode="cleanup"/> 
     805      </spanx> 
     806    </xsl:otherwise> 
     807  </xsl:choose> 
     808</xsl:template> 
     809 
    793810<!-- v3 features --> 
    794811<xsl:template match="strong" mode="cleanup"> 
     
    848865  <reference> 
    849866    <xsl:apply-templates select="@anchor|@target" mode="cleanup"/> 
    850     <xsl:if test="not(@target) and $xml2rfc-ext-link-rfc-to-info-page='yes' and seriesInfo[@name='RFC']"> 
    851       <xsl:variable name="uri" select="concat('http://www.rfc-editor.org/info/rfc',seriesInfo[@name='RFC']/@value)"/> 
    852       <xsl:attribute name="target"><xsl:value-of select="$uri"/></xsl:attribute> 
    853     </xsl:if> 
     867    <xsl:choose> 
     868      <xsl:when test="not(@target) and $xml2rfc-ext-link-rfc-to-info-page='yes' and seriesInfo[@name='BCP'] and starts-with(@anchor,'BCP')"> 
     869        <xsl:variable name="uri" select="concat('http://www.rfc-editor.org/info/bcp',seriesInfo[@name='BCP']/@value)"/> 
     870        <xsl:attribute name="target"><xsl:value-of select="$uri"/></xsl:attribute> 
     871      </xsl:when> 
     872      <xsl:when test="not(@target) and $xml2rfc-ext-link-rfc-to-info-page='yes' and seriesInfo[@name='RFC']"> 
     873        <xsl:variable name="uri" select="concat('http://www.rfc-editor.org/info/rfc',seriesInfo[@name='RFC']/@value)"/> 
     874        <xsl:attribute name="target"><xsl:value-of select="$uri"/></xsl:attribute> 
     875      </xsl:when> 
     876      <xsl:otherwise/> 
     877    </xsl:choose> 
    854878    <xsl:apply-templates select="front" mode="cleanup"/> 
    855879    <xsl:apply-templates select="seriesInfo" mode="cleanup"/> 
     
    865889    <xsl:apply-templates select="*[not(self::front) and not(self::seriesInfo)]" mode="cleanup"/> 
    866890  </reference> 
     891</xsl:template> 
     892<xsl:template match="seriesInfo" mode="cleanup"> 
     893  <xsl:choose> 
     894    <xsl:when test="@name='Internet-Draft' and $rfcno > 7375"> 
     895      <!-- special case in RFC formatting since 2015 --> 
     896      <seriesInfo name="Work in Progress," value="{@value}"/> 
     897    </xsl:when> 
     898    <xsl:otherwise> 
     899      <seriesInfo name="{@name}" value="{@value}"/> 
     900    </xsl:otherwise> 
     901  </xsl:choose> 
    867902</xsl:template> 
    868903 
  • rfc2629xslt/rfc2629.xslt

    r2738 r2739  
    20202020<xsl:template name="compute-doi"> 
    20212021  <xsl:choose> 
     2022    <!-- xref seems to be for BCP, not RFC --> 
     2023    <xsl:when test="seriesInfo[@name='BCP'] and starts-with(@anchor, 'BCP')" /> 
    20222024    <xsl:when test="seriesInfo[@name='RFC']"> 
    20232025      <xsl:variable name="rfc" select="seriesInfo[@name='RFC'][1]/@value"/> 
     
    22142216            </xsl:if> 
    22152217          </xsl:when> 
     2218          <xsl:when test="@name='Internet-Draft' and $rfcno > 7375"> 
     2219            <!-- special case in RFC formatting since 2015 -->             
     2220            <xsl:text>Work in Progress, </xsl:text> 
     2221            <xsl:value-of select="@value" /> 
     2222          </xsl:when> 
    22162223          <xsl:otherwise> 
    22172224            <xsl:value-of select="@name" /> 
     
    22632270          <xsl:text>, &lt;</xsl:text> 
    22642271          <a href="{normalize-space(@target)}"><xsl:value-of select="normalize-space(@target)"/></a> 
     2272          <xsl:text>&gt;</xsl:text> 
     2273        </xsl:when> 
     2274        <xsl:when test="$xml2rfc-ext-link-rfc-to-info-page='yes' and seriesInfo[@name='BCP'] and starts-with(@anchor, 'BCP')"> 
     2275          <xsl:text>, &lt;</xsl:text> 
     2276          <xsl:variable name="uri" select="concat('http://www.rfc-editor.org/info/bcp',seriesInfo[@name='BCP']/@value)"/> 
     2277          <a href="{$uri}"><xsl:value-of select="$uri"/></a> 
    22652278          <xsl:text>&gt;</xsl:text> 
    22662279        </xsl:when> 
     
    28502863    <xsl:apply-templates /> 
    28512864  </strong> 
     2865</xsl:template> 
     2866 
     2867<xsl:template match="spanx[@style!='']" priority="0.1"> 
     2868  <xsl:call-template name="warning"> 
     2869    <xsl:with-param name="msg">unknown spanx style attribute '<xsl:value-of select="@style"/>' ignored</xsl:with-param> 
     2870  </xsl:call-template> 
     2871  <span> 
     2872    <xsl:call-template name="copy-anchor"/> 
     2873    <xsl:apply-templates /> 
     2874  </span> 
    28522875</xsl:template> 
    28532876 
     
    79878010    <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text> 
    79888011    <!-- when RCS keyword substitution in place, add version info --> 
    7989     <xsl:if test="contains('$Revision: 1.730 $',':')"> 
    7990       <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.730 $', 'Revision: '),'$','')),', ')" /> 
     8012    <xsl:if test="contains('$Revision: 1.733 $',':')"> 
     8013      <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.733 $', 'Revision: '),'$','')),', ')" /> 
    79918014    </xsl:if> 
    7992     <xsl:if test="contains('$Date: 2015/05/19 09:21:05 $',':')"> 
    7993       <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2015/05/19 09:21:05 $', 'Date: '),'$','')),', ')" /> 
     8015    <xsl:if test="contains('$Date: 2015/05/28 13:08:20 $',':')"> 
     8016      <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2015/05/28 13:08:20 $', 'Date: '),'$','')),', ')" /> 
    79948017    </xsl:if> 
    79958018    <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))" /> 
  • rfc2629xslt/rfc2629toFO.xslt

    r2738 r2739  
    907907            </xsl:if> 
    908908          </xsl:when> 
     909          <xsl:when test="@name='Internet-Draft' and $rfcno > 7375"> 
     910            <!-- special case in RFC formatting since 2015 -->             
     911            <xsl:text>Work in Progress, </xsl:text> 
     912            <xsl:value-of select="@value" /> 
     913          </xsl:when> 
    909914         <xsl:otherwise> 
    910915            <xsl:value-of select="@name" /> 
     
    938943              <xsl:with-param name="s" select="@target"/> 
    939944            </xsl:call-template> 
     945          <xsl:text>&gt;</xsl:text> 
     946        </xsl:when> 
     947        <xsl:when test="$xml2rfc-ext-link-rfc-to-info-page='yes' and seriesInfo[@name='BCP'] and starts-with(@anchor, 'BCP')"> 
     948          <xsl:text>, &lt;</xsl:text> 
     949          <xsl:variable name="uri" select="concat('http://www.rfc-editor.org/info/bcp',seriesInfo[@name='BCP']/@value)"/> 
     950          <xsl:call-template name="format-uri"> 
     951            <xsl:with-param name="s" select="$uri"/> 
     952          </xsl:call-template> 
    940953          <xsl:text>&gt;</xsl:text> 
    941954        </xsl:when> 
  • rfc2629xslt/rfc2629toXHTML.xslt

    r2738 r2739  
    18881888<xsl:template name="compute-doi"> 
    18891889  <xsl:choose> 
     1890    <!-- xref seems to be for BCP, not RFC --> 
     1891    <xsl:when test="seriesInfo[@name='BCP'] and starts-with(@anchor, 'BCP')"/> 
    18901892    <xsl:when test="seriesInfo[@name='RFC']"> 
    18911893      <xsl:variable name="rfc" select="seriesInfo[@name='RFC'][1]/@value"/> 
     
    20822084            </xsl:if> 
    20832085          </xsl:when> 
     2086          <xsl:when test="@name='Internet-Draft' and $rfcno &gt; 7375"> 
     2087            <!-- special case in RFC formatting since 2015 -->             
     2088            <xsl:text>Work in Progress, </xsl:text> 
     2089            <xsl:value-of select="@value"/> 
     2090          </xsl:when> 
    20842091          <xsl:otherwise> 
    20852092            <xsl:value-of select="@name"/> 
     
    21312138          <xsl:text>, &lt;</xsl:text> 
    21322139          <a href="{normalize-space(@target)}"><xsl:value-of select="normalize-space(@target)"/></a> 
     2140          <xsl:text>&gt;</xsl:text> 
     2141        </xsl:when> 
     2142        <xsl:when test="$xml2rfc-ext-link-rfc-to-info-page='yes' and seriesInfo[@name='BCP'] and starts-with(@anchor, 'BCP')"> 
     2143          <xsl:text>, &lt;</xsl:text> 
     2144          <xsl:variable name="uri" select="concat('http://www.rfc-editor.org/info/bcp',seriesInfo[@name='BCP']/@value)"/> 
     2145          <a href="{$uri}"><xsl:value-of select="$uri"/></a> 
    21332146          <xsl:text>&gt;</xsl:text> 
    21342147        </xsl:when> 
     
    27182731    <xsl:apply-templates/> 
    27192732  </strong> 
     2733</xsl:template> 
     2734 
     2735<xsl:template match="spanx[@style!='']" priority="0.1"> 
     2736  <xsl:call-template name="warning"> 
     2737    <xsl:with-param name="msg">unknown spanx style attribute '<xsl:value-of select="@style"/>' ignored</xsl:with-param> 
     2738  </xsl:call-template> 
     2739  <span xmlns="http://www.w3.org/1999/xhtml"> 
     2740    <xsl:call-template name="copy-anchor"/> 
     2741    <xsl:apply-templates/> 
     2742  </span> 
    27202743</xsl:template> 
    27212744 
     
    78447867    <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text> 
    78457868    <!-- when RCS keyword substitution in place, add version info --> 
    7846     <xsl:if test="contains('$Revision: 1.730 $',':')"> 
    7847       <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.730 $', 'Revision: '),'$','')),', ')"/> 
     7869    <xsl:if test="contains('$Revision: 1.733 $',':')"> 
     7870      <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.733 $', 'Revision: '),'$','')),', ')"/> 
    78487871    </xsl:if> 
    7849     <xsl:if test="contains('$Date: 2015/05/19 09:21:05 $',':')"> 
    7850       <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2015/05/19 09:21:05 $', 'Date: '),'$','')),', ')"/> 
     7872    <xsl:if test="contains('$Date: 2015/05/28 13:08:20 $',':')"> 
     7873      <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2015/05/28 13:08:20 $', 'Date: '),'$','')),', ')"/> 
    78517874    </xsl:if> 
    78527875    <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))"/> 
  • rfc2629xslt/samples/rfc2629.xslt

    r2738 r2739  
    20202020<xsl:template name="compute-doi"> 
    20212021  <xsl:choose> 
     2022    <!-- xref seems to be for BCP, not RFC --> 
     2023    <xsl:when test="seriesInfo[@name='BCP'] and starts-with(@anchor, 'BCP')" /> 
    20222024    <xsl:when test="seriesInfo[@name='RFC']"> 
    20232025      <xsl:variable name="rfc" select="seriesInfo[@name='RFC'][1]/@value"/> 
     
    22142216            </xsl:if> 
    22152217          </xsl:when> 
     2218          <xsl:when test="@name='Internet-Draft' and $rfcno > 7375"> 
     2219            <!-- special case in RFC formatting since 2015 -->             
     2220            <xsl:text>Work in Progress, </xsl:text> 
     2221            <xsl:value-of select="@value" /> 
     2222          </xsl:when> 
    22162223          <xsl:otherwise> 
    22172224            <xsl:value-of select="@name" /> 
     
    22632270          <xsl:text>, &lt;</xsl:text> 
    22642271          <a href="{normalize-space(@target)}"><xsl:value-of select="normalize-space(@target)"/></a> 
     2272          <xsl:text>&gt;</xsl:text> 
     2273        </xsl:when> 
     2274        <xsl:when test="$xml2rfc-ext-link-rfc-to-info-page='yes' and seriesInfo[@name='BCP'] and starts-with(@anchor, 'BCP')"> 
     2275          <xsl:text>, &lt;</xsl:text> 
     2276          <xsl:variable name="uri" select="concat('http://www.rfc-editor.org/info/bcp',seriesInfo[@name='BCP']/@value)"/> 
     2277          <a href="{$uri}"><xsl:value-of select="$uri"/></a> 
    22652278          <xsl:text>&gt;</xsl:text> 
    22662279        </xsl:when> 
     
    28502863    <xsl:apply-templates /> 
    28512864  </strong> 
     2865</xsl:template> 
     2866 
     2867<xsl:template match="spanx[@style!='']" priority="0.1"> 
     2868  <xsl:call-template name="warning"> 
     2869    <xsl:with-param name="msg">unknown spanx style attribute '<xsl:value-of select="@style"/>' ignored</xsl:with-param> 
     2870  </xsl:call-template> 
     2871  <span> 
     2872    <xsl:call-template name="copy-anchor"/> 
     2873    <xsl:apply-templates /> 
     2874  </span> 
    28522875</xsl:template> 
    28532876 
     
    79878010    <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text> 
    79888011    <!-- when RCS keyword substitution in place, add version info --> 
    7989     <xsl:if test="contains('$Revision: 1.730 $',':')"> 
    7990       <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.730 $', 'Revision: '),'$','')),', ')" /> 
     8012    <xsl:if test="contains('$Revision: 1.733 $',':')"> 
     8013      <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.733 $', 'Revision: '),'$','')),', ')" /> 
    79918014    </xsl:if> 
    7992     <xsl:if test="contains('$Date: 2015/05/19 09:21:05 $',':')"> 
    7993       <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2015/05/19 09:21:05 $', 'Date: '),'$','')),', ')" /> 
     8015    <xsl:if test="contains('$Date: 2015/05/28 13:08:20 $',':')"> 
     8016      <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2015/05/28 13:08:20 $', 'Date: '),'$','')),', ')" /> 
    79948017    </xsl:if> 
    79958018    <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))" /> 
  • specs/rfc7230.html

    r2737 r2739  
    525525    } 
    526526} 
    527 </style><link rel="Contents" href="#rfc.toc"><link rel="Author" href="#rfc.authors"><link rel="Copyright" href="#rfc.copyrightnotice"><link rel="Index" href="#rfc.index"><link rel="Chapter" title="1 Introduction" href="#rfc.section.1"><link rel="Chapter" title="2 Architecture" href="#rfc.section.2"><link rel="Chapter" title="3 Message Format" href="#rfc.section.3"><link rel="Chapter" title="4 Transfer Codings" href="#rfc.section.4"><link rel="Chapter" title="5 Message Routing" href="#rfc.section.5"><link rel="Chapter" title="6 Connection Management" href="#rfc.section.6"><link rel="Chapter" title="7 ABNF List Extension: #rule" href="#rfc.section.7"><link rel="Chapter" title="8 IANA Considerations" href="#rfc.section.8"><link rel="Chapter" title="9 Security Considerations" href="#rfc.section.9"><link rel="Chapter" title="10 Acknowledgments" href="#rfc.section.10"><link rel="Chapter" href="#rfc.section.11" title="11 References"><link rel="Appendix" title="A HTTP Version History" href="#rfc.section.A"><link rel="Appendix" title="B Collected ABNF" href="#rfc.section.B"><link href="rfc7231.html" rel="next"><link rel="Alternate" title="Authoritative ASCII Version" href="http://www.ietf.org/rfc/rfc7230.txt"><link rel="Help" title="RFC-Editor's Status Page" href="http://www.rfc-editor.org/info/rfc7230"><link rel="Help" title="Additional Information on tools.ietf.org" href="http://tools.ietf.org/html/rfc7230"><meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.718, 2015/04/08 13:10:26, XSLT vendor: SAXON 6.5.5 from Michael Kay http://saxon.sf.net/"><meta name="keywords" content="Hypertext Transfer Protocol, HTTP, HTTP message format"><link rel="schema.dct" href="http://purl.org/dc/terms/"><meta name="dct.creator" content="Fielding, R."><meta name="dct.creator" content="Reschke, J. F."><meta name="dct.identifier" content="urn:ietf:rfc:7230"><meta name="dct.issued" scheme="ISO8601" content="2014-06"><meta name="dct.replaces" content="urn:ietf:rfc:2145"><meta name="dct.replaces" content="urn:ietf:rfc:2616"><meta name="dct.abstract" content="The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document provides an overview of HTTP architecture and its associated terminology, defines the &#34;http&#34; and &#34;https&#34; Uniform Resource Identifier (URI) schemes, defines the HTTP/1.1 message syntax and parsing requirements, and describes related security concerns for implementations."><meta name="dct.isPartOf" content="urn:issn:2070-1721"><meta name="description" content="The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document provides an overview of HTTP architecture and its associated terminology, defines the &#34;http&#34; and &#34;https&#34; Uniform Resource Identifier (URI) schemes, defines the HTTP/1.1 message syntax and parsing requirements, and describes related security concerns for implementations."></head><body onload="getMeta(7230,&#34;rfc.meta&#34;);"><table class="header" id="rfc.headerblock"><tbody><tr><td class="left">Internet Engineering Task Force (IETF)</td><td class="right">R. Fielding, Editor</td></tr><tr><td class="left">Request for Comments: 7230</td><td class="right">Adobe</td></tr><tr><td class="left">Obsoletes: <a href="https://tools.ietf.org/html/rfc2145">2145</a>, <a href="https://tools.ietf.org/html/rfc2616">2616</a></td><td class="right">J. Reschke, Editor</td></tr><tr><td class="left">Updates: <a href="https://tools.ietf.org/html/rfc2817">2817</a>, <a href="https://tools.ietf.org/html/rfc2818">2818</a></td><td class="right">greenbytes</td></tr><tr><td class="left">Category: Standards Track</td><td class="right">June 2014</td></tr><tr><td class="left">ISSN: 2070-1721</td><td class="right"></td></tr></tbody></table><p class="title" id="rfc.title">Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</p><h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1><p>The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document provides an overview of HTTP architecture and its associated terminology, defines the "http" and "https" Uniform Resource Identifier (URI) schemes, defines the HTTP/1.1 message syntax and parsing requirements, and describes related security concerns for implementations.</p><div id="rfc.meta" style="float: right; border: 1px solid black; margin: 2em; padding: 1em; display: none;"></div><div id="rfc.status"><h1><a href="#rfc.status">Status of This Memo</a></h1><p>This is an Internet Standards Track document.</p><p>This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.</p><p>Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at <a href="http://www.rfc-editor.org/info/rfc7230">http://www.rfc-editor.org/info/rfc7230</a>.</p></div><div id="rfc.copyrightnotice"><h1><a href="#rfc.copyrightnotice">Copyright Notice</a></h1><p>Copyright &copy; 2014 IETF Trust and the persons identified as the document authors. All rights reserved.</p><p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.</p><p>This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.</p></div><hr class="noprint"><div id="rfc.toc"><h1 class="np"><a href="#rfc.toc">Table of Contents</a></h1><ul class="toc"><li><a href="#rfc.section.1">1.</a>&nbsp;&nbsp;&nbsp;<a href="#introduction">Introduction</a><ul><li><a href="#rfc.section.1.1">1.1</a>&nbsp;&nbsp;&nbsp;<a href="#intro.requirements">Requirements Notation</a></li><li><a href="#rfc.section.1.2">1.2</a>&nbsp;&nbsp;&nbsp;<a href="#notation">Syntax Notation</a></li></ul></li><li><a href="#rfc.section.2">2.</a>&nbsp;&nbsp;&nbsp;<a href="#architecture">Architecture</a><ul><li><a href="#rfc.section.2.1">2.1</a>&nbsp;&nbsp;&nbsp;<a href="#operation">Client/Server Messaging</a></li><li><a href="#rfc.section.2.2">2.2</a>&nbsp;&nbsp;&nbsp;<a href="#implementation-diversity">Implementation Diversity</a></li><li><a href="#rfc.section.2.3">2.3</a>&nbsp;&nbsp;&nbsp;<a href="#intermediaries">Intermediaries</a></li><li><a href="#rfc.section.2.4">2.4</a>&nbsp;&nbsp;&nbsp;<a href="#caches">Caches</a></li><li><a href="#rfc.section.2.5">2.5</a>&nbsp;&nbsp;&nbsp;<a href="#conformance">Conformance and Error Handling</a></li><li><a href="#rfc.section.2.6">2.6</a>&nbsp;&nbsp;&nbsp;<a href="#http.version">Protocol Versioning</a></li><li><a href="#rfc.section.2.7">2.7</a>&nbsp;&nbsp;&nbsp;<a href="#uri">Uniform Resource Identifiers</a><ul><li><a href="#rfc.section.2.7.1">2.7.1</a>&nbsp;&nbsp;&nbsp;<a href="#http.uri">http URI Scheme</a></li><li><a href="#rfc.section.2.7.2">2.7.2</a>&nbsp;&nbsp;&nbsp;<a href="#https.uri">https URI Scheme</a></li><li><a href="#rfc.section.2.7.3">2.7.3</a>&nbsp;&nbsp;&nbsp;<a href="#uri.comparison">http and https URI Normalization and Comparison</a></li></ul></li></ul></li><li><a href="#rfc.section.3">3.</a>&nbsp;&nbsp;&nbsp;<a href="#http.message">Message Format</a><ul><li><a href="#rfc.section.3.1">3.1</a>&nbsp;&nbsp;&nbsp;<a href="#start.line">Start Line</a><ul><li><a href="#rfc.section.3.1.1">3.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#request.line">Request Line</a></li><li><a href="#rfc.section.3.1.2">3.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#status.line">Status Line</a></li></ul></li><li><a href="#rfc.section.3.2">3.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.fields">Header Fields</a><ul><li><a href="#rfc.section.3.2.1">3.2.1</a>&nbsp;&nbsp;&nbsp;<a href="#field.extensibility">Field Extensibility</a></li><li><a href="#rfc.section.3.2.2">3.2.2</a>&nbsp;&nbsp;&nbsp;<a href="#field.order">Field Order</a></li><li><a href="#rfc.section.3.2.3">3.2.3</a>&nbsp;&nbsp;&nbsp;<a href="#whitespace">Whitespace</a></li><li><a href="#rfc.section.3.2.4">3.2.4</a>&nbsp;&nbsp;&nbsp;<a href="#field.parsing">Field Parsing</a></li><li><a href="#rfc.section.3.2.5">3.2.5</a>&nbsp;&nbsp;&nbsp;<a href="#field.limits">Field Limits</a></li><li><a href="#rfc.section.3.2.6">3.2.6</a>&nbsp;&nbsp;&nbsp;<a href="#field.components">Field Value Components</a></li></ul></li><li><a href="#rfc.section.3.3">3.3</a>&nbsp;&nbsp;&nbsp;<a href="#message.body">Message Body</a><ul><li><a href="#rfc.section.3.3.1">3.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#header.transfer-encoding">Transfer-Encoding</a></li><li><a href="#rfc.section.3.3.2">3.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.content-length">Content-Length</a></li><li><a href="#rfc.section.3.3.3">3.3.3</a>&nbsp;&nbsp;&nbsp;<a href="#message.body.length">Message Body Length</a></li></ul></li><li><a href="#rfc.section.3.4">3.4</a>&nbsp;&nbsp;&nbsp;<a href="#incomplete.messages">Handling Incomplete Messages</a></li><li><a href="#rfc.section.3.5">3.5</a>&nbsp;&nbsp;&nbsp;<a href="#message.robustness">Message Parsing Robustness</a></li></ul></li><li><a href="#rfc.section.4">4.</a>&nbsp;&nbsp;&nbsp;<a href="#transfer.codings">Transfer Codings</a><ul><li><a href="#rfc.section.4.1">4.1</a>&nbsp;&nbsp;&nbsp;<a href="#chunked.encoding">Chunked Transfer Coding</a><ul><li><a href="#rfc.section.4.1.1">4.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#chunked.extension">Chunk Extensions</a></li><li><a href="#rfc.section.4.1.2">4.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#chunked.trailer.part">Chunked Trailer Part</a></li><li><a href="#rfc.section.4.1.3">4.1.3</a>&nbsp;&nbsp;&nbsp;<a href="#decoding.chunked">Decoding Chunked</a></li></ul></li><li><a href="#rfc.section.4.2">4.2</a>&nbsp;&nbsp;&nbsp;<a href="#compression.codings">Compression Codings</a><ul><li><a href="#rfc.section.4.2.1">4.2.1</a>&nbsp;&nbsp;&nbsp;<a href="#compress.coding">Compress Coding</a></li><li><a href="#rfc.section.4.2.2">4.2.2</a>&nbsp;&nbsp;&nbsp;<a href="#deflate.coding">Deflate Coding</a></li><li><a href="#rfc.section.4.2.3">4.2.3</a>&nbsp;&nbsp;&nbsp;<a href="#gzip.coding">Gzip Coding</a></li></ul></li><li><a href="#rfc.section.4.3">4.3</a>&nbsp;&nbsp;&nbsp;<a href="#header.te">TE</a></li><li><a href="#rfc.section.4.4">4.4</a>&nbsp;&nbsp;&nbsp;<a href="#header.trailer">Trailer</a></li></ul></li><li><a href="#rfc.section.5">5.</a>&nbsp;&nbsp;&nbsp;<a href="#message.routing">Message Routing</a><ul><li><a href="#rfc.section.5.1">5.1</a>&nbsp;&nbsp;&nbsp;<a href="#target-resource">Identifying a Target Resource</a></li><li><a href="#rfc.section.5.2">5.2</a>&nbsp;&nbsp;&nbsp;<a href="#connecting.inbound">Connecting Inbound</a></li><li><a href="#rfc.section.5.3">5.3</a>&nbsp;&nbsp;&nbsp;<a href="#request-target">Request Target</a><ul><li><a href="#rfc.section.5.3.1">5.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#origin-form">origin-form</a></li><li><a href="#rfc.section.5.3.2">5.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#absolute-form">absolute-form</a></li><li><a href="#rfc.section.5.3.3">5.3.3</a>&nbsp;&nbsp;&nbsp;<a href="#authority-form">authority-form</a></li><li><a href="#rfc.section.5.3.4">5.3.4</a>&nbsp;&nbsp;&nbsp;<a href="#asterisk-form">asterisk-form</a></li></ul></li><li><a href="#rfc.section.5.4">5.4</a>&nbsp;&nbsp;&nbsp;<a href="#header.host">Host</a></li><li><a href="#rfc.section.5.5">5.5</a>&nbsp;&nbsp;&nbsp;<a href="#effective.request.uri">Effective Request URI</a></li><li><a href="#rfc.section.5.6">5.6</a>&nbsp;&nbsp;&nbsp;<a href="#associating.response.to.request">Associating a Response to a Request</a></li><li><a href="#rfc.section.5.7">5.7</a>&nbsp;&nbsp;&nbsp;<a href="#message.forwarding">Message Forwarding</a><ul><li><a href="#rfc.section.5.7.1">5.7.1</a>&nbsp;&nbsp;&nbsp;<a href="#header.via">Via</a></li><li><a href="#rfc.section.5.7.2">5.7.2</a>&nbsp;&nbsp;&nbsp;<a href="#message.transformations">Transformations</a></li></ul></li></ul></li><li><a href="#rfc.section.6">6.</a>&nbsp;&nbsp;&nbsp;<a href="#connection.management">Connection Management</a><ul><li><a href="#rfc.section.6.1">6.1</a>&nbsp;&nbsp;&nbsp;<a href="#header.connection">Connection</a></li><li><a href="#rfc.section.6.2">6.2</a>&nbsp;&nbsp;&nbsp;<a href="#persistent.establishment">Establishment</a></li><li><a href="#rfc.section.6.3">6.3</a>&nbsp;&nbsp;&nbsp;<a href="#persistent.connections">Persistence</a><ul><li><a href="#rfc.section.6.3.1">6.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#persistent.retrying.requests">Retrying Requests</a></li><li><a href="#rfc.section.6.3.2">6.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#pipelining">Pipelining</a></li></ul></li><li><a href="#rfc.section.6.4">6.4</a>&nbsp;&nbsp;&nbsp;<a href="#persistent.concurrency">Concurrency</a></li><li><a href="#rfc.section.6.5">6.5</a>&nbsp;&nbsp;&nbsp;<a href="#persistent.failures">Failures and Timeouts</a></li><li><a href="#rfc.section.6.6">6.6</a>&nbsp;&nbsp;&nbsp;<a href="#persistent.tear-down">Tear-down</a></li><li><a href="#rfc.section.6.7">6.7</a>&nbsp;&nbsp;&nbsp;<a href="#header.upgrade">Upgrade</a></li></ul></li><li><a href="#rfc.section.7">7.</a>&nbsp;&nbsp;&nbsp;<a href="#abnf.extension">ABNF List Extension: #rule</a></li><li><a href="#rfc.section.8">8.</a>&nbsp;&nbsp;&nbsp;<a href="#IANA.considerations">IANA Considerations</a><ul><li><a href="#rfc.section.8.1">8.1</a>&nbsp;&nbsp;&nbsp;<a href="#header.field.registration">Header Field Registration</a></li><li><a href="#rfc.section.8.2">8.2</a>&nbsp;&nbsp;&nbsp;<a href="#uri.scheme.registration">URI Scheme Registration</a></li><li><a href="#rfc.section.8.3">8.3</a>&nbsp;&nbsp;&nbsp;<a href="#internet.media.type.http">Internet Media Type Registration</a><ul><li><a href="#rfc.section.8.3.1">8.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#internet.media.type.message.http">Internet Media Type message/http</a></li><li><a href="#rfc.section.8.3.2">8.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#internet.media.type.application.http">Internet Media Type application/http</a></li></ul></li><li><a href="#rfc.section.8.4">8.4</a>&nbsp;&nbsp;&nbsp;<a href="#transfer.coding.registry">Transfer Coding Registry</a><ul><li><a href="#rfc.section.8.4.1">8.4.1</a>&nbsp;&nbsp;&nbsp;<a href="#transfer.coding.registry.procedure">Procedure</a></li><li><a href="#rfc.section.8.4.2">8.4.2</a>&nbsp;&nbsp;&nbsp;<a href="#transfer.coding.registration">Registration</a></li></ul></li><li><a href="#rfc.section.8.5">8.5</a>&nbsp;&nbsp;&nbsp;<a href="#content.coding.registration">Content Coding Registration</a></li><li><a href="#rfc.section.8.6">8.6</a>&nbsp;&nbsp;&nbsp;<a href="#upgrade.token.registry">Upgrade Token Registry</a><ul><li><a href="#rfc.section.8.6.1">8.6.1</a>&nbsp;&nbsp;&nbsp;<a href="#upgrade.token.registry.procedure">Procedure</a></li><li><a href="#rfc.section.8.6.2">8.6.2</a>&nbsp;&nbsp;&nbsp;<a href="#upgrade.token.registration">Upgrade Token Registration</a></li></ul></li></ul></li><li><a href="#rfc.section.9">9.</a>&nbsp;&nbsp;&nbsp;<a href="#security.considerations">Security Considerations</a><ul><li><a href="#rfc.section.9.1">9.1</a>&nbsp;&nbsp;&nbsp;<a href="#establishing.authority">Establishing Authority</a></li><li><a href="#rfc.section.9.2">9.2</a>&nbsp;&nbsp;&nbsp;<a href="#risks.intermediaries">Risks of Intermediaries</a></li><li><a href="#rfc.section.9.3">9.3</a>&nbsp;&nbsp;&nbsp;<a href="#attack.protocol.element.length">Attacks via Protocol Element Length</a></li><li><a href="#rfc.section.9.4">9.4</a>&nbsp;&nbsp;&nbsp;<a href="#response.splitting">Response Splitting</a></li><li><a href="#rfc.section.9.5">9.5</a>&nbsp;&nbsp;&nbsp;<a href="#request.smuggling">Request Smuggling</a></li><li><a href="#rfc.section.9.6">9.6</a>&nbsp;&nbsp;&nbsp;<a href="#message.integrity">Message Integrity</a></li><li><a href="#rfc.section.9.7">9.7</a>&nbsp;&nbsp;&nbsp;<a href="#message.confidentiality">Message Confidentiality</a></li><li><a href="#rfc.section.9.8">9.8</a>&nbsp;&nbsp;&nbsp;<a href="#privacy.of.server.log.information">Privacy of Server Log Information</a></li></ul></li><li><a href="#rfc.section.10">10.</a>&nbsp;&nbsp;&nbsp;<a href="#acks">Acknowledgments</a></li><li><a href="#rfc.section.11">11.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references">References</a><ul><li><a href="#rfc.section.11.1">11.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references.1">Normative References</a></li><li><a href="#rfc.section.11.2">11.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references.2">Informative References</a></li></ul></li><li><a href="#rfc.section.A">A.</a>&nbsp;&nbsp;&nbsp;<a href="#compatibility">HTTP Version History</a><ul><li><a href="#rfc.section.A.1">A.1</a>&nbsp;&nbsp;&nbsp;<a href="#changes.from.1.0">Changes from HTTP/1.0</a><ul><li><a href="#rfc.section.A.1.1">A.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#changes.to.simplify.multihomed.web.servers.and.conserve.ip.addresses">Multihomed Web Servers</a></li><li><a href="#rfc.section.A.1.2">A.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#compatibility.with.http.1.0.persistent.connections">Keep-Alive Connections</a></li><li><a href="#rfc.section.A.1.3">A.1.3</a>&nbsp;&nbsp;&nbsp;<a href="#introduction.of.transfer-encoding">Introduction of Transfer-Encoding</a></li></ul></li><li><a href="#rfc.section.A.2">A.2</a>&nbsp;&nbsp;&nbsp;<a href="#changes.from.rfc.2616">Changes from RFC 2616</a></li></ul></li><li><a href="#rfc.section.B">B.</a>&nbsp;&nbsp;&nbsp;<a href="#collected.abnf">Collected ABNF</a></li><li><a href="#rfc.index">Index</a></li><li><a href="#rfc.authors">Authors' Addresses</a></li></ul></div><div id="introduction"><h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;<a href="#introduction">Introduction</a></h1><div id="rfc.section.1.p.1"><p>The Hypertext Transfer Protocol (HTTP) is a stateless application-level request/response protocol that uses extensible semantics and self-descriptive message payloads for flexible interaction with network-based hypertext information systems. This document is the first in a series of documents that collectively form the HTTP/1.1 specification: <a class="self" href="#rfc.section.1.p.1">&para;</a></p><ol><li>"Message Syntax and Routing" (this document)</li><li>"Semantics and Content" <a href="#RFC7231" id="rfc.xref.RFC7231.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a></li><li>"Conditional Requests" <a href="#RFC7232" id="rfc.xref.RFC7232.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[RFC7232]</cite></a></li><li>"Range Requests" <a href="#RFC7233" id="rfc.xref.RFC7233.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[RFC7233]</cite></a></li><li>"Caching" <a href="#RFC7234" id="rfc.xref.RFC7234.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a></li><li>"Authentication" <a href="#RFC7235" id="rfc.xref.RFC7235.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Authentication">[RFC7235]</cite></a></li></ol></div><div id="rfc.section.1.p.2"><p>This HTTP/1.1 specification obsoletes <cite title="Hypertext Transfer Protocol -- HTTP/1.1" id="rfc.xref.RFC2616.1">RFC 2616</cite> and <cite title="Use and Interpretation of HTTP Version Numbers" id="rfc.xref.RFC2145.1">RFC 2145</cite> (on HTTP versioning). This specification also updates the use of CONNECT to establish a tunnel, previously defined in <cite title="Upgrading to TLS Within HTTP/1.1" id="rfc.xref.RFC2817.1">RFC 2817</cite>, and defines the "https" URI scheme that was described informally in <cite title="HTTP Over TLS" id="rfc.xref.RFC2818.1">RFC 2818</cite>.<a class="self" href="#rfc.section.1.p.2">&para;</a></p></div><div id="rfc.section.1.p.3"><p>HTTP is a generic interface protocol for information systems. It is designed to hide the details of how a service is implemented by presenting a uniform interface to clients that is independent of the types of resources provided. Likewise, servers do not need to be aware of each client's purpose: an HTTP request can be considered in isolation rather than being associated with a specific type of client or a predetermined sequence of application steps. The result is a protocol that can be used effectively in many different contexts and for which implementations can evolve independently over time.<a class="self" href="#rfc.section.1.p.3">&para;</a></p></div><div id="rfc.section.1.p.4"><p>HTTP is also designed for use as an intermediation protocol for translating communication to and from non-HTTP information systems. HTTP proxies and gateways can provide access to alternative information services by translating their diverse protocols into a hypertext format that can be viewed and manipulated by clients in the same way as HTTP services.<a class="self" href="#rfc.section.1.p.4">&para;</a></p></div><div id="rfc.section.1.p.5"><p>One consequence of this flexibility is that the protocol cannot be defined in terms of what occurs behind the interface. Instead, we are limited to defining the syntax of communication, the intent of received communication, and the expected behavior of recipients. If the communication is considered in isolation, then successful actions ought to be reflected in corresponding changes to the observable interface provided by servers. However, since multiple clients might act in parallel and perhaps at cross-purposes, we cannot require that such changes be observable beyond the scope of a single response.<a class="self" href="#rfc.section.1.p.5">&para;</a></p></div><div id="rfc.section.1.p.6"><p>This document describes the architectural elements that are used or referred to in HTTP, defines the "http" and "https" URI schemes, describes overall network operation and connection management, and defines HTTP message framing and forwarding requirements. Our goal is to define all of the mechanisms necessary for HTTP message handling that are independent of message semantics, thereby defining the complete set of requirements for message parsers and message-forwarding intermediaries.<a class="self" href="#rfc.section.1.p.6">&para;</a></p></div><div id="intro.requirements"><h2 id="rfc.section.1.1"><a href="#rfc.section.1.1">1.1</a>&nbsp;<a href="#intro.requirements">Requirements Notation</a></h2><div id="rfc.section.1.1.p.1"><p>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in <a href="#RFC2119" id="rfc.xref.RFC2119.1"><cite title="Key words for use in RFCs to Indicate Requirement Levels">[RFC2119]</cite></a>.<a class="self" href="#rfc.section.1.1.p.1">&para;</a></p></div><div id="rfc.section.1.1.p.2"><p>Conformance criteria and considerations regarding error handling are defined in <a href="#conformance" title="Conformance and Error Handling">Section&nbsp;2.5</a>.<a class="self" href="#rfc.section.1.1.p.2">&para;</a></p></div></div><div id="notation"><h2 id="rfc.section.1.2"><a href="#rfc.section.1.2">1.2</a>&nbsp;<a href="#notation">Syntax Notation</a></h2><div id="rfc.section.1.2.p.1"><p>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> with a list extension, defined in <a href="#abnf.extension" title="ABNF List Extension: #rule">Section&nbsp;7</a>, that allows for compact definition of comma-separated lists using a '#' operator (similar to how the '*' operator indicates repetition). <a href="#collected.abnf" title="Collected ABNF">Appendix&nbsp;B</a> shows the collected grammar with all list operators expanded to standard ABNF notation.<a class="self" href="#rfc.section.1.2.p.1">&para;</a></p></div><div id="core.rules"><div id="rfc.section.1.2.p.2"><p>            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="https://tools.ietf.org/html/rfc5234#appendix-B.1">Appendix B.1</a>: ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote), HEXDIG (hexadecimal 0-9/A-F/a-f), HTAB (horizontal tab), LF (line feed), OCTET (any 8-bit sequence of data), SP (space), and VCHAR (any visible <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).<a class="self" href="#rfc.section.1.2.p.2">&para;</a></p></div></div><div id="rfc.section.1.2.p.3"><p>As a convention, ABNF rule names prefixed with "obs-" denote "obsolete" grammar rules that appear for historical reasons.<a class="self" href="#rfc.section.1.2.p.3">&para;</a></p></div></div></div><div id="architecture"><h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a href="#architecture">Architecture</a></h1><div id="rfc.section.2.p.1"><p>HTTP was created for the World Wide Web (WWW) architecture and has evolved over time to support the scalability needs of a worldwide hypertext system. Much of that architecture is reflected in the terminology and syntax productions used to define HTTP.<a class="self" href="#rfc.section.2.p.1">&para;</a></p></div><div id="operation"><h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a>&nbsp;<a href="#operation">Client/Server Messaging</a></h2><div id="rfc.section.2.1.p.1"><p>HTTP is a stateless request/response protocol that operates by exchanging <dfn>messages</dfn> (<a href="#http.message" title="Message Format">Section&nbsp;3</a>) across a reliable transport- or session-layer "<dfn>connection</dfn>" (<a href="#connection.management" title="Connection Management">Section&nbsp;6</a>). An HTTP "<dfn>client</dfn>" is a program that establishes a connection to a server for the purpose of sending one or more HTTP requests. An HTTP "<dfn>server</dfn>" is a program that accepts connections in order to service HTTP requests by sending HTTP responses.<a class="self" href="#rfc.section.2.1.p.1">&para;</a></p></div><div id="rfc.iref.u.1"></div><div id="rfc.iref.o.1"></div><div id="rfc.iref.b.1"></div><div id="rfc.iref.s.1"></div><div id="rfc.iref.s.2"></div><div id="rfc.iref.r.1"></div><div id="rfc.section.2.1.p.2"><p>The terms "client" and "server" refer only to the roles that these programs perform for a particular connection. The same program might act as a client on some connections and a server on others. The term "<dfn>user agent</dfn>" refers to any of the various client programs that initiate a request, including (but not limited to) browsers, spiders (web-based robots), command-line tools, custom applications, and mobile apps. The term "<dfn>origin server</dfn>" refers to the program that can originate authoritative responses for a given target resource. The terms "<dfn>sender</dfn>" and "<dfn>recipient</dfn>" refer to any implementation that sends or receives a given message, respectively.<a class="self" href="#rfc.section.2.1.p.2">&para;</a></p></div><div id="rfc.section.2.1.p.3"><p>HTTP relies upon the Uniform Resource Identifier (URI) standard <a href="#RFC3986" id="rfc.xref.RFC3986.1"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a> to indicate the target resource (<a href="#target-resource" title="Identifying a Target Resource">Section&nbsp;5.1</a>) and relationships between resources. Messages are passed in a format similar to that used by Internet mail <a href="#RFC5322" id="rfc.xref.RFC5322.1"><cite title="Internet Message Format">[RFC5322]</cite></a> and the Multipurpose Internet Mail Extensions (MIME) <a href="#RFC2045" id="rfc.xref.RFC2045.1"><cite title="Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies">[RFC2045]</cite></a> (see <a href="rfc7231.html#differences.between.http.and.mime" title="Differences between HTTP and MIME">Appendix A</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a> for the differences between HTTP and MIME messages).<a class="self" href="#rfc.section.2.1.p.3">&para;</a></p></div><div id="rfc.section.2.1.p.4"><p>Most HTTP communication consists of a retrieval request (GET) for a representation of some resource identified by a URI. In the simplest case, this might be accomplished via a single bidirectional connection (===) between the user agent (UA) and the origin server (O).<a class="self" href="#rfc.section.2.1.p.4">&para;</a></p></div><div id="rfc.figure.u.1"><pre class="drawing">         request   &gt; 
     527</style><link rel="Contents" href="#rfc.toc"><link rel="Author" href="#rfc.authors"><link rel="Copyright" href="#rfc.copyrightnotice"><link rel="Index" href="#rfc.index"><link rel="Chapter" title="1 Introduction" href="#rfc.section.1"><link rel="Chapter" title="2 Architecture" href="#rfc.section.2"><link rel="Chapter" title="3 Message Format" href="#rfc.section.3"><link rel="Chapter" title="4 Transfer Codings" href="#rfc.section.4"><link rel="Chapter" title="5 Message Routing" href="#rfc.section.5"><link rel="Chapter" title="6 Connection Management" href="#rfc.section.6"><link rel="Chapter" title="7 ABNF List Extension: #rule" href="#rfc.section.7"><link rel="Chapter" title="8 IANA Considerations" href="#rfc.section.8"><link rel="Chapter" title="9 Security Considerations" href="#rfc.section.9"><link rel="Chapter" title="10 Acknowledgments" href="#rfc.section.10"><link rel="Chapter" href="#rfc.section.11" title="11 References"><link rel="Appendix" title="A HTTP Version History" href="#rfc.section.A"><link rel="Appendix" title="B Collected ABNF" href="#rfc.section.B"><link href="rfc7231.html" rel="next"><link rel="Alternate" title="Authoritative ASCII Version" href="http://www.ietf.org/rfc/rfc7230.txt"><link rel="Help" title="RFC-Editor's Status Page" href="http://www.rfc-editor.org/info/rfc7230"><link rel="Help" title="Additional Information on tools.ietf.org" href="http://tools.ietf.org/html/rfc7230"><meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.730, 2015/05/19 09:21:05, XSLT vendor: SAXON 6.5.5 from Michael Kay http://saxon.sf.net/"><meta name="keywords" content="Hypertext Transfer Protocol, HTTP, HTTP message format"><link rel="schema.dct" href="http://purl.org/dc/terms/"><meta name="dct.creator" content="Fielding, R."><meta name="dct.creator" content="Reschke, J. F."><meta name="dct.identifier" content="urn:ietf:rfc:7230"><meta name="dct.issued" scheme="ISO8601" content="2014-06"><meta name="dct.replaces" content="urn:ietf:rfc:2145"><meta name="dct.replaces" content="urn:ietf:rfc:2616"><meta name="dct.abstract" content="The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document provides an overview of HTTP architecture and its associated terminology, defines the &#34;http&#34; and &#34;https&#34; Uniform Resource Identifier (URI) schemes, defines the HTTP/1.1 message syntax and parsing requirements, and describes related security concerns for implementations."><meta name="dct.isPartOf" content="urn:issn:2070-1721"><meta name="description" content="The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document provides an overview of HTTP architecture and its associated terminology, defines the &#34;http&#34; and &#34;https&#34; Uniform Resource Identifier (URI) schemes, defines the HTTP/1.1 message syntax and parsing requirements, and describes related security concerns for implementations."></head><body onload="getMeta(7230,&#34;rfc.meta&#34;);"><table class="header" id="rfc.headerblock"><tbody><tr><td class="left">Internet Engineering Task Force (IETF)</td><td class="right">R. Fielding, Editor</td></tr><tr><td class="left">Request for Comments: 7230</td><td class="right">Adobe</td></tr><tr><td class="left">Obsoletes: <a href="https://tools.ietf.org/html/rfc2145">2145</a>, <a href="https://tools.ietf.org/html/rfc2616">2616</a></td><td class="right">J. Reschke, Editor</td></tr><tr><td class="left">Updates: <a href="https://tools.ietf.org/html/rfc2817">2817</a>, <a href="https://tools.ietf.org/html/rfc2818">2818</a></td><td class="right">greenbytes</td></tr><tr><td class="left">Category: Standards Track</td><td class="right">June 2014</td></tr><tr><td class="left">ISSN: 2070-1721</td><td class="right"></td></tr></tbody></table><p class="title" id="rfc.title">Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</p><h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1><p>The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document provides an overview of HTTP architecture and its associated terminology, defines the "http" and "https" Uniform Resource Identifier (URI) schemes, defines the HTTP/1.1 message syntax and parsing requirements, and describes related security concerns for implementations.</p><div id="rfc.meta" style="float: right; border: 1px solid black; margin: 2em; padding: 1em; display: none;"></div><div id="rfc.status"><h1><a href="#rfc.status">Status of This Memo</a></h1><p>This is an Internet Standards Track document.</p><p>This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.</p><p>Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at <a href="http://www.rfc-editor.org/info/rfc7230">http://www.rfc-editor.org/info/rfc7230</a>.</p></div><div id="rfc.copyrightnotice"><h1><a href="#rfc.copyrightnotice">Copyright Notice</a></h1><p>Copyright &copy; 2014 IETF Trust and the persons identified as the document authors. All rights reserved.</p><p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.</p><p>This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.</p></div><hr class="noprint"><div id="rfc.toc"><h1 class="np"><a href="#rfc.toc">Table of Contents</a></h1><ul class="toc"><li><a href="#rfc.section.1">1.</a>&nbsp;&nbsp;&nbsp;<a href="#introduction">Introduction</a><ul><li><a href="#rfc.section.1.1">1.1</a>&nbsp;&nbsp;&nbsp;<a href="#intro.requirements">Requirements Notation</a></li><li><a href="#rfc.section.1.2">1.2</a>&nbsp;&nbsp;&nbsp;<a href="#notation">Syntax Notation</a></li></ul></li><li><a href="#rfc.section.2">2.</a>&nbsp;&nbsp;&nbsp;<a href="#architecture">Architecture</a><ul><li><a href="#rfc.section.2.1">2.1</a>&nbsp;&nbsp;&nbsp;<a href="#operation">Client/Server Messaging</a></li><li><a href="#rfc.section.2.2">2.2</a>&nbsp;&nbsp;&nbsp;<a href="#implementation-diversity">Implementation Diversity</a></li><li><a href="#rfc.section.2.3">2.3</a>&nbsp;&nbsp;&nbsp;<a href="#intermediaries">Intermediaries</a></li><li><a href="#rfc.section.2.4">2.4</a>&nbsp;&nbsp;&nbsp;<a href="#caches">Caches</a></li><li><a href="#rfc.section.2.5">2.5</a>&nbsp;&nbsp;&nbsp;<a href="#conformance">Conformance and Error Handling</a></li><li><a href="#rfc.section.2.6">2.6</a>&nbsp;&nbsp;&nbsp;<a href="#http.version">Protocol Versioning</a></li><li><a href="#rfc.section.2.7">2.7</a>&nbsp;&nbsp;&nbsp;<a href="#uri">Uniform Resource Identifiers</a><ul><li><a href="#rfc.section.2.7.1">2.7.1</a>&nbsp;&nbsp;&nbsp;<a href="#http.uri">http URI Scheme</a></li><li><a href="#rfc.section.2.7.2">2.7.2</a>&nbsp;&nbsp;&nbsp;<a href="#https.uri">https URI Scheme</a></li><li><a href="#rfc.section.2.7.3">2.7.3</a>&nbsp;&nbsp;&nbsp;<a href="#uri.comparison">http and https URI Normalization and Comparison</a></li></ul></li></ul></li><li><a href="#rfc.section.3">3.</a>&nbsp;&nbsp;&nbsp;<a href="#http.message">Message Format</a><ul><li><a href="#rfc.section.3.1">3.1</a>&nbsp;&nbsp;&nbsp;<a href="#start.line">Start Line</a><ul><li><a href="#rfc.section.3.1.1">3.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#request.line">Request Line</a></li><li><a href="#rfc.section.3.1.2">3.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#status.line">Status Line</a></li></ul></li><li><a href="#rfc.section.3.2">3.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.fields">Header Fields</a><ul><li><a href="#rfc.section.3.2.1">3.2.1</a>&nbsp;&nbsp;&nbsp;<a href="#field.extensibility">Field Extensibility</a></li><li><a href="#rfc.section.3.2.2">3.2.2</a>&nbsp;&nbsp;&nbsp;<a href="#field.order">Field Order</a></li><li><a href="#rfc.section.3.2.3">3.2.3</a>&nbsp;&nbsp;&nbsp;<a href="#whitespace">Whitespace</a></li><li><a href="#rfc.section.3.2.4">3.2.4</a>&nbsp;&nbsp;&nbsp;<a href="#field.parsing">Field Parsing</a></li><li><a href="#rfc.section.3.2.5">3.2.5</a>&nbsp;&nbsp;&nbsp;<a href="#field.limits">Field Limits</a></li><li><a href="#rfc.section.3.2.6">3.2.6</a>&nbsp;&nbsp;&nbsp;<a href="#field.components">Field Value Components</a></li></ul></li><li><a href="#rfc.section.3.3">3.3</a>&nbsp;&nbsp;&nbsp;<a href="#message.body">Message Body</a><ul><li><a href="#rfc.section.3.3.1">3.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#header.transfer-encoding">Transfer-Encoding</a></li><li><a href="#rfc.section.3.3.2">3.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.content-length">Content-Length</a></li><li><a href="#rfc.section.3.3.3">3.3.3</a>&nbsp;&nbsp;&nbsp;<a href="#message.body.length">Message Body Length</a></li></ul></li><li><a href="#rfc.section.3.4">3.4</a>&nbsp;&nbsp;&nbsp;<a href="#incomplete.messages">Handling Incomplete Messages</a></li><li><a href="#rfc.section.3.5">3.5</a>&nbsp;&nbsp;&nbsp;<a href="#message.robustness">Message Parsing Robustness</a></li></ul></li><li><a href="#rfc.section.4">4.</a>&nbsp;&nbsp;&nbsp;<a href="#transfer.codings">Transfer Codings</a><ul><li><a href="#rfc.section.4.1">4.1</a>&nbsp;&nbsp;&nbsp;<a href="#chunked.encoding">Chunked Transfer Coding</a><ul><li><a href="#rfc.section.4.1.1">4.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#chunked.extension">Chunk Extensions</a></li><li><a href="#rfc.section.4.1.2">4.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#chunked.trailer.part">Chunked Trailer Part</a></li><li><a href="#rfc.section.4.1.3">4.1.3</a>&nbsp;&nbsp;&nbsp;<a href="#decoding.chunked">Decoding Chunked</a></li></ul></li><li><a href="#rfc.section.4.2">4.2</a>&nbsp;&nbsp;&nbsp;<a href="#compression.codings">Compression Codings</a><ul><li><a href="#rfc.section.4.2.1">4.2.1</a>&nbsp;&nbsp;&nbsp;<a href="#compress.coding">Compress Coding</a></li><li><a href="#rfc.section.4.2.2">4.2.2</a>&nbsp;&nbsp;&nbsp;<a href="#deflate.coding">Deflate Coding</a></li><li><a href="#rfc.section.4.2.3">4.2.3</a>&nbsp;&nbsp;&nbsp;<a href="#gzip.coding">Gzip Coding</a></li></ul></li><li><a href="#rfc.section.4.3">4.3</a>&nbsp;&nbsp;&nbsp;<a href="#header.te">TE</a></li><li><a href="#rfc.section.4.4">4.4</a>&nbsp;&nbsp;&nbsp;<a href="#header.trailer">Trailer</a></li></ul></li><li><a href="#rfc.section.5">5.</a>&nbsp;&nbsp;&nbsp;<a href="#message.routing">Message Routing</a><ul><li><a href="#rfc.section.5.1">5.1</a>&nbsp;&nbsp;&nbsp;<a href="#target-resource">Identifying a Target Resource</a></li><li><a href="#rfc.section.5.2">5.2</a>&nbsp;&nbsp;&nbsp;<a href="#connecting.inbound">Connecting Inbound</a></li><li><a href="#rfc.section.5.3">5.3</a>&nbsp;&nbsp;&nbsp;<a href="#request-target">Request Target</a><ul><li><a href="#rfc.section.5.3.1">5.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#origin-form">origin-form</a></li><li><a href="#rfc.section.5.3.2">5.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#absolute-form">absolute-form</a></li><li><a href="#rfc.section.5.3.3">5.3.3</a>&nbsp;&nbsp;&nbsp;<a href="#authority-form">authority-form</a></li><li><a href="#rfc.section.5.3.4">5.3.4</a>&nbsp;&nbsp;&nbsp;<a href="#asterisk-form">asterisk-form</a></li></ul></li><li><a href="#rfc.section.5.4">5.4</a>&nbsp;&nbsp;&nbsp;<a href="#header.host">Host</a></li><li><a href="#rfc.section.5.5">5.5</a>&nbsp;&nbsp;&nbsp;<a href="#effective.request.uri">Effective Request URI</a></li><li><a href="#rfc.section.5.6">5.6</a>&nbsp;&nbsp;&nbsp;<a href="#associating.response.to.request">Associating a Response to a Request</a></li><li><a href="#rfc.section.5.7">5.7</a>&nbsp;&nbsp;&nbsp;<a href="#message.forwarding">Message Forwarding</a><ul><li><a href="#rfc.section.5.7.1">5.7.1</a>&nbsp;&nbsp;&nbsp;<a href="#header.via">Via</a></li><li><a href="#rfc.section.5.7.2">5.7.2</a>&nbsp;&nbsp;&nbsp;<a href="#message.transformations">Transformations</a></li></ul></li></ul></li><li><a href="#rfc.section.6">6.</a>&nbsp;&nbsp;&nbsp;<a href="#connection.management">Connection Management</a><ul><li><a href="#rfc.section.6.1">6.1</a>&nbsp;&nbsp;&nbsp;<a href="#header.connection">Connection</a></li><li><a href="#rfc.section.6.2">6.2</a>&nbsp;&nbsp;&nbsp;<a href="#persistent.establishment">Establishment</a></li><li><a href="#rfc.section.6.3">6.3</a>&nbsp;&nbsp;&nbsp;<a href="#persistent.connections">Persistence</a><ul><li><a href="#rfc.section.6.3.1">6.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#persistent.retrying.requests">Retrying Requests</a></li><li><a href="#rfc.section.6.3.2">6.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#pipelining">Pipelining</a></li></ul></li><li><a href="#rfc.section.6.4">6.4</a>&nbsp;&nbsp;&nbsp;<a href="#persistent.concurrency">Concurrency</a></li><li><a href="#rfc.section.6.5">6.5</a>&nbsp;&nbsp;&nbsp;<a href="#persistent.failures">Failures and Timeouts</a></li><li><a href="#rfc.section.6.6">6.6</a>&nbsp;&nbsp;&nbsp;<a href="#persistent.tear-down">Tear-down</a></li><li><a href="#rfc.section.6.7">6.7</a>&nbsp;&nbsp;&nbsp;<a href="#header.upgrade">Upgrade</a></li></ul></li><li><a href="#rfc.section.7">7.</a>&nbsp;&nbsp;&nbsp;<a href="#abnf.extension">ABNF List Extension: #rule</a></li><li><a href="#rfc.section.8">8.</a>&nbsp;&nbsp;&nbsp;<a href="#IANA.considerations">IANA Considerations</a><ul><li><a href="#rfc.section.8.1">8.1</a>&nbsp;&nbsp;&nbsp;<a href="#header.field.registration">Header Field Registration</a></li><li><a href="#rfc.section.8.2">8.2</a>&nbsp;&nbsp;&nbsp;<a href="#uri.scheme.registration">URI Scheme Registration</a></li><li><a href="#rfc.section.8.3">8.3</a>&nbsp;&nbsp;&nbsp;<a href="#internet.media.type.http">Internet Media Type Registration</a><ul><li><a href="#rfc.section.8.3.1">8.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#internet.media.type.message.http">Internet Media Type message/http</a></li><li><a href="#rfc.section.8.3.2">8.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#internet.media.type.application.http">Internet Media Type application/http</a></li></ul></li><li><a href="#rfc.section.8.4">8.4</a>&nbsp;&nbsp;&nbsp;<a href="#transfer.coding.registry">Transfer Coding Registry</a><ul><li><a href="#rfc.section.8.4.1">8.4.1</a>&nbsp;&nbsp;&nbsp;<a href="#transfer.coding.registry.procedure">Procedure</a></li><li><a href="#rfc.section.8.4.2">8.4.2</a>&nbsp;&nbsp;&nbsp;<a href="#transfer.coding.registration">Registration</a></li></ul></li><li><a href="#rfc.section.8.5">8.5</a>&nbsp;&nbsp;&nbsp;<a href="#content.coding.registration">Content Coding Registration</a></li><li><a href="#rfc.section.8.6">8.6</a>&nbsp;&nbsp;&nbsp;<a href="#upgrade.token.registry">Upgrade Token Registry</a><ul><li><a href="#rfc.section.8.6.1">8.6.1</a>&nbsp;&nbsp;&nbsp;<a href="#upgrade.token.registry.procedure">Procedure</a></li><li><a href="#rfc.section.8.6.2">8.6.2</a>&nbsp;&nbsp;&nbsp;<a href="#upgrade.token.registration">Upgrade Token Registration</a></li></ul></li></ul></li><li><a href="#rfc.section.9">9.</a>&nbsp;&nbsp;&nbsp;<a href="#security.considerations">Security Considerations</a><ul><li><a href="#rfc.section.9.1">9.1</a>&nbsp;&nbsp;&nbsp;<a href="#establishing.authority">Establishing Authority</a></li><li><a href="#rfc.section.9.2">9.2</a>&nbsp;&nbsp;&nbsp;<a href="#risks.intermediaries">Risks of Intermediaries</a></li><li><a href="#rfc.section.9.3">9.3</a>&nbsp;&nbsp;&nbsp;<a href="#attack.protocol.element.length">Attacks via Protocol Element Length</a></li><li><a href="#rfc.section.9.4">9.4</a>&nbsp;&nbsp;&nbsp;<a href="#response.splitting">Response Splitting</a></li><li><a href="#rfc.section.9.5">9.5</a>&nbsp;&nbsp;&nbsp;<a href="#request.smuggling">Request Smuggling</a></li><li><a href="#rfc.section.9.6">9.6</a>&nbsp;&nbsp;&nbsp;<a href="#message.integrity">Message Integrity</a></li><li><a href="#rfc.section.9.7">9.7</a>&nbsp;&nbsp;&nbsp;<a href="#message.confidentiality">Message Confidentiality</a></li><li><a href="#rfc.section.9.8">9.8</a>&nbsp;&nbsp;&nbsp;<a href="#privacy.of.server.log.information">Privacy of Server Log Information</a></li></ul></li><li><a href="#rfc.section.10">10.</a>&nbsp;&nbsp;&nbsp;<a href="#acks">Acknowledgments</a></li><li><a href="#rfc.section.11">11.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references">References</a><ul><li><a href="#rfc.section.11.1">11.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references.1">Normative References</a></li><li><a href="#rfc.section.11.2">11.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references.2">Informative References</a></li></ul></li><li><a href="#rfc.section.A">A.</a>&nbsp;&nbsp;&nbsp;<a href="#compatibility">HTTP Version History</a><ul><li><a href="#rfc.section.A.1">A.1</a>&nbsp;&nbsp;&nbsp;<a href="#changes.from.1.0">Changes from HTTP/1.0</a><ul><li><a href="#rfc.section.A.1.1">A.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#changes.to.simplify.multihomed.web.servers.and.conserve.ip.addresses">Multihomed Web Servers</a></li><li><a href="#rfc.section.A.1.2">A.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#compatibility.with.http.1.0.persistent.connections">Keep-Alive Connections</a></li><li><a href="#rfc.section.A.1.3">A.1.3</a>&nbsp;&nbsp;&nbsp;<a href="#introduction.of.transfer-encoding">Introduction of Transfer-Encoding</a></li></ul></li><li><a href="#rfc.section.A.2">A.2</a>&nbsp;&nbsp;&nbsp;<a href="#changes.from.rfc.2616">Changes from RFC 2616</a></li></ul></li><li><a href="#rfc.section.B">B.</a>&nbsp;&nbsp;&nbsp;<a href="#collected.abnf">Collected ABNF</a></li><li><a href="#rfc.index">Index</a></li><li><a href="#rfc.authors">Authors' Addresses</a></li></ul></div><div id="introduction"><h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;<a href="#introduction">Introduction</a></h1><div id="rfc.section.1.p.1"><p>The Hypertext Transfer Protocol (HTTP) is a stateless application-level request/response protocol that uses extensible semantics and self-descriptive message payloads for flexible interaction with network-based hypertext information systems. This document is the first in a series of documents that collectively form the HTTP/1.1 specification: <a class="self" href="#rfc.section.1.p.1">&para;</a></p><ol><li>"Message Syntax and Routing" (this document)</li><li>"Semantics and Content" <a href="#RFC7231" id="rfc.xref.RFC7231.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a></li><li>"Conditional Requests" <a href="#RFC7232" id="rfc.xref.RFC7232.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[RFC7232]</cite></a></li><li>"Range Requests" <a href="#RFC7233" id="rfc.xref.RFC7233.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[RFC7233]</cite></a></li><li>"Caching" <a href="#RFC7234" id="rfc.xref.RFC7234.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a></li><li>"Authentication" <a href="#RFC7235" id="rfc.xref.RFC7235.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Authentication">[RFC7235]</cite></a></li></ol></div><div id="rfc.section.1.p.2"><p>This HTTP/1.1 specification obsoletes <cite title="Hypertext Transfer Protocol -- HTTP/1.1" id="rfc.xref.RFC2616.1">RFC 2616</cite> and <cite title="Use and Interpretation of HTTP Version Numbers" id="rfc.xref.RFC2145.1">RFC 2145</cite> (on HTTP versioning). This specification also updates the use of CONNECT to establish a tunnel, previously defined in <cite title="Upgrading to TLS Within HTTP/1.1" id="rfc.xref.RFC2817.1">RFC 2817</cite>, and defines the "https" URI scheme that was described informally in <cite title="HTTP Over TLS" id="rfc.xref.RFC2818.1">RFC 2818</cite>.<a class="self" href="#rfc.section.1.p.2">&para;</a></p></div><div id="rfc.section.1.p.3"><p>HTTP is a generic interface protocol for information systems. It is designed to hide the details of how a service is implemented by presenting a uniform interface to clients that is independent of the types of resources provided. Likewise, servers do not need to be aware of each client's purpose: an HTTP request can be considered in isolation rather than being associated with a specific type of client or a predetermined sequence of application steps. The result is a protocol that can be used effectively in many different contexts and for which implementations can evolve independently over time.<a class="self" href="#rfc.section.1.p.3">&para;</a></p></div><div id="rfc.section.1.p.4"><p>HTTP is also designed for use as an intermediation protocol for translating communication to and from non-HTTP information systems. HTTP proxies and gateways can provide access to alternative information services by translating their diverse protocols into a hypertext format that can be viewed and manipulated by clients in the same way as HTTP services.<a class="self" href="#rfc.section.1.p.4">&para;</a></p></div><div id="rfc.section.1.p.5"><p>One consequence of this flexibility is that the protocol cannot be defined in terms of what occurs behind the interface. Instead, we are limited to defining the syntax of communication, the intent of received communication, and the expected behavior of recipients. If the communication is considered in isolation, then successful actions ought to be reflected in corresponding changes to the observable interface provided by servers. However, since multiple clients might act in parallel and perhaps at cross-purposes, we cannot require that such changes be observable beyond the scope of a single response.<a class="self" href="#rfc.section.1.p.5">&para;</a></p></div><div id="rfc.section.1.p.6"><p>This document describes the architectural elements that are used or referred to in HTTP, defines the "http" and "https" URI schemes, describes overall network operation and connection management, and defines HTTP message framing and forwarding requirements. Our goal is to define all of the mechanisms necessary for HTTP message handling that are independent of message semantics, thereby defining the complete set of requirements for message parsers and message-forwarding intermediaries.<a class="self" href="#rfc.section.1.p.6">&para;</a></p></div><div id="intro.requirements"><h2 id="rfc.section.1.1"><a href="#rfc.section.1.1">1.1</a>&nbsp;<a href="#intro.requirements">Requirements Notation</a></h2><div id="rfc.section.1.1.p.1"><p>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in <a href="#RFC2119" id="rfc.xref.RFC2119.1"><cite title="Key words for use in RFCs to Indicate Requirement Levels">[RFC2119]</cite></a>.<a class="self" href="#rfc.section.1.1.p.1">&para;</a></p></div><div id="rfc.section.1.1.p.2"><p>Conformance criteria and considerations regarding error handling are defined in <a href="#conformance" title="Conformance and Error Handling">Section&nbsp;2.5</a>.<a class="self" href="#rfc.section.1.1.p.2">&para;</a></p></div></div><div id="notation"><h2 id="rfc.section.1.2"><a href="#rfc.section.1.2">1.2</a>&nbsp;<a href="#notation">Syntax Notation</a></h2><div id="rfc.section.1.2.p.1"><p>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> with a list extension, defined in <a href="#abnf.extension" title="ABNF List Extension: #rule">Section&nbsp;7</a>, that allows for compact definition of comma-separated lists using a '#' operator (similar to how the '*' operator indicates repetition). <a href="#collected.abnf" title="Collected ABNF">Appendix&nbsp;B</a> shows the collected grammar with all list operators expanded to standard ABNF notation.<a class="self" href="#rfc.section.1.2.p.1">&para;</a></p></div><div id="core.rules"><div id="rfc.section.1.2.p.2"><p>            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="https://tools.ietf.org/html/rfc5234#appendix-B.1">Appendix B.1</a>: ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote), HEXDIG (hexadecimal 0-9/A-F/a-f), HTAB (horizontal tab), LF (line feed), OCTET (any 8-bit sequence of data), SP (space), and VCHAR (any visible <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).<a class="self" href="#rfc.section.1.2.p.2">&para;</a></p></div></div><div id="rfc.section.1.2.p.3"><p>As a convention, ABNF rule names prefixed with "obs-" denote "obsolete" grammar rules that appear for historical reasons.<a class="self" href="#rfc.section.1.2.p.3">&para;</a></p></div></div></div><div id="architecture"><h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a href="#architecture">Architecture</a></h1><div id="rfc.section.2.p.1"><p>HTTP was created for the World Wide Web (WWW) architecture and has evolved over time to support the scalability needs of a worldwide hypertext system. Much of that architecture is reflected in the terminology and syntax productions used to define HTTP.<a class="self" href="#rfc.section.2.p.1">&para;</a></p></div><div id="operation"><h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a>&nbsp;<a href="#operation">Client/Server Messaging</a></h2><div id="rfc.section.2.1.p.1"><p>HTTP is a stateless request/response protocol that operates by exchanging <dfn>messages</dfn> (<a href="#http.message" title="Message Format">Section&nbsp;3</a>) across a reliable transport- or session-layer "<dfn>connection</dfn>" (<a href="#connection.management" title="Connection Management">Section&nbsp;6</a>). An HTTP "<dfn>client</dfn>" is a program that establishes a connection to a server for the purpose of sending one or more HTTP requests. An HTTP "<dfn>server</dfn>" is a program that accepts connections in order to service HTTP requests by sending HTTP responses.<a class="self" href="#rfc.section.2.1.p.1">&para;</a></p></div><div id="rfc.iref.u.1"></div><div id="rfc.iref.o.1"></div><div id="rfc.iref.b.1"></div><div id="rfc.iref.s.1"></div><div id="rfc.iref.s.2"></div><div id="rfc.iref.r.1"></div><div id="rfc.section.2.1.p.2"><p>The terms "client" and "server" refer only to the roles that these programs perform for a particular connection. The same program might act as a client on some connections and a server on others. The term "<dfn>user agent</dfn>" refers to any of the various client programs that initiate a request, including (but not limited to) browsers, spiders (web-based robots), command-line tools, custom applications, and mobile apps. The term "<dfn>origin server</dfn>" refers to the program that can originate authoritative responses for a given target resource. The terms "<dfn>sender</dfn>" and "<dfn>recipient</dfn>" refer to any implementation that sends or receives a given message, respectively.<a class="self" href="#rfc.section.2.1.p.2">&para;</a></p></div><div id="rfc.section.2.1.p.3"><p>HTTP relies upon the Uniform Resource Identifier (URI) standard <a href="#RFC3986" id="rfc.xref.RFC3986.1"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a> to indicate the target resource (<a href="#target-resource" title="Identifying a Target Resource">Section&nbsp;5.1</a>) and relationships between resources. Messages are passed in a format similar to that used by Internet mail <a href="#RFC5322" id="rfc.xref.RFC5322.1"><cite title="Internet Message Format">[RFC5322]</cite></a> and the Multipurpose Internet Mail Extensions (MIME) <a href="#RFC2045" id="rfc.xref.RFC2045.1"><cite title="Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies">[RFC2045]</cite></a> (see <a href="rfc7231.html#differences.between.http.and.mime" title="Differences between HTTP and MIME">Appendix A</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a> for the differences between HTTP and MIME messages).<a class="self" href="#rfc.section.2.1.p.3">&para;</a></p></div><div id="rfc.section.2.1.p.4"><p>Most HTTP communication consists of a retrieval request (GET) for a representation of some resource identified by a URI. In the simplest case, this might be accomplished via a single bidirectional connection (===) between the user agent (UA) and the origin server (O).<a class="self" href="#rfc.section.2.1.p.4">&para;</a></p></div><div id="rfc.figure.u.1"><pre class="drawing">         request   &gt; 
    528528    <b>UA</b> ======================================= <b>O</b> 
    529529                                &lt;   response 
    530 </pre></div><div id="rfc.iref.m.1"></div><div id="rfc.iref.r.2"></div><div id="rfc.iref.r.3"></div><div id="rfc.section.2.1.p.5"><p>A client sends an HTTP request to a server in the form of a <dfn>request</dfn> message, beginning with a request-line that includes a method, URI, and protocol version (<a href="#request.line" title="Request Line">Section&nbsp;3.1.1</a>), followed by header fields containing request modifiers, client information, and representation metadata (<a href="#header.fields" title="Header Fields">Section&nbsp;3.2</a>), an empty line to indicate the end of the header section, and finally a message body containing the payload body (if any, <a href="#message.body" title="Message Body">Section&nbsp;3.3</a>).<a class="self" href="#rfc.section.2.1.p.5">&para;</a></p></div><div id="rfc.section.2.1.p.6"><p>A server responds to a client's request by sending one or more HTTP <dfn>response</dfn> messages, each beginning with a status line that includes the protocol version, a success or error code, and textual reason phrase (<a href="#status.line" title="Status Line">Section&nbsp;3.1.2</a>), possibly followed by header fields containing server information, resource metadata, and representation metadata (<a href="#header.fields" title="Header Fields">Section&nbsp;3.2</a>), an empty line to indicate the end of the header section, and finally a message body containing the payload body (if any, <a href="#message.body" title="Message Body">Section&nbsp;3.3</a>).<a class="self" href="#rfc.section.2.1.p.6">&para;</a></p></div><div id="rfc.section.2.1.p.7"><p>A connection might be used for multiple request/response exchanges, as defined in <a href="#persistent.connections" title="Persistence">Section&nbsp;6.3</a>.<a class="self" href="#rfc.section.2.1.p.7">&para;</a></p></div><div id="rfc.section.2.1.p.8"><p>The following example illustrates a typical message exchange for a GET request (<a href="rfc7231.html#GET" title="GET">Section 4.3.1</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>) on the URI "http://www.example.com/hello.txt":<a class="self" href="#rfc.section.2.1.p.8">&para;</a></p></div><div id="rfc.figure.u.2"><p>Client request:</p><pre class="text2">GET /hello.txt HTTP/1.1 
     530</pre></div><div id="rfc.iref.m.1"></div><div id="rfc.iref.r.2"></div><div id="rfc.iref.r.3"></div><div id="rfc.section.2.1.p.5"><p>A client sends an HTTP request to a server in the form of a <dfn>request</dfn> message, beginning with a request-line that includes a method, URI, and protocol version (<a href="#request.line" title="Request Line">Section&nbsp;3.1.1</a>), followed by header fields containing request modifiers, client information, and representation metadata (<a href="#header.fields" title="Header Fields">Section&nbsp;3.2</a>), an empty line to indicate the end of the header section, and finally a message body containing the payload body (if any, <a href="#message.body" title="Message Body">Section&nbsp;3.3</a>).<a class="self" href="#rfc.section.2.1.p.5">&para;</a></p></div><div id="rfc.section.2.1.p.6"><p>A server responds to a client's request by sending one or more HTTP <dfn>response</dfn> messages, each beginning with a status line that includes the protocol version, a success or error code, and textual reason phrase (<a href="#status.line" title="Status Line">Section&nbsp;3.1.2</a>), possibly followed by header fields containing server information, resource metadata, and representation metadata (<a href="#header.fields" title="Header Fields">Section&nbsp;3.2</a>), an empty line to indicate the end of the header section, and finally a message body containing the payload body (if any, <a href="#message.body" title="Message Body">Section&nbsp;3.3</a>).<a class="self" href="#rfc.section.2.1.p.6">&para;</a></p></div><div id="rfc.section.2.1.p.7"><p>A connection might be used for multiple request/response exchanges, as defined in <a href="#persistent.connections" title="Persistence">Section&nbsp;6.3</a>.<a class="self" href="#rfc.section.2.1.p.7">&para;</a></p></div><div id="rfc.section.2.1.p.8" class="avoidbreakafter"><p>The following example illustrates a typical message exchange for a GET request (<a href="rfc7231.html#GET" title="GET">Section 4.3.1</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>) on the URI "http://www.example.com/hello.txt":<a class="self" href="#rfc.section.2.1.p.8">&para;</a></p></div><div id="rfc.figure.u.2"><p>Client request:</p><pre class="text2">GET /hello.txt HTTP/1.1 
    531531User-Agent: curl/7.16.3 libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3 
    532532Host: www.example.com 
     
    570570</pre></div><div id="rfc.section.2.7.1.p.2"><p>The origin server for an "http" URI is identified by the <a href="#uri" class="smpl">authority</a> component, which includes a host identifier and optional TCP port (<a href="#RFC3986" id="rfc.xref.RFC3986.14"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="https://tools.ietf.org/html/rfc3986#section-3.2.2">Section 3.2.2</a>). The hierarchical path component and optional query component serve as an identifier for a potential target resource within that origin server's name space. The optional fragment component allows for indirect identification of a secondary resource, independent of the URI scheme, as defined in <a href="https://tools.ietf.org/html/rfc3986#section-3.5">Section 3.5</a> of <a href="#RFC3986" id="rfc.xref.RFC3986.15"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>.<a class="self" href="#rfc.section.2.7.1.p.2">&para;</a></p></div><div id="rfc.section.2.7.1.p.3"><p>A sender <em class="bcp14">MUST NOT</em> generate an "http" URI with an empty host identifier. A recipient that processes such a URI reference <em class="bcp14">MUST</em> reject it as invalid.<a class="self" href="#rfc.section.2.7.1.p.3">&para;</a></p></div><div id="rfc.section.2.7.1.p.4"><p>If the host identifier is provided as an IP address, the origin server is the listener (if any) on the indicated TCP port at that IP address. If host is a registered name, the registered name is an indirect identifier for use with a name resolution service, such as DNS, to find an address for that origin server. If the port subcomponent is empty or not given, TCP port 80 (the reserved port for WWW services) is the default.<a class="self" href="#rfc.section.2.7.1.p.4">&para;</a></p></div><div id="rfc.section.2.7.1.p.5"><p>Note that the presence of a URI with a given authority component does not imply that there is always an HTTP server listening for connections on that host and port. Anyone can mint a URI. What the authority component determines is who has the right to respond authoritatively to requests that target the identified resource. The delegated nature of registered names and IP addresses creates a federated namespace, based on control over the indicated host and port, whether or not an HTTP server is present. See <a href="#establishing.authority" title="Establishing Authority">Section&nbsp;9.1</a> for security considerations related to establishing authority.<a class="self" href="#rfc.section.2.7.1.p.5">&para;</a></p></div><div id="rfc.section.2.7.1.p.6"><p>When an "http" URI is used within a context that calls for access to the indicated resource, a client <em class="bcp14">MAY</em> attempt access by resolving the host to an IP address, establishing a TCP connection to that address on the indicated port, and sending an HTTP request message (<a href="#http.message" title="Message Format">Section&nbsp;3</a>) containing the URI's identifying data (<a href="#message.routing" title="Message Routing">Section&nbsp;5</a>) to the server. If the server responds to that request with a non-interim HTTP response message, as described in <a href="rfc7231.html#status.codes" title="Response Status Codes">Section 6</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>, then that response is considered an authoritative answer to the client's request.<a class="self" href="#rfc.section.2.7.1.p.6">&para;</a></p></div><div id="rfc.section.2.7.1.p.7"><p>Although HTTP is independent of the transport protocol, the "http" scheme is specific to TCP-based services because the name delegation process depends on TCP for establishing authority. An HTTP service based on some other underlying connection protocol would presumably be identified using a different URI scheme, just as the "https" scheme (below) is used for resources that require an end-to-end secured connection. Other protocols might also be used to provide access to "http" identified resources &#8212; it is only the authoritative interface that is specific to TCP.<a class="self" href="#rfc.section.2.7.1.p.7">&para;</a></p></div><div id="rfc.section.2.7.1.p.8"><p>The URI generic syntax for authority also includes a deprecated userinfo subcomponent (<a href="#RFC3986" id="rfc.xref.RFC3986.16"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="https://tools.ietf.org/html/rfc3986#section-3.2.1">Section 3.2.1</a>) for including user authentication information in the URI. Some implementations make use of the userinfo component for internal configuration of authentication information, such as within command invocation options, configuration files, or bookmark lists, even though such usage might expose a user identifier or password. A sender <em class="bcp14">MUST NOT</em> generate the userinfo subcomponent (and its "@" delimiter) when an "http" URI reference is generated within a message as a request target or header field value. Before making use of an "http" URI reference received from an untrusted source, a recipient <em class="bcp14">SHOULD</em> parse for userinfo and treat its presence as an error; it is likely being used to obscure the authority for the sake of phishing attacks.<a class="self" href="#rfc.section.2.7.1.p.8">&para;</a></p></div></div><div id="https.uri"><h3 id="rfc.section.2.7.2"><a href="#rfc.section.2.7.2">2.7.2</a>&nbsp;<a href="#https.uri">https URI Scheme</a></h3><div id="rfc.section.2.7.2.p.1"><p>The "https" URI scheme is hereby defined for the purpose of minting identifiers according to their association with the hierarchical namespace governed by a potential HTTP origin server listening to a given TCP port for TLS-secured connections (<a href="#RFC5246" id="rfc.xref.RFC5246.2"><cite title="The Transport Layer Security (TLS) Protocol Version 1.2">[RFC5246]</cite></a>).<a class="self" href="#rfc.section.2.7.2.p.1">&para;</a></p></div><div id="rfc.section.2.7.2.p.2"><p>All of the requirements listed above for the "http" scheme are also requirements for the "https" scheme, except that TCP port 443 is the default if the port subcomponent is empty or not given, and the user agent <em class="bcp14">MUST</em> ensure that its connection to the origin server is secured through the use of strong encryption, end-to-end, prior to sending the first HTTP request.<a class="self" href="#rfc.section.2.7.2.p.2">&para;</a></p></div><div id="rfc.figure.u.9"><pre class="inline"><span id="rfc.iref.g.16"></span>  <a href="#https.uri" class="smpl">https-URI</a> = "https:" "//" <a href="#uri" class="smpl">authority</a> <a href="#uri" class="smpl">path-abempty</a> [ "?" <a href="#uri" class="smpl">query</a> ] 
    571571              [ "#" <a href="#uri" class="smpl">fragment</a> ] 
    572 </pre></div><div id="rfc.section.2.7.2.p.3"><p>Note that the "https" URI scheme depends on both TLS and TCP for establishing authority. Resources made available via the "https" scheme have no shared identity with the "http" scheme even if their resource identifiers indicate the same authority (the same host listening to the same TCP port). They are distinct namespaces and are considered to be distinct origin servers. However, an extension to HTTP that is defined to apply to entire host domains, such as the Cookie protocol <a href="#RFC6265" id="rfc.xref.RFC6265.1"><cite title="HTTP State Management Mechanism">[RFC6265]</cite></a>, can allow information set by one service to impact communication with other services within a matching group of host domains.<a class="self" href="#rfc.section.2.7.2.p.3">&para;</a></p></div><div id="rfc.section.2.7.2.p.4"><p>The process for authoritative access to an "https" identified resource is defined in <a href="#RFC2818" id="rfc.xref.RFC2818.2"><cite title="HTTP Over TLS">[RFC2818]</cite></a>.<a class="self" href="#rfc.section.2.7.2.p.4">&para;</a></p></div></div><div id="uri.comparison"><h3 id="rfc.section.2.7.3"><a href="#rfc.section.2.7.3">2.7.3</a>&nbsp;<a href="#uri.comparison">http and https URI Normalization and Comparison</a></h3><div id="rfc.section.2.7.3.p.1"><p>Since the "http" and "https" schemes conform to the URI generic syntax, such URIs are normalized and compared according to the algorithm defined in <a href="https://tools.ietf.org/html/rfc3986#section-6">Section 6</a> of <a href="#RFC3986" id="rfc.xref.RFC3986.17"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, using the defaults described above for each scheme.<a class="self" href="#rfc.section.2.7.3.p.1">&para;</a></p></div><div id="rfc.section.2.7.3.p.2"><p>If the port is equal to the default port for a scheme, the normal form is to omit the port subcomponent. When not being used in absolute form as the request target of an OPTIONS request, an empty path component is equivalent to an absolute path of "/", so the normal form is to provide a path of "/" instead. The scheme and host are case-insensitive and normally provided in lowercase; all other components are compared in a case-sensitive manner. Characters other than those in the "reserved" set are equivalent to their percent-encoded octets: the normal form is to not encode them (see Sections <a href="https://tools.ietf.org/html/rfc3986#section-2.1" id="rfc.xref.RFC3986.18">2.1</a> and <a href="https://tools.ietf.org/html/rfc3986#section-2.2" id="rfc.xref.RFC3986.19">2.2</a> of <a href="#RFC3986" id="rfc.xref.RFC3986.20"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>).<a class="self" href="#rfc.section.2.7.3.p.2">&para;</a></p></div><div id="rfc.section.2.7.3.p.3"><p>For example, the following three URIs are equivalent:<a class="self" href="#rfc.section.2.7.3.p.3">&para;</a></p></div><div id="rfc.figure.u.10"><pre class="text">   http://example.com:80/~smith/home.html 
     572</pre></div><div id="rfc.section.2.7.2.p.3"><p>Note that the "https" URI scheme depends on both TLS and TCP for establishing authority. Resources made available via the "https" scheme have no shared identity with the "http" scheme even if their resource identifiers indicate the same authority (the same host listening to the same TCP port). They are distinct namespaces and are considered to be distinct origin servers. However, an extension to HTTP that is defined to apply to entire host domains, such as the Cookie protocol <a href="#RFC6265" id="rfc.xref.RFC6265.1"><cite title="HTTP State Management Mechanism">[RFC6265]</cite></a>, can allow information set by one service to impact communication with other services within a matching group of host domains.<a class="self" href="#rfc.section.2.7.2.p.3">&para;</a></p></div><div id="rfc.section.2.7.2.p.4"><p>The process for authoritative access to an "https" identified resource is defined in <a href="#RFC2818" id="rfc.xref.RFC2818.2"><cite title="HTTP Over TLS">[RFC2818]</cite></a>.<a class="self" href="#rfc.section.2.7.2.p.4">&para;</a></p></div></div><div id="uri.comparison"><h3 id="rfc.section.2.7.3"><a href="#rfc.section.2.7.3">2.7.3</a>&nbsp;<a href="#uri.comparison">http and https URI Normalization and Comparison</a></h3><div id="rfc.section.2.7.3.p.1"><p>Since the "http" and "https" schemes conform to the URI generic syntax, such URIs are normalized and compared according to the algorithm defined in <a href="https://tools.ietf.org/html/rfc3986#section-6">Section 6</a> of <a href="#RFC3986" id="rfc.xref.RFC3986.17"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, using the defaults described above for each scheme.<a class="self" href="#rfc.section.2.7.3.p.1">&para;</a></p></div><div id="rfc.section.2.7.3.p.2"><p>If the port is equal to the default port for a scheme, the normal form is to omit the port subcomponent. When not being used in absolute form as the request target of an OPTIONS request, an empty path component is equivalent to an absolute path of "/", so the normal form is to provide a path of "/" instead. The scheme and host are case-insensitive and normally provided in lowercase; all other components are compared in a case-sensitive manner. Characters other than those in the "reserved" set are equivalent to their percent-encoded octets: the normal form is to not encode them (see Sections <a href="https://tools.ietf.org/html/rfc3986#section-2.1" id="rfc.xref.RFC3986.18">2.1</a> and <a href="https://tools.ietf.org/html/rfc3986#section-2.2" id="rfc.xref.RFC3986.19">2.2</a> of <a href="#RFC3986" id="rfc.xref.RFC3986.20"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>).<a class="self" href="#rfc.section.2.7.3.p.2">&para;</a></p></div><div id="rfc.section.2.7.3.p.3" class="avoidbreakafter"><p>For example, the following three URIs are equivalent:<a class="self" href="#rfc.section.2.7.3.p.3">&para;</a></p></div><div id="rfc.figure.u.10"><pre class="text">   http://example.com:80/~smith/home.html 
    573573   http://EXAMPLE.com/%7Esmith/home.html 
    574574   http://EXAMPLE.com:/%7esmith/home.html 
     
    616616</pre><p>indicates that the payload body has been compressed using the gzip coding and then chunked using the chunked coding while forming the message body.</p></div><div id="rfc.section.3.3.1.p.4"><p>Unlike <a href="rfc7231.html#header.content-encoding" class="smpl">Content-Encoding</a> (<a href="rfc7231.html#content.codings" title="Content Codings">Section 3.1.2.1</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.14"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>), Transfer-Encoding is a property of the message, not of the representation, and any recipient along the request/response chain <em class="bcp14">MAY</em> decode the received transfer coding(s) or apply additional transfer coding(s) to the message body, assuming that corresponding changes are made to the Transfer-Encoding field-value. Additional information about the encoding parameters can be provided by other header fields not defined by this specification.<a class="self" href="#rfc.section.3.3.1.p.4">&para;</a></p></div><div id="rfc.section.3.3.1.p.5"><p>Transfer-Encoding <em class="bcp14">MAY</em> be sent in a response to a HEAD request or in a <a href="rfc7232.html#status.304" class="smpl">304 (Not Modified)</a> response (<a href="rfc7232.html#status.304" title="304 Not Modified">Section 4.1</a> of <a href="#RFC7232" id="rfc.xref.RFC7232.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[RFC7232]</cite></a>) to a GET request, neither of which includes a message body, to indicate that the origin server would have applied a transfer coding to the message body if the request had been an unconditional GET. This indication is not required, however, because any recipient on the response chain (including the origin server) can remove transfer codings when they are not needed.<a class="self" href="#rfc.section.3.3.1.p.5">&para;</a></p></div><div id="rfc.section.3.3.1.p.6"><p>A server <em class="bcp14">MUST NOT</em> send a Transfer-Encoding header field in any response with a status code of <a href="rfc7231.html#status.1xx" class="smpl">1xx (Informational)</a> or <a href="rfc7231.html#status.204" class="smpl">204 (No Content)</a>. A server <em class="bcp14">MUST NOT</em> send a Transfer-Encoding header field in any <a href="rfc7231.html#status.2xx" class="smpl">2xx (Successful)</a> response to a CONNECT request (<a href="rfc7231.html#CONNECT" title="CONNECT">Section 4.3.6</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.15"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>).<a class="self" href="#rfc.section.3.3.1.p.6">&para;</a></p></div><div id="rfc.section.3.3.1.p.7"><p>Transfer-Encoding was added in HTTP/1.1. It is generally assumed that implementations advertising only HTTP/1.0 support will not understand how to process a transfer-encoded payload. A client <em class="bcp14">MUST NOT</em> send a request containing Transfer-Encoding unless it knows the server will handle HTTP/1.1 (or later) requests; such knowledge might be in the form of specific user configuration or by remembering the version of a prior received response. A server <em class="bcp14">MUST NOT</em> send a response containing Transfer-Encoding unless the corresponding request indicates HTTP/1.1 (or later).<a class="self" href="#rfc.section.3.3.1.p.7">&para;</a></p></div><div id="rfc.section.3.3.1.p.8"><p>A server that receives a request message with a transfer coding it does not understand <em class="bcp14">SHOULD</em> respond with <a href="rfc7231.html#status.501" class="smpl">501 (Not Implemented)</a>.<a class="self" href="#rfc.section.3.3.1.p.8">&para;</a></p></div></div><div id="header.content-length"><h3 id="rfc.section.3.3.2"><a href="#rfc.section.3.3.2">3.3.2</a>&nbsp;<a href="#header.content-length">Content-Length</a></h3><div id="rfc.section.3.3.2.p.1"><p>When a message does not have a <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> header field, a Content-Length header field can provide the anticipated size, as a decimal number of octets, for a potential payload body. For messages that do include a payload body, the Content-Length field-value provides the framing information necessary for determining where the body (and message) ends. For messages that do not include a payload body, the Content-Length indicates the size of the selected representation (<a href="rfc7231.html#representations" title="Representations">Section 3</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.16"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>).<a class="self" href="#rfc.section.3.3.2.p.1">&para;</a></p></div><div id="rfc.figure.u.27"><pre class="inline"><span id="rfc.iref.g.43"></span>  <a href="#header.content-length" class="smpl">Content-Length</a> = 1*<a href="#core.rules" class="smpl">DIGIT</a> 
    617617</pre></div><div id="rfc.section.3.3.2.p.2"><p>An example is<a class="self" href="#rfc.section.3.3.2.p.2">&para;</a></p></div><div id="rfc.figure.u.28"><pre class="text">  Content-Length: 3495 
    618 </pre></div><div id="rfc.section.3.3.2.p.3"><p>A sender <em class="bcp14">MUST NOT</em> send a Content-Length header field in any message that contains a <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> header field.<a class="self" href="#rfc.section.3.3.2.p.3">&para;</a></p></div><div id="rfc.section.3.3.2.p.4"><p>A user agent <em class="bcp14">SHOULD</em> send a Content-Length in a request message when no <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> is sent and the request method defines a meaning for an enclosed payload body. For example, a Content-Length header field is normally sent in a POST request even when the value is 0 (indicating an empty payload body). A user agent <em class="bcp14">SHOULD NOT</em> send a Content-Length header field when the request message does not contain a payload body and the method semantics do not anticipate such a body.<a class="self" href="#rfc.section.3.3.2.p.4">&para;</a></p></div><div id="rfc.section.3.3.2.p.5"><p>A server <em class="bcp14">MAY</em> send a Content-Length header field in a response to a HEAD request (<a href="rfc7231.html#HEAD" title="HEAD">Section 4.3.2</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.17"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>); a server <em class="bcp14">MUST NOT</em> send Content-Length in such a response unless its field-value equals the decimal number of octets that would have been sent in the payload body of a response if the same request had used the GET method.<a class="self" href="#rfc.section.3.3.2.p.5">&para;</a></p></div><div id="rfc.section.3.3.2.p.6"><p>A server <em class="bcp14">MAY</em> send a Content-Length header field in a <a href="rfc7232.html#status.304" class="smpl">304 (Not Modified)</a> response to a conditional GET request (<a href="rfc7232.html#status.304" title="304 Not Modified">Section 4.1</a> of <a href="#RFC7232" id="rfc.xref.RFC7232.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[RFC7232]</cite></a>); a server <em class="bcp14">MUST NOT</em> send Content-Length in such a response unless its field-value equals the decimal number of octets that would have been sent in the payload body of a <a href="rfc7231.html#status.200" class="smpl">200 (OK)</a> response to the same request.<a class="self" href="#rfc.section.3.3.2.p.6">&para;</a></p></div><div id="rfc.section.3.3.2.p.7"><p>A server <em class="bcp14">MUST NOT</em> send a Content-Length header field in any response with a status code of <a href="rfc7231.html#status.1xx" class="smpl">1xx (Informational)</a> or <a href="rfc7231.html#status.204" class="smpl">204 (No Content)</a>. A server <em class="bcp14">MUST NOT</em> send a Content-Length header field in any <a href="rfc7231.html#status.2xx" class="smpl">2xx (Successful)</a> response to a CONNECT request (<a href="rfc7231.html#CONNECT" title="CONNECT">Section 4.3.6</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.18"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>).<a class="self" href="#rfc.section.3.3.2.p.7">&para;</a></p></div><div id="rfc.section.3.3.2.p.8"><p>Aside from the cases defined above, in the absence of Transfer-Encoding, an origin server <em class="bcp14">SHOULD</em> send a Content-Length header field when the payload body size is known prior to sending the complete header section. This will allow downstream recipients to measure transfer progress, know when a received message is complete, and potentially reuse the connection for additional requests.<a class="self" href="#rfc.section.3.3.2.p.8">&para;</a></p></div><div id="rfc.section.3.3.2.p.9"><p>Any Content-Length field value greater than or equal to zero is valid. Since there is no predefined limit to the length of a payload, a recipient <em class="bcp14">MUST</em> anticipate potentially large decimal numerals and prevent parsing errors due to integer conversion overflows (<a href="#attack.protocol.element.length" title="Attacks via Protocol Element Length">Section&nbsp;9.3</a>).<a class="self" href="#rfc.section.3.3.2.p.9">&para;</a></p></div><div id="rfc.section.3.3.2.p.10"><p>If a message is received that has multiple Content-Length header fields with field-values consisting of the same decimal value, or a single Content-Length header field with a field value containing a list of identical decimal values (e.g., "Content-Length: 42, 42"), indicating that duplicate Content-Length header fields have been generated or combined by an upstream message processor, then the recipient <em class="bcp14">MUST</em> either reject the message as invalid or replace the duplicated field-values with a single valid Content-Length field containing that decimal value prior to determining the message body length or forwarding the message.<a class="self" href="#rfc.section.3.3.2.p.10">&para;</a></p></div><div class="note"><div id="rfc.section.3.3.2.p.11"><p><b>Note:</b> HTTP's use of Content-Length for message framing differs significantly from the same field's use in MIME, where it is an optional field used only within the "message/external-body" media-type.<a class="self" href="#rfc.section.3.3.2.p.11">&para;</a></p></div></div></div><div id="message.body.length"><h3 id="rfc.section.3.3.3"><a href="#rfc.section.3.3.3">3.3.3</a>&nbsp;<a href="#message.body.length">Message Body Length</a></h3><div id="rfc.section.3.3.3.p.1"><p>The length of a message body is determined by one of the following (in order of precedence):<a class="self" href="#rfc.section.3.3.3.p.1">&para;</a></p></div><div id="rfc.section.3.3.3.p.2"><ol><li><p>Any response to a HEAD request and any response with a <a href="rfc7231.html#status.1xx" class="smpl">1xx (Informational)</a>, <a href="rfc7231.html#status.204" class="smpl">204 (No Content)</a>, or <a href="rfc7232.html#status.304" class="smpl">304 (Not Modified)</a> status code is always terminated by the first empty line after the header fields, regardless of the header fields present in the message, and thus cannot contain a message body.</p></li><li><p>Any <a href="rfc7231.html#status.2xx" class="smpl">2xx (Successful)</a> response to a CONNECT request implies that the connection will become a tunnel immediately after the empty line that concludes the header fields. A client <em class="bcp14">MUST</em> ignore any <a href="#header.content-length" class="smpl">Content-Length</a> or <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> header fields received in such a message.</p></li><li><p>If a <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> header field is present and the chunked transfer coding (<a href="#chunked.encoding" title="Chunked Transfer Coding">Section&nbsp;4.1</a>) is the final encoding, the message body length is determined by reading and decoding the chunked data until the transfer coding indicates the data is complete.</p><p>If a <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> header field is present in a response and the chunked transfer coding is not the final encoding, the message body length is determined by reading the connection until it is closed by the server. If a <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> header field is present in a request and the chunked transfer coding is not the final encoding, the message body length cannot be determined reliably; the server <em class="bcp14">MUST</em> respond with the <a href="rfc7231.html#status.400" class="smpl">400 (Bad Request)</a> status code and then close the connection.</p><p>If a message is received with both a <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> and a <a href="#header.content-length" class="smpl">Content-Length</a> header field, the Transfer-Encoding overrides the Content-Length. Such a message might indicate an attempt to perform request smuggling (<a href="#request.smuggling" title="Request Smuggling">Section&nbsp;9.5</a>) or response splitting (<a href="#response.splitting" title="Response Splitting">Section&nbsp;9.4</a>) and ought to be handled as an error. A sender <em class="bcp14">MUST</em> remove the received Content-Length field prior to forwarding such a message downstream.</p></li><li><p>If a message is received without <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> and with either multiple <a href="#header.content-length" class="smpl">Content-Length</a> header fields having differing field-values or a single Content-Length header field having an invalid value, then the message framing is invalid and the recipient <em class="bcp14">MUST</em> treat it as an unrecoverable error. If this is a request message, the server <em class="bcp14">MUST</em> respond with a <a href="rfc7231.html#status.400" class="smpl">400 (Bad Request)</a> status code and then close the connection. If this is a response message received by a proxy, the proxy <em class="bcp14">MUST</em> close the connection to the server, discard the received response, and send a <a href="rfc7231.html#status.502" class="smpl">502 (Bad Gateway)</a> response to the client. If this is a response message received by a user agent, the user agent <em class="bcp14">MUST</em> close the connection to the server and discard the received response.</p></li><li><p>If a valid <a href="#header.content-length" class="smpl">Content-Length</a> header field is present without <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a>, its decimal value defines the expected message body length in octets. If the sender closes the connection or the recipient times out before the indicated number of octets are received, the recipient <em class="bcp14">MUST</em> consider the message to be incomplete and close the connection.</p></li><li><p>If this is a request message and none of the above are true, then the message body length is zero (no message body is present).</p></li><li><p>Otherwise, this is a response message without a declared message body length, so the message body length is determined by the number of octets received prior to the server closing the connection.</p></li></ol></div><div id="rfc.section.3.3.3.p.3"><p>Since there is no way to distinguish a successfully completed, close-delimited message from a partially received message interrupted by network failure, a server <em class="bcp14">SHOULD</em> generate encoding or length-delimited messages whenever possible. The close-delimiting feature exists primarily for backwards compatibility with HTTP/1.0.<a class="self" href="#rfc.section.3.3.3.p.3">&para;</a></p></div><div id="rfc.section.3.3.3.p.4"><p>A server <em class="bcp14">MAY</em> reject a request that contains a message body but not a <a href="#header.content-length" class="smpl">Content-Length</a> by responding with <a href="rfc7231.html#status.411" class="smpl">411 (Length Required)</a>.<a class="self" href="#rfc.section.3.3.3.p.4">&para;</a></p></div><div id="rfc.section.3.3.3.p.5"><p>Unless a transfer coding other than chunked has been applied, a client that sends a request containing a message body <em class="bcp14">SHOULD</em> use a valid <a href="#header.content-length" class="smpl">Content-Length</a> header field if the message body length is known in advance, rather than the chunked transfer coding, since some existing services respond to chunked with a <a href="rfc7231.html#status.411" class="smpl">411 (Length Required)</a> status code even though they understand the chunked transfer coding. This is typically because such services are implemented via a gateway that requires a content-length in advance of being called and the server is unable or unwilling to buffer the entire request before processing.<a class="self" href="#rfc.section.3.3.3.p.5">&para;</a></p></div><div id="rfc.section.3.3.3.p.6"><p>A user agent that sends a request containing a message body <em class="bcp14">MUST</em> send a valid <a href="#header.content-length" class="smpl">Content-Length</a> header field if it does not know the server will handle HTTP/1.1 (or later) requests; such knowledge can be in the form of specific user configuration or by remembering the version of a prior received response.<a class="self" href="#rfc.section.3.3.3.p.6">&para;</a></p></div><div id="rfc.section.3.3.3.p.7"><p>If the final response to the last request on a connection has been completely received and there remains additional data to read, a user agent <em class="bcp14">MAY</em> discard the remaining data or attempt to determine if that data belongs as part of the prior response body, which might be the case if the prior message's Content-Length value is incorrect. A client <em class="bcp14">MUST NOT</em> process, cache, or forward such extra data as a separate response, since such behavior would be vulnerable to cache poisoning.<a class="self" href="#rfc.section.3.3.3.p.7">&para;</a></p></div></div></div><div id="incomplete.messages"><h2 id="rfc.section.3.4"><a href="#rfc.section.3.4">3.4</a>&nbsp;<a href="#incomplete.messages">Handling Incomplete Messages</a></h2><div id="rfc.section.3.4.p.1"><p>A server that receives an incomplete request message, usually due to a canceled request or a triggered timeout exception, <em class="bcp14">MAY</em> send an error response prior to closing the connection.<a class="self" href="#rfc.section.3.4.p.1">&para;</a></p></div><div id="rfc.section.3.4.p.2"><p>A client that receives an incomplete response message, which can occur when a connection is closed prematurely or when decoding a supposedly chunked transfer coding fails, <em class="bcp14">MUST</em> record the message as incomplete. Cache requirements for incomplete responses are defined in <a href="rfc7234.html#response.cacheability" title="Storing Responses in Caches">Section 3</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>.<a class="self" href="#rfc.section.3.4.p.2">&para;</a></p></div><div id="rfc.section.3.4.p.3"><p>If a response terminates in the middle of the header section (before the empty line is received) and the status code might rely on header fields to convey the full meaning of the response, then the client cannot assume that meaning has been conveyed; the client might need to repeat the request in order to determine what action to take next.<a class="self" href="#rfc.section.3.4.p.3">&para;</a></p></div><div id="rfc.section.3.4.p.4"><p>A message body that uses the chunked transfer coding is incomplete if the zero-sized chunk that terminates the encoding has not been received. A message that uses a valid <a href="#header.content-length" class="smpl">Content-Length</a> is incomplete if the size of the message body received (in octets) is less than the value given by Content-Length. A response that has neither chunked transfer coding nor Content-Length is terminated by closure of the connection and, thus, is considered complete regardless of the number of message body octets received, provided that the header section was received intact.<a class="self" href="#rfc.section.3.4.p.4">&para;</a></p></div></div><div id="message.robustness"><h2 id="rfc.section.3.5"><a href="#rfc.section.3.5">3.5</a>&nbsp;<a href="#message.robustness">Message Parsing Robustness</a></h2><div id="rfc.section.3.5.p.1"><p>Older HTTP/1.0 user agent implementations might send an extra CRLF after a POST request as a workaround for some early server applications that failed to read message body content that was not terminated by a line-ending. An HTTP/1.1 user agent <em class="bcp14">MUST NOT</em> preface or follow a request with an extra CRLF. If terminating the request message body with a line-ending is desired, then the user agent <em class="bcp14">MUST</em> count the terminating CRLF octets as part of the message body length.<a class="self" href="#rfc.section.3.5.p.1">&para;</a></p></div><div id="rfc.section.3.5.p.2"><p>In the interest of robustness, a server that is expecting to receive and parse a request-line <em class="bcp14">SHOULD</em> ignore at least one empty line (CRLF) received prior to the request-line.<a class="self" href="#rfc.section.3.5.p.2">&para;</a></p></div><div id="rfc.section.3.5.p.3"><p>Although the line terminator for the start-line and header fields is the sequence CRLF, a recipient <em class="bcp14">MAY</em> recognize a single LF as a line terminator and ignore any preceding CR.<a class="self" href="#rfc.section.3.5.p.3">&para;</a></p></div><div id="rfc.section.3.5.p.4"><p>Although the request-line and status-line grammar rules require that each of the component elements be separated by a single SP octet, recipients <em class="bcp14">MAY</em> instead parse on whitespace-delimited word boundaries and, aside from the CRLF terminator, treat any form of whitespace as the SP separator while ignoring preceding or trailing whitespace; such whitespace includes one or more of the following octets: SP, HTAB, VT (%x0B), FF (%x0C), or bare CR. However, lenient parsing can result in security vulnerabilities if there are multiple recipients of the message and each has its own unique interpretation of robustness (see <a href="#request.smuggling" title="Request Smuggling">Section&nbsp;9.5</a>).<a class="self" href="#rfc.section.3.5.p.4">&para;</a></p></div><div id="rfc.section.3.5.p.5"><p>When a server listening only for HTTP request messages, or processing what appears from the start-line to be an HTTP request message, receives a sequence of octets that does not match the HTTP-message grammar aside from the robustness exceptions listed above, the server <em class="bcp14">SHOULD</em> respond with a <a href="rfc7231.html#status.400" class="smpl">400 (Bad Request)</a> response.<a class="self" href="#rfc.section.3.5.p.5">&para;</a></p></div></div></div><div id="transfer.codings"><h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a>&nbsp;<a href="#transfer.codings">Transfer Codings</a></h1><div id="rfc.section.4.p.1"><p>Transfer coding names are used to indicate an encoding transformation that has been, can be, or might need to be applied to a payload body in order to ensure "safe transport" through the network. This differs from a content coding in that the transfer coding is a property of the message rather than a property of the representation that is being transferred.<a class="self" href="#rfc.section.4.p.1">&para;</a></p></div><div id="rfc.figure.u.29"><pre class="inline"><span id="rfc.iref.g.44"></span><span id="rfc.iref.g.45"></span>  <a href="#transfer.codings" class="smpl">transfer-coding</a>    = "chunked" ; <a href="#chunked.encoding" title="Chunked Transfer Coding">Section&nbsp;4.1</a> 
     618</pre></div><div id="rfc.section.3.3.2.p.3"><p>A sender <em class="bcp14">MUST NOT</em> send a Content-Length header field in any message that contains a <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> header field.<a class="self" href="#rfc.section.3.3.2.p.3">&para;</a></p></div><div id="rfc.section.3.3.2.p.4"><p>A user agent <em class="bcp14">SHOULD</em> send a Content-Length in a request message when no <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> is sent and the request method defines a meaning for an enclosed payload body. For example, a Content-Length header field is normally sent in a POST request even when the value is 0 (indicating an empty payload body). A user agent <em class="bcp14">SHOULD NOT</em> send a Content-Length header field when the request message does not contain a payload body and the method semantics do not anticipate such a body.<a class="self" href="#rfc.section.3.3.2.p.4">&para;</a></p></div><div id="rfc.section.3.3.2.p.5"><p>A server <em class="bcp14">MAY</em> send a Content-Length header field in a response to a HEAD request (<a href="rfc7231.html#HEAD" title="HEAD">Section 4.3.2</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.17"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>); a server <em class="bcp14">MUST NOT</em> send Content-Length in such a response unless its field-value equals the decimal number of octets that would have been sent in the payload body of a response if the same request had used the GET method.<a class="self" href="#rfc.section.3.3.2.p.5">&para;</a></p></div><div id="rfc.section.3.3.2.p.6"><p>A server <em class="bcp14">MAY</em> send a Content-Length header field in a <a href="rfc7232.html#status.304" class="smpl">304 (Not Modified)</a> response to a conditional GET request (<a href="rfc7232.html#status.304" title="304 Not Modified">Section 4.1</a> of <a href="#RFC7232" id="rfc.xref.RFC7232.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[RFC7232]</cite></a>); a server <em class="bcp14">MUST NOT</em> send Content-Length in such a response unless its field-value equals the decimal number of octets that would have been sent in the payload body of a <a href="rfc7231.html#status.200" class="smpl">200 (OK)</a> response to the same request.<a class="self" href="#rfc.section.3.3.2.p.6">&para;</a></p></div><div id="rfc.section.3.3.2.p.7"><p>A server <em class="bcp14">MUST NOT</em> send a Content-Length header field in any response with a status code of <a href="rfc7231.html#status.1xx" class="smpl">1xx (Informational)</a> or <a href="rfc7231.html#status.204" class="smpl">204 (No Content)</a>. A server <em class="bcp14">MUST NOT</em> send a Content-Length header field in any <a href="rfc7231.html#status.2xx" class="smpl">2xx (Successful)</a> response to a CONNECT request (<a href="rfc7231.html#CONNECT" title="CONNECT">Section 4.3.6</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.18"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>).<a class="self" href="#rfc.section.3.3.2.p.7">&para;</a></p></div><div id="rfc.section.3.3.2.p.8"><p>Aside from the cases defined above, in the absence of Transfer-Encoding, an origin server <em class="bcp14">SHOULD</em> send a Content-Length header field when the payload body size is known prior to sending the complete header section. This will allow downstream recipients to measure transfer progress, know when a received message is complete, and potentially reuse the connection for additional requests.<a class="self" href="#rfc.section.3.3.2.p.8">&para;</a></p></div><div id="rfc.section.3.3.2.p.9"><p>Any Content-Length field value greater than or equal to zero is valid. Since there is no predefined limit to the length of a payload, a recipient <em class="bcp14">MUST</em> anticipate potentially large decimal numerals and prevent parsing errors due to integer conversion overflows (<a href="#attack.protocol.element.length" title="Attacks via Protocol Element Length">Section&nbsp;9.3</a>).<a class="self" href="#rfc.section.3.3.2.p.9">&para;</a></p></div><div id="rfc.section.3.3.2.p.10"><p>If a message is received that has multiple Content-Length header fields with field-values consisting of the same decimal value, or a single Content-Length header field with a field value containing a list of identical decimal values (e.g., "Content-Length: 42, 42"), indicating that duplicate Content-Length header fields have been generated or combined by an upstream message processor, then the recipient <em class="bcp14">MUST</em> either reject the message as invalid or replace the duplicated field-values with a single valid Content-Length field containing that decimal value prior to determining the message body length or forwarding the message.<a class="self" href="#rfc.section.3.3.2.p.10">&para;</a></p></div><div class="note"><div id="rfc.section.3.3.2.p.11"><p><b>Note:</b> HTTP's use of Content-Length for message framing differs significantly from the same field's use in MIME, where it is an optional field used only within the "message/external-body" media-type.<a class="self" href="#rfc.section.3.3.2.p.11">&para;</a></p></div></div></div><div id="message.body.length"><h3 id="rfc.section.3.3.3"><a href="#rfc.section.3.3.3">3.3.3</a>&nbsp;<a href="#message.body.length">Message Body Length</a></h3><div id="rfc.section.3.3.3.p.1" class="avoidbreakafter"><p>The length of a message body is determined by one of the following (in order of precedence):<a class="self" href="#rfc.section.3.3.3.p.1">&para;</a></p></div><div id="rfc.section.3.3.3.p.2"><ol><li><p>Any response to a HEAD request and any response with a <a href="rfc7231.html#status.1xx" class="smpl">1xx (Informational)</a>, <a href="rfc7231.html#status.204" class="smpl">204 (No Content)</a>, or <a href="rfc7232.html#status.304" class="smpl">304 (Not Modified)</a> status code is always terminated by the first empty line after the header fields, regardless of the header fields present in the message, and thus cannot contain a message body.</p></li><li><p>Any <a href="rfc7231.html#status.2xx" class="smpl">2xx (Successful)</a> response to a CONNECT request implies that the connection will become a tunnel immediately after the empty line that concludes the header fields. A client <em class="bcp14">MUST</em> ignore any <a href="#header.content-length" class="smpl">Content-Length</a> or <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> header fields received in such a message.</p></li><li><p>If a <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> header field is present and the chunked transfer coding (<a href="#chunked.encoding" title="Chunked Transfer Coding">Section&nbsp;4.1</a>) is the final encoding, the message body length is determined by reading and decoding the chunked data until the transfer coding indicates the data is complete.</p><p>If a <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> header field is present in a response and the chunked transfer coding is not the final encoding, the message body length is determined by reading the connection until it is closed by the server. If a <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> header field is present in a request and the chunked transfer coding is not the final encoding, the message body length cannot be determined reliably; the server <em class="bcp14">MUST</em> respond with the <a href="rfc7231.html#status.400" class="smpl">400 (Bad Request)</a> status code and then close the connection.</p><p>If a message is received with both a <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> and a <a href="#header.content-length" class="smpl">Content-Length</a> header field, the Transfer-Encoding overrides the Content-Length. Such a message might indicate an attempt to perform request smuggling (<a href="#request.smuggling" title="Request Smuggling">Section&nbsp;9.5</a>) or response splitting (<a href="#response.splitting" title="Response Splitting">Section&nbsp;9.4</a>) and ought to be handled as an error. A sender <em class="bcp14">MUST</em> remove the received Content-Length field prior to forwarding such a message downstream.</p></li><li><p>If a message is received without <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> and with either multiple <a href="#header.content-length" class="smpl">Content-Length</a> header fields having differing field-values or a single Content-Length header field having an invalid value, then the message framing is invalid and the recipient <em class="bcp14">MUST</em> treat it as an unrecoverable error. If this is a request message, the server <em class="bcp14">MUST</em> respond with a <a href="rfc7231.html#status.400" class="smpl">400 (Bad Request)</a> status code and then close the connection. If this is a response message received by a proxy, the proxy <em class="bcp14">MUST</em> close the connection to the server, discard the received response, and send a <a href="rfc7231.html#status.502" class="smpl">502 (Bad Gateway)</a> response to the client. If this is a response message received by a user agent, the user agent <em class="bcp14">MUST</em> close the connection to the server and discard the received response.</p></li><li><p>If a valid <a href="#header.content-length" class="smpl">Content-Length</a> header field is present without <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a>, its decimal value defines the expected message body length in octets. If the sender closes the connection or the recipient times out before the indicated number of octets are received, the recipient <em class="bcp14">MUST</em> consider the message to be incomplete and close the connection.</p></li><li><p>If this is a request message and none of the above are true, then the message body length is zero (no message body is present).</p></li><li><p>Otherwise, this is a response message without a declared message body length, so the message body length is determined by the number of octets received prior to the server closing the connection.</p></li></ol></div><div id="rfc.section.3.3.3.p.3"><p>Since there is no way to distinguish a successfully completed, close-delimited message from a partially received message interrupted by network failure, a server <em class="bcp14">SHOULD</em> generate encoding or length-delimited messages whenever possible. The close-delimiting feature exists primarily for backwards compatibility with HTTP/1.0.<a class="self" href="#rfc.section.3.3.3.p.3">&para;</a></p></div><div id="rfc.section.3.3.3.p.4"><p>A server <em class="bcp14">MAY</em> reject a request that contains a message body but not a <a href="#header.content-length" class="smpl">Content-Length</a> by responding with <a href="rfc7231.html#status.411" class="smpl">411 (Length Required)</a>.<a class="self" href="#rfc.section.3.3.3.p.4">&para;</a></p></div><div id="rfc.section.3.3.3.p.5"><p>Unless a transfer coding other than chunked has been applied, a client that sends a request containing a message body <em class="bcp14">SHOULD</em> use a valid <a href="#header.content-length" class="smpl">Content-Length</a> header field if the message body length is known in advance, rather than the chunked transfer coding, since some existing services respond to chunked with a <a href="rfc7231.html#status.411" class="smpl">411 (Length Required)</a> status code even though they understand the chunked transfer coding. This is typically because such services are implemented via a gateway that requires a content-length in advance of being called and the server is unable or unwilling to buffer the entire request before processing.<a class="self" href="#rfc.section.3.3.3.p.5">&para;</a></p></div><div id="rfc.section.3.3.3.p.6"><p>A user agent that sends a request containing a message body <em class="bcp14">MUST</em> send a valid <a href="#header.content-length" class="smpl">Content-Length</a> header field if it does not know the server will handle HTTP/1.1 (or later) requests; such knowledge can be in the form of specific user configuration or by remembering the version of a prior received response.<a class="self" href="#rfc.section.3.3.3.p.6">&para;</a></p></div><div id="rfc.section.3.3.3.p.7"><p>If the final response to the last request on a connection has been completely received and there remains additional data to read, a user agent <em class="bcp14">MAY</em> discard the remaining data or attempt to determine if that data belongs as part of the prior response body, which might be the case if the prior message's Content-Length value is incorrect. A client <em class="bcp14">MUST NOT</em> process, cache, or forward such extra data as a separate response, since such behavior would be vulnerable to cache poisoning.<a class="self" href="#rfc.section.3.3.3.p.7">&para;</a></p></div></div></div><div id="incomplete.messages"><h2 id="rfc.section.3.4"><a href="#rfc.section.3.4">3.4</a>&nbsp;<a href="#incomplete.messages">Handling Incomplete Messages</a></h2><div id="rfc.section.3.4.p.1"><p>A server that receives an incomplete request message, usually due to a canceled request or a triggered timeout exception, <em class="bcp14">MAY</em> send an error response prior to closing the connection.<a class="self" href="#rfc.section.3.4.p.1">&para;</a></p></div><div id="rfc.section.3.4.p.2"><p>A client that receives an incomplete response message, which can occur when a connection is closed prematurely or when decoding a supposedly chunked transfer coding fails, <em class="bcp14">MUST</em> record the message as incomplete. Cache requirements for incomplete responses are defined in <a href="rfc7234.html#response.cacheability" title="Storing Responses in Caches">Section 3</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>.<a class="self" href="#rfc.section.3.4.p.2">&para;</a></p></div><div id="rfc.section.3.4.p.3"><p>If a response terminates in the middle of the header section (before the empty line is received) and the status code might rely on header fields to convey the full meaning of the response, then the client cannot assume that meaning has been conveyed; the client might need to repeat the request in order to determine what action to take next.<a class="self" href="#rfc.section.3.4.p.3">&para;</a></p></div><div id="rfc.section.3.4.p.4"><p>A message body that uses the chunked transfer coding is incomplete if the zero-sized chunk that terminates the encoding has not been received. A message that uses a valid <a href="#header.content-length" class="smpl">Content-Length</a> is incomplete if the size of the message body received (in octets) is less than the value given by Content-Length. A response that has neither chunked transfer coding nor Content-Length is terminated by closure of the connection and, thus, is considered complete regardless of the number of message body octets received, provided that the header section was received intact.<a class="self" href="#rfc.section.3.4.p.4">&para;</a></p></div></div><div id="message.robustness"><h2 id="rfc.section.3.5"><a href="#rfc.section.3.5">3.5</a>&nbsp;<a href="#message.robustness">Message Parsing Robustness</a></h2><div id="rfc.section.3.5.p.1"><p>Older HTTP/1.0 user agent implementations might send an extra CRLF after a POST request as a workaround for some early server applications that failed to read message body content that was not terminated by a line-ending. An HTTP/1.1 user agent <em class="bcp14">MUST NOT</em> preface or follow a request with an extra CRLF. If terminating the request message body with a line-ending is desired, then the user agent <em class="bcp14">MUST</em> count the terminating CRLF octets as part of the message body length.<a class="self" href="#rfc.section.3.5.p.1">&para;</a></p></div><div id="rfc.section.3.5.p.2"><p>In the interest of robustness, a server that is expecting to receive and parse a request-line <em class="bcp14">SHOULD</em> ignore at least one empty line (CRLF) received prior to the request-line.<a class="self" href="#rfc.section.3.5.p.2">&para;</a></p></div><div id="rfc.section.3.5.p.3"><p>Although the line terminator for the start-line and header fields is the sequence CRLF, a recipient <em class="bcp14">MAY</em> recognize a single LF as a line terminator and ignore any preceding CR.<a class="self" href="#rfc.section.3.5.p.3">&para;</a></p></div><div id="rfc.section.3.5.p.4"><p>Although the request-line and status-line grammar rules require that each of the component elements be separated by a single SP octet, recipients <em class="bcp14">MAY</em> instead parse on whitespace-delimited word boundaries and, aside from the CRLF terminator, treat any form of whitespace as the SP separator while ignoring preceding or trailing whitespace; such whitespace includes one or more of the following octets: SP, HTAB, VT (%x0B), FF (%x0C), or bare CR. However, lenient parsing can result in security vulnerabilities if there are multiple recipients of the message and each has its own unique interpretation of robustness (see <a href="#request.smuggling" title="Request Smuggling">Section&nbsp;9.5</a>).<a class="self" href="#rfc.section.3.5.p.4">&para;</a></p></div><div id="rfc.section.3.5.p.5"><p>When a server listening only for HTTP request messages, or processing what appears from the start-line to be an HTTP request message, receives a sequence of octets that does not match the HTTP-message grammar aside from the robustness exceptions listed above, the server <em class="bcp14">SHOULD</em> respond with a <a href="rfc7231.html#status.400" class="smpl">400 (Bad Request)</a> response.<a class="self" href="#rfc.section.3.5.p.5">&para;</a></p></div></div></div><div id="transfer.codings"><h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a>&nbsp;<a href="#transfer.codings">Transfer Codings</a></h1><div id="rfc.section.4.p.1"><p>Transfer coding names are used to indicate an encoding transformation that has been, can be, or might need to be applied to a payload body in order to ensure "safe transport" through the network. This differs from a content coding in that the transfer coding is a property of the message rather than a property of the representation that is being transferred.<a class="self" href="#rfc.section.4.p.1">&para;</a></p></div><div id="rfc.figure.u.29"><pre class="inline"><span id="rfc.iref.g.44"></span><span id="rfc.iref.g.45"></span>  <a href="#transfer.codings" class="smpl">transfer-coding</a>    = "chunked" ; <a href="#chunked.encoding" title="Chunked Transfer Coding">Section&nbsp;4.1</a> 
    619619                     / "compress" ; <a href="#compress.coding" title="Compress Coding">Section&nbsp;4.2.1</a> 
    620620                     / "deflate" ; <a href="#deflate.coding" title="Deflate Coding">Section&nbsp;4.2.2</a> 
     
    639639  <a href="#chunked.extension" 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> 
    640640</pre></div><div id="rfc.section.4.1.1.p.2"><p>The chunked encoding is specific to each connection and is likely to be removed or recoded by each recipient (including intermediaries) before any higher-level application would have a chance to inspect the extensions. Hence, use of chunk extensions is generally limited to specialized HTTP services such as "long polling" (where client and server can have shared expectations regarding the use of chunk extensions) or for padding within an end-to-end secured connection.<a class="self" href="#rfc.section.4.1.1.p.2">&para;</a></p></div><div id="rfc.section.4.1.1.p.3"><p>A recipient <em class="bcp14">MUST</em> ignore unrecognized chunk extensions. A server ought to limit the total length of chunk extensions received in a request to an amount reasonable for the services provided, in the same way that it applies length limitations and timeouts for other parts of a message, and generate an appropriate <a href="rfc7231.html#status.4xx" class="smpl">4xx (Client Error)</a> response if that amount is exceeded.<a class="self" href="#rfc.section.4.1.1.p.3">&para;</a></p></div></div><div id="chunked.trailer.part"><h3 id="rfc.section.4.1.2"><a href="#rfc.section.4.1.2">4.1.2</a>&nbsp;<a href="#chunked.trailer.part">Chunked Trailer Part</a></h3><div id="rfc.section.4.1.2.p.1"><p>A trailer allows the sender to include additional fields at the end of a chunked message in order to supply metadata that might be dynamically generated while the message body is sent, such as a message integrity check, digital signature, or post-processing status. The trailer fields are identical to header fields, except they are sent in a chunked trailer instead of the message's header section.<a class="self" href="#rfc.section.4.1.2.p.1">&para;</a></p></div><div id="rfc.figure.u.33"><pre class="inline"><span id="rfc.iref.g.58"></span><span id="rfc.iref.g.59"></span>  <a href="#chunked.trailer.part" class="smpl">trailer-part</a>   = *( <a href="#header.fields" class="smpl">header-field</a> <a href="#core.rules" class="smpl">CRLF</a> ) 
    641 </pre></div><div id="rfc.section.4.1.2.p.2"><p>A sender <em class="bcp14">MUST NOT</em> generate a trailer that contains a field necessary for message framing (e.g., <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> and <a href="#header.content-length" class="smpl">Content-Length</a>), routing (e.g., <a href="#header.host" class="smpl">Host</a>), request modifiers (e.g., controls and conditionals in <a href="rfc7231.html#request.header.fields" title="Request Header Fields">Section 5</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.19"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>), authentication (e.g., see <a href="#RFC7235" id="rfc.xref.RFC7235.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Authentication">[RFC7235]</cite></a> and <a href="#RFC6265" id="rfc.xref.RFC6265.3"><cite title="HTTP State Management Mechanism">[RFC6265]</cite></a>), response control data (e.g., see <a href="rfc7231.html#response.control.data" title="Control Data">Section 7.1</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.20"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>), or determining how to process the payload (e.g., <a href="rfc7231.html#header.content-encoding" class="smpl">Content-Encoding</a>, <a href="rfc7231.html#header.content-type" class="smpl">Content-Type</a>, <a href="rfc7233.html#header.content-range" class="smpl">Content-Range</a>, and <a href="#header.trailer" class="smpl">Trailer</a>).<a class="self" href="#rfc.section.4.1.2.p.2">&para;</a></p></div><div id="rfc.section.4.1.2.p.3"><p>When a chunked message containing a non-empty trailer is received, the recipient <em class="bcp14">MAY</em> process the fields (aside from those forbidden above) as if they were appended to the message's header section. A recipient <em class="bcp14">MUST</em> ignore (or consider as an error) any fields that are forbidden to be sent in a trailer, since processing them as if they were present in the header section might bypass external security filters.<a class="self" href="#rfc.section.4.1.2.p.3">&para;</a></p></div><div id="rfc.section.4.1.2.p.4"><p>Unless the request includes a <a href="#header.te" class="smpl">TE</a> header field indicating "trailers" is acceptable, as described in <a href="#header.te" id="rfc.xref.header.te.2" title="TE">Section&nbsp;4.3</a>, a server <em class="bcp14">SHOULD NOT</em> generate trailer fields that it believes are necessary for the user agent to receive. Without a TE containing "trailers", the server ought to assume that the trailer fields might be silently discarded along the path to the user agent. This requirement allows intermediaries to forward a de-chunked message to an HTTP/1.0 recipient without buffering the entire response.<a class="self" href="#rfc.section.4.1.2.p.4">&para;</a></p></div></div><div id="decoding.chunked"><h3 id="rfc.section.4.1.3"><a href="#rfc.section.4.1.3">4.1.3</a>&nbsp;<a href="#decoding.chunked">Decoding Chunked</a></h3><div id="rfc.section.4.1.3.p.1"><p>A process for decoding the chunked transfer coding can be represented in pseudo-code as:<a class="self" href="#rfc.section.4.1.3.p.1">&para;</a></p></div><div id="rfc.figure.u.34"><pre class="text">  length := 0 
     641</pre></div><div id="rfc.section.4.1.2.p.2"><p>A sender <em class="bcp14">MUST NOT</em> generate a trailer that contains a field necessary for message framing (e.g., <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> and <a href="#header.content-length" class="smpl">Content-Length</a>), routing (e.g., <a href="#header.host" class="smpl">Host</a>), request modifiers (e.g., controls and conditionals in <a href="rfc7231.html#request.header.fields" title="Request Header Fields">Section 5</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.19"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>), authentication (e.g., see <a href="#RFC7235" id="rfc.xref.RFC7235.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Authentication">[RFC7235]</cite></a> and <a href="#RFC6265" id="rfc.xref.RFC6265.3"><cite title="HTTP State Management Mechanism">[RFC6265]</cite></a>), response control data (e.g., see <a href="rfc7231.html#response.control.data" title="Control Data">Section 7.1</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.20"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>), or determining how to process the payload (e.g., <a href="rfc7231.html#header.content-encoding" class="smpl">Content-Encoding</a>, <a href="rfc7231.html#header.content-type" class="smpl">Content-Type</a>, <a href="rfc7233.html#header.content-range" class="smpl">Content-Range</a>, and <a href="#header.trailer" class="smpl">Trailer</a>).<a class="self" href="#rfc.section.4.1.2.p.2">&para;</a></p></div><div id="rfc.section.4.1.2.p.3"><p>When a chunked message containing a non-empty trailer is received, the recipient <em class="bcp14">MAY</em> process the fields (aside from those forbidden above) as if they were appended to the message's header section. A recipient <em class="bcp14">MUST</em> ignore (or consider as an error) any fields that are forbidden to be sent in a trailer, since processing them as if they were present in the header section might bypass external security filters.<a class="self" href="#rfc.section.4.1.2.p.3">&para;</a></p></div><div id="rfc.section.4.1.2.p.4"><p>Unless the request includes a <a href="#header.te" class="smpl">TE</a> header field indicating "trailers" is acceptable, as described in <a href="#header.te" id="rfc.xref.header.te.2" title="TE">Section&nbsp;4.3</a>, a server <em class="bcp14">SHOULD NOT</em> generate trailer fields that it believes are necessary for the user agent to receive. Without a TE containing "trailers", the server ought to assume that the trailer fields might be silently discarded along the path to the user agent. This requirement allows intermediaries to forward a de-chunked message to an HTTP/1.0 recipient without buffering the entire response.<a class="self" href="#rfc.section.4.1.2.p.4">&para;</a></p></div></div><div id="decoding.chunked"><h3 id="rfc.section.4.1.3"><a href="#rfc.section.4.1.3">4.1.3</a>&nbsp;<a href="#decoding.chunked">Decoding Chunked</a></h3><div id="rfc.section.4.1.3.p.1" class="avoidbreakafter"><p>A process for decoding the chunked transfer coding can be represented in pseudo-code as:<a class="self" href="#rfc.section.4.1.3.p.1">&para;</a></p></div><div id="rfc.figure.u.34"><pre class="text">  length := 0 
    642642  read chunk-size, chunk-ext (if any), and CRLF 
    643643  while (chunk-size &gt; 0) { 
     
    672672</pre></div><div id="origin-form"><h3 id="rfc.section.5.3.1"><a href="#rfc.section.5.3.1">5.3.1</a>&nbsp;<a href="#origin-form">origin-form</a></h3><div id="rfc.section.5.3.1.p.1"><p>The most common form of request-target is the <dfn>origin-form</dfn>.<a class="self" href="#rfc.section.5.3.1.p.1">&para;</a></p></div><div id="rfc.figure.u.39"><pre class="inline"><span id="rfc.iref.g.71"></span>  <a href="#origin-form" class="smpl">origin-form</a>    = <a href="#uri" class="smpl">absolute-path</a> [ "?" <a href="#uri" class="smpl">query</a> ] 
    673673</pre></div><div id="rfc.section.5.3.1.p.2"><p>When making a request directly to an origin server, other than a CONNECT or server-wide OPTIONS request (as detailed below), a client <em class="bcp14">MUST</em> send only the absolute path and query components of the target URI as the request-target. If the target URI's path component is empty, the client <em class="bcp14">MUST</em> send "/" as the path within the origin-form of request-target. A <a href="#header.host" class="smpl">Host</a> header field is also sent, as defined in <a href="#header.host" id="rfc.xref.header.host.1" title="Host">Section&nbsp;5.4</a>.<a class="self" href="#rfc.section.5.3.1.p.2">&para;</a></p></div><div id="rfc.section.5.3.1.p.3"><p>For example, a client wishing to retrieve a representation of the resource identified as<a class="self" href="#rfc.section.5.3.1.p.3">&para;</a></p></div><div id="rfc.figure.u.40"><pre class="text">http://www.example.org/where?q=now 
    674 </pre></div><div id="rfc.section.5.3.1.p.4"><p>directly from the origin server would open (or reuse) a TCP connection to port 80 of the host "www.example.org" and send the lines:<a class="self" href="#rfc.section.5.3.1.p.4">&para;</a></p></div><div id="rfc.figure.u.41"><pre class="text2">GET /where?q=now HTTP/1.1 
     674</pre></div><div id="rfc.section.5.3.1.p.4" class="avoidbreakafter"><p>directly from the origin server would open (or reuse) a TCP connection to port 80 of the host "www.example.org" and send the lines:<a class="self" href="#rfc.section.5.3.1.p.4">&para;</a></p></div><div id="rfc.figure.u.41"><pre class="text2">GET /where?q=now HTTP/1.1 
    675675Host: www.example.org 
    676676</pre></div><div id="rfc.section.5.3.1.p.5"><p>followed by the remainder of the request message.<a class="self" href="#rfc.section.5.3.1.p.5">&para;</a></p></div></div><div id="absolute-form"><h3 id="rfc.section.5.3.2"><a href="#rfc.section.5.3.2">5.3.2</a>&nbsp;<a href="#absolute-form">absolute-form</a></h3><div id="rfc.section.5.3.2.p.1"><p>When making a request to a proxy, other than a CONNECT or server-wide OPTIONS request (as detailed below), a client <em class="bcp14">MUST</em> send the target URI in <dfn>absolute-form</dfn> as the request-target.<a class="self" href="#rfc.section.5.3.2.p.1">&para;</a></p></div><div id="rfc.figure.u.42"><pre class="inline"><span id="rfc.iref.g.72"></span>  <a href="#absolute-form" class="smpl">absolute-form</a>  = <a href="#uri" class="smpl">absolute-URI</a> 
    677 </pre></div><div id="rfc.section.5.3.2.p.2"><p>The proxy is requested to either service that request from a valid cache, if possible, or make the same request on the client's behalf to either the next inbound proxy server or directly to the origin server indicated by the request-target. Requirements on such "forwarding" of messages are defined in <a href="#message.forwarding" title="Message Forwarding">Section&nbsp;5.7</a>.<a class="self" href="#rfc.section.5.3.2.p.2">&para;</a></p></div><div id="rfc.section.5.3.2.p.3"><p>An example absolute-form of request-line would be:<a class="self" href="#rfc.section.5.3.2.p.3">&para;</a></p></div><div id="rfc.figure.u.43"><pre class="text2">GET http://www.example.org/pub/WWW/TheProject.html HTTP/1.1 
     677</pre></div><div id="rfc.section.5.3.2.p.2"><p>The proxy is requested to either service that request from a valid cache, if possible, or make the same request on the client's behalf to either the next inbound proxy server or directly to the origin server indicated by the request-target. Requirements on such "forwarding" of messages are defined in <a href="#message.forwarding" title="Message Forwarding">Section&nbsp;5.7</a>.<a class="self" href="#rfc.section.5.3.2.p.2">&para;</a></p></div><div id="rfc.section.5.3.2.p.3" class="avoidbreakafter"><p>An example absolute-form of request-line would be:<a class="self" href="#rfc.section.5.3.2.p.3">&para;</a></p></div><div id="rfc.figure.u.43"><pre class="text2">GET http://www.example.org/pub/WWW/TheProject.html HTTP/1.1 
    678678</pre></div><div id="rfc.section.5.3.2.p.4"><p>To allow for transition to the absolute-form for all requests in some future version of HTTP, a server <em class="bcp14">MUST</em> accept the absolute-form in requests, even though HTTP/1.1 clients will only send them in requests to proxies.<a class="self" href="#rfc.section.5.3.2.p.4">&para;</a></p></div></div><div id="authority-form"><h3 id="rfc.section.5.3.3"><a href="#rfc.section.5.3.3">5.3.3</a>&nbsp;<a href="#authority-form">authority-form</a></h3><div id="rfc.section.5.3.3.p.1"><p>The <dfn>authority-form</dfn> of request-target is only used for CONNECT requests (<a href="rfc7231.html#CONNECT" title="CONNECT">Section 4.3.6</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.23"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>).<a class="self" href="#rfc.section.5.3.3.p.1">&para;</a></p></div><div id="rfc.figure.u.44"><pre class="inline"><span id="rfc.iref.g.73"></span>  <a href="#authority-form" class="smpl">authority-form</a> = <a href="#uri" class="smpl">authority</a> 
    679679</pre></div><div id="rfc.section.5.3.3.p.2"><p>When making a CONNECT request to establish a tunnel through one or more proxies, a client <em class="bcp14">MUST</em> send only the target URI's authority component (excluding any userinfo and its "@" delimiter) as the request-target. For example,<a class="self" href="#rfc.section.5.3.3.p.2">&para;</a></p></div><div id="rfc.figure.u.45"><pre class="text2">CONNECT www.example.com:80 HTTP/1.1 
     
    684684Host: www.example.org:8001 
    685685</pre><p>after connecting to port 8001 of host "www.example.org".</p></div></div></div><div id="header.host"><h2 id="rfc.section.5.4"><a href="#rfc.section.5.4">5.4</a>&nbsp;<a href="#header.host">Host</a></h2><div id="rfc.section.5.4.p.1"><p>The "Host" header field in a request provides the host and port information from the target URI, enabling the origin server to distinguish among resources while servicing requests for multiple host names on a single IP address.<a class="self" href="#rfc.section.5.4.p.1">&para;</a></p></div><div id="rfc.figure.u.50"><pre class="inline"><span id="rfc.iref.g.75"></span>  <a href="#header.host" class="smpl">Host</a> = <a href="#uri" class="smpl">uri-host</a> [ ":" <a href="#uri" class="smpl">port</a> ] ; <a href="#http.uri" title="http URI Scheme">Section&nbsp;2.7.1</a> 
    686 </pre></div><div id="rfc.section.5.4.p.2"><p>A client <em class="bcp14">MUST</em> send a Host header field in all HTTP/1.1 request messages. If the target URI includes an authority component, then a client <em class="bcp14">MUST</em> send a field-value for Host that is identical to that authority component, excluding any userinfo subcomponent and its "@" delimiter (<a href="#http.uri" title="http URI Scheme">Section&nbsp;2.7.1</a>). If the authority component is missing or undefined for the target URI, then a client <em class="bcp14">MUST</em> send a Host header field with an empty field-value.<a class="self" href="#rfc.section.5.4.p.2">&para;</a></p></div><div id="rfc.section.5.4.p.3"><p>Since the Host field-value is critical information for handling a request, a user agent <em class="bcp14">SHOULD</em> generate Host as the first header field following the request-line.<a class="self" href="#rfc.section.5.4.p.3">&para;</a></p></div><div id="rfc.section.5.4.p.4"><p>For example, a GET request to the origin server for &lt;http://www.example.org/pub/WWW/&gt; would begin with:<a class="self" href="#rfc.section.5.4.p.4">&para;</a></p></div><div id="rfc.figure.u.51"><pre class="text2">GET /pub/WWW/ HTTP/1.1 
     686</pre></div><div id="rfc.section.5.4.p.2"><p>A client <em class="bcp14">MUST</em> send a Host header field in all HTTP/1.1 request messages. If the target URI includes an authority component, then a client <em class="bcp14">MUST</em> send a field-value for Host that is identical to that authority component, excluding any userinfo subcomponent and its "@" delimiter (<a href="#http.uri" title="http URI Scheme">Section&nbsp;2.7.1</a>). If the authority component is missing or undefined for the target URI, then a client <em class="bcp14">MUST</em> send a Host header field with an empty field-value.<a class="self" href="#rfc.section.5.4.p.2">&para;</a></p></div><div id="rfc.section.5.4.p.3"><p>Since the Host field-value is critical information for handling a request, a user agent <em class="bcp14">SHOULD</em> generate Host as the first header field following the request-line.<a class="self" href="#rfc.section.5.4.p.3">&para;</a></p></div><div id="rfc.section.5.4.p.4" class="avoidbreakafter"><p>For example, a GET request to the origin server for &lt;http://www.example.org/pub/WWW/&gt; would begin with:<a class="self" href="#rfc.section.5.4.p.4">&para;</a></p></div><div id="rfc.figure.u.51"><pre class="text2">GET /pub/WWW/ HTTP/1.1 
    687687Host: www.example.org 
    688688</pre></div><div id="rfc.section.5.4.p.5"><p>A client <em class="bcp14">MUST</em> send a Host header field in an HTTP/1.1 request even if the request-target is in the absolute-form, since this allows the Host information to be forwarded through ancient HTTP/1.0 proxies that might not have implemented Host.<a class="self" href="#rfc.section.5.4.p.5">&para;</a></p></div><div id="rfc.section.5.4.p.6"><p>When a proxy receives a request with an absolute-form of request-target, the proxy <em class="bcp14">MUST</em> ignore the received Host header field (if any) and instead replace it with the host information of the request-target. A proxy that forwards such a request <em class="bcp14">MUST</em> generate a new Host field-value based on the received request-target rather than forward the received Host field-value.<a class="self" href="#rfc.section.5.4.p.6">&para;</a></p></div><div id="rfc.section.5.4.p.7"><p>Since the Host header field acts as an application-level routing mechanism, it is a frequent target for malware seeking to poison a shared cache or redirect a request to an unintended server. An interception proxy is particularly vulnerable if it relies on the Host field-value for redirecting requests to internal servers, or for use as a cache key in a shared cache, without first verifying that the intercepted connection is targeting a valid IP address for that host.<a class="self" href="#rfc.section.5.4.p.7">&para;</a></p></div><div id="rfc.section.5.4.p.8"><p>A server <em class="bcp14">MUST</em> respond with a <a href="rfc7231.html#status.400" class="smpl">400 (Bad Request)</a> status code to any HTTP/1.1 request message that lacks a Host header field and to any request message that contains more than one Host header field or a Host header field with an invalid field-value.<a class="self" href="#rfc.section.5.4.p.8">&para;</a></p></div></div><div id="effective.request.uri"><h2 id="rfc.section.5.5"><a href="#rfc.section.5.5">5.5</a>&nbsp;<a href="#effective.request.uri">Effective Request URI</a></h2><div id="rfc.section.5.5.p.1"><p>Since the request-target often contains only part of the user agent's target URI, a server reconstructs the intended target as an "<dfn>effective request URI</dfn>" to properly service the request. This reconstruction involves both the server's local configuration and information communicated in the <a href="#request-target" class="smpl">request-target</a>, <a href="#header.host" class="smpl">Host</a> header field, and connection context.<a class="self" href="#rfc.section.5.5.p.1">&para;</a></p></div><div id="rfc.section.5.5.p.2"><p>For a user agent, the effective request URI is the target URI.<a class="self" href="#rfc.section.5.5.p.2">&para;</a></p></div><div id="rfc.section.5.5.p.3"><p>If the <a href="#request-target" class="smpl">request-target</a> is in <a href="#absolute-form" class="smpl">absolute-form</a>, the effective request URI is the same as the request-target. Otherwise, the effective request URI is constructed as follows: <a class="self" href="#rfc.section.5.5.p.3">&para;</a></p><ul class="empty"><li>If the server's configuration (or outbound gateway) provides a fixed URI <a href="#uri" class="smpl">scheme</a>, that scheme is used for the effective request URI. Otherwise, if the request is received over a TLS-secured TCP connection, the effective request URI's scheme is "https"; if not, the scheme is "http".</li><li>If the server's configuration (or outbound gateway) provides a fixed URI <a href="#uri" class="smpl">authority</a> component, that authority is used for the effective request URI. If not, then if the request-target is in <a href="#authority-form" class="smpl">authority-form</a>, the effective request URI's authority component is the same as the request-target. If not, then if a <a href="#header.host" class="smpl">Host</a> header field is supplied with a non-empty field-value, the authority component is the same as the Host field-value. Otherwise, the authority component is assigned the default name configured for the server and, if the connection's incoming TCP port number differs from the default port for the effective request URI's scheme, then a colon (":") and the incoming port number (in decimal form) are appended to the authority component.</li><li>If the request-target is in <a href="#authority-form" class="smpl">authority-form</a> or <a href="#asterisk-form" class="smpl">asterisk-form</a>, the effective request URI's combined <a href="#uri" class="smpl">path</a> and <a href="#uri" class="smpl">query</a> component is empty. Otherwise, the combined <a href="#uri" class="smpl">path</a> and <a href="#uri" class="smpl">query</a> component is the same as the request-target.</li><li>The components of the effective request URI, once determined as above, can be combined into <a href="#uri" class="smpl">absolute-URI</a> form by concatenating the scheme, "://", authority, and combined path and query component.</li></ul></div><div id="rfc.figure.u.52"><p>Example 1: the following message received over an insecure TCP connection</p><pre class="text">GET /pub/WWW/TheProject.html HTTP/1.1 
     
    698698  <a href="#header.via" class="smpl">received-by</a>       = ( <a href="#uri" class="smpl">uri-host</a> [ ":" <a href="#uri" class="smpl">port</a> ] ) / <a href="#header.via" class="smpl">pseudonym</a> 
    699699  <a href="#header.via" class="smpl">pseudonym</a>         = <a href="#rule.token.separators" class="smpl">token</a> 
    700 </pre></div><div id="rfc.section.5.7.1.p.2"><p>Multiple Via field values represent each proxy or gateway that has forwarded the message. Each intermediary appends its own information about how the message was received, such that the end result is ordered according to the sequence of forwarding recipients.<a class="self" href="#rfc.section.5.7.1.p.2">&para;</a></p></div><div id="rfc.section.5.7.1.p.3"><p>A proxy <em class="bcp14">MUST</em> send an appropriate Via header field, as described below, in each message that it forwards. An HTTP-to-HTTP gateway <em class="bcp14">MUST</em> send an appropriate Via header field in each inbound request message and <em class="bcp14">MAY</em> send a Via header field in forwarded response messages.<a class="self" href="#rfc.section.5.7.1.p.3">&para;</a></p></div><div id="rfc.section.5.7.1.p.4"><p>For each intermediary, the received-protocol indicates the protocol and protocol version used by the upstream sender of the message. Hence, the Via field value records the advertised protocol capabilities of the request/response chain such that they remain visible to downstream recipients; this can be useful for determining what backwards-incompatible features might be safe to use in response, or within a later request, as described in <a href="#http.version" title="Protocol Versioning">Section&nbsp;2.6</a>. For brevity, the protocol-name is omitted when the received protocol is HTTP.<a class="self" href="#rfc.section.5.7.1.p.4">&para;</a></p></div><div id="rfc.section.5.7.1.p.5"><p>The received-by portion of the field value is normally the host and optional port number of a recipient server or client that subsequently forwarded the message. However, if the real host is considered to be sensitive information, a sender <em class="bcp14">MAY</em> replace it with a pseudonym. If a port is not provided, a recipient <em class="bcp14">MAY</em> interpret that as meaning it was received on the default TCP port, if any, for the received-protocol.<a class="self" href="#rfc.section.5.7.1.p.5">&para;</a></p></div><div id="rfc.section.5.7.1.p.6"><p>A sender <em class="bcp14">MAY</em> generate comments in the Via header field to identify the software of each recipient, analogous to the <a href="rfc7231.html#header.user-agent" class="smpl">User-Agent</a> and <a href="rfc7231.html#header.server" class="smpl">Server</a> header fields. However, all comments in the Via field are optional, and a recipient <em class="bcp14">MAY</em> remove them prior to forwarding the message.<a class="self" href="#rfc.section.5.7.1.p.6">&para;</a></p></div><div id="rfc.section.5.7.1.p.7"><p>For example, a request message could be sent from an HTTP/1.0 user agent to an internal proxy code-named "fred", which uses HTTP/1.1 to forward the request to a public proxy at p.example.net, which completes the request by forwarding it to the origin server at www.example.com. The request received by www.example.com would then have the following Via header field:<a class="self" href="#rfc.section.5.7.1.p.7">&para;</a></p></div><div id="rfc.figure.u.57"><pre class="text">  Via: 1.0 fred, 1.1 p.example.net 
     700</pre></div><div id="rfc.section.5.7.1.p.2"><p>Multiple Via field values represent each proxy or gateway that has forwarded the message. Each intermediary appends its own information about how the message was received, such that the end result is ordered according to the sequence of forwarding recipients.<a class="self" href="#rfc.section.5.7.1.p.2">&para;</a></p></div><div id="rfc.section.5.7.1.p.3"><p>A proxy <em class="bcp14">MUST</em> send an appropriate Via header field, as described below, in each message that it forwards. An HTTP-to-HTTP gateway <em class="bcp14">MUST</em> send an appropriate Via header field in each inbound request message and <em class="bcp14">MAY</em> send a Via header field in forwarded response messages.<a class="self" href="#rfc.section.5.7.1.p.3">&para;</a></p></div><div id="rfc.section.5.7.1.p.4"><p>For each intermediary, the received-protocol indicates the protocol and protocol version used by the upstream sender of the message. Hence, the Via field value records the advertised protocol capabilities of the request/response chain such that they remain visible to downstream recipients; this can be useful for determining what backwards-incompatible features might be safe to use in response, or within a later request, as described in <a href="#http.version" title="Protocol Versioning">Section&nbsp;2.6</a>. For brevity, the protocol-name is omitted when the received protocol is HTTP.<a class="self" href="#rfc.section.5.7.1.p.4">&para;</a></p></div><div id="rfc.section.5.7.1.p.5"><p>The received-by portion of the field value is normally the host and optional port number of a recipient server or client that subsequently forwarded the message. However, if the real host is considered to be sensitive information, a sender <em class="bcp14">MAY</em> replace it with a pseudonym. If a port is not provided, a recipient <em class="bcp14">MAY</em> interpret that as meaning it was received on the default TCP port, if any, for the received-protocol.<a class="self" href="#rfc.section.5.7.1.p.5">&para;</a></p></div><div id="rfc.section.5.7.1.p.6"><p>A sender <em class="bcp14">MAY</em> generate comments in the Via header field to identify the software of each recipient, analogous to the <a href="rfc7231.html#header.user-agent" class="smpl">User-Agent</a> and <a href="rfc7231.html#header.server" class="smpl">Server</a> header fields. However, all comments in the Via field are optional, and a recipient <em class="bcp14">MAY</em> remove them prior to forwarding the message.<a class="self" href="#rfc.section.5.7.1.p.6">&para;</a></p></div><div id="rfc.section.5.7.1.p.7" class="avoidbreakafter"><p>For example, a request message could be sent from an HTTP/1.0 user agent to an internal proxy code-named "fred", which uses HTTP/1.1 to forward the request to a public proxy at p.example.net, which completes the request by forwarding it to the origin server at www.example.com. The request received by www.example.com would then have the following Via header field:<a class="self" href="#rfc.section.5.7.1.p.7">&para;</a></p></div><div id="rfc.figure.u.57"><pre class="text">  Via: 1.0 fred, 1.1 p.example.net 
    701701</pre></div><div id="rfc.section.5.7.1.p.8"><p>An intermediary used as a portal through a network firewall <em class="bcp14">SHOULD NOT</em> forward the names and ports of hosts within the firewall region unless it is explicitly enabled to do so. If not enabled, such an intermediary <em class="bcp14">SHOULD</em> replace each received-by host of any host behind the firewall by an appropriate pseudonym for that host.<a class="self" href="#rfc.section.5.7.1.p.8">&para;</a></p></div><div id="rfc.section.5.7.1.p.9"><p>An intermediary <em class="bcp14">MAY</em> combine an ordered subsequence of Via header field entries into a single such entry if the entries have identical received-protocol values. For example,<a class="self" href="#rfc.section.5.7.1.p.9">&para;</a></p></div><div id="rfc.figure.u.58"><pre class="text">  Via: 1.0 ricky, 1.1 ethel, 1.1 fred, 1.0 lucy 
    702702</pre></div><div id="rfc.section.5.7.1.p.10"><p>could be collapsed to<a class="self" href="#rfc.section.5.7.1.p.10">&para;</a></p></div><div id="rfc.figure.u.59"><pre class="text">  Via: 1.0 ricky, 1.1 mertz, 1.0 lucy 
    703 </pre></div><div id="rfc.section.5.7.1.p.11"><p>A sender <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 by pseudonyms. A sender <em class="bcp14">MUST NOT</em> combine entries that have different received-protocol values.<a class="self" href="#rfc.section.5.7.1.p.11">&para;</a></p></div></div><div id="message.transformations"><h3 id="rfc.section.5.7.2"><a href="#rfc.section.5.7.2">5.7.2</a>&nbsp;<a href="#message.transformations">Transformations</a></h3><div id="rfc.section.5.7.2.p.1"><p>Some intermediaries include features for transforming messages and their payloads. A proxy might, for example, convert between image formats in order to save cache space or to reduce the amount of traffic on a slow link. However, operational problems might occur when these transformations are applied to payloads intended for critical applications, such as medical imaging or scientific data analysis, particularly when integrity checks or digital signatures are used to ensure that the payload received is identical to the original.<a class="self" href="#rfc.section.5.7.2.p.1">&para;</a></p></div><div id="rfc.section.5.7.2.p.2"><p>An HTTP-to-HTTP proxy is called a "<dfn>transforming proxy</dfn>" if it is designed or configured to modify messages in a semantically meaningful way (i.e., modifications, beyond those required by normal HTTP processing, that change the message in a way that would be significant to the original sender or potentially significant to downstream recipients). For example, a transforming proxy might be acting as a shared annotation server (modifying responses to include references to a local annotation database), a malware filter, a format transcoder, or a privacy filter. Such transformations are presumed to be desired by whichever client (or client organization) selected the proxy.<a class="self" href="#rfc.section.5.7.2.p.2">&para;</a></p></div><div id="rfc.section.5.7.2.p.3"><p>If a proxy receives a request-target with a host name that is not a fully qualified domain name, it <em class="bcp14">MAY</em> add its own domain to the host name it received when forwarding the request. A proxy <em class="bcp14">MUST NOT</em> change the host name if the request-target contains a fully qualified domain name.<a class="self" href="#rfc.section.5.7.2.p.3">&para;</a></p></div><div id="rfc.section.5.7.2.p.4"><p>A proxy <em class="bcp14">MUST NOT</em> modify the "absolute-path" and "query" parts of the received request-target when forwarding it to the next inbound server, except as noted above to replace an empty path with "/" or "*".<a class="self" href="#rfc.section.5.7.2.p.4">&para;</a></p></div><div id="rfc.section.5.7.2.p.5"><p>A proxy <em class="bcp14">MAY</em> modify the message body through application or removal of a transfer coding (<a href="#transfer.codings" title="Transfer Codings">Section&nbsp;4</a>).<a class="self" href="#rfc.section.5.7.2.p.5">&para;</a></p></div><div id="rfc.section.5.7.2.p.6"><p>A proxy <em class="bcp14">MUST NOT</em> transform the payload (<a href="rfc7231.html#payload" title="Payload Semantics">Section 3.3</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.26"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>) of a message that contains a no-transform cache-control directive (<a href="rfc7234.html#header.cache-control" title="Cache-Control">Section 5.2</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>).<a class="self" href="#rfc.section.5.7.2.p.6">&para;</a></p></div><div id="rfc.section.5.7.2.p.7"><p>A proxy <em class="bcp14">MAY</em> transform the payload of a message that does not contain a no-transform cache-control directive. A proxy that transforms a payload <em class="bcp14">MUST</em> add a <a href="rfc7234.html#header.warning" class="smpl">Warning</a> header field with the warn-code of 214 ("Transformation Applied") if one is not already in the message (see <a href="rfc7234.html#header.warning" title="Warning">Section 5.5</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.6"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>). A proxy that transforms the payload of a <a href="rfc7231.html#status.200" class="smpl">200 (OK)</a> response can further inform downstream recipients that a transformation has been applied by changing the response status code to <a href="rfc7231.html#status.203" class="smpl">203 (Non-Authoritative Information)</a> (<a href="rfc7231.html#status.203" title="203 Non-Authoritative Information">Section 6.3.4</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.27"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>).<a class="self" href="#rfc.section.5.7.2.p.7">&para;</a></p></div><div id="rfc.section.5.7.2.p.8"><p>A proxy <em class="bcp14">SHOULD NOT</em> modify header fields that provide information about the endpoints of the communication chain, the resource state, or the selected representation (other than the payload) unless the field's definition specifically allows such modification or the modification is deemed necessary for privacy or security.<a class="self" href="#rfc.section.5.7.2.p.8">&para;</a></p></div></div></div></div><div id="connection.management"><h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a>&nbsp;<a href="#connection.management">Connection Management</a></h1><div id="rfc.section.6.p.1"><p>HTTP messaging is independent of the underlying transport- or session-layer connection protocol(s). HTTP only presumes a reliable transport with in-order delivery of requests and the corresponding in-order delivery of responses. The mapping of HTTP request and response structures onto the data units of an underlying transport protocol is outside the scope of this specification.<a class="self" href="#rfc.section.6.p.1">&para;</a></p></div><div id="rfc.section.6.p.2"><p>As described in <a href="#connecting.inbound" title="Connecting Inbound">Section&nbsp;5.2</a>, the specific connection protocols to be used for an HTTP interaction are determined by client configuration and the <a href="#target-resource" class="smpl">target URI</a>. For example, the "http" URI scheme (<a href="#http.uri" title="http URI Scheme">Section&nbsp;2.7.1</a>) indicates a default connection of TCP over IP, with a default TCP port of 80, but the client might be configured to use a proxy via some other connection, port, or protocol.<a class="self" href="#rfc.section.6.p.2">&para;</a></p></div><div id="rfc.section.6.p.3"><p>HTTP implementations are expected to engage in connection management, which includes maintaining the state of current connections, establishing a new connection or reusing an existing connection, processing messages received on a connection, detecting connection failures, and closing each connection. Most clients maintain multiple connections in parallel, including more than one connection per server endpoint. Most servers are designed to maintain thousands of concurrent connections, while controlling request queues to enable fair use and detect denial-of-service attacks.<a class="self" href="#rfc.section.6.p.3">&para;</a></p></div><div id="header.connection"><h2 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a>&nbsp;<a href="#header.connection">Connection</a></h2><div id="rfc.section.6.1.p.1"><p>The "Connection" header field allows the sender to indicate desired control options for the current connection. In order to avoid confusing downstream recipients, a proxy or gateway <em class="bcp14">MUST</em> remove or replace any received connection options before forwarding the message.<a class="self" href="#rfc.section.6.1.p.1">&para;</a></p></div><div id="rfc.section.6.1.p.2"><p>When a header field aside from Connection is used to supply control information for or about the current connection, the sender <em class="bcp14">MUST</em> list the corresponding field-name within the Connection header field. A proxy or gateway <em class="bcp14">MUST</em> parse a received Connection header field before a message is forwarded and, for each connection-option in this field, remove any header field(s) from the message with the same name as the connection-option, and then remove the Connection header field itself (or replace it with the intermediary's own connection options for the forwarded message).<a class="self" href="#rfc.section.6.1.p.2">&para;</a></p></div><div id="rfc.section.6.1.p.3"><p>Hence, the Connection header field provides a declarative way of distinguishing header fields that are only intended for the immediate recipient ("hop-by-hop") from those fields that are intended for all recipients on the chain ("end-to-end"), enabling the message to be self-descriptive and allowing future connection-specific extensions to be deployed without fear that they will be blindly forwarded by older intermediaries.<a class="self" href="#rfc.section.6.1.p.3">&para;</a></p></div><div id="rfc.section.6.1.p.4"><p>The Connection header field's value has the following grammar:<a class="self" href="#rfc.section.6.1.p.4">&para;</a></p></div><div id="rfc.figure.u.60"><pre class="inline"><span id="rfc.iref.g.82"></span><span id="rfc.iref.g.83"></span>  <a href="#header.connection" class="smpl">Connection</a>        = 1#<a href="#header.connection" class="smpl">connection-option</a> 
     703</pre></div><div id="rfc.section.5.7.1.p.11"><p>A sender <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 by pseudonyms. A sender <em class="bcp14">MUST NOT</em> combine entries that have different received-protocol values.<a class="self" href="#rfc.section.5.7.1.p.11">&para;</a></p></div></div><div id="message.transformations"><h3 id="rfc.section.5.7.2"><a href="#rfc.section.5.7.2">5.7.2</a>&nbsp;<a href="#message.transformations">Transformations</a></h3><div id="rfc.section.5.7.2.p.1"><p>Some intermediaries include features for transforming messages and their payloads. A proxy might, for example, convert between image formats in order to save cache space or to reduce the amount of traffic on a slow link. However, operational problems might occur when these transformations are applied to payloads intended for critical applications, such as medical imaging or scientific data analysis, particularly when integrity checks or digital signatures are used to ensure that the payload received is identical to the original.<a class="self" href="#rfc.section.5.7.2.p.1">&para;</a></p></div><div id="rfc.section.5.7.2.p.2"><p>An HTTP-to-HTTP proxy is called a "<dfn>transforming proxy</dfn>" if it is designed or configured to modify messages in a semantically meaningful way (i.e., modifications, beyond those required by normal HTTP processing, that change the message in a way that would be significant to the original sender or potentially significant to downstream recipients). For example, a transforming proxy might be acting as a shared annotation server (modifying responses to include references to a local annotation database), a malware filter, a format transcoder, or a privacy filter. Such transformations are presumed to be desired by whichever client (or client organization) selected the proxy.<a class="self" href="#rfc.section.5.7.2.p.2">&para;</a></p></div><div id="rfc.section.5.7.2.p.3"><p>If a proxy receives a request-target with a host name that is not a fully qualified domain name, it <em class="bcp14">MAY</em> add its own domain to the host name it received when forwarding the request. A proxy <em class="bcp14">MUST NOT</em> change the host name if the request-target contains a fully qualified domain name.<a class="self" href="#rfc.section.5.7.2.p.3">&para;</a></p></div><div id="rfc.section.5.7.2.p.4"><p>A proxy <em class="bcp14">MUST NOT</em> modify the "absolute-path" and "query" parts of the received request-target when forwarding it to the next inbound server, except as noted above to replace an empty path with "/" or "*".<a class="self" href="#rfc.section.5.7.2.p.4">&para;</a></p></div><div id="rfc.section.5.7.2.p.5"><p>A proxy <em class="bcp14">MAY</em> modify the message body through application or removal of a transfer coding (<a href="#transfer.codings" title="Transfer Codings">Section&nbsp;4</a>).<a class="self" href="#rfc.section.5.7.2.p.5">&para;</a></p></div><div id="rfc.section.5.7.2.p.6"><p>A proxy <em class="bcp14">MUST NOT</em> transform the payload (<a href="rfc7231.html#payload" title="Payload Semantics">Section 3.3</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.26"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>) of a message that contains a no-transform cache-control directive (<a href="rfc7234.html#header.cache-control" title="Cache-Control">Section 5.2</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>).<a class="self" href="#rfc.section.5.7.2.p.6">&para;</a></p></div><div id="rfc.section.5.7.2.p.7"><p>A proxy <em class="bcp14">MAY</em> transform the payload of a message that does not contain a no-transform cache-control directive. A proxy that transforms a payload <em class="bcp14">MUST</em> add a <a href="rfc7234.html#header.warning" class="smpl">Warning</a> header field with the warn-code of 214 ("Transformation Applied") if one is not already in the message (see <a href="rfc7234.html#header.warning" title="Warning">Section 5.5</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.6"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>). A proxy that transforms the payload of a <a href="rfc7231.html#status.200" class="smpl">200 (OK)</a> response can further inform downstream recipients that a transformation has been applied by changing the response status code to <a href="rfc7231.html#status.203" class="smpl">203 (Non-Authoritative Information)</a> (<a href="rfc7231.html#status.203" title="203 Non-Authoritative Information">Section 6.3.4</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.27"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>).<a class="self" href="#rfc.section.5.7.2.p.7">&para;</a></p></div><div id="rfc.section.5.7.2.p.8"><p>A proxy <em class="bcp14">SHOULD NOT</em> modify header fields that provide information about the endpoints of the communication chain, the resource state, or the selected representation (other than the payload) unless the field's definition specifically allows such modification or the modification is deemed necessary for privacy or security.<a class="self" href="#rfc.section.5.7.2.p.8">&para;</a></p></div></div></div></div><div id="connection.management"><h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a>&nbsp;<a href="#connection.management">Connection Management</a></h1><div id="rfc.section.6.p.1"><p>HTTP messaging is independent of the underlying transport- or session-layer connection protocol(s). HTTP only presumes a reliable transport with in-order delivery of requests and the corresponding in-order delivery of responses. The mapping of HTTP request and response structures onto the data units of an underlying transport protocol is outside the scope of this specification.<a class="self" href="#rfc.section.6.p.1">&para;</a></p></div><div id="rfc.section.6.p.2"><p>As described in <a href="#connecting.inbound" title="Connecting Inbound">Section&nbsp;5.2</a>, the specific connection protocols to be used for an HTTP interaction are determined by client configuration and the <a href="#target-resource" class="smpl">target URI</a>. For example, the "http" URI scheme (<a href="#http.uri" title="http URI Scheme">Section&nbsp;2.7.1</a>) indicates a default connection of TCP over IP, with a default TCP port of 80, but the client might be configured to use a proxy via some other connection, port, or protocol.<a class="self" href="#rfc.section.6.p.2">&para;</a></p></div><div id="rfc.section.6.p.3"><p>HTTP implementations are expected to engage in connection management, which includes maintaining the state of current connections, establishing a new connection or reusing an existing connection, processing messages received on a connection, detecting connection failures, and closing each connection. Most clients maintain multiple connections in parallel, including more than one connection per server endpoint. Most servers are designed to maintain thousands of concurrent connections, while controlling request queues to enable fair use and detect denial-of-service attacks.<a class="self" href="#rfc.section.6.p.3">&para;</a></p></div><div id="header.connection"><h2 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a>&nbsp;<a href="#header.connection">Connection</a></h2><div id="rfc.section.6.1.p.1"><p>The "Connection" header field allows the sender to indicate desired control options for the current connection. In order to avoid confusing downstream recipients, a proxy or gateway <em class="bcp14">MUST</em> remove or replace any received connection options before forwarding the message.<a class="self" href="#rfc.section.6.1.p.1">&para;</a></p></div><div id="rfc.section.6.1.p.2"><p>When a header field aside from Connection is used to supply control information for or about the current connection, the sender <em class="bcp14">MUST</em> list the corresponding field-name within the Connection header field. A proxy or gateway <em class="bcp14">MUST</em> parse a received Connection header field before a message is forwarded and, for each connection-option in this field, remove any header field(s) from the message with the same name as the connection-option, and then remove the Connection header field itself (or replace it with the intermediary's own connection options for the forwarded message).<a class="self" href="#rfc.section.6.1.p.2">&para;</a></p></div><div id="rfc.section.6.1.p.3"><p>Hence, the Connection header field provides a declarative way of distinguishing header fields that are only intended for the immediate recipient ("hop-by-hop") from those fields that are intended for all recipients on the chain ("end-to-end"), enabling the message to be self-descriptive and allowing future connection-specific extensions to be deployed without fear that they will be blindly forwarded by older intermediaries.<a class="self" href="#rfc.section.6.1.p.3">&para;</a></p></div><div id="rfc.section.6.1.p.4" class="avoidbreakafter"><p>The Connection header field's value has the following grammar:<a class="self" href="#rfc.section.6.1.p.4">&para;</a></p></div><div id="rfc.figure.u.60"><pre class="inline"><span id="rfc.iref.g.82"></span><span id="rfc.iref.g.83"></span>  <a href="#header.connection" class="smpl">Connection</a>        = 1#<a href="#header.connection" class="smpl">connection-option</a> 
    704704  <a href="#header.connection" class="smpl">connection-option</a> = <a href="#rule.token.separators" class="smpl">token</a> 
    705705</pre></div><div id="rfc.section.6.1.p.5"><p>Connection options are case-insensitive.<a class="self" href="#rfc.section.6.1.p.5">&para;</a></p></div><div id="rfc.section.6.1.p.6"><p>A sender <em class="bcp14">MUST NOT</em> send a connection option corresponding to a header field that is intended for all recipients of the payload. For example, <a href="rfc7234.html#header.cache-control" class="smpl">Cache-Control</a> is never appropriate as a connection option (<a href="rfc7234.html#header.cache-control" title="Cache-Control">Section 5.2</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.7"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>).<a class="self" href="#rfc.section.6.1.p.6">&para;</a></p></div><div id="rfc.section.6.1.p.7"><p>The connection options do not always correspond to a header field present in the message, since a connection-specific header field might not be needed if there are no parameters associated with a connection option. In contrast, a connection-specific header field that is received without a corresponding connection option usually indicates that the field has been improperly forwarded by an intermediary and ought to be ignored by the recipient.<a class="self" href="#rfc.section.6.1.p.7">&para;</a></p></div><div id="rfc.section.6.1.p.8"><p>When defining new connection options, specification authors ought to survey existing header field names and ensure that the new connection option does not share the same name as an already deployed header field. Defining a new connection option essentially reserves that potential field-name for carrying additional information related to the connection option, since it would be unwise for senders to use that field-name for anything else.<a class="self" href="#rfc.section.6.1.p.8">&para;</a></p></div><div id="rfc.section.6.1.p.9"><p>The "<dfn>close</dfn>" connection option is defined for a sender to signal that this connection will be closed after completion of the response. For example,<a class="self" href="#rfc.section.6.1.p.9">&para;</a></p></div><div id="rfc.figure.u.61"><pre class="text">  Connection: close 
     
    723723</pre></div><div id="rfc.figure.u.66"><p>and:</p><pre class="text">  #element =&gt; [ 1#element ] 
    724724</pre></div><div id="rfc.figure.u.67"><p>and for n &gt;= 1 and m &gt; 1:</p><pre class="text">  &lt;n&gt;#&lt;m&gt;element =&gt; element &lt;n-1&gt;*&lt;m-1&gt;( OWS "," OWS element ) 
    725 </pre></div><div id="rfc.section.7.p.3"><p>For compatibility with legacy list rules, a recipient <em class="bcp14">MUST</em> parse and ignore a reasonable number of empty list elements: enough to handle common mistakes by senders that merge values, but not so much that they could be used as a denial-of-service mechanism. In other words, a recipient <em class="bcp14">MUST</em> accept lists that satisfy the following syntax:<a class="self" href="#rfc.section.7.p.3">&para;</a></p></div><div id="rfc.figure.u.68"><pre class="text">  #element =&gt; [ ( "," / element ) *( OWS "," [ OWS element ] ) ] 
     725</pre></div><div id="rfc.section.7.p.3" class="avoidbreakafter"><p>For compatibility with legacy list rules, a recipient <em class="bcp14">MUST</em> parse and ignore a reasonable number of empty list elements: enough to handle common mistakes by senders that merge values, but not so much that they could be used as a denial-of-service mechanism. In other words, a recipient <em class="bcp14">MUST</em> accept lists that satisfy the following syntax:<a class="self" href="#rfc.section.7.p.3">&para;</a></p></div><div id="rfc.figure.u.68"><pre class="text">  #element =&gt; [ ( "," / element ) *( OWS "," [ OWS element ] ) ] 
    726726   
    727727  1#element =&gt; *( "," OWS ) element *( OWS "," [ OWS element ] ) 
    728 </pre></div><div id="rfc.section.7.p.4"><p>Empty elements do not contribute to the count of elements present. For example, given these ABNF productions:<a class="self" href="#rfc.section.7.p.4">&para;</a></p></div><div id="rfc.figure.u.69"><pre class="text">  example-list      = 1#example-list-elmt 
     728</pre></div><div id="rfc.section.7.p.4" class="avoidbreakafter"><p>Empty elements do not contribute to the count of elements present. For example, given these ABNF productions:<a class="self" href="#rfc.section.7.p.4">&para;</a></p></div><div id="rfc.figure.u.69"><pre class="text">  example-list      = 1#example-list-elmt 
    729729  example-list-elmt = token ; see <a href="#field.components" title="Field Value Components">Section&nbsp;3.2.6</a>  
    730 </pre></div><div id="rfc.section.7.p.5"><p>Then the following are valid values for example-list (not including the double quotes, which are present for delimitation only):<a class="self" href="#rfc.section.7.p.5">&para;</a></p></div><div id="rfc.figure.u.70"><pre class="text">  "foo,bar" 
     730</pre></div><div id="rfc.section.7.p.5" class="avoidbreakafter"><p>Then the following are valid values for example-list (not including the double quotes, which are present for delimitation only):<a class="self" href="#rfc.section.7.p.5">&para;</a></p></div><div id="rfc.figure.u.70"><pre class="text">  "foo,bar" 
    731731  "foo ,bar," 
    732732  "foo , ,bar,charlie   " 
    733 </pre></div><div id="rfc.section.7.p.6"><p>In contrast, the following values would be invalid, since at least one non-empty element is required by the example-list production:<a class="self" href="#rfc.section.7.p.6">&para;</a></p></div><div id="rfc.figure.u.71"><pre class="text">  "" 
     733</pre></div><div id="rfc.section.7.p.6" class="avoidbreakafter"><p>In contrast, the following values would be invalid, since at least one non-empty element is required by the example-list production:<a class="self" href="#rfc.section.7.p.6">&para;</a></p></div><div id="rfc.figure.u.71"><pre class="text">  "" 
    734734  "," 
    735735  ",   ," 
    736 </pre></div><div id="rfc.section.7.p.7"><p><a href="#collected.abnf" title="Collected ABNF">Appendix&nbsp;B</a> shows the collected ABNF for recipients after the list constructs have been expanded.<a class="self" href="#rfc.section.7.p.7">&para;</a></p></div></div><div id="IANA.considerations"><h1 id="rfc.section.8"><a href="#rfc.section.8">8.</a>&nbsp;<a href="#IANA.considerations">IANA Considerations</a></h1><div id="header.field.registration"><h2 id="rfc.section.8.1"><a href="#rfc.section.8.1">8.1</a>&nbsp;<a href="#header.field.registration">Header Field Registration</a></h2><div id="rfc.section.8.1.p.1"><p>HTTP header fields are registered within the "Message Headers" registry maintained at &lt;<a href="http://www.iana.org/assignments/message-headers/">http://www.iana.org/assignments/message-headers/</a>&gt;.<a class="self" href="#rfc.section.8.1.p.1">&para;</a></p></div><div id="rfc.section.8.1.p.2"><p>This document defines the following HTTP header fields, so the "Permanent Message Header Field Names" registry has been updated accordingly (see <a href="#BCP90" id="rfc.xref.BCP90.1"><cite title="Registration Procedures for Message Header Fields">[BCP90]</cite></a>).<a class="self" href="#rfc.section.8.1.p.2">&para;</a></p></div><div id="rfc.table.1"><div id="iana.header.registration.table"></div><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Header Field Name</th><th>Protocol</th><th>Status</th><th>Reference</th></tr></thead><tbody><tr><td class="left">Connection</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.connection" id="rfc.xref.header.connection.6" title="Connection">Section&nbsp;6.1</a> </td></tr><tr><td class="left">Content-Length</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.content-length" id="rfc.xref.header.content-length.1" title="Content-Length">Section&nbsp;3.3.2</a> </td></tr><tr><td class="left">Host</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.host" id="rfc.xref.header.host.2" title="Host">Section&nbsp;5.4</a> </td></tr><tr><td class="left">TE</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.te" id="rfc.xref.header.te.3" title="TE">Section&nbsp;4.3</a> </td></tr><tr><td class="left">Trailer</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.trailer" id="rfc.xref.header.trailer.1" title="Trailer">Section&nbsp;4.4</a> </td></tr><tr><td class="left">Transfer-Encoding</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.transfer-encoding" id="rfc.xref.header.transfer-encoding.3" title="Transfer-Encoding">Section&nbsp;3.3.1</a> </td></tr><tr><td class="left">Upgrade</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.upgrade" id="rfc.xref.header.upgrade.2" title="Upgrade">Section&nbsp;6.7</a> </td></tr><tr><td class="left">Via</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.via" id="rfc.xref.header.via.1" title="Via">Section&nbsp;5.7.1</a> </td></tr></tbody></table></div><div id="rfc.section.8.1.p.3"><p>Furthermore, the header field-name "Close" has been registered as "reserved", since using that name as an HTTP header field might conflict with the "close" connection option of the <a href="#header.connection" class="smpl">Connection</a> header field (<a href="#header.connection" id="rfc.xref.header.connection.7" title="Connection">Section&nbsp;6.1</a>).<a class="self" href="#rfc.section.8.1.p.3">&para;</a></p></div><div id="rfc.table.u.1"><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Header Field Name</th><th>Protocol</th><th>Status</th><th>Reference</th></tr></thead><tbody><tr><td class="left">Close</td><td class="left">http</td><td class="left">reserved</td><td class="left"><a href="#header.field.registration" title="Header Field Registration">Section&nbsp;8.1</a> </td></tr></tbody></table></div><div id="rfc.section.8.1.p.4"><p>The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".<a class="self" href="#rfc.section.8.1.p.4">&para;</a></p></div></div><div id="uri.scheme.registration"><h2 id="rfc.section.8.2"><a href="#rfc.section.8.2">8.2</a>&nbsp;<a href="#uri.scheme.registration">URI Scheme Registration</a></h2><div id="rfc.section.8.2.p.1"><p>IANA maintains the registry of URI Schemes <a href="#BCP115" id="rfc.xref.BCP115.1"><cite title="Guidelines and Registration Procedures for New URI Schemes">[BCP115]</cite></a> at &lt;<a href="http://www.iana.org/assignments/uri-schemes/">http://www.iana.org/assignments/uri-schemes/</a>&gt;.<a class="self" href="#rfc.section.8.2.p.1">&para;</a></p></div><div id="rfc.section.8.2.p.2"><p>This document defines the following URI schemes, so the "Permanent URI Schemes" registry has been updated accordingly.<a class="self" href="#rfc.section.8.2.p.2">&para;</a></p></div><div id="rfc.table.u.2"><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>URI Scheme</th><th>Description</th><th>Reference</th></tr></thead><tbody><tr><td class="left">http</td><td class="left">Hypertext Transfer Protocol</td><td class="left"><a href="#http.uri" title="http URI Scheme">Section&nbsp;2.7.1</a></td></tr><tr><td class="left">https</td><td class="left">Hypertext Transfer Protocol Secure</td><td class="left"><a href="#https.uri" title="https URI Scheme">Section&nbsp;2.7.2</a></td></tr></tbody></table></div></div><div id="internet.media.type.http"><h2 id="rfc.section.8.3"><a href="#rfc.section.8.3">8.3</a>&nbsp;<a href="#internet.media.type.http">Internet Media Type Registration</a></h2><div id="rfc.section.8.3.p.1"><p>IANA maintains the registry of Internet media types <a href="#BCP13" id="rfc.xref.BCP13.1"><cite title="Media Type Specifications and Registration Procedures">[BCP13]</cite></a> at &lt;<a href="http://www.iana.org/assignments/media-types">http://www.iana.org/assignments/media-types</a>&gt;.<a class="self" href="#rfc.section.8.3.p.1">&para;</a></p></div><div id="rfc.section.8.3.p.2"><p>This document serves as the specification for the Internet media types "message/http" and "application/http". The following has been registered with IANA.<a class="self" href="#rfc.section.8.3.p.2">&para;</a></p></div><div id="internet.media.type.message.http"><h3 id="rfc.section.8.3.1"><a href="#rfc.section.8.3.1">8.3.1</a>&nbsp;<a href="#internet.media.type.message.http">Internet Media Type message/http</a></h3><div id="rfc.section.8.3.1.p.1"><p>The message/http type can be used to enclose a single HTTP request or response message, provided that it obeys the MIME restrictions for all "message" types regarding line length and encodings.<a class="self" href="#rfc.section.8.3.1.p.1">&para;</a></p></div><div id="rfc.section.8.3.1.p.2"><dl><dt>Type name:</dt><dd>message</dd><dt>Subtype name:</dt><dd>http</dd><dt>Required parameters:</dt><dd>N/A</dd><dt>Optional parameters:</dt><dd>version, msgtype <dl><dt>version:</dt><dd>The HTTP-version number of the enclosed message (e.g., "1.1"). If not present, the version can be determined from the first line of the body.</dd><dt>msgtype:</dt><dd>The message type &#8212; "request" or "response". If not present, the type can be determined from the first line of the body.</dd></dl> </dd><dt>Encoding considerations:</dt><dd>only "7bit", "8bit", or "binary" are permitted</dd><dt>Security considerations:</dt><dd>see <a href="#security.considerations" title="Security Considerations">Section&nbsp;9</a> </dd><dt>Interoperability considerations:</dt><dd>N/A</dd><dt>Published specification:</dt><dd>This specification (see <a href="#internet.media.type.message.http" title="Internet Media Type message/http">Section&nbsp;8.3.1</a>).</dd><dt>Applications that use this media type:</dt><dd>N/A</dd><dt>Fragment identifier considerations:</dt><dd>N/A</dd><dt>Additional information:</dt><dd>&nbsp;<dl><dt>Magic number(s):</dt><dd>N/A</dd><dt>Deprecated alias names for this type:</dt><dd>N/A</dd><dt>File extension(s):</dt><dd>N/A</dd><dt>Macintosh file type code(s):</dt><dd>N/A</dd></dl> </dd><dt>Person and email address to contact for further information:</dt><dd>See&nbsp;Authors'&nbsp;Addresses section.</dd><dt>Intended usage:</dt><dd>COMMON</dd><dt>Restrictions on usage:</dt><dd>N/A</dd><dt>Author:</dt><dd>See Authors' Addresses section.</dd><dt>Change controller:</dt><dd>IESG</dd></dl></div></div><div id="internet.media.type.application.http"><h3 id="rfc.section.8.3.2"><a href="#rfc.section.8.3.2">8.3.2</a>&nbsp;<a href="#internet.media.type.application.http">Internet Media Type application/http</a></h3><div id="rfc.section.8.3.2.p.1"><p>The application/http type can be used to enclose a pipeline of one or more HTTP request or response messages (not intermixed).<a class="self" href="#rfc.section.8.3.2.p.1">&para;</a></p></div><div id="rfc.section.8.3.2.p.2"><dl><dt>Type name:</dt><dd>application</dd><dt>Subtype name:</dt><dd>http</dd><dt>Required parameters:</dt><dd>N/A</dd><dt>Optional parameters:</dt><dd>version, msgtype <dl><dt>version:</dt><dd>The HTTP-version number of the enclosed messages (e.g., "1.1"). If not present, the version can be determined from the first line of the body.</dd><dt>msgtype:</dt><dd>The message type &#8212; "request" or "response". If not present, the type can be determined from the first line of the body.</dd></dl> </dd><dt>Encoding considerations:</dt><dd>HTTP messages enclosed by this type are in "binary" format; use of an appropriate Content-Transfer-Encoding is required when transmitted via email.</dd><dt>Security considerations:</dt><dd>see <a href="#security.considerations" title="Security Considerations">Section&nbsp;9</a> </dd><dt>Interoperability considerations:</dt><dd>N/A</dd><dt>Published specification:</dt><dd>This specification (see <a href="#internet.media.type.application.http" title="Internet Media Type application/http">Section&nbsp;8.3.2</a>).</dd><dt>Applications that use this media type:</dt><dd>N/A</dd><dt>Fragment identifier considerations:</dt><dd>N/A</dd><dt>Additional information:</dt><dd>&nbsp;<dl><dt>Deprecated alias names for this type:</dt><dd>N/A</dd><dt>Magic number(s):</dt><dd>N/A</dd><dt>File extension(s):</dt><dd>N/A</dd><dt>Macintosh file type code(s):</dt><dd>N/A</dd></dl> </dd><dt>Person and email address to contact for further information:</dt><dd>See&nbsp;Authors'&nbsp;Addresses section.</dd><dt>Intended usage:</dt><dd>COMMON</dd><dt>Restrictions on usage:</dt><dd>N/A</dd><dt>Author:</dt><dd>See Authors' Addresses section.</dd><dt>Change controller:</dt><dd>IESG</dd></dl></div></div></div><div id="transfer.coding.registry"><h2 id="rfc.section.8.4"><a href="#rfc.section.8.4">8.4</a>&nbsp;<a href="#transfer.coding.registry">Transfer Coding Registry</a></h2><div id="rfc.section.8.4.p.1"><p>The "HTTP Transfer Coding Registry" defines the namespace for transfer coding names. It is maintained at &lt;<a href="http://www.iana.org/assignments/http-parameters">http://www.iana.org/assignments/http-parameters</a>&gt;.<a class="self" href="#rfc.section.8.4.p.1">&para;</a></p></div><div id="transfer.coding.registry.procedure"><h3 id="rfc.section.8.4.1"><a href="#rfc.section.8.4.1">8.4.1</a>&nbsp;<a href="#transfer.coding.registry.procedure">Procedure</a></h3><div id="rfc.section.8.4.1.p.1"><p>Registrations <em class="bcp14">MUST</em> include the following fields: <a class="self" href="#rfc.section.8.4.1.p.1">&para;</a></p><ul><li>Name</li><li>Description</li><li>Pointer to specification text</li></ul></div><div id="rfc.section.8.4.1.p.2"><p>Names of transfer codings <em class="bcp14">MUST NOT</em> overlap with names of content codings (<a href="rfc7231.html#content.codings" title="Content Codings">Section 3.1.2.1</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.33"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>) unless the encoding transformation is identical, as is the case for the compression codings defined in <a href="#compression.codings" title="Compression Codings">Section&nbsp;4.2</a>.<a class="self" href="#rfc.section.8.4.1.p.2">&para;</a></p></div><div id="rfc.section.8.4.1.p.3"><p>Values to be added to this namespace require IETF Review (see <a href="https://tools.ietf.org/html/rfc5226#section-4.1">Section 4.1</a> of <a href="#RFC5226" id="rfc.xref.RFC5226.1"><cite title="Guidelines for Writing an IANA Considerations Section in RFCs">[RFC5226]</cite></a>), and <em class="bcp14">MUST</em> conform to the purpose of transfer coding defined in this specification.<a class="self" href="#rfc.section.8.4.1.p.3">&para;</a></p></div><div id="rfc.section.8.4.1.p.4"><p>Use of program names for the identification of encoding formats is not desirable and is discouraged for future encodings.<a class="self" href="#rfc.section.8.4.1.p.4">&para;</a></p></div></div><div id="transfer.coding.registration"><h3 id="rfc.section.8.4.2"><a href="#rfc.section.8.4.2">8.4.2</a>&nbsp;<a href="#transfer.coding.registration">Registration</a></h3><div id="rfc.section.8.4.2.p.1"><p>The "HTTP Transfer Coding Registry" has been updated with the registrations below:<a class="self" href="#rfc.section.8.4.2.p.1">&para;</a></p></div><div id="rfc.table.2"><div id="iana.transfer.coding.registration.table"></div><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Name</th><th>Description</th><th>Reference</th></tr></thead><tbody><tr><td class="left">chunked</td><td class="left">Transfer in a series of chunks</td><td class="left"><a href="#chunked.encoding" title="Chunked Transfer Coding">Section&nbsp;4.1</a> </td></tr><tr><td class="left">compress</td><td class="left">UNIX "compress" data format <a href="#Welch" id="rfc.xref.Welch.2"><cite title="A Technique for High-Performance Data Compression">[Welch]</cite></a></td><td class="left"><a href="#compress.coding" title="Compress Coding">Section&nbsp;4.2.1</a> </td></tr><tr><td class="left">deflate</td><td class="left">"deflate" compressed data (<a href="#RFC1951" id="rfc.xref.RFC1951.2"><cite title="DEFLATE Compressed Data Format Specification version 1.3">[RFC1951]</cite></a>) inside the "zlib" data format (<a href="#RFC1950" id="rfc.xref.RFC1950.2"><cite title="ZLIB Compressed Data Format Specification version 3.3">[RFC1950]</cite></a>)</td><td class="left"><a href="#deflate.coding" title="Deflate Coding">Section&nbsp;4.2.2</a> </td></tr><tr><td class="left">gzip</td><td class="left">GZIP file format <a href="#RFC1952" id="rfc.xref.RFC1952.2"><cite title="GZIP file format specification version 4.3">[RFC1952]</cite></a></td><td class="left"><a href="#gzip.coding" title="Gzip Coding">Section&nbsp;4.2.3</a> </td></tr><tr><td class="left">x-compress</td><td class="left">Deprecated (alias for compress)</td><td class="left"><a href="#compress.coding" title="Compress Coding">Section&nbsp;4.2.1</a> </td></tr><tr><td class="left">x-gzip</td><td class="left">Deprecated (alias for gzip)</td><td class="left"><a href="#gzip.coding" title="Gzip Coding">Section&nbsp;4.2.3</a> </td></tr></tbody></table></div></div></div><div id="content.coding.registration"><h2 id="rfc.section.8.5"><a href="#rfc.section.8.5">8.5</a>&nbsp;<a href="#content.coding.registration">Content Coding Registration</a></h2><div id="rfc.section.8.5.p.1"><p>IANA maintains the "HTTP Content Coding Registry" at &lt;<a href="http://www.iana.org/assignments/http-parameters">http://www.iana.org/assignments/http-parameters</a>&gt;.<a class="self" href="#rfc.section.8.5.p.1">&para;</a></p></div><div id="rfc.section.8.5.p.2"><p>The "HTTP Content Coding Registry" has been updated with the registrations below:<a class="self" href="#rfc.section.8.5.p.2">&para;</a></p></div><div id="rfc.table.3"><div id="iana.content.coding.registration.table"></div><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Name</th><th>Description</th><th>Reference</th></tr></thead><tbody><tr><td class="left">compress</td><td class="left">UNIX "compress" data format <a href="#Welch" id="rfc.xref.Welch.3"><cite title="A Technique for High-Performance Data Compression">[Welch]</cite></a></td><td class="left"><a href="#compress.coding" title="Compress Coding">Section&nbsp;4.2.1</a> </td></tr><tr><td class="left">deflate</td><td class="left">"deflate" compressed data (<a href="#RFC1951" id="rfc.xref.RFC1951.3"><cite title="DEFLATE Compressed Data Format Specification version 1.3">[RFC1951]</cite></a>) inside the "zlib" data format (<a href="#RFC1950" id="rfc.xref.RFC1950.3"><cite title="ZLIB Compressed Data Format Specification version 3.3">[RFC1950]</cite></a>)</td><td class="left"><a href="#deflate.coding" title="Deflate Coding">Section&nbsp;4.2.2</a> </td></tr><tr><td class="left">gzip</td><td class="left">GZIP file format <a href="#RFC1952" id="rfc.xref.RFC1952.3"><cite title="GZIP file format specification version 4.3">[RFC1952]</cite></a></td><td class="left"><a href="#gzip.coding" title="Gzip Coding">Section&nbsp;4.2.3</a> </td></tr><tr><td class="left">x-compress</td><td class="left">Deprecated (alias for compress)</td><td class="left"><a href="#compress.coding" title="Compress Coding">Section&nbsp;4.2.1</a> </td></tr><tr><td class="left">x-gzip</td><td class="left">Deprecated (alias for gzip)</td><td class="left"><a href="#gzip.coding" title="Gzip Coding">Section&nbsp;4.2.3</a> </td></tr></tbody></table></div></div><div id="upgrade.token.registry"><h2 id="rfc.section.8.6"><a href="#rfc.section.8.6">8.6</a>&nbsp;<a href="#upgrade.token.registry">Upgrade Token Registry</a></h2><div id="rfc.section.8.6.p.1"><p>The "Hypertext Transfer Protocol (HTTP) Upgrade Token Registry" defines the namespace for protocol-name tokens used to identify protocols in the <a href="#header.upgrade" class="smpl">Upgrade</a> header field. The registry is maintained at &lt;<a href="http://www.iana.org/assignments/http-upgrade-tokens">http://www.iana.org/assignments/http-upgrade-tokens</a>&gt;.<a class="self" href="#rfc.section.8.6.p.1">&para;</a></p></div><div id="upgrade.token.registry.procedure"><h3 id="rfc.section.8.6.1"><a href="#rfc.section.8.6.1">8.6.1</a>&nbsp;<a href="#upgrade.token.registry.procedure">Procedure</a></h3><div id="rfc.section.8.6.1.p.1"><p>Each registered protocol name is associated with contact information and an optional set of specifications that details how the connection will be processed after it has been upgraded.<a class="self" href="#rfc.section.8.6.1.p.1">&para;</a></p></div><div id="rfc.section.8.6.1.p.2"><p>Registrations happen on a "First Come First Served" basis (see <a href="https://tools.ietf.org/html/rfc5226#section-4.1">Section 4.1</a> of <a href="#RFC5226" id="rfc.xref.RFC5226.2"><cite title="Guidelines for Writing an IANA Considerations Section in RFCs">[RFC5226]</cite></a>) and are subject to the following rules: <a class="self" href="#rfc.section.8.6.1.p.2">&para;</a></p><ol><li>A protocol-name token, once registered, stays registered forever.</li><li>The registration <em class="bcp14">MUST</em> name a responsible party for the registration.</li><li>The registration <em class="bcp14">MUST</em> name a point of contact.</li><li>The registration <em class="bcp14">MAY</em> name a set of specifications associated with that token. Such specifications need not be publicly available.</li><li>The registration <em class="bcp14">SHOULD</em> name a set of expected "protocol-version" tokens associated with that token at the time of registration.</li><li>The responsible party <em class="bcp14">MAY</em> change the registration at any time. The IANA will keep a record of all such changes, and make them available upon request.</li><li>The IESG <em class="bcp14">MAY</em> reassign responsibility for a protocol token. This will normally only be used in the case when a responsible party cannot be contacted.</li></ol></div><div id="rfc.section.8.6.1.p.3"><p>This registration procedure for HTTP Upgrade Tokens replaces that previously defined in <a href="https://tools.ietf.org/html/rfc2817#section-7.2">Section 7.2</a> of <a href="#RFC2817" id="rfc.xref.RFC2817.2"><cite title="Upgrading to TLS Within HTTP/1.1">[RFC2817]</cite></a>.<a class="self" href="#rfc.section.8.6.1.p.3">&para;</a></p></div></div><div id="upgrade.token.registration"><h3 id="rfc.section.8.6.2"><a href="#rfc.section.8.6.2">8.6.2</a>&nbsp;<a href="#upgrade.token.registration">Upgrade Token Registration</a></h3><div id="rfc.section.8.6.2.p.1"><p>The "HTTP" entry in the upgrade token registry has been updated with the registration below:<a class="self" href="#rfc.section.8.6.2.p.1">&para;</a></p></div><div id="rfc.table.u.3"><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Value</th><th>Description</th><th>Expected Version Tokens</th><th>Reference</th></tr></thead><tbody><tr><td class="left">HTTP</td><td class="left">Hypertext Transfer Protocol</td><td class="left">any DIGIT.DIGIT (e.g, "2.0")</td><td class="left"><a href="#http.version" title="Protocol Versioning">Section&nbsp;2.6</a></td></tr></tbody></table></div><div id="rfc.section.8.6.2.p.2"><p>The responsible party is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".<a class="self" href="#rfc.section.8.6.2.p.2">&para;</a></p></div></div></div></div><div id="security.considerations"><h1 id="rfc.section.9"><a href="#rfc.section.9">9.</a>&nbsp;<a href="#security.considerations">Security Considerations</a></h1><div id="rfc.section.9.p.1"><p>This section is meant to inform developers, information providers, and users of known security considerations relevant to HTTP message syntax, parsing, and routing. Security considerations about HTTP semantics and payloads are addressed in <a href="#RFC7231" id="rfc.xref.RFC7231.34"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>.<a class="self" href="#rfc.section.9.p.1">&para;</a></p></div><div id="establishing.authority"><h2 id="rfc.section.9.1"><a href="#rfc.section.9.1">9.1</a>&nbsp;<a href="#establishing.authority">Establishing Authority</a></h2><div id="rfc.section.9.1.p.1"><p>HTTP relies on the notion of an <dfn>authoritative response</dfn>: a response that has been determined by (or at the direction of) the authority identified within the target URI to be the most appropriate response for that request given the state of the target resource at the time of response message origination. Providing a response from a non-authoritative source, such as a shared cache, is often useful to improve performance and availability, but only to the extent that the source can be trusted or the distrusted response can be safely used.<a class="self" href="#rfc.section.9.1.p.1">&para;</a></p></div><div id="rfc.section.9.1.p.2"><p>Unfortunately, establishing authority can be difficult. For example, <dfn>phishing</dfn> is an attack on the user's perception of authority, where that perception can be misled by presenting similar branding in hypertext, possibly aided by userinfo obfuscating the authority component (see <a href="#http.uri" title="http URI Scheme">Section&nbsp;2.7.1</a>). User agents can reduce the impact of phishing attacks by enabling users to easily inspect a target URI prior to making an action, by prominently distinguishing (or rejecting) userinfo when present, and by not sending stored credentials and cookies when the referring document is from an unknown or untrusted source.<a class="self" href="#rfc.section.9.1.p.2">&para;</a></p></div><div id="rfc.section.9.1.p.3"><p>When a registered name is used in the authority component, the "http" URI scheme (<a href="#http.uri" title="http URI Scheme">Section&nbsp;2.7.1</a>) relies on the user's local name resolution service to determine where it can find authoritative responses. This means that any attack on a user's network host table, cached names, or name resolution libraries becomes an avenue for attack on establishing authority. Likewise, the user's choice of server for Domain Name Service (DNS), and the hierarchy of servers from which it obtains resolution results, could impact the authenticity of address mappings; DNS Security Extensions (DNSSEC, <a href="#RFC4033" id="rfc.xref.RFC4033.1"><cite title="DNS Security Introduction and Requirements">[RFC4033]</cite></a>) are one way to improve authenticity.<a class="self" href="#rfc.section.9.1.p.3">&para;</a></p></div><div id="rfc.section.9.1.p.4"><p>Furthermore, after an IP address is obtained, establishing authority for an "http" URI is vulnerable to attacks on Internet Protocol routing.<a class="self" href="#rfc.section.9.1.p.4">&para;</a></p></div><div id="rfc.section.9.1.p.5"><p>The "https" scheme (<a href="#https.uri" title="https URI Scheme">Section&nbsp;2.7.2</a>) is intended to prevent (or at least reveal) many of these potential attacks on establishing authority, provided that the negotiated TLS connection is secured and the client properly verifies that the communicating server's identity matches the target URI's authority component (see <a href="#RFC2818" id="rfc.xref.RFC2818.3"><cite title="HTTP Over TLS">[RFC2818]</cite></a>). Correctly implementing such verification can be difficult (see <a href="#Georgiev" id="rfc.xref.Georgiev.1"><cite title="The Most Dangerous Code in the World: Validating SSL Certificates in Non-browser Software">[Georgiev]</cite></a>).<a class="self" href="#rfc.section.9.1.p.5">&para;</a></p></div></div><div id="risks.intermediaries"><h2 id="rfc.section.9.2"><a href="#rfc.section.9.2">9.2</a>&nbsp;<a href="#risks.intermediaries">Risks of Intermediaries</a></h2><div id="rfc.section.9.2.p.1"><p>By their very nature, HTTP intermediaries are men-in-the-middle and, thus, represent an opportunity for man-in-the-middle attacks. Compromise of the systems on which the intermediaries run can result in serious security and privacy problems. Intermediaries might have access to security-related information, personal information about individual users and organizations, and proprietary information belonging to users and content providers. A compromised intermediary, or an intermediary implemented or configured without regard to security and privacy considerations, might be used in the commission of a wide range of potential attacks.<a class="self" href="#rfc.section.9.2.p.1">&para;</a></p></div><div id="rfc.section.9.2.p.2"><p>Intermediaries that contain a shared cache are especially vulnerable to cache poisoning attacks, as described in <a href="rfc7234.html#security.considerations" title="Security Considerations">Section 8</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.8"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>.<a class="self" href="#rfc.section.9.2.p.2">&para;</a></p></div><div id="rfc.section.9.2.p.3"><p>Implementers need to consider the privacy and security implications of their design and coding decisions, and of the configuration options they provide to operators (especially the default configuration).<a class="self" href="#rfc.section.9.2.p.3">&para;</a></p></div><div id="rfc.section.9.2.p.4"><p>Users need to be aware that intermediaries are no more trustworthy than the people who run them; HTTP itself cannot solve this problem.<a class="self" href="#rfc.section.9.2.p.4">&para;</a></p></div></div><div id="attack.protocol.element.length"><h2 id="rfc.section.9.3"><a href="#rfc.section.9.3">9.3</a>&nbsp;<a href="#attack.protocol.element.length">Attacks via Protocol Element Length</a></h2><div id="rfc.section.9.3.p.1"><p>Because HTTP uses mostly textual, character-delimited fields, parsers are often vulnerable to attacks based on sending very long (or very slow) streams of data, particularly where an implementation is expecting a protocol element with no predefined length.<a class="self" href="#rfc.section.9.3.p.1">&para;</a></p></div><div id="rfc.section.9.3.p.2"><p>To promote interoperability, specific recommendations are made for minimum size limits on request-line (<a href="#request.line" title="Request Line">Section&nbsp;3.1.1</a>) and header fields (<a href="#header.fields" title="Header Fields">Section&nbsp;3.2</a>). These are minimum recommendations, chosen to be supportable even by implementations with limited resources; it is expected that most implementations will choose substantially higher limits.<a class="self" href="#rfc.section.9.3.p.2">&para;</a></p></div><div id="rfc.section.9.3.p.3"><p>A server can reject a message that has a request-target that is too long (<a href="rfc7231.html#status.414" title="414 URI Too Long">Section 6.5.12</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.35"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>) or a request payload that is too large (<a href="rfc7231.html#status.413" title="413 Payload Too Large">Section 6.5.11</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.36"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>). Additional status codes related to capacity limits have been defined by extensions to HTTP <a href="#RFC6585" id="rfc.xref.RFC6585.1"><cite title="Additional HTTP Status Codes">[RFC6585]</cite></a>.<a class="self" href="#rfc.section.9.3.p.3">&para;</a></p></div><div id="rfc.section.9.3.p.4"><p>Recipients ought to carefully limit the extent to which they process other protocol elements, including (but not limited to) request methods, response status phrases, header field-names, numeric values, and body chunks. Failure to limit such processing can result in buffer overflows, arithmetic overflows, or increased vulnerability to denial-of-service attacks.<a class="self" href="#rfc.section.9.3.p.4">&para;</a></p></div></div><div id="response.splitting"><h2 id="rfc.section.9.4"><a href="#rfc.section.9.4">9.4</a>&nbsp;<a href="#response.splitting">Response Splitting</a></h2><div id="rfc.section.9.4.p.1"><p>Response splitting (a.k.a, CRLF injection) is a common technique, used in various attacks on Web usage, that exploits the line-based nature of HTTP message framing and the ordered association of requests to responses on persistent connections <a href="#Klein" id="rfc.xref.Klein.1"><cite title="Divide and Conquer - HTTP Response Splitting, Web Cache Poisoning Attacks, and Related Topics">[Klein]</cite></a>. This technique can be particularly damaging when the requests pass through a shared cache.<a class="self" href="#rfc.section.9.4.p.1">&para;</a></p></div><div id="rfc.section.9.4.p.2"><p>Response splitting exploits a vulnerability in servers (usually within an application server) where an attacker can send encoded data within some parameter of the request that is later decoded and echoed within any of the response header fields of the response. If the decoded data is crafted to look like the response has ended and a subsequent response has begun, the response has been split and the content within the apparent second response is controlled by the attacker. The attacker can then make any other request on the same persistent connection and trick the recipients (including intermediaries) into believing that the second half of the split is an authoritative answer to the second request.<a class="self" href="#rfc.section.9.4.p.2">&para;</a></p></div><div id="rfc.section.9.4.p.3"><p>For example, a parameter within the request-target might be read by an application server and reused within a redirect, resulting in the same parameter being echoed in the <a href="rfc7231.html#header.location" class="smpl">Location</a> header field of the response. If the parameter is decoded by the application and not properly encoded when placed in the response field, the attacker can send encoded CRLF octets and other content that will make the application's single response look like two or more responses.<a class="self" href="#rfc.section.9.4.p.3">&para;</a></p></div><div id="rfc.section.9.4.p.4"><p>A common defense against response splitting is to filter requests for data that looks like encoded CR and LF (e.g., "%0D" and "%0A"). However, that assumes the application server is only performing URI decoding, rather than more obscure data transformations like charset transcoding, XML entity translation, base64 decoding, sprintf reformatting, etc. A more effective mitigation is to prevent anything other than the server's core protocol libraries from sending a CR or LF within the header section, which means restricting the output of header fields to APIs that filter for bad octets and not allowing application servers to write directly to the protocol stream.<a class="self" href="#rfc.section.9.4.p.4">&para;</a></p></div></div><div id="request.smuggling"><h2 id="rfc.section.9.5"><a href="#rfc.section.9.5">9.5</a>&nbsp;<a href="#request.smuggling">Request Smuggling</a></h2><div id="rfc.section.9.5.p.1"><p>Request smuggling (<a href="#Linhart" id="rfc.xref.Linhart.1"><cite title="HTTP Request Smuggling">[Linhart]</cite></a>) is a technique that exploits differences in protocol parsing among various recipients to hide additional requests (which might otherwise be blocked or disabled by policy) within an apparently harmless request. Like response splitting, request smuggling can lead to a variety of attacks on HTTP usage.<a class="self" href="#rfc.section.9.5.p.1">&para;</a></p></div><div id="rfc.section.9.5.p.2"><p>This specification has introduced new requirements on request parsing, particularly with regard to message framing in <a href="#message.body.length" title="Message Body Length">Section&nbsp;3.3.3</a>, to reduce the effectiveness of request smuggling.<a class="self" href="#rfc.section.9.5.p.2">&para;</a></p></div></div><div id="message.integrity"><h2 id="rfc.section.9.6"><a href="#rfc.section.9.6">9.6</a>&nbsp;<a href="#message.integrity">Message Integrity</a></h2><div id="rfc.section.9.6.p.1"><p>HTTP does not define a specific mechanism for ensuring message integrity, instead relying on the error-detection ability of underlying transport protocols and the use of length or chunk-delimited framing to detect completeness. Additional integrity mechanisms, such as hash functions or digital signatures applied to the content, can be selectively added to messages via extensible metadata header fields. Historically, the lack of a single integrity mechanism has been justified by the informal nature of most HTTP communication. However, the prevalence of HTTP as an information access mechanism has resulted in its increasing use within environments where verification of message integrity is crucial.<a class="self" href="#rfc.section.9.6.p.1">&para;</a></p></div><div id="rfc.section.9.6.p.2"><p>User agents are encouraged to implement configurable means for detecting and reporting failures of message integrity such that those means can be enabled within environments for which integrity is necessary. For example, a browser being used to view medical history or drug interaction information needs to indicate to the user when such information is detected by the protocol to be incomplete, expired, or corrupted during transfer. Such mechanisms might be selectively enabled via user agent extensions or the presence of message integrity metadata in a response. At a minimum, user agents ought to provide some indication that allows a user to distinguish between a complete and incomplete response message (<a href="#incomplete.messages" title="Handling Incomplete Messages">Section&nbsp;3.4</a>) when such verification is desired.<a class="self" href="#rfc.section.9.6.p.2">&para;</a></p></div></div><div id="message.confidentiality"><h2 id="rfc.section.9.7"><a href="#rfc.section.9.7">9.7</a>&nbsp;<a href="#message.confidentiality">Message Confidentiality</a></h2><div id="rfc.section.9.7.p.1"><p>HTTP relies on underlying transport protocols to provide message confidentiality when that is desired. HTTP has been specifically designed to be independent of the transport protocol, such that it can be used over many different forms of encrypted connection, with the selection of such transports being identified by the choice of URI scheme or within user agent configuration.<a class="self" href="#rfc.section.9.7.p.1">&para;</a></p></div><div id="rfc.section.9.7.p.2"><p>The "https" scheme can be used to identify resources that require a confidential connection, as described in <a href="#https.uri" title="https URI Scheme">Section&nbsp;2.7.2</a>.<a class="self" href="#rfc.section.9.7.p.2">&para;</a></p></div></div><div id="privacy.of.server.log.information"><h2 id="rfc.section.9.8"><a href="#rfc.section.9.8">9.8</a>&nbsp;<a href="#privacy.of.server.log.information">Privacy of Server Log Information</a></h2><div id="rfc.section.9.8.p.1"><p>A server is in the position to save personal data about a user's requests over time, which might identify their reading patterns or subjects of interest. In particular, log information gathered at an intermediary often contains a history of user agent interaction, across a multitude of sites, that can be traced to individual users.<a class="self" href="#rfc.section.9.8.p.1">&para;</a></p></div><div id="rfc.section.9.8.p.2"><p>HTTP log information is confidential in nature; its handling is often constrained by laws and regulations. Log information needs to be securely stored and appropriate guidelines followed for its analysis. Anonymization of personal information within individual entries helps, but it is generally not sufficient to prevent real log traces from being re-identified based on correlation with other access characteristics. As such, access traces that are keyed to a specific client are unsafe to publish even if the key is pseudonymous.<a class="self" href="#rfc.section.9.8.p.2">&para;</a></p></div><div id="rfc.section.9.8.p.3"><p>To minimize the risk of theft or accidental publication, log information ought to be purged of personally identifiable information, including user identifiers, IP addresses, and user-provided query parameters, as soon as that information is no longer necessary to support operational needs for security, auditing, or fraud control.<a class="self" href="#rfc.section.9.8.p.3">&para;</a></p></div></div></div><div id="acks"><h1 id="rfc.section.10"><a href="#rfc.section.10">10.</a>&nbsp;<a href="#acks">Acknowledgments</a></h1><div id="rfc.section.10.p.1"><p>This edition of HTTP/1.1 builds on the many contributions that went into <a href="#RFC1945" id="rfc.xref.RFC1945.2">RFC 1945</a>, <a href="#RFC2068" id="rfc.xref.RFC2068.3">RFC 2068</a>, <a href="#RFC2145" id="rfc.xref.RFC2145.2">RFC 2145</a>, and <a href="#RFC2616" id="rfc.xref.RFC2616.3">RFC 2616</a>, including substantial contributions made by the previous authors, editors, and Working Group Chairs: Tim Berners-Lee, Ari Luotonen, Roy T. Fielding, Henrik Frystyk Nielsen, Jim Gettys, Jeffrey C. Mogul, Larry Masinter, and Paul J. Leach. Mark Nottingham oversaw this effort as Working Group Chair.<a class="self" href="#rfc.section.10.p.1">&para;</a></p></div><div id="rfc.section.10.p.2"><p>Since 1999, the following contributors have helped improve the HTTP specification by reporting bugs, asking smart questions, drafting or reviewing text, and evaluating open issues:<a class="self" href="#rfc.section.10.p.2">&para;</a></p></div><div id="rfc.section.10.p.3"><p>Adam Barth, Adam Roach, Addison Phillips, Adrian Chadd, Adrian Cole, Adrien W. de Croy, Alan Ford, Alan Ruttenberg, Albert Lunde, Alek Storm, Alex Rousskov, Alexandre Morgaut, Alexey Melnikov, Alisha Smith, Amichai Rothman, Amit Klein, Amos Jeffries, Andreas Maier, Andreas Petersson, Andrei Popov, Anil Sharma, Anne van Kesteren, Anthony Bryan, Asbjorn Ulsberg, Ashok Kumar, Balachander Krishnamurthy, Barry Leiba, Ben Laurie, Benjamin Carlyle, Benjamin Niven-Jenkins, Benoit Claise, Bil Corry, Bill Burke, Bjoern Hoehrmann, Bob Scheifler, Boris Zbarsky, Brett Slatkin, Brian Kell, Brian McBarron, Brian Pane, Brian Raymor, Brian Smith, Bruce Perens, Bryce Nesbitt, Cameron Heavon-Jones, Carl Kugler, Carsten Bormann, Charles Fry, Chris Burdess, Chris Newman, Christian Huitema, Cyrus Daboo, Dale Robert Anderson, Dan Wing, Dan Winship, Daniel Stenberg, Darrel Miller, Dave Cridland, Dave Crocker, Dave Kristol, Dave Thaler, David Booth, David Singer, David W. Morris, Diwakar Shetty, Dmitry Kurochkin, Drummond Reed, Duane Wessels, Edward Lee, Eitan Adler, Eliot Lear, Emile Stephan, Eran Hammer-Lahav, Eric D. Williams, Eric J. Bowman, Eric Lawrence, Eric Rescorla, Erik Aronesty, EungJun Yi, Evan Prodromou, Felix Geisendoerfer, Florian Weimer, Frank Ellermann, Fred Akalin, Fred Bohle, Frederic Kayser, Gabor Molnar, Gabriel Montenegro, Geoffrey Sneddon, Gervase Markham, Gili Tzabari, Grahame Grieve, Greg Slepak, Greg Wilkins, Grzegorz Calkowski, Harald Tveit Alvestrand, Harry Halpin, Helge Hess, Henrik Nordstrom, Henry S. Thompson, Henry Story, Herbert van de Sompel, Herve Ruellan, Howard Melman, Hugo Haas, Ian Fette, Ian Hickson, Ido Safruti, Ilari Liusvaara, Ilya Grigorik, Ingo Struck, J. Ross Nicoll, James Cloos, James H. Manger, James Lacey, James M. Snell, Jamie Lokier, Jan Algermissen, Jari Arkko, Jeff Hodges (who came up with the term 'effective Request-URI'), Jeff Pinner, Jeff Walden, Jim Luther, Jitu Padhye, Joe D. Williams, Joe Gregorio, Joe Orton, Joel Jaeggli, John C. Klensin, John C. Mallery, John Cowan, John Kemp, John Panzer, John Schneider, John Stracke, John Sullivan, Jonas Sicking, Jonathan A. Rees, Jonathan Billington, Jonathan Moore, Jonathan Silvera, Jordi Ros, Joris Dobbelsteen, Josh Cohen, Julien Pierre, Jungshik Shin, Justin Chapweske, Justin Erenkrantz, Justin James, Kalvinder Singh, Karl Dubost, Kathleen Moriarty, Keith Hoffman, Keith Moore, Ken Murchison, Koen Holtman, Konstantin Voronkov, Kris Zyp, Leif Hedstrom, Lionel Morand, Lisa Dusseault, Maciej Stachowiak, Manu Sporny, Marc Schneider, Marc Slemko, Mark Baker, Mark Pauley, Mark Watson, Markus Isomaki, Markus Lanthaler, Martin J. Duerst, Martin Musatov, Martin Nilsson, Martin Thomson, Matt Lynch, Matthew Cox, Matthew Kerwin, Max Clark, Menachem Dodge, Meral Shirazipour, Michael Burrows, Michael Hausenblas, Michael Scharf, Michael Sweet, Michael Tuexen, Michael Welzl, Mike Amundsen, Mike Belshe, Mike Bishop, Mike Kelly, Mike Schinkel, Miles Sabin, Murray S. Kucherawy, Mykyta Yevstifeyev, Nathan Rixham, Nicholas Shanks, Nico Williams, Nicolas Alvarez, Nicolas Mailhot, Noah Slater, Osama Mazahir, Pablo Castro, Pat Hayes, Patrick R. McManus, Paul E. Jones, Paul Hoffman, Paul Marquess, Pete Resnick, Peter Lepeska, Peter Occil, Peter Saint-Andre, Peter Watkins, Phil Archer, Phil Hunt, Philippe Mougin, Phillip Hallam-Baker, Piotr Dobrogost, Poul-Henning Kamp, Preethi Natarajan, Rajeev Bector, Ray Polk, Reto Bachmann-Gmuer, Richard Barnes, Richard Cyganiak, Rob Trace, Robby Simpson, Robert Brewer, Robert Collins, Robert Mattson, Robert O'Callahan, Robert Olofsson, Robert Sayre, Robert Siemer, Robert de Wilde, Roberto Javier Godoy, Roberto Peon, Roland Zink, Ronny Widjaja, Ryan Hamilton, S. Mike Dierken, Salvatore Loreto, Sam Johnston, Sam Pullara, Sam Ruby, Saurabh Kulkarni, Scott Lawrence (who maintained the original issues list), Sean B. Palmer, Sean Turner, Sebastien Barnoud, Shane McCarron, Shigeki Ohtsu, Simon Yarde, Stefan Eissing, Stefan Tilkov, Stefanos Harhalakis, Stephane Bortzmeyer, Stephen Farrell, Stephen Kent, Stephen Ludin, Stuart Williams, Subbu Allamaraju, Subramanian Moonesamy, Susan Hares, Sylvain Hellegouarch, Tapan Divekar, Tatsuhiro Tsujikawa, Tatsuya Hayashi, Ted Hardie, Ted Lemon, Thomas Broyer, Thomas Fossati, Thomas Maslen, Thomas Nadeau, Thomas Nordin, Thomas Roessler, Tim Bray, Tim Morgan, Tim Olsen, Tom Zhou, Travis Snoozy, Tyler Close, Vincent Murphy, Wenbo Zhu, Werner Baumann, Wilbur Streett, Wilfredo Sanchez Vega, William A. Rowe Jr., William Chan, Willy Tarreau, Xiaoshu Wang, Yaron Goland, Yngve Nysaeter Pettersen, Yoav Nir, Yogesh Bang, Yuchung Cheng, Yutaka Oiwa, Yves Lafon (long-time member of the editor team), Zed A. Shaw, and Zhong Yu.<a class="self" href="#rfc.section.10.p.3">&para;</a></p></div><div id="rfc.section.10.p.4"><p>See <a href="https://tools.ietf.org/html/rfc2616#section-16">Section 16</a> of <a href="#RFC2616" id="rfc.xref.RFC2616.4"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> for additional acknowledgements from prior revisions.<a class="self" href="#rfc.section.10.p.4">&para;</a></p></div></div><h1 id="rfc.references"><a id="rfc.section.11" href="#rfc.section.11">11.</a> References</h1><h2 id="rfc.references.1"><a href="#rfc.section.11.1" id="rfc.section.11.1">11.1</a> Normative References</h2><table><tr><td class="reference"><b id="RFC0793">[RFC0793]</b></td><td class="top">Postel, J., &#8220;<a href="https://tools.ietf.org/html/rfc793">Transmission Control Protocol</a>&#8221;, STD&nbsp;7, RFC&nbsp;793, September&nbsp;1981.</td></tr><tr><td class="reference"><b id="RFC1950">[RFC1950]</b></td><td class="top">Deutsch, L. and J-L. Gailly, &#8220;<a href="https://tools.ietf.org/html/rfc1950">ZLIB Compressed Data Format Specification version 3.3</a>&#8221;, RFC&nbsp;1950, May&nbsp;1996.</td></tr><tr><td class="reference"><b id="RFC1951">[RFC1951]</b></td><td class="top">Deutsch, P., &#8220;<a href="https://tools.ietf.org/html/rfc1951">DEFLATE Compressed Data Format Specification version 1.3</a>&#8221;, RFC&nbsp;1951, May&nbsp;1996.</td></tr><tr><td class="reference"><b id="RFC1952">[RFC1952]</b></td><td class="top">Deutsch, P., Gailly, J-L., Adler, M., Deutsch, L., and G. Randers-Pehrson, &#8220;<a href="https://tools.ietf.org/html/rfc1952">GZIP file format specification version 4.3</a>&#8221;, RFC&nbsp;1952, May&nbsp;1996.</td></tr><tr><td class="reference"><b id="RFC2119">[RFC2119]</b></td><td class="top">Bradner, S., &#8220;<a href="https://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>&#8221;, BCP&nbsp;14, RFC&nbsp;2119, March&nbsp;1997.</td></tr><tr><td class="reference"><b id="RFC3986">[RFC3986]</b></td><td class="top">Berners-Lee, T., Fielding, R., and L. Masinter, &#8220;<a href="https://tools.ietf.org/html/rfc3986">Uniform Resource Identifier (URI): Generic Syntax</a>&#8221;, STD&nbsp;66, RFC&nbsp;3986, January&nbsp;2005.</td></tr><tr><td class="reference"><b id="RFC5234">[RFC5234]</b></td><td class="top">Crocker, D., Ed. and P. Overell, &#8220;<a href="https://tools.ietf.org/html/rfc5234">Augmented BNF for Syntax Specifications: ABNF</a>&#8221;, STD&nbsp;68, RFC&nbsp;5234, January&nbsp;2008.</td></tr><tr><td class="reference"><b id="RFC7231">[RFC7231]</b></td><td class="top">Fielding, R., Ed. and J. Reschke, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc7231">Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</a>&#8221;, RFC&nbsp;7231, June&nbsp;2014.</td></tr><tr><td class="reference"><b id="RFC7232">[RFC7232]</b></td><td class="top">Fielding, R., Ed. and J. Reschke, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc7232">Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</a>&#8221;, RFC&nbsp;7232, June&nbsp;2014.</td></tr><tr><td class="reference"><b id="RFC7233">[RFC7233]</b></td><td class="top">Fielding, R., Ed., Lafon, Y., Ed., and J. Reschke, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc7233">Hypertext Transfer Protocol (HTTP/1.1): Range Requests</a>&#8221;, RFC&nbsp;7233, June&nbsp;2014.</td></tr><tr><td class="reference"><b id="RFC7234">[RFC7234]</b></td><td class="top">Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc7234">Hypertext Transfer Protocol (HTTP/1.1): Caching</a>&#8221;, RFC&nbsp;7234, June&nbsp;2014.</td></tr><tr><td class="reference"><b id="RFC7235">[RFC7235]</b></td><td class="top">Fielding, R., Ed. and J. Reschke, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc7235">Hypertext Transfer Protocol (HTTP/1.1): Authentication</a>&#8221;, RFC&nbsp;7235, June&nbsp;2014.</td></tr><tr><td class="reference"><b id="USASCII">[USASCII]</b></td><td class="top">American National Standards Institute, &#8220;Coded Character Set -- 7-bit American Standard Code for Information Interchange&#8221;, ANSI&nbsp;X3.4, 1986.</td></tr><tr><td class="reference"><b id="Welch">[Welch]</b></td><td class="top">Welch, T., &#8220;A Technique for High-Performance Data Compression&#8221;, IEEE Computer&nbsp;17(6), June&nbsp;1984.</td></tr></table><h2 id="rfc.references.2"><a href="#rfc.section.11.2" id="rfc.section.11.2">11.2</a> Informative References</h2><table><tr><td class="reference"><b id="BCP115">[BCP115]</b></td><td class="top">Hansen, T., Hardie, T., and L. Masinter, &#8220;<a href="https://tools.ietf.org/html/rfc4395">Guidelines and Registration Procedures for New URI Schemes</a>&#8221;, BCP&nbsp;115, RFC&nbsp;4395, February&nbsp;2006.</td></tr><tr><td class="reference"><b id="BCP13">[BCP13]</b></td><td class="top">Freed, N., Klensin, J., and T. Hansen, &#8220;<a href="https://tools.ietf.org/html/rfc6838">Media Type Specifications and Registration Procedures</a>&#8221;, BCP&nbsp;13, RFC&nbsp;6838, January&nbsp;2013.</td></tr><tr><td class="reference"><b id="BCP90">[BCP90]</b></td><td class="top">Klyne, G., Nottingham, M., and J. Mogul, &#8220;<a href="https://tools.ietf.org/html/rfc3864">Registration Procedures for Message Header Fields</a>&#8221;, BCP&nbsp;90, RFC&nbsp;3864, September&nbsp;2004.</td></tr><tr><td class="reference"><b id="Georgiev">[Georgiev]</b></td><td class="top">Georgiev, M., Iyengar, S., Jana, S., Anubhai, R., Boneh, D., and V. Shmatikov, &#8220;<a href="http://doi.acm.org/10.1145/2382196.2382204">The Most Dangerous Code in the World: Validating SSL Certificates in Non-browser Software</a>&#8221;, In Proceedings of the 2012 ACM Conference on Computer and Communications Security (CCS '12), pp. 38-49, October&nbsp;2012, &lt;<a href="http://doi.acm.org/10.1145/2382196.2382204">http://doi.acm.org/10.1145/2382196.2382204</a>&gt;.</td></tr><tr><td class="reference"><b id="ISO-8859-1">[ISO-8859-1]</b></td><td class="top">International Organization for Standardization, &#8220;Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1&#8221;, ISO/IEC&nbsp;8859-1:1998, 1998.</td></tr><tr><td class="reference"><b id="Klein">[Klein]</b></td><td class="top">Klein, A., &#8220;<a href="http://packetstormsecurity.com/papers/general/whitepaper_httpresponse.pdf">Divide and Conquer - HTTP Response Splitting, Web Cache Poisoning Attacks, and Related Topics</a>&#8221;, March&nbsp;2004, &lt;<a href="http://packetstormsecurity.com/papers/general/whitepaper_httpresponse.pdf">http://packetstormsecurity.com/papers/general/whitepaper_httpresponse.pdf</a>&gt;.</td></tr><tr><td class="reference"><b id="Kri2001">[Kri2001]</b></td><td class="top">Kristol, D., &#8220;<a href="http://arxiv.org/abs/cs.SE/0105018">HTTP Cookies: Standards, Privacy, and Politics</a>&#8221;, ACM Transactions on Internet Technology&nbsp;1(2), November&nbsp;2001, &lt;<a href="http://arxiv.org/abs/cs.SE/0105018">http://arxiv.org/abs/cs.SE/0105018</a>&gt;.</td></tr><tr><td class="reference"><b id="Linhart">[Linhart]</b></td><td class="top">Linhart, C., Klein, A., Heled, R., and S. Orrin, &#8220;<a href="http://www.watchfire.com/news/whitepapers.aspx">HTTP Request Smuggling</a>&#8221;, June&nbsp;2005, &lt;<a href="http://www.watchfire.com/news/whitepapers.aspx">http://www.watchfire.com/news/whitepapers.aspx</a>&gt;.</td></tr><tr><td class="reference"><b id="RFC1919">[RFC1919]</b></td><td class="top">Chatel, M., &#8220;<a href="https://tools.ietf.org/html/rfc1919">Classical versus Transparent IP Proxies</a>&#8221;, RFC&nbsp;1919, March&nbsp;1996.</td></tr><tr><td class="reference"><b id="RFC1945">[RFC1945]</b></td><td class="top">Berners-Lee, T., Fielding, R., and H. Nielsen, &#8220;<a href="https://tools.ietf.org/html/rfc1945">Hypertext Transfer Protocol -- HTTP/1.0</a>&#8221;, RFC&nbsp;1945, May&nbsp;1996.</td></tr><tr><td class="reference"><b id="RFC2045">[RFC2045]</b></td><td class="top">Freed, N. and N. Borenstein, &#8220;<a href="https://tools.ietf.org/html/rfc2045">Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</a>&#8221;, RFC&nbsp;2045, November&nbsp;1996.</td></tr><tr><td class="reference"><b id="RFC2047">[RFC2047]</b></td><td class="top">Moore, K., &#8220;<a href="https://tools.ietf.org/html/rfc2047">MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text</a>&#8221;, RFC&nbsp;2047, November&nbsp;1996.</td></tr><tr><td class="reference"><b id="RFC2068">[RFC2068]</b></td><td class="top">Fielding, R., Gettys, J., Mogul, J., Nielsen, H., and T. Berners-Lee, &#8220;<a href="https://tools.ietf.org/html/rfc2068">Hypertext Transfer Protocol -- HTTP/1.1</a>&#8221;, RFC&nbsp;2068, January&nbsp;1997.</td></tr><tr><td class="reference"><b id="RFC2145">[RFC2145]</b></td><td class="top">Mogul, J., Fielding, R., Gettys, J., and H. Nielsen, &#8220;<a href="https://tools.ietf.org/html/rfc2145">Use and Interpretation of HTTP Version Numbers</a>&#8221;, RFC&nbsp;2145, May&nbsp;1997.</td></tr><tr><td class="reference"><b id="RFC2616">[RFC2616]</b></td><td class="top">Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, &#8220;<a href="https://tools.ietf.org/html/rfc2616">Hypertext Transfer Protocol -- HTTP/1.1</a>&#8221;, RFC&nbsp;2616, June&nbsp;1999.</td></tr><tr><td class="reference"><b id="RFC2817">[RFC2817]</b></td><td class="top">Khare, R. and S. Lawrence, &#8220;<a href="https://tools.ietf.org/html/rfc2817">Upgrading to TLS Within HTTP/1.1</a>&#8221;, RFC&nbsp;2817, May&nbsp;2000.</td></tr><tr><td class="reference"><b id="RFC2818">[RFC2818]</b></td><td class="top">Rescorla, E., &#8220;<a href="https://tools.ietf.org/html/rfc2818">HTTP Over TLS</a>&#8221;, RFC&nbsp;2818, May&nbsp;2000.</td></tr><tr><td class="reference"><b id="RFC3040">[RFC3040]</b></td><td class="top">Cooper, I., Melve, I., and G. Tomlinson, &#8220;<a href="https://tools.ietf.org/html/rfc3040">Internet Web Replication and Caching Taxonomy</a>&#8221;, RFC&nbsp;3040, January&nbsp;2001.</td></tr><tr><td class="reference"><b id="RFC4033">[RFC4033]</b></td><td class="top">Arends, R., Austein, R., Larson, M., Massey, D., and S. Rose, &#8220;<a href="https://tools.ietf.org/html/rfc4033">DNS Security Introduction and Requirements</a>&#8221;, RFC&nbsp;4033, March&nbsp;2005.</td></tr><tr><td class="reference"><b id="RFC4559">[RFC4559]</b></td><td class="top">Jaganathan, K., Zhu, L., and J. Brezak, &#8220;<a href="https://tools.ietf.org/html/rfc4559">SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows</a>&#8221;, RFC&nbsp;4559, June&nbsp;2006.</td></tr><tr><td class="reference"><b id="RFC5226">[RFC5226]</b></td><td class="top">Narten, T. and H. Alvestrand, &#8220;<a href="https://tools.ietf.org/html/rfc5226">Guidelines for Writing an IANA Considerations Section in RFCs</a>&#8221;, BCP&nbsp;26, RFC&nbsp;5226, May&nbsp;2008.</td></tr><tr><td class="reference"><b id="RFC5246">[RFC5246]</b></td><td class="top">Dierks, T. and E. Rescorla, &#8220;<a href="https://tools.ietf.org/html/rfc5246">The Transport Layer Security (TLS) Protocol Version 1.2</a>&#8221;, RFC&nbsp;5246, August&nbsp;2008.</td></tr><tr><td class="reference"><b id="RFC5322">[RFC5322]</b></td><td class="top">Resnick, P., &#8220;<a href="https://tools.ietf.org/html/rfc5322">Internet Message Format</a>&#8221;, RFC&nbsp;5322, October&nbsp;2008.</td></tr><tr><td class="reference"><b id="RFC6265">[RFC6265]</b></td><td class="top">Barth, A., &#8220;<a href="https://tools.ietf.org/html/rfc6265">HTTP State Management Mechanism</a>&#8221;, RFC&nbsp;6265, April&nbsp;2011.</td></tr><tr><td class="reference"><b id="RFC6585">[RFC6585]</b></td><td class="top">Nottingham, M. and R. Fielding, &#8220;<a href="https://tools.ietf.org/html/rfc6585">Additional HTTP Status Codes</a>&#8221;, RFC&nbsp;6585, April&nbsp;2012.</td></tr></table><div id="compatibility"><h1 id="rfc.section.A" class="np"><a href="#rfc.section.A">A.</a>&nbsp;<a href="#compatibility">HTTP Version History</a></h1><div id="rfc.section.A.p.1"><p>HTTP has been in use since 1990. The first version, later referred to as HTTP/0.9, was a simple protocol for hypertext data transfer across the Internet, using only a single request method (GET) and no metadata. HTTP/1.0, as defined by <a href="#RFC1945" id="rfc.xref.RFC1945.3"><cite title="Hypertext Transfer Protocol -- HTTP/1.0">[RFC1945]</cite></a>, added a range of request methods and MIME-like messaging, allowing for metadata to be transferred and modifiers placed on the request/response semantics. However, HTTP/1.0 did not sufficiently take into consideration the effects of hierarchical proxies, caching, the need for persistent connections, or name-based virtual hosts. The proliferation of incompletely implemented applications calling themselves "HTTP/1.0" further necessitated a protocol version change in order for two communicating applications to determine each other's true capabilities.<a class="self" href="#rfc.section.A.p.1">&para;</a></p></div><div id="rfc.section.A.p.2"><p>HTTP/1.1 remains compatible with HTTP/1.0 by including more stringent requirements that enable reliable implementations, adding only those features that can either be safely ignored by an HTTP/1.0 recipient or only be sent when communicating with a party advertising conformance with HTTP/1.1.<a class="self" href="#rfc.section.A.p.2">&para;</a></p></div><div id="rfc.section.A.p.3"><p>HTTP/1.1 has been designed to make supporting previous versions easy. A general-purpose HTTP/1.1 server ought to be able to understand any valid request in the format of HTTP/1.0, responding appropriately with an HTTP/1.1 message that only uses features understood (or safely ignored) by HTTP/1.0 clients. Likewise, an HTTP/1.1 client can be expected to understand any valid HTTP/1.0 response.<a class="self" href="#rfc.section.A.p.3">&para;</a></p></div><div id="rfc.section.A.p.4"><p>Since HTTP/0.9 did not support header fields in a request, there is no mechanism for it to support name-based virtual hosts (selection of resource by inspection of the <a href="#header.host" class="smpl">Host</a> header field). Any server that implements name-based virtual hosts ought to disable support for HTTP/0.9. Most requests that appear to be HTTP/0.9 are, in fact, badly constructed HTTP/1.x requests caused by a client failing to properly encode the request-target.<a class="self" href="#rfc.section.A.p.4">&para;</a></p></div><div id="changes.from.1.0"><h2 id="rfc.section.A.1"><a href="#rfc.section.A.1">A.1</a>&nbsp;<a href="#changes.from.1.0">Changes from HTTP/1.0</a></h2><div id="rfc.section.A.1.p.1"><p>This section summarizes major differences between versions HTTP/1.0 and HTTP/1.1.<a class="self" href="#rfc.section.A.1.p.1">&para;</a></p></div><div id="changes.to.simplify.multihomed.web.servers.and.conserve.ip.addresses"><h3 id="rfc.section.A.1.1"><a href="#rfc.section.A.1.1">A.1.1</a>&nbsp;<a href="#changes.to.simplify.multihomed.web.servers.and.conserve.ip.addresses">Multihomed Web Servers</a></h3><div id="rfc.section.A.1.1.p.1"><p>The requirements that clients and servers support the <a href="#header.host" class="smpl">Host</a> header field (<a href="#header.host" id="rfc.xref.header.host.3" title="Host">Section&nbsp;5.4</a>), report an error if it is missing from an HTTP/1.1 request, and accept absolute URIs (<a href="#request-target" title="Request Target">Section&nbsp;5.3</a>) are among the most important changes defined by HTTP/1.1.<a class="self" href="#rfc.section.A.1.1.p.1">&para;</a></p></div><div id="rfc.section.A.1.1.p.2"><p>Older HTTP/1.0 clients assumed a one-to-one relationship of IP addresses and servers; there was no other established mechanism for distinguishing the intended server of a request than the IP address to which that request was directed. The <a href="#header.host" class="smpl">Host</a> header field was introduced during the development of HTTP/1.1 and, though it was quickly implemented by most HTTP/1.0 browsers, additional requirements were placed on all HTTP/1.1 requests in order to ensure complete adoption. At the time of this writing, most HTTP-based services are dependent upon the Host header field for targeting requests.<a class="self" href="#rfc.section.A.1.1.p.2">&para;</a></p></div></div><div id="compatibility.with.http.1.0.persistent.connections"><h3 id="rfc.section.A.1.2"><a href="#rfc.section.A.1.2">A.1.2</a>&nbsp;<a href="#compatibility.with.http.1.0.persistent.connections">Keep-Alive Connections</a></h3><div id="rfc.section.A.1.2.p.1"><p>In HTTP/1.0, each connection is established by the client prior to the request and closed by the server after sending the response. However, some implementations implement the explicitly negotiated ("Keep-Alive") version of persistent connections described in <a href="https://tools.ietf.org/html/rfc2068#section-19.7.1">Section 19.7.1</a> of <a href="#RFC2068" id="rfc.xref.RFC2068.4"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2068]</cite></a>.<a class="self" href="#rfc.section.A.1.2.p.1">&para;</a></p></div><div id="rfc.section.A.1.2.p.2"><p>Some clients and servers might wish to be compatible with these previous approaches to persistent connections, by explicitly negotiating for them with a "Connection: keep-alive" request header field. However, some experimental implementations of HTTP/1.0 persistent connections are faulty; for example, if an HTTP/1.0 proxy server doesn't understand <a href="#header.connection" class="smpl">Connection</a>, it will erroneously forward that header field to the next inbound server, which would result in a hung connection.<a class="self" href="#rfc.section.A.1.2.p.2">&para;</a></p></div><div id="rfc.section.A.1.2.p.3"><p>One attempted solution was the introduction of a Proxy-Connection header field, targeted specifically at proxies. In practice, this was also unworkable, because proxies are often deployed in multiple layers, bringing about the same problem discussed above.<a class="self" href="#rfc.section.A.1.2.p.3">&para;</a></p></div><div id="rfc.section.A.1.2.p.4"><p>As a result, clients are encouraged not to send the Proxy-Connection header field in any requests.<a class="self" href="#rfc.section.A.1.2.p.4">&para;</a></p></div><div id="rfc.section.A.1.2.p.5"><p>Clients are also encouraged to consider the use of Connection: keep-alive in requests carefully; while they can enable persistent connections with HTTP/1.0 servers, clients using them will need to monitor the connection for "hung" requests (which indicate that the client ought stop sending the header field), and this mechanism ought not be used by clients at all when a proxy is being used.<a class="self" href="#rfc.section.A.1.2.p.5">&para;</a></p></div></div><div id="introduction.of.transfer-encoding"><h3 id="rfc.section.A.1.3"><a href="#rfc.section.A.1.3">A.1.3</a>&nbsp;<a href="#introduction.of.transfer-encoding">Introduction of Transfer-Encoding</a></h3><div id="rfc.section.A.1.3.p.1"><p>HTTP/1.1 introduces the <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> header field (<a href="#header.transfer-encoding" id="rfc.xref.header.transfer-encoding.4" title="Transfer-Encoding">Section&nbsp;3.3.1</a>). Transfer codings need to be decoded prior to forwarding an HTTP message over a MIME-compliant protocol.<a class="self" href="#rfc.section.A.1.3.p.1">&para;</a></p></div></div></div><div id="changes.from.rfc.2616"><h2 id="rfc.section.A.2"><a href="#rfc.section.A.2">A.2</a>&nbsp;<a href="#changes.from.rfc.2616">Changes from RFC 2616</a></h2><div id="rfc.section.A.2.p.1"><p>HTTP's approach to error handling has been explained. (<a href="#conformance" title="Conformance and Error Handling">Section&nbsp;2.5</a>)<a class="self" href="#rfc.section.A.2.p.1">&para;</a></p></div><div id="rfc.section.A.2.p.2"><p>The HTTP-version ABNF production has been clarified to be case-sensitive. Additionally, version numbers have been restricted to single digits, due to the fact that implementations are known to handle multi-digit version numbers incorrectly. (<a href="#http.version" title="Protocol Versioning">Section&nbsp;2.6</a>)<a class="self" href="#rfc.section.A.2.p.2">&para;</a></p></div><div id="rfc.section.A.2.p.3"><p>Userinfo (i.e., username and password) are now disallowed in HTTP and HTTPS URIs, because of security issues related to their transmission on the wire. (<a href="#http.uri" title="http URI Scheme">Section&nbsp;2.7.1</a>)<a class="self" href="#rfc.section.A.2.p.3">&para;</a></p></div><div id="rfc.section.A.2.p.4"><p>The HTTPS URI scheme is now defined by this specification; previously, it was done in <a href="https://tools.ietf.org/html/rfc2818#section-2.4">Section 2.4</a> of <a href="#RFC2818" id="rfc.xref.RFC2818.4"><cite title="HTTP Over TLS">[RFC2818]</cite></a>. Furthermore, it implies end-to-end security. (<a href="#https.uri" title="https URI Scheme">Section&nbsp;2.7.2</a>)<a class="self" href="#rfc.section.A.2.p.4">&para;</a></p></div><div id="rfc.section.A.2.p.5"><p>HTTP messages can be (and often are) buffered by implementations; despite it sometimes being available as a stream, HTTP is fundamentally a message-oriented protocol. Minimum supported sizes for various protocol elements have been suggested, to improve interoperability. (<a href="#http.message" title="Message Format">Section&nbsp;3</a>)<a class="self" href="#rfc.section.A.2.p.5">&para;</a></p></div><div id="rfc.section.A.2.p.6"><p>Invalid whitespace around field-names is now required to be rejected, because accepting it represents a security vulnerability. The ABNF productions defining header fields now only list the field value. (<a href="#header.fields" title="Header Fields">Section&nbsp;3.2</a>)<a class="self" href="#rfc.section.A.2.p.6">&para;</a></p></div><div id="rfc.section.A.2.p.7"><p>Rules about implicit linear whitespace between certain grammar productions have been removed; now whitespace is only allowed where specifically defined in the ABNF. (<a href="#whitespace" title="Whitespace">Section&nbsp;3.2.3</a>)<a class="self" href="#rfc.section.A.2.p.7">&para;</a></p></div><div id="rfc.section.A.2.p.8"><p>Header fields that span multiple lines ("line folding") are deprecated. (<a href="#field.parsing" title="Field Parsing">Section&nbsp;3.2.4</a>)<a class="self" href="#rfc.section.A.2.p.8">&para;</a></p></div><div id="rfc.section.A.2.p.9"><p>The NUL octet is no longer allowed in comment and quoted-string text, and handling of backslash-escaping in them has been clarified. The quoted-pair rule no longer allows escaping control characters other than HTAB. Non-US-ASCII content in header fields and the reason phrase has been obsoleted and made opaque (the TEXT rule was removed). (<a href="#field.components" title="Field Value Components">Section&nbsp;3.2.6</a>)<a class="self" href="#rfc.section.A.2.p.9">&para;</a></p></div><div id="rfc.section.A.2.p.10"><p>Bogus <a href="#header.content-length" class="smpl">Content-Length</a> header fields are now required to be handled as errors by recipients. (<a href="#header.content-length" id="rfc.xref.header.content-length.2" title="Content-Length">Section&nbsp;3.3.2</a>)<a class="self" href="#rfc.section.A.2.p.10">&para;</a></p></div><div id="rfc.section.A.2.p.11"><p>The algorithm for determining the message body length has been clarified to indicate all of the special cases (e.g., driven by methods or status codes) that affect it, and that new protocol elements cannot define such special cases. CONNECT is a new, special case in determining message body length. "multipart/byteranges" is no longer a way of determining message body length detection. (<a href="#message.body.length" title="Message Body Length">Section&nbsp;3.3.3</a>)<a class="self" href="#rfc.section.A.2.p.11">&para;</a></p></div><div id="rfc.section.A.2.p.12"><p>The "identity" transfer coding token has been removed. (Sections <a href="#message.body" title="Message Body">3.3</a> and <a href="#transfer.codings" title="Transfer Codings">4</a>)<a class="self" href="#rfc.section.A.2.p.12">&para;</a></p></div><div id="rfc.section.A.2.p.13"><p>Chunk length does not include the count of the octets in the chunk header and trailer. Line folding in chunk extensions is disallowed. (<a href="#chunked.encoding" title="Chunked Transfer Coding">Section&nbsp;4.1</a>)<a class="self" href="#rfc.section.A.2.p.13">&para;</a></p></div><div id="rfc.section.A.2.p.14"><p>The meaning of the "deflate" content coding has been clarified. (<a href="#deflate.coding" title="Deflate Coding">Section&nbsp;4.2.2</a>)<a class="self" href="#rfc.section.A.2.p.14">&para;</a></p></div><div id="rfc.section.A.2.p.15"><p>The segment + query components of RFC 3986 have been used to define the request-target, instead of abs_path from RFC 1808. The asterisk-form of the request-target is only allowed with the OPTIONS method. (<a href="#request-target" title="Request Target">Section&nbsp;5.3</a>)<a class="self" href="#rfc.section.A.2.p.15">&para;</a></p></div><div id="rfc.section.A.2.p.16"><p>The term "Effective Request URI" has been introduced. (<a href="#effective.request.uri" title="Effective Request URI">Section&nbsp;5.5</a>)<a class="self" href="#rfc.section.A.2.p.16">&para;</a></p></div><div id="rfc.section.A.2.p.17"><p>Gateways do not need to generate <a href="#header.via" class="smpl">Via</a> header fields anymore. (<a href="#header.via" id="rfc.xref.header.via.2" title="Via">Section&nbsp;5.7.1</a>)<a class="self" href="#rfc.section.A.2.p.17">&para;</a></p></div><div id="rfc.section.A.2.p.18"><p>Exactly when "close" connection options have to be sent has been clarified. Also, "hop-by-hop" header fields are required to appear in the Connection header field; just because they're defined as hop-by-hop in this specification doesn't exempt them. (<a href="#header.connection" id="rfc.xref.header.connection.8" title="Connection">Section&nbsp;6.1</a>)<a class="self" href="#rfc.section.A.2.p.18">&para;</a></p></div><div id="rfc.section.A.2.p.19"><p>The limit of two connections per server has been removed. An idempotent sequence of requests is no longer required to be retried. The requirement to retry requests under certain circumstances when the server prematurely closes the connection has been removed. Also, some extraneous requirements about when servers are allowed to close connections prematurely have been removed. (<a href="#persistent.connections" title="Persistence">Section&nbsp;6.3</a>)<a class="self" href="#rfc.section.A.2.p.19">&para;</a></p></div><div id="rfc.section.A.2.p.20"><p>The semantics of the <a href="#header.upgrade" class="smpl">Upgrade</a> header field is now defined in responses other than 101 (this was incorporated from <a href="#RFC2817" id="rfc.xref.RFC2817.3"><cite title="Upgrading to TLS Within HTTP/1.1">[RFC2817]</cite></a>). Furthermore, the ordering in the field value is now significant. (<a href="#header.upgrade" id="rfc.xref.header.upgrade.3" title="Upgrade">Section&nbsp;6.7</a>)<a class="self" href="#rfc.section.A.2.p.20">&para;</a></p></div><div id="rfc.section.A.2.p.21"><p>Empty list elements in list productions (e.g., a list header field containing ", ,") have been deprecated. (<a href="#abnf.extension" title="ABNF List Extension: #rule">Section&nbsp;7</a>)<a class="self" href="#rfc.section.A.2.p.21">&para;</a></p></div><div id="rfc.section.A.2.p.22"><p>Registration of Transfer Codings now requires IETF Review (<a href="#transfer.coding.registry" title="Transfer Coding Registry">Section&nbsp;8.4</a>)<a class="self" href="#rfc.section.A.2.p.22">&para;</a></p></div><div id="rfc.section.A.2.p.23"><p>This specification now defines the Upgrade Token Registry, previously defined in <a href="https://tools.ietf.org/html/rfc2817#section-7.2">Section 7.2</a> of <a href="#RFC2817" id="rfc.xref.RFC2817.4"><cite title="Upgrading to TLS Within HTTP/1.1">[RFC2817]</cite></a>. (<a href="#upgrade.token.registry" title="Upgrade Token Registry">Section&nbsp;8.6</a>)<a class="self" href="#rfc.section.A.2.p.23">&para;</a></p></div><div id="rfc.section.A.2.p.24"><p>The expectation to support HTTP/0.9 requests has been removed. (<a href="#compatibility" title="HTTP Version History">Appendix&nbsp;A</a>)<a class="self" href="#rfc.section.A.2.p.24">&para;</a></p></div><div id="rfc.section.A.2.p.25"><p>Issues with the Keep-Alive and Proxy-Connection header fields in requests are pointed out, with use of the latter being discouraged altogether. (<a href="#compatibility.with.http.1.0.persistent.connections" title="Keep-Alive Connections">Appendix&nbsp;A.1.2</a>)<a class="self" href="#rfc.section.A.2.p.25">&para;</a></p></div></div></div><div id="collected.abnf"><h1 id="rfc.section.B"><a href="#rfc.section.B">B.</a>&nbsp;<a href="#collected.abnf">Collected ABNF</a></h1><div id="rfc.figure.u.72"><pre class="inline"><a href="#rule.whitespace" class="smpl">BWS</a> = OWS 
     736</pre></div><div id="rfc.section.7.p.7"><p><a href="#collected.abnf" title="Collected ABNF">Appendix&nbsp;B</a> shows the collected ABNF for recipients after the list constructs have been expanded.<a class="self" href="#rfc.section.7.p.7">&para;</a></p></div></div><div id="IANA.considerations"><h1 id="rfc.section.8"><a href="#rfc.section.8">8.</a>&nbsp;<a href="#IANA.considerations">IANA Considerations</a></h1><div id="header.field.registration"><h2 id="rfc.section.8.1"><a href="#rfc.section.8.1">8.1</a>&nbsp;<a href="#header.field.registration">Header Field Registration</a></h2><div id="rfc.section.8.1.p.1"><p>HTTP header fields are registered within the "Message Headers" registry maintained at &lt;<a href="http://www.iana.org/assignments/message-headers/">http://www.iana.org/assignments/message-headers/</a>&gt;.<a class="self" href="#rfc.section.8.1.p.1">&para;</a></p></div><div id="rfc.section.8.1.p.2"><p>This document defines the following HTTP header fields, so the "Permanent Message Header Field Names" registry has been updated accordingly (see <a href="#BCP90" id="rfc.xref.BCP90.1"><cite title="Registration Procedures for Message Header Fields">[BCP90]</cite></a>).<a class="self" href="#rfc.section.8.1.p.2">&para;</a></p></div><div id="rfc.table.1"><div id="iana.header.registration.table"></div><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Header Field Name</th><th>Protocol</th><th>Status</th><th>Reference</th></tr></thead><tbody><tr><td class="left">Connection</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.connection" id="rfc.xref.header.connection.6" title="Connection">Section&nbsp;6.1</a> </td></tr><tr><td class="left">Content-Length</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.content-length" id="rfc.xref.header.content-length.1" title="Content-Length">Section&nbsp;3.3.2</a> </td></tr><tr><td class="left">Host</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.host" id="rfc.xref.header.host.2" title="Host">Section&nbsp;5.4</a> </td></tr><tr><td class="left">TE</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.te" id="rfc.xref.header.te.3" title="TE">Section&nbsp;4.3</a> </td></tr><tr><td class="left">Trailer</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.trailer" id="rfc.xref.header.trailer.1" title="Trailer">Section&nbsp;4.4</a> </td></tr><tr><td class="left">Transfer-Encoding</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.transfer-encoding" id="rfc.xref.header.transfer-encoding.3" title="Transfer-Encoding">Section&nbsp;3.3.1</a> </td></tr><tr><td class="left">Upgrade</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.upgrade" id="rfc.xref.header.upgrade.2" title="Upgrade">Section&nbsp;6.7</a> </td></tr><tr><td class="left">Via</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.via" id="rfc.xref.header.via.1" title="Via">Section&nbsp;5.7.1</a> </td></tr></tbody></table></div><div id="rfc.section.8.1.p.3"><p>Furthermore, the header field-name "Close" has been registered as "reserved", since using that name as an HTTP header field might conflict with the "close" connection option of the <a href="#header.connection" class="smpl">Connection</a> header field (<a href="#header.connection" id="rfc.xref.header.connection.7" title="Connection">Section&nbsp;6.1</a>).<a class="self" href="#rfc.section.8.1.p.3">&para;</a></p></div><div id="rfc.table.u.1"><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Header Field Name</th><th>Protocol</th><th>Status</th><th>Reference</th></tr></thead><tbody><tr><td class="left">Close</td><td class="left">http</td><td class="left">reserved</td><td class="left"><a href="#header.field.registration" title="Header Field Registration">Section&nbsp;8.1</a> </td></tr></tbody></table></div><div id="rfc.section.8.1.p.4"><p>The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".<a class="self" href="#rfc.section.8.1.p.4">&para;</a></p></div></div><div id="uri.scheme.registration"><h2 id="rfc.section.8.2"><a href="#rfc.section.8.2">8.2</a>&nbsp;<a href="#uri.scheme.registration">URI Scheme Registration</a></h2><div id="rfc.section.8.2.p.1"><p>IANA maintains the registry of URI Schemes <a href="#BCP115" id="rfc.xref.BCP115.1"><cite title="Guidelines and Registration Procedures for New URI Schemes">[BCP115]</cite></a> at &lt;<a href="http://www.iana.org/assignments/uri-schemes/">http://www.iana.org/assignments/uri-schemes/</a>&gt;.<a class="self" href="#rfc.section.8.2.p.1">&para;</a></p></div><div id="rfc.section.8.2.p.2"><p>This document defines the following URI schemes, so the "Permanent URI Schemes" registry has been updated accordingly.<a class="self" href="#rfc.section.8.2.p.2">&para;</a></p></div><div id="rfc.table.u.2"><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>URI Scheme</th><th>Description</th><th>Reference</th></tr></thead><tbody><tr><td class="left">http</td><td class="left">Hypertext Transfer Protocol</td><td class="left"><a href="#http.uri" title="http URI Scheme">Section&nbsp;2.7.1</a></td></tr><tr><td class="left">https</td><td class="left">Hypertext Transfer Protocol Secure</td><td class="left"><a href="#https.uri" title="https URI Scheme">Section&nbsp;2.7.2</a></td></tr></tbody></table></div></div><div id="internet.media.type.http"><h2 id="rfc.section.8.3"><a href="#rfc.section.8.3">8.3</a>&nbsp;<a href="#internet.media.type.http">Internet Media Type Registration</a></h2><div id="rfc.section.8.3.p.1"><p>IANA maintains the registry of Internet media types <a href="#BCP13" id="rfc.xref.BCP13.1"><cite title="Media Type Specifications and Registration Procedures">[BCP13]</cite></a> at &lt;<a href="http://www.iana.org/assignments/media-types">http://www.iana.org/assignments/media-types</a>&gt;.<a class="self" href="#rfc.section.8.3.p.1">&para;</a></p></div><div id="rfc.section.8.3.p.2"><p>This document serves as the specification for the Internet media types "message/http" and "application/http". The following has been registered with IANA.<a class="self" href="#rfc.section.8.3.p.2">&para;</a></p></div><div id="internet.media.type.message.http"><h3 id="rfc.section.8.3.1"><a href="#rfc.section.8.3.1">8.3.1</a>&nbsp;<a href="#internet.media.type.message.http">Internet Media Type message/http</a></h3><div id="rfc.section.8.3.1.p.1"><p>The message/http type can be used to enclose a single HTTP request or response message, provided that it obeys the MIME restrictions for all "message" types regarding line length and encodings.<a class="self" href="#rfc.section.8.3.1.p.1">&para;</a></p></div><div id="rfc.section.8.3.1.p.2"><dl><dt>Type name:</dt><dd>message</dd><dt>Subtype name:</dt><dd>http</dd><dt>Required parameters:</dt><dd>N/A</dd><dt>Optional parameters:</dt><dd>version, msgtype <dl><dt>version:</dt><dd>The HTTP-version number of the enclosed message (e.g., "1.1"). If not present, the version can be determined from the first line of the body.</dd><dt>msgtype:</dt><dd>The message type &#8212; "request" or "response". If not present, the type can be determined from the first line of the body.</dd></dl> </dd><dt>Encoding considerations:</dt><dd>only "7bit", "8bit", or "binary" are permitted</dd><dt>Security considerations:</dt><dd>see <a href="#security.considerations" title="Security Considerations">Section&nbsp;9</a> </dd><dt>Interoperability considerations:</dt><dd>N/A</dd><dt>Published specification:</dt><dd>This specification (see <a href="#internet.media.type.message.http" title="Internet Media Type message/http">Section&nbsp;8.3.1</a>).</dd><dt>Applications that use this media type:</dt><dd>N/A</dd><dt>Fragment identifier considerations:</dt><dd>N/A</dd><dt>Additional information:</dt><dd>&nbsp;<dl><dt>Magic number(s):</dt><dd>N/A</dd><dt>Deprecated alias names for this type:</dt><dd>N/A</dd><dt>File extension(s):</dt><dd>N/A</dd><dt>Macintosh file type code(s):</dt><dd>N/A</dd></dl> </dd><dt>Person and email address to contact for further information:</dt><dd>See&nbsp;Authors'&nbsp;Addresses section.</dd><dt>Intended usage:</dt><dd>COMMON</dd><dt>Restrictions on usage:</dt><dd>N/A</dd><dt>Author:</dt><dd>See Authors' Addresses section.</dd><dt>Change controller:</dt><dd>IESG</dd></dl></div></div><div id="internet.media.type.application.http"><h3 id="rfc.section.8.3.2"><a href="#rfc.section.8.3.2">8.3.2</a>&nbsp;<a href="#internet.media.type.application.http">Internet Media Type application/http</a></h3><div id="rfc.section.8.3.2.p.1"><p>The application/http type can be used to enclose a pipeline of one or more HTTP request or response messages (not intermixed).<a class="self" href="#rfc.section.8.3.2.p.1">&para;</a></p></div><div id="rfc.section.8.3.2.p.2"><dl><dt>Type name:</dt><dd>application</dd><dt>Subtype name:</dt><dd>http</dd><dt>Required parameters:</dt><dd>N/A</dd><dt>Optional parameters:</dt><dd>version, msgtype <dl><dt>version:</dt><dd>The HTTP-version number of the enclosed messages (e.g., "1.1"). If not present, the version can be determined from the first line of the body.</dd><dt>msgtype:</dt><dd>The message type &#8212; "request" or "response". If not present, the type can be determined from the first line of the body.</dd></dl> </dd><dt>Encoding considerations:</dt><dd>HTTP messages enclosed by this type are in "binary" format; use of an appropriate Content-Transfer-Encoding is required when transmitted via email.</dd><dt>Security considerations:</dt><dd>see <a href="#security.considerations" title="Security Considerations">Section&nbsp;9</a> </dd><dt>Interoperability considerations:</dt><dd>N/A</dd><dt>Published specification:</dt><dd>This specification (see <a href="#internet.media.type.application.http" title="Internet Media Type application/http">Section&nbsp;8.3.2</a>).</dd><dt>Applications that use this media type:</dt><dd>N/A</dd><dt>Fragment identifier considerations:</dt><dd>N/A</dd><dt>Additional information:</dt><dd>&nbsp;<dl><dt>Deprecated alias names for this type:</dt><dd>N/A</dd><dt>Magic number(s):</dt><dd>N/A</dd><dt>File extension(s):</dt><dd>N/A</dd><dt>Macintosh file type code(s):</dt><dd>N/A</dd></dl> </dd><dt>Person and email address to contact for further information:</dt><dd>See&nbsp;Authors'&nbsp;Addresses section.</dd><dt>Intended usage:</dt><dd>COMMON</dd><dt>Restrictions on usage:</dt><dd>N/A</dd><dt>Author:</dt><dd>See Authors' Addresses section.</dd><dt>Change controller:</dt><dd>IESG</dd></dl></div></div></div><div id="transfer.coding.registry"><h2 id="rfc.section.8.4"><a href="#rfc.section.8.4">8.4</a>&nbsp;<a href="#transfer.coding.registry">Transfer Coding Registry</a></h2><div id="rfc.section.8.4.p.1"><p>The "HTTP Transfer Coding Registry" defines the namespace for transfer coding names. It is maintained at &lt;<a href="http://www.iana.org/assignments/http-parameters">http://www.iana.org/assignments/http-parameters</a>&gt;.<a class="self" href="#rfc.section.8.4.p.1">&para;</a></p></div><div id="transfer.coding.registry.procedure"><h3 id="rfc.section.8.4.1"><a href="#rfc.section.8.4.1">8.4.1</a>&nbsp;<a href="#transfer.coding.registry.procedure">Procedure</a></h3><div id="rfc.section.8.4.1.p.1"><p>Registrations <em class="bcp14">MUST</em> include the following fields: <a class="self" href="#rfc.section.8.4.1.p.1">&para;</a></p><ul><li>Name</li><li>Description</li><li>Pointer to specification text</li></ul></div><div id="rfc.section.8.4.1.p.2"><p>Names of transfer codings <em class="bcp14">MUST NOT</em> overlap with names of content codings (<a href="rfc7231.html#content.codings" title="Content Codings">Section 3.1.2.1</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.33"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>) unless the encoding transformation is identical, as is the case for the compression codings defined in <a href="#compression.codings" title="Compression Codings">Section&nbsp;4.2</a>.<a class="self" href="#rfc.section.8.4.1.p.2">&para;</a></p></div><div id="rfc.section.8.4.1.p.3"><p>Values to be added to this namespace require IETF Review (see <a href="https://tools.ietf.org/html/rfc5226#section-4.1">Section 4.1</a> of <a href="#RFC5226" id="rfc.xref.RFC5226.1"><cite title="Guidelines for Writing an IANA Considerations Section in RFCs">[RFC5226]</cite></a>), and <em class="bcp14">MUST</em> conform to the purpose of transfer coding defined in this specification.<a class="self" href="#rfc.section.8.4.1.p.3">&para;</a></p></div><div id="rfc.section.8.4.1.p.4"><p>Use of program names for the identification of encoding formats is not desirable and is discouraged for future encodings.<a class="self" href="#rfc.section.8.4.1.p.4">&para;</a></p></div></div><div id="transfer.coding.registration"><h3 id="rfc.section.8.4.2"><a href="#rfc.section.8.4.2">8.4.2</a>&nbsp;<a href="#transfer.coding.registration">Registration</a></h3><div id="rfc.section.8.4.2.p.1" class="avoidbreakafter"><p>The "HTTP Transfer Coding Registry" has been updated with the registrations below:<a class="self" href="#rfc.section.8.4.2.p.1">&para;</a></p></div><div id="rfc.table.2"><div id="iana.transfer.coding.registration.table"></div><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Name</th><th>Description</th><th>Reference</th></tr></thead><tbody><tr><td class="left">chunked</td><td class="left">Transfer in a series of chunks</td><td class="left"><a href="#chunked.encoding" title="Chunked Transfer Coding">Section&nbsp;4.1</a> </td></tr><tr><td class="left">compress</td><td class="left">UNIX "compress" data format <a href="#Welch" id="rfc.xref.Welch.2"><cite title="A Technique for High-Performance Data Compression">[Welch]</cite></a></td><td class="left"><a href="#compress.coding" title="Compress Coding">Section&nbsp;4.2.1</a> </td></tr><tr><td class="left">deflate</td><td class="left">"deflate" compressed data (<a href="#RFC1951" id="rfc.xref.RFC1951.2"><cite title="DEFLATE Compressed Data Format Specification version 1.3">[RFC1951]</cite></a>) inside the "zlib" data format (<a href="#RFC1950" id="rfc.xref.RFC1950.2"><cite title="ZLIB Compressed Data Format Specification version 3.3">[RFC1950]</cite></a>)</td><td class="left"><a href="#deflate.coding" title="Deflate Coding">Section&nbsp;4.2.2</a> </td></tr><tr><td class="left">gzip</td><td class="left">GZIP file format <a href="#RFC1952" id="rfc.xref.RFC1952.2"><cite title="GZIP file format specification version 4.3">[RFC1952]</cite></a></td><td class="left"><a href="#gzip.coding" title="Gzip Coding">Section&nbsp;4.2.3</a> </td></tr><tr><td class="left">x-compress</td><td class="left">Deprecated (alias for compress)</td><td class="left"><a href="#compress.coding" title="Compress Coding">Section&nbsp;4.2.1</a> </td></tr><tr><td class="left">x-gzip</td><td class="left">Deprecated (alias for gzip)</td><td class="left"><a href="#gzip.coding" title="Gzip Coding">Section&nbsp;4.2.3</a> </td></tr></tbody></table></div></div></div><div id="content.coding.registration"><h2 id="rfc.section.8.5"><a href="#rfc.section.8.5">8.5</a>&nbsp;<a href="#content.coding.registration">Content Coding Registration</a></h2><div id="rfc.section.8.5.p.1"><p>IANA maintains the "HTTP Content Coding Registry" at &lt;<a href="http://www.iana.org/assignments/http-parameters">http://www.iana.org/assignments/http-parameters</a>&gt;.<a class="self" href="#rfc.section.8.5.p.1">&para;</a></p></div><div id="rfc.section.8.5.p.2" class="avoidbreakafter"><p>The "HTTP Content Coding Registry" has been updated with the registrations below:<a class="self" href="#rfc.section.8.5.p.2">&para;</a></p></div><div id="rfc.table.3"><div id="iana.content.coding.registration.table"></div><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Name</th><th>Description</th><th>Reference</th></tr></thead><tbody><tr><td class="left">compress</td><td class="left">UNIX "compress" data format <a href="#Welch" id="rfc.xref.Welch.3"><cite title="A Technique for High-Performance Data Compression">[Welch]</cite></a></td><td class="left"><a href="#compress.coding" title="Compress Coding">Section&nbsp;4.2.1</a> </td></tr><tr><td class="left">deflate</td><td class="left">"deflate" compressed data (<a href="#RFC1951" id="rfc.xref.RFC1951.3"><cite title="DEFLATE Compressed Data Format Specification version 1.3">[RFC1951]</cite></a>) inside the "zlib" data format (<a href="#RFC1950" id="rfc.xref.RFC1950.3"><cite title="ZLIB Compressed Data Format Specification version 3.3">[RFC1950]</cite></a>)</td><td class="left"><a href="#deflate.coding" title="Deflate Coding">Section&nbsp;4.2.2</a> </td></tr><tr><td class="left">gzip</td><td class="left">GZIP file format <a href="#RFC1952" id="rfc.xref.RFC1952.3"><cite title="GZIP file format specification version 4.3">[RFC1952]</cite></a></td><td class="left"><a href="#gzip.coding" title="Gzip Coding">Section&nbsp;4.2.3</a> </td></tr><tr><td class="left">x-compress</td><td class="left">Deprecated (alias for compress)</td><td class="left"><a href="#compress.coding" title="Compress Coding">Section&nbsp;4.2.1</a> </td></tr><tr><td class="left">x-gzip</td><td class="left">Deprecated (alias for gzip)</td><td class="left"><a href="#gzip.coding" title="Gzip Coding">Section&nbsp;4.2.3</a> </td></tr></tbody></table></div></div><div id="upgrade.token.registry"><h2 id="rfc.section.8.6"><a href="#rfc.section.8.6">8.6</a>&nbsp;<a href="#upgrade.token.registry">Upgrade Token Registry</a></h2><div id="rfc.section.8.6.p.1"><p>The "Hypertext Transfer Protocol (HTTP) Upgrade Token Registry" defines the namespace for protocol-name tokens used to identify protocols in the <a href="#header.upgrade" class="smpl">Upgrade</a> header field. The registry is maintained at &lt;<a href="http://www.iana.org/assignments/http-upgrade-tokens">http://www.iana.org/assignments/http-upgrade-tokens</a>&gt;.<a class="self" href="#rfc.section.8.6.p.1">&para;</a></p></div><div id="upgrade.token.registry.procedure"><h3 id="rfc.section.8.6.1"><a href="#rfc.section.8.6.1">8.6.1</a>&nbsp;<a href="#upgrade.token.registry.procedure">Procedure</a></h3><div id="rfc.section.8.6.1.p.1"><p>Each registered protocol name is associated with contact information and an optional set of specifications that details how the connection will be processed after it has been upgraded.<a class="self" href="#rfc.section.8.6.1.p.1">&para;</a></p></div><div id="rfc.section.8.6.1.p.2"><p>Registrations happen on a "First Come First Served" basis (see <a href="https://tools.ietf.org/html/rfc5226#section-4.1">Section 4.1</a> of <a href="#RFC5226" id="rfc.xref.RFC5226.2"><cite title="Guidelines for Writing an IANA Considerations Section in RFCs">[RFC5226]</cite></a>) and are subject to the following rules: <a class="self" href="#rfc.section.8.6.1.p.2">&para;</a></p><ol><li>A protocol-name token, once registered, stays registered forever.</li><li>The registration <em class="bcp14">MUST</em> name a responsible party for the registration.</li><li>The registration <em class="bcp14">MUST</em> name a point of contact.</li><li>The registration <em class="bcp14">MAY</em> name a set of specifications associated with that token. Such specifications need not be publicly available.</li><li>The registration <em class="bcp14">SHOULD</em> name a set of expected "protocol-version" tokens associated with that token at the time of registration.</li><li>The responsible party <em class="bcp14">MAY</em> change the registration at any time. The IANA will keep a record of all such changes, and make them available upon request.</li><li>The IESG <em class="bcp14">MAY</em> reassign responsibility for a protocol token. This will normally only be used in the case when a responsible party cannot be contacted.</li></ol></div><div id="rfc.section.8.6.1.p.3"><p>This registration procedure for HTTP Upgrade Tokens replaces that previously defined in <a href="https://tools.ietf.org/html/rfc2817#section-7.2">Section 7.2</a> of <a href="#RFC2817" id="rfc.xref.RFC2817.2"><cite title="Upgrading to TLS Within HTTP/1.1">[RFC2817]</cite></a>.<a class="self" href="#rfc.section.8.6.1.p.3">&para;</a></p></div></div><div id="upgrade.token.registration"><h3 id="rfc.section.8.6.2"><a href="#rfc.section.8.6.2">8.6.2</a>&nbsp;<a href="#upgrade.token.registration">Upgrade Token Registration</a></h3><div id="rfc.section.8.6.2.p.1" class="avoidbreakafter"><p>The "HTTP" entry in the upgrade token registry has been updated with the registration below:<a class="self" href="#rfc.section.8.6.2.p.1">&para;</a></p></div><div id="rfc.table.u.3"><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Value</th><th>Description</th><th>Expected Version Tokens</th><th>Reference</th></tr></thead><tbody><tr><td class="left">HTTP</td><td class="left">Hypertext Transfer Protocol</td><td class="left">any DIGIT.DIGIT (e.g, "2.0")</td><td class="left"><a href="#http.version" title="Protocol Versioning">Section&nbsp;2.6</a></td></tr></tbody></table></div><div id="rfc.section.8.6.2.p.2"><p>The responsible party is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".<a class="self" href="#rfc.section.8.6.2.p.2">&para;</a></p></div></div></div></div><div id="security.considerations"><h1 id="rfc.section.9"><a href="#rfc.section.9">9.</a>&nbsp;<a href="#security.considerations">Security Considerations</a></h1><div id="rfc.section.9.p.1"><p>This section is meant to inform developers, information providers, and users of known security considerations relevant to HTTP message syntax, parsing, and routing. Security considerations about HTTP semantics and payloads are addressed in <a href="#RFC7231" id="rfc.xref.RFC7231.34"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>.<a class="self" href="#rfc.section.9.p.1">&para;</a></p></div><div id="establishing.authority"><h2 id="rfc.section.9.1"><a href="#rfc.section.9.1">9.1</a>&nbsp;<a href="#establishing.authority">Establishing Authority</a></h2><div id="rfc.section.9.1.p.1"><p>HTTP relies on the notion of an <dfn>authoritative response</dfn>: a response that has been determined by (or at the direction of) the authority identified within the target URI to be the most appropriate response for that request given the state of the target resource at the time of response message origination. Providing a response from a non-authoritative source, such as a shared cache, is often useful to improve performance and availability, but only to the extent that the source can be trusted or the distrusted response can be safely used.<a class="self" href="#rfc.section.9.1.p.1">&para;</a></p></div><div id="rfc.section.9.1.p.2"><p>Unfortunately, establishing authority can be difficult. For example, <dfn>phishing</dfn> is an attack on the user's perception of authority, where that perception can be misled by presenting similar branding in hypertext, possibly aided by userinfo obfuscating the authority component (see <a href="#http.uri" title="http URI Scheme">Section&nbsp;2.7.1</a>). User agents can reduce the impact of phishing attacks by enabling users to easily inspect a target URI prior to making an action, by prominently distinguishing (or rejecting) userinfo when present, and by not sending stored credentials and cookies when the referring document is from an unknown or untrusted source.<a class="self" href="#rfc.section.9.1.p.2">&para;</a></p></div><div id="rfc.section.9.1.p.3"><p>When a registered name is used in the authority component, the "http" URI scheme (<a href="#http.uri" title="http URI Scheme">Section&nbsp;2.7.1</a>) relies on the user's local name resolution service to determine where it can find authoritative responses. This means that any attack on a user's network host table, cached names, or name resolution libraries becomes an avenue for attack on establishing authority. Likewise, the user's choice of server for Domain Name Service (DNS), and the hierarchy of servers from which it obtains resolution results, could impact the authenticity of address mappings; DNS Security Extensions (DNSSEC, <a href="#RFC4033" id="rfc.xref.RFC4033.1"><cite title="DNS Security Introduction and Requirements">[RFC4033]</cite></a>) are one way to improve authenticity.<a class="self" href="#rfc.section.9.1.p.3">&para;</a></p></div><div id="rfc.section.9.1.p.4"><p>Furthermore, after an IP address is obtained, establishing authority for an "http" URI is vulnerable to attacks on Internet Protocol routing.<a class="self" href="#rfc.section.9.1.p.4">&para;</a></p></div><div id="rfc.section.9.1.p.5"><p>The "https" scheme (<a href="#https.uri" title="https URI Scheme">Section&nbsp;2.7.2</a>) is intended to prevent (or at least reveal) many of these potential attacks on establishing authority, provided that the negotiated TLS connection is secured and the client properly verifies that the communicating server's identity matches the target URI's authority component (see <a href="#RFC2818" id="rfc.xref.RFC2818.3"><cite title="HTTP Over TLS">[RFC2818]</cite></a>). Correctly implementing such verification can be difficult (see <a href="#Georgiev" id="rfc.xref.Georgiev.1"><cite title="The Most Dangerous Code in the World: Validating SSL Certificates in Non-browser Software">[Georgiev]</cite></a>).<a class="self" href="#rfc.section.9.1.p.5">&para;</a></p></div></div><div id="risks.intermediaries"><h2 id="rfc.section.9.2"><a href="#rfc.section.9.2">9.2</a>&nbsp;<a href="#risks.intermediaries">Risks of Intermediaries</a></h2><div id="rfc.section.9.2.p.1"><p>By their very nature, HTTP intermediaries are men-in-the-middle and, thus, represent an opportunity for man-in-the-middle attacks. Compromise of the systems on which the intermediaries run can result in serious security and privacy problems. Intermediaries might have access to security-related information, personal information about individual users and organizations, and proprietary information belonging to users and content providers. A compromised intermediary, or an intermediary implemented or configured without regard to security and privacy considerations, might be used in the commission of a wide range of potential attacks.<a class="self" href="#rfc.section.9.2.p.1">&para;</a></p></div><div id="rfc.section.9.2.p.2"><p>Intermediaries that contain a shared cache are especially vulnerable to cache poisoning attacks, as described in <a href="rfc7234.html#security.considerations" title="Security Considerations">Section 8</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.8"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>.<a class="self" href="#rfc.section.9.2.p.2">&para;</a></p></div><div id="rfc.section.9.2.p.3"><p>Implementers need to consider the privacy and security implications of their design and coding decisions, and of the configuration options they provide to operators (especially the default configuration).<a class="self" href="#rfc.section.9.2.p.3">&para;</a></p></div><div id="rfc.section.9.2.p.4"><p>Users need to be aware that intermediaries are no more trustworthy than the people who run them; HTTP itself cannot solve this problem.<a class="self" href="#rfc.section.9.2.p.4">&para;</a></p></div></div><div id="attack.protocol.element.length"><h2 id="rfc.section.9.3"><a href="#rfc.section.9.3">9.3</a>&nbsp;<a href="#attack.protocol.element.length">Attacks via Protocol Element Length</a></h2><div id="rfc.section.9.3.p.1"><p>Because HTTP uses mostly textual, character-delimited fields, parsers are often vulnerable to attacks based on sending very long (or very slow) streams of data, particularly where an implementation is expecting a protocol element with no predefined length.<a class="self" href="#rfc.section.9.3.p.1">&para;</a></p></div><div id="rfc.section.9.3.p.2"><p>To promote interoperability, specific recommendations are made for minimum size limits on request-line (<a href="#request.line" title="Request Line">Section&nbsp;3.1.1</a>) and header fields (<a href="#header.fields" title="Header Fields">Section&nbsp;3.2</a>). These are minimum recommendations, chosen to be supportable even by implementations with limited resources; it is expected that most implementations will choose substantially higher limits.<a class="self" href="#rfc.section.9.3.p.2">&para;</a></p></div><div id="rfc.section.9.3.p.3"><p>A server can reject a message that has a request-target that is too long (<a href="rfc7231.html#status.414" title="414 URI Too Long">Section 6.5.12</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.35"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>) or a request payload that is too large (<a href="rfc7231.html#status.413" title="413 Payload Too Large">Section 6.5.11</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.36"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>). Additional status codes related to capacity limits have been defined by extensions to HTTP <a href="#RFC6585" id="rfc.xref.RFC6585.1"><cite title="Additional HTTP Status Codes">[RFC6585]</cite></a>.<a class="self" href="#rfc.section.9.3.p.3">&para;</a></p></div><div id="rfc.section.9.3.p.4"><p>Recipients ought to carefully limit the extent to which they process other protocol elements, including (but not limited to) request methods, response status phrases, header field-names, numeric values, and body chunks. Failure to limit such processing can result in buffer overflows, arithmetic overflows, or increased vulnerability to denial-of-service attacks.<a class="self" href="#rfc.section.9.3.p.4">&para;</a></p></div></div><div id="response.splitting"><h2 id="rfc.section.9.4"><a href="#rfc.section.9.4">9.4</a>&nbsp;<a href="#response.splitting">Response Splitting</a></h2><div id="rfc.section.9.4.p.1"><p>Response splitting (a.k.a, CRLF injection) is a common technique, used in various attacks on Web usage, that exploits the line-based nature of HTTP message framing and the ordered association of requests to responses on persistent connections <a href="#Klein" id="rfc.xref.Klein.1"><cite title="Divide and Conquer - HTTP Response Splitting, Web Cache Poisoning Attacks, and Related Topics">[Klein]</cite></a>. This technique can be particularly damaging when the requests pass through a shared cache.<a class="self" href="#rfc.section.9.4.p.1">&para;</a></p></div><div id="rfc.section.9.4.p.2"><p>Response splitting exploits a vulnerability in servers (usually within an application server) where an attacker can send encoded data within some parameter of the request that is later decoded and echoed within any of the response header fields of the response. If the decoded data is crafted to look like the response has ended and a subsequent response has begun, the response has been split and the content within the apparent second response is controlled by the attacker. The attacker can then make any other request on the same persistent connection and trick the recipients (including intermediaries) into believing that the second half of the split is an authoritative answer to the second request.<a class="self" href="#rfc.section.9.4.p.2">&para;</a></p></div><div id="rfc.section.9.4.p.3"><p>For example, a parameter within the request-target might be read by an application server and reused within a redirect, resulting in the same parameter being echoed in the <a href="rfc7231.html#header.location" class="smpl">Location</a> header field of the response. If the parameter is decoded by the application and not properly encoded when placed in the response field, the attacker can send encoded CRLF octets and other content that will make the application's single response look like two or more responses.<a class="self" href="#rfc.section.9.4.p.3">&para;</a></p></div><div id="rfc.section.9.4.p.4"><p>A common defense against response splitting is to filter requests for data that looks like encoded CR and LF (e.g., "%0D" and "%0A"). However, that assumes the application server is only performing URI decoding, rather than more obscure data transformations like charset transcoding, XML entity translation, base64 decoding, sprintf reformatting, etc. A more effective mitigation is to prevent anything other than the server's core protocol libraries from sending a CR or LF within the header section, which means restricting the output of header fields to APIs that filter for bad octets and not allowing application servers to write directly to the protocol stream.<a class="self" href="#rfc.section.9.4.p.4">&para;</a></p></div></div><div id="request.smuggling"><h2 id="rfc.section.9.5"><a href="#rfc.section.9.5">9.5</a>&nbsp;<a href="#request.smuggling">Request Smuggling</a></h2><div id="rfc.section.9.5.p.1"><p>Request smuggling (<a href="#Linhart" id="rfc.xref.Linhart.1"><cite title="HTTP Request Smuggling">[Linhart]</cite></a>) is a technique that exploits differences in protocol parsing among various recipients to hide additional requests (which might otherwise be blocked or disabled by policy) within an apparently harmless request. Like response splitting, request smuggling can lead to a variety of attacks on HTTP usage.<a class="self" href="#rfc.section.9.5.p.1">&para;</a></p></div><div id="rfc.section.9.5.p.2"><p>This specification has introduced new requirements on request parsing, particularly with regard to message framing in <a href="#message.body.length" title="Message Body Length">Section&nbsp;3.3.3</a>, to reduce the effectiveness of request smuggling.<a class="self" href="#rfc.section.9.5.p.2">&para;</a></p></div></div><div id="message.integrity"><h2 id="rfc.section.9.6"><a href="#rfc.section.9.6">9.6</a>&nbsp;<a href="#message.integrity">Message Integrity</a></h2><div id="rfc.section.9.6.p.1"><p>HTTP does not define a specific mechanism for ensuring message integrity, instead relying on the error-detection ability of underlying transport protocols and the use of length or chunk-delimited framing to detect completeness. Additional integrity mechanisms, such as hash functions or digital signatures applied to the content, can be selectively added to messages via extensible metadata header fields. Historically, the lack of a single integrity mechanism has been justified by the informal nature of most HTTP communication. However, the prevalence of HTTP as an information access mechanism has resulted in its increasing use within environments where verification of message integrity is crucial.<a class="self" href="#rfc.section.9.6.p.1">&para;</a></p></div><div id="rfc.section.9.6.p.2"><p>User agents are encouraged to implement configurable means for detecting and reporting failures of message integrity such that those means can be enabled within environments for which integrity is necessary. For example, a browser being used to view medical history or drug interaction information needs to indicate to the user when such information is detected by the protocol to be incomplete, expired, or corrupted during transfer. Such mechanisms might be selectively enabled via user agent extensions or the presence of message integrity metadata in a response. At a minimum, user agents ought to provide some indication that allows a user to distinguish between a complete and incomplete response message (<a href="#incomplete.messages" title="Handling Incomplete Messages">Section&nbsp;3.4</a>) when such verification is desired.<a class="self" href="#rfc.section.9.6.p.2">&para;</a></p></div></div><div id="message.confidentiality"><h2 id="rfc.section.9.7"><a href="#rfc.section.9.7">9.7</a>&nbsp;<a href="#message.confidentiality">Message Confidentiality</a></h2><div id="rfc.section.9.7.p.1"><p>HTTP relies on underlying transport protocols to provide message confidentiality when that is desired. HTTP has been specifically designed to be independent of the transport protocol, such that it can be used over many different forms of encrypted connection, with the selection of such transports being identified by the choice of URI scheme or within user agent configuration.<a class="self" href="#rfc.section.9.7.p.1">&para;</a></p></div><div id="rfc.section.9.7.p.2"><p>The "https" scheme can be used to identify resources that require a confidential connection, as described in <a href="#https.uri" title="https URI Scheme">Section&nbsp;2.7.2</a>.<a class="self" href="#rfc.section.9.7.p.2">&para;</a></p></div></div><div id="privacy.of.server.log.information"><h2 id="rfc.section.9.8"><a href="#rfc.section.9.8">9.8</a>&nbsp;<a href="#privacy.of.server.log.information">Privacy of Server Log Information</a></h2><div id="rfc.section.9.8.p.1"><p>A server is in the position to save personal data about a user's requests over time, which might identify their reading patterns or subjects of interest. In particular, log information gathered at an intermediary often contains a history of user agent interaction, across a multitude of sites, that can be traced to individual users.<a class="self" href="#rfc.section.9.8.p.1">&para;</a></p></div><div id="rfc.section.9.8.p.2"><p>HTTP log information is confidential in nature; its handling is often constrained by laws and regulations. Log information needs to be securely stored and appropriate guidelines followed for its analysis. Anonymization of personal information within individual entries helps, but it is generally not sufficient to prevent real log traces from being re-identified based on correlation with other access characteristics. As such, access traces that are keyed to a specific client are unsafe to publish even if the key is pseudonymous.<a class="self" href="#rfc.section.9.8.p.2">&para;</a></p></div><div id="rfc.section.9.8.p.3"><p>To minimize the risk of theft or accidental publication, log information ought to be purged of personally identifiable information, including user identifiers, IP addresses, and user-provided query parameters, as soon as that information is no longer necessary to support operational needs for security, auditing, or fraud control.<a class="self" href="#rfc.section.9.8.p.3">&para;</a></p></div></div></div><div id="acks"><h1 id="rfc.section.10"><a href="#rfc.section.10">10.</a>&nbsp;<a href="#acks">Acknowledgments</a></h1><div id="rfc.section.10.p.1"><p>This edition of HTTP/1.1 builds on the many contributions that went into <a href="#RFC1945" id="rfc.xref.RFC1945.2">RFC 1945</a>, <a href="#RFC2068" id="rfc.xref.RFC2068.3">RFC 2068</a>, <a href="#RFC2145" id="rfc.xref.RFC2145.2">RFC 2145</a>, and <a href="#RFC2616" id="rfc.xref.RFC2616.3">RFC 2616</a>, including substantial contributions made by the previous authors, editors, and Working Group Chairs: Tim Berners-Lee, Ari Luotonen, Roy T. Fielding, Henrik Frystyk Nielsen, Jim Gettys, Jeffrey C. Mogul, Larry Masinter, and Paul J. Leach. Mark Nottingham oversaw this effort as Working Group Chair.<a class="self" href="#rfc.section.10.p.1">&para;</a></p></div><div id="rfc.section.10.p.2" class="avoidbreakafter"><p>Since 1999, the following contributors have helped improve the HTTP specification by reporting bugs, asking smart questions, drafting or reviewing text, and evaluating open issues:<a class="self" href="#rfc.section.10.p.2">&para;</a></p></div><div id="rfc.section.10.p.3"><p>Adam Barth, Adam Roach, Addison Phillips, Adrian Chadd, Adrian Cole, Adrien W. de Croy, Alan Ford, Alan Ruttenberg, Albert Lunde, Alek Storm, Alex Rousskov, Alexandre Morgaut, Alexey Melnikov, Alisha Smith, Amichai Rothman, Amit Klein, Amos Jeffries, Andreas Maier, Andreas Petersson, Andrei Popov, Anil Sharma, Anne van Kesteren, Anthony Bryan, Asbjorn Ulsberg, Ashok Kumar, Balachander Krishnamurthy, Barry Leiba, Ben Laurie, Benjamin Carlyle, Benjamin Niven-Jenkins, Benoit Claise, Bil Corry, Bill Burke, Bjoern Hoehrmann, Bob Scheifler, Boris Zbarsky, Brett Slatkin, Brian Kell, Brian McBarron, Brian Pane, Brian Raymor, Brian Smith, Bruce Perens, Bryce Nesbitt, Cameron Heavon-Jones, Carl Kugler, Carsten Bormann, Charles Fry, Chris Burdess, Chris Newman, Christian Huitema, Cyrus Daboo, Dale Robert Anderson, Dan Wing, Dan Winship, Daniel Stenberg, Darrel Miller, Dave Cridland, Dave Crocker, Dave Kristol, Dave Thaler, David Booth, David Singer, David W. Morris, Diwakar Shetty, Dmitry Kurochkin, Drummond Reed, Duane Wessels, Edward Lee, Eitan Adler, Eliot Lear, Emile Stephan, Eran Hammer-Lahav, Eric D. Williams, Eric J. Bowman, Eric Lawrence, Eric Rescorla, Erik Aronesty, EungJun Yi, Evan Prodromou, Felix Geisendoerfer, Florian Weimer, Frank Ellermann, Fred Akalin, Fred Bohle, Frederic Kayser, Gabor Molnar, Gabriel Montenegro, Geoffrey Sneddon, Gervase Markham, Gili Tzabari, Grahame Grieve, Greg Slepak, Greg Wilkins, Grzegorz Calkowski, Harald Tveit Alvestrand, Harry Halpin, Helge Hess, Henrik Nordstrom, Henry S. Thompson, Henry Story, Herbert van de Sompel, Herve Ruellan, Howard Melman, Hugo Haas, Ian Fette, Ian Hickson, Ido Safruti, Ilari Liusvaara, Ilya Grigorik, Ingo Struck, J. Ross Nicoll, James Cloos, James H. Manger, James Lacey, James M. Snell, Jamie Lokier, Jan Algermissen, Jari Arkko, Jeff Hodges (who came up with the term 'effective Request-URI'), Jeff Pinner, Jeff Walden, Jim Luther, Jitu Padhye, Joe D. Williams, Joe Gregorio, Joe Orton, Joel Jaeggli, John C. Klensin, John C. Mallery, John Cowan, John Kemp, John Panzer, John Schneider, John Stracke, John Sullivan, Jonas Sicking, Jonathan A. Rees, Jonathan Billington, Jonathan Moore, Jonathan Silvera, Jordi Ros, Joris Dobbelsteen, Josh Cohen, Julien Pierre, Jungshik Shin, Justin Chapweske, Justin Erenkrantz, Justin James, Kalvinder Singh, Karl Dubost, Kathleen Moriarty, Keith Hoffman, Keith Moore, Ken Murchison, Koen Holtman, Konstantin Voronkov, Kris Zyp, Leif Hedstrom, Lionel Morand, Lisa Dusseault, Maciej Stachowiak, Manu Sporny, Marc Schneider, Marc Slemko, Mark Baker, Mark Pauley, Mark Watson, Markus Isomaki, Markus Lanthaler, Martin J. Duerst, Martin Musatov, Martin Nilsson, Martin Thomson, Matt Lynch, Matthew Cox, Matthew Kerwin, Max Clark, Menachem Dodge, Meral Shirazipour, Michael Burrows, Michael Hausenblas, Michael Scharf, Michael Sweet, Michael Tuexen, Michael Welzl, Mike Amundsen, Mike Belshe, Mike Bishop, Mike Kelly, Mike Schinkel, Miles Sabin, Murray S. Kucherawy, Mykyta Yevstifeyev, Nathan Rixham, Nicholas Shanks, Nico Williams, Nicolas Alvarez, Nicolas Mailhot, Noah Slater, Osama Mazahir, Pablo Castro, Pat Hayes, Patrick R. McManus, Paul E. Jones, Paul Hoffman, Paul Marquess, Pete Resnick, Peter Lepeska, Peter Occil, Peter Saint-Andre, Peter Watkins, Phil Archer, Phil Hunt, Philippe Mougin, Phillip Hallam-Baker, Piotr Dobrogost, Poul-Henning Kamp, Preethi Natarajan, Rajeev Bector, Ray Polk, Reto Bachmann-Gmuer, Richard Barnes, Richard Cyganiak, Rob Trace, Robby Simpson, Robert Brewer, Robert Collins, Robert Mattson, Robert O'Callahan, Robert Olofsson, Robert Sayre, Robert Siemer, Robert de Wilde, Roberto Javier Godoy, Roberto Peon, Roland Zink, Ronny Widjaja, Ryan Hamilton, S. Mike Dierken, Salvatore Loreto, Sam Johnston, Sam Pullara, Sam Ruby, Saurabh Kulkarni, Scott Lawrence (who maintained the original issues list), Sean B. Palmer, Sean Turner, Sebastien Barnoud, Shane McCarron, Shigeki Ohtsu, Simon Yarde, Stefan Eissing, Stefan Tilkov, Stefanos Harhalakis, Stephane Bortzmeyer, Stephen Farrell, Stephen Kent, Stephen Ludin, Stuart Williams, Subbu Allamaraju, Subramanian Moonesamy, Susan Hares, Sylvain Hellegouarch, Tapan Divekar, Tatsuhiro Tsujikawa, Tatsuya Hayashi, Ted Hardie, Ted Lemon, Thomas Broyer, Thomas Fossati, Thomas Maslen, Thomas Nadeau, Thomas Nordin, Thomas Roessler, Tim Bray, Tim Morgan, Tim Olsen, Tom Zhou, Travis Snoozy, Tyler Close, Vincent Murphy, Wenbo Zhu, Werner Baumann, Wilbur Streett, Wilfredo Sanchez Vega, William A. Rowe Jr., William Chan, Willy Tarreau, Xiaoshu Wang, Yaron Goland, Yngve Nysaeter Pettersen, Yoav Nir, Yogesh Bang, Yuchung Cheng, Yutaka Oiwa, Yves Lafon (long-time member of the editor team), Zed A. Shaw, and Zhong Yu.<a class="self" href="#rfc.section.10.p.3">&para;</a></p></div><div id="rfc.section.10.p.4"><p>See <a href="https://tools.ietf.org/html/rfc2616#section-16">Section 16</a> of <a href="#RFC2616" id="rfc.xref.RFC2616.4"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> for additional acknowledgements from prior revisions.<a class="self" href="#rfc.section.10.p.4">&para;</a></p></div></div><h1 id="rfc.references"><a id="rfc.section.11" href="#rfc.section.11">11.</a> References</h1><h2 id="rfc.references.1"><a href="#rfc.section.11.1" id="rfc.section.11.1">11.1</a> Normative References</h2><table><tr><td class="reference"><b id="RFC0793">[RFC0793]</b></td><td class="top">Postel, J., &#8220;<a href="https://tools.ietf.org/html/rfc793">Transmission Control Protocol</a>&#8221;, STD&nbsp;7, RFC&nbsp;793, September&nbsp;1981.</td></tr><tr><td class="reference"><b id="RFC1950">[RFC1950]</b></td><td class="top">Deutsch, L. and J-L. Gailly, &#8220;<a href="https://tools.ietf.org/html/rfc1950">ZLIB Compressed Data Format Specification version 3.3</a>&#8221;, RFC&nbsp;1950, May&nbsp;1996.</td></tr><tr><td class="reference"><b id="RFC1951">[RFC1951]</b></td><td class="top">Deutsch, P., &#8220;<a href="https://tools.ietf.org/html/rfc1951">DEFLATE Compressed Data Format Specification version 1.3</a>&#8221;, RFC&nbsp;1951, May&nbsp;1996.</td></tr><tr><td class="reference"><b id="RFC1952">[RFC1952]</b></td><td class="top">Deutsch, P., Gailly, J-L., Adler, M., Deutsch, L., and G. Randers-Pehrson, &#8220;<a href="https://tools.ietf.org/html/rfc1952">GZIP file format specification version 4.3</a>&#8221;, RFC&nbsp;1952, May&nbsp;1996.</td></tr><tr><td class="reference"><b id="RFC2119">[RFC2119]</b></td><td class="top">Bradner, S., &#8220;<a href="https://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>&#8221;, BCP&nbsp;14, RFC&nbsp;2119, March&nbsp;1997.</td></tr><tr><td class="reference"><b id="RFC3986">[RFC3986]</b></td><td class="top">Berners-Lee, T., Fielding, R., and L. Masinter, &#8220;<a href="https://tools.ietf.org/html/rfc3986">Uniform Resource Identifier (URI): Generic Syntax</a>&#8221;, STD&nbsp;66, RFC&nbsp;3986, January&nbsp;2005.</td></tr><tr><td class="reference"><b id="RFC5234">[RFC5234]</b></td><td class="top">Crocker, D., Ed. and P. Overell, &#8220;<a href="https://tools.ietf.org/html/rfc5234">Augmented BNF for Syntax Specifications: ABNF</a>&#8221;, STD&nbsp;68, RFC&nbsp;5234, January&nbsp;2008.</td></tr><tr><td class="reference"><b id="RFC7231">[RFC7231]</b></td><td class="top">Fielding, R., Ed. and J. Reschke, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc7231">Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</a>&#8221;, RFC&nbsp;7231, June&nbsp;2014.</td></tr><tr><td class="reference"><b id="RFC7232">[RFC7232]</b></td><td class="top">Fielding, R., Ed. and J. Reschke, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc7232">Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</a>&#8221;, RFC&nbsp;7232, June&nbsp;2014.</td></tr><tr><td class="reference"><b id="RFC7233">[RFC7233]</b></td><td class="top">Fielding, R., Ed., Lafon, Y., Ed., and J. Reschke, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc7233">Hypertext Transfer Protocol (HTTP/1.1): Range Requests</a>&#8221;, RFC&nbsp;7233, June&nbsp;2014.</td></tr><tr><td class="reference"><b id="RFC7234">[RFC7234]</b></td><td class="top">Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc7234">Hypertext Transfer Protocol (HTTP/1.1): Caching</a>&#8221;, RFC&nbsp;7234, June&nbsp;2014.</td></tr><tr><td class="reference"><b id="RFC7235">[RFC7235]</b></td><td class="top">Fielding, R., Ed. and J. Reschke, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc7235">Hypertext Transfer Protocol (HTTP/1.1): Authentication</a>&#8221;, RFC&nbsp;7235, June&nbsp;2014.</td></tr><tr><td class="reference"><b id="USASCII">[USASCII]</b></td><td class="top">American National Standards Institute, &#8220;Coded Character Set -- 7-bit American Standard Code for Information Interchange&#8221;, ANSI&nbsp;X3.4, 1986.</td></tr><tr><td class="reference"><b id="Welch">[Welch]</b></td><td class="top">Welch, T., &#8220;A Technique for High-Performance Data Compression&#8221;, IEEE Computer&nbsp;17(6), June&nbsp;1984.</td></tr></table><h2 id="rfc.references.2"><a href="#rfc.section.11.2" id="rfc.section.11.2">11.2</a> Informative References</h2><table><tr><td class="reference"><b id="BCP115">[BCP115]</b></td><td class="top">Hansen, T., Hardie, T., and L. Masinter, &#8220;<a href="https://tools.ietf.org/html/rfc4395">Guidelines and Registration Procedures for New URI Schemes</a>&#8221;, BCP&nbsp;115, RFC&nbsp;4395, February&nbsp;2006.</td></tr><tr><td class="reference"><b id="BCP13">[BCP13]</b></td><td class="top">Freed, N., Klensin, J., and T. Hansen, &#8220;<a href="https://tools.ietf.org/html/rfc6838">Media Type Specifications and Registration Procedures</a>&#8221;, BCP&nbsp;13, RFC&nbsp;6838, January&nbsp;2013.</td></tr><tr><td class="reference"><b id="BCP90">[BCP90]</b></td><td class="top">Klyne, G., Nottingham, M., and J. Mogul, &#8220;<a href="https://tools.ietf.org/html/rfc3864">Registration Procedures for Message Header Fields</a>&#8221;, BCP&nbsp;90, RFC&nbsp;3864, September&nbsp;2004.</td></tr><tr><td class="reference"><b id="Georgiev">[Georgiev]</b></td><td class="top">Georgiev, M., Iyengar, S., Jana, S., Anubhai, R., Boneh, D., and V. Shmatikov, &#8220;<a href="http://doi.acm.org/10.1145/2382196.2382204">The Most Dangerous Code in the World: Validating SSL Certificates in Non-browser Software</a>&#8221;, In Proceedings of the 2012 ACM Conference on Computer and Communications Security (CCS '12), pp. 38-49, October&nbsp;2012, &lt;<a href="http://doi.acm.org/10.1145/2382196.2382204">http://doi.acm.org/10.1145/2382196.2382204</a>&gt;.</td></tr><tr><td class="reference"><b id="ISO-8859-1">[ISO-8859-1]</b></td><td class="top">International Organization for Standardization, &#8220;Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1&#8221;, ISO/IEC&nbsp;8859-1:1998, 1998.</td></tr><tr><td class="reference"><b id="Klein">[Klein]</b></td><td class="top">Klein, A., &#8220;<a href="http://packetstormsecurity.com/papers/general/whitepaper_httpresponse.pdf">Divide and Conquer - HTTP Response Splitting, Web Cache Poisoning Attacks, and Related Topics</a>&#8221;, March&nbsp;2004, &lt;<a href="http://packetstormsecurity.com/papers/general/whitepaper_httpresponse.pdf">http://packetstormsecurity.com/papers/general/whitepaper_httpresponse.pdf</a>&gt;.</td></tr><tr><td class="reference"><b id="Kri2001">[Kri2001]</b></td><td class="top">Kristol, D., &#8220;<a href="http://arxiv.org/abs/cs.SE/0105018">HTTP Cookies: Standards, Privacy, and Politics</a>&#8221;, ACM Transactions on Internet Technology&nbsp;1(2), November&nbsp;2001, &lt;<a href="http://arxiv.org/abs/cs.SE/0105018">http://arxiv.org/abs/cs.SE/0105018</a>&gt;.</td></tr><tr><td class="reference"><b id="Linhart">[Linhart]</b></td><td class="top">Linhart, C., Klein, A., Heled, R., and S. Orrin, &#8220;<a href="http://www.watchfire.com/news/whitepapers.aspx">HTTP Request Smuggling</a>&#8221;, June&nbsp;2005, &lt;<a href="http://www.watchfire.com/news/whitepapers.aspx">http://www.watchfire.com/news/whitepapers.aspx</a>&gt;.</td></tr><tr><td class="reference"><b id="RFC1919">[RFC1919]</b></td><td class="top">Chatel, M., &#8220;<a href="https://tools.ietf.org/html/rfc1919">Classical versus Transparent IP Proxies</a>&#8221;, RFC&nbsp;1919, March&nbsp;1996.</td></tr><tr><td class="reference"><b id="RFC1945">[RFC1945]</b></td><td class="top">Berners-Lee, T., Fielding, R., and H. Nielsen, &#8220;<a href="https://tools.ietf.org/html/rfc1945">Hypertext Transfer Protocol -- HTTP/1.0</a>&#8221;, RFC&nbsp;1945, May&nbsp;1996.</td></tr><tr><td class="reference"><b id="RFC2045">[RFC2045]</b></td><td class="top">Freed, N. and N. Borenstein, &#8220;<a href="https://tools.ietf.org/html/rfc2045">Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</a>&#8221;, RFC&nbsp;2045, November&nbsp;1996.</td></tr><tr><td class="reference"><b id="RFC2047">[RFC2047]</b></td><td class="top">Moore, K., &#8220;<a href="https://tools.ietf.org/html/rfc2047">MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text</a>&#8221;, RFC&nbsp;2047, November&nbsp;1996.</td></tr><tr><td class="reference"><b id="RFC2068">[RFC2068]</b></td><td class="top">Fielding, R., Gettys, J., Mogul, J., Nielsen, H., and T. Berners-Lee, &#8220;<a href="https://tools.ietf.org/html/rfc2068">Hypertext Transfer Protocol -- HTTP/1.1</a>&#8221;, RFC&nbsp;2068, January&nbsp;1997.</td></tr><tr><td class="reference"><b id="RFC2145">[RFC2145]</b></td><td class="top">Mogul, J., Fielding, R., Gettys, J., and H. Nielsen, &#8220;<a href="https://tools.ietf.org/html/rfc2145">Use and Interpretation of HTTP Version Numbers</a>&#8221;, RFC&nbsp;2145, May&nbsp;1997.</td></tr><tr><td class="reference"><b id="RFC2616">[RFC2616]</b></td><td class="top">Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, &#8220;<a href="https://tools.ietf.org/html/rfc2616">Hypertext Transfer Protocol -- HTTP/1.1</a>&#8221;, RFC&nbsp;2616, June&nbsp;1999.</td></tr><tr><td class="reference"><b id="RFC2817">[RFC2817]</b></td><td class="top">Khare, R. and S. Lawrence, &#8220;<a href="https://tools.ietf.org/html/rfc2817">Upgrading to TLS Within HTTP/1.1</a>&#8221;, RFC&nbsp;2817, May&nbsp;2000.</td></tr><tr><td class="reference"><b id="RFC2818">[RFC2818]</b></td><td class="top">Rescorla, E., &#8220;<a href="https://tools.ietf.org/html/rfc2818">HTTP Over TLS</a>&#8221;, RFC&nbsp;2818, May&nbsp;2000.</td></tr><tr><td class="reference"><b id="RFC3040">[RFC3040]</b></td><td class="top">Cooper, I., Melve, I., and G. Tomlinson, &#8220;<a href="https://tools.ietf.org/html/rfc3040">Internet Web Replication and Caching Taxonomy</a>&#8221;, RFC&nbsp;3040, January&nbsp;2001.</td></tr><tr><td class="reference"><b id="RFC4033">[RFC4033]</b></td><td class="top">Arends, R., Austein, R., Larson, M., Massey, D., and S. Rose, &#8220;<a href="https://tools.ietf.org/html/rfc4033">DNS Security Introduction and Requirements</a>&#8221;, RFC&nbsp;4033, March&nbsp;2005.</td></tr><tr><td class="reference"><b id="RFC4559">[RFC4559]</b></td><td class="top">Jaganathan, K., Zhu, L., and J. Brezak, &#8220;<a href="https://tools.ietf.org/html/rfc4559">SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows</a>&#8221;, RFC&nbsp;4559, June&nbsp;2006.</td></tr><tr><td class="reference"><b id="RFC5226">[RFC5226]</b></td><td class="top">Narten, T. and H. Alvestrand, &#8220;<a href="https://tools.ietf.org/html/rfc5226">Guidelines for Writing an IANA Considerations Section in RFCs</a>&#8221;, BCP&nbsp;26, RFC&nbsp;5226, May&nbsp;2008.</td></tr><tr><td class="reference"><b id="RFC5246">[RFC5246]</b></td><td class="top">Dierks, T. and E. Rescorla, &#8220;<a href="https://tools.ietf.org/html/rfc5246">The Transport Layer Security (TLS) Protocol Version 1.2</a>&#8221;, RFC&nbsp;5246, August&nbsp;2008.</td></tr><tr><td class="reference"><b id="RFC5322">[RFC5322]</b></td><td class="top">Resnick, P., &#8220;<a href="https://tools.ietf.org/html/rfc5322">Internet Message Format</a>&#8221;, RFC&nbsp;5322, October&nbsp;2008.</td></tr><tr><td class="reference"><b id="RFC6265">[RFC6265]</b></td><td class="top">Barth, A., &#8220;<a href="https://tools.ietf.org/html/rfc6265">HTTP State Management Mechanism</a>&#8221;, RFC&nbsp;6265, April&nbsp;2011.</td></tr><tr><td class="reference"><b id="RFC6585">[RFC6585]</b></td><td class="top">Nottingham, M. and R. Fielding, &#8220;<a href="https://tools.ietf.org/html/rfc6585">Additional HTTP Status Codes</a>&#8221;, RFC&nbsp;6585, April&nbsp;2012.</td></tr></table><div id="compatibility"><h1 id="rfc.section.A" class="np"><a href="#rfc.section.A">A.</a>&nbsp;<a href="#compatibility">HTTP Version History</a></h1><div id="rfc.section.A.p.1"><p>HTTP has been in use since 1990. The first version, later referred to as HTTP/0.9, was a simple protocol for hypertext data transfer across the Internet, using only a single request method (GET) and no metadata. HTTP/1.0, as defined by <a href="#RFC1945" id="rfc.xref.RFC1945.3"><cite title="Hypertext Transfer Protocol -- HTTP/1.0">[RFC1945]</cite></a>, added a range of request methods and MIME-like messaging, allowing for metadata to be transferred and modifiers placed on the request/response semantics. However, HTTP/1.0 did not sufficiently take into consideration the effects of hierarchical proxies, caching, the need for persistent connections, or name-based virtual hosts. The proliferation of incompletely implemented applications calling themselves "HTTP/1.0" further necessitated a protocol version change in order for two communicating applications to determine each other's true capabilities.<a class="self" href="#rfc.section.A.p.1">&para;</a></p></div><div id="rfc.section.A.p.2"><p>HTTP/1.1 remains compatible with HTTP/1.0 by including more stringent requirements that enable reliable implementations, adding only those features that can either be safely ignored by an HTTP/1.0 recipient or only be sent when communicating with a party advertising conformance with HTTP/1.1.<a class="self" href="#rfc.section.A.p.2">&para;</a></p></div><div id="rfc.section.A.p.3"><p>HTTP/1.1 has been designed to make supporting previous versions easy. A general-purpose HTTP/1.1 server ought to be able to understand any valid request in the format of HTTP/1.0, responding appropriately with an HTTP/1.1 message that only uses features understood (or safely ignored) by HTTP/1.0 clients. Likewise, an HTTP/1.1 client can be expected to understand any valid HTTP/1.0 response.<a class="self" href="#rfc.section.A.p.3">&para;</a></p></div><div id="rfc.section.A.p.4"><p>Since HTTP/0.9 did not support header fields in a request, there is no mechanism for it to support name-based virtual hosts (selection of resource by inspection of the <a href="#header.host" class="smpl">Host</a> header field). Any server that implements name-based virtual hosts ought to disable support for HTTP/0.9. Most requests that appear to be HTTP/0.9 are, in fact, badly constructed HTTP/1.x requests caused by a client failing to properly encode the request-target.<a class="self" href="#rfc.section.A.p.4">&para;</a></p></div><div id="changes.from.1.0"><h2 id="rfc.section.A.1"><a href="#rfc.section.A.1">A.1</a>&nbsp;<a href="#changes.from.1.0">Changes from HTTP/1.0</a></h2><div id="rfc.section.A.1.p.1"><p>This section summarizes major differences between versions HTTP/1.0 and HTTP/1.1.<a class="self" href="#rfc.section.A.1.p.1">&para;</a></p></div><div id="changes.to.simplify.multihomed.web.servers.and.conserve.ip.addresses"><h3 id="rfc.section.A.1.1"><a href="#rfc.section.A.1.1">A.1.1</a>&nbsp;<a href="#changes.to.simplify.multihomed.web.servers.and.conserve.ip.addresses">Multihomed Web Servers</a></h3><div id="rfc.section.A.1.1.p.1"><p>The requirements that clients and servers support the <a href="#header.host" class="smpl">Host</a> header field (<a href="#header.host" id="rfc.xref.header.host.3" title="Host">Section&nbsp;5.4</a>), report an error if it is missing from an HTTP/1.1 request, and accept absolute URIs (<a href="#request-target" title="Request Target">Section&nbsp;5.3</a>) are among the most important changes defined by HTTP/1.1.<a class="self" href="#rfc.section.A.1.1.p.1">&para;</a></p></div><div id="rfc.section.A.1.1.p.2"><p>Older HTTP/1.0 clients assumed a one-to-one relationship of IP addresses and servers; there was no other established mechanism for distinguishing the intended server of a request than the IP address to which that request was directed. The <a href="#header.host" class="smpl">Host</a> header field was introduced during the development of HTTP/1.1 and, though it was quickly implemented by most HTTP/1.0 browsers, additional requirements were placed on all HTTP/1.1 requests in order to ensure complete adoption. At the time of this writing, most HTTP-based services are dependent upon the Host header field for targeting requests.<a class="self" href="#rfc.section.A.1.1.p.2">&para;</a></p></div></div><div id="compatibility.with.http.1.0.persistent.connections"><h3 id="rfc.section.A.1.2"><a href="#rfc.section.A.1.2">A.1.2</a>&nbsp;<a href="#compatibility.with.http.1.0.persistent.connections">Keep-Alive Connections</a></h3><div id="rfc.section.A.1.2.p.1"><p>In HTTP/1.0, each connection is established by the client prior to the request and closed by the server after sending the response. However, some implementations implement the explicitly negotiated ("Keep-Alive") version of persistent connections described in <a href="https://tools.ietf.org/html/rfc2068#section-19.7.1">Section 19.7.1</a> of <a href="#RFC2068" id="rfc.xref.RFC2068.4"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2068]</cite></a>.<a class="self" href="#rfc.section.A.1.2.p.1">&para;</a></p></div><div id="rfc.section.A.1.2.p.2"><p>Some clients and servers might wish to be compatible with these previous approaches to persistent connections, by explicitly negotiating for them with a "Connection: keep-alive" request header field. However, some experimental implementations of HTTP/1.0 persistent connections are faulty; for example, if an HTTP/1.0 proxy server doesn't understand <a href="#header.connection" class="smpl">Connection</a>, it will erroneously forward that header field to the next inbound server, which would result in a hung connection.<a class="self" href="#rfc.section.A.1.2.p.2">&para;</a></p></div><div id="rfc.section.A.1.2.p.3"><p>One attempted solution was the introduction of a Proxy-Connection header field, targeted specifically at proxies. In practice, this was also unworkable, because proxies are often deployed in multiple layers, bringing about the same problem discussed above.<a class="self" href="#rfc.section.A.1.2.p.3">&para;</a></p></div><div id="rfc.section.A.1.2.p.4"><p>As a result, clients are encouraged not to send the Proxy-Connection header field in any requests.<a class="self" href="#rfc.section.A.1.2.p.4">&para;</a></p></div><div id="rfc.section.A.1.2.p.5"><p>Clients are also encouraged to consider the use of Connection: keep-alive in requests carefully; while they can enable persistent connections with HTTP/1.0 servers, clients using them will need to monitor the connection for "hung" requests (which indicate that the client ought stop sending the header field), and this mechanism ought not be used by clients at all when a proxy is being used.<a class="self" href="#rfc.section.A.1.2.p.5">&para;</a></p></div></div><div id="introduction.of.transfer-encoding"><h3 id="rfc.section.A.1.3"><a href="#rfc.section.A.1.3">A.1.3</a>&nbsp;<a href="#introduction.of.transfer-encoding">Introduction of Transfer-Encoding</a></h3><div id="rfc.section.A.1.3.p.1"><p>HTTP/1.1 introduces the <a href="#header.transfer-encoding" class="smpl">Transfer-Encoding</a> header field (<a href="#header.transfer-encoding" id="rfc.xref.header.transfer-encoding.4" title="Transfer-Encoding">Section&nbsp;3.3.1</a>). Transfer codings need to be decoded prior to forwarding an HTTP message over a MIME-compliant protocol.<a class="self" href="#rfc.section.A.1.3.p.1">&para;</a></p></div></div></div><div id="changes.from.rfc.2616"><h2 id="rfc.section.A.2"><a href="#rfc.section.A.2">A.2</a>&nbsp;<a href="#changes.from.rfc.2616">Changes from RFC 2616</a></h2><div id="rfc.section.A.2.p.1"><p>HTTP's approach to error handling has been explained. (<a href="#conformance" title="Conformance and Error Handling">Section&nbsp;2.5</a>)<a class="self" href="#rfc.section.A.2.p.1">&para;</a></p></div><div id="rfc.section.A.2.p.2"><p>The HTTP-version ABNF production has been clarified to be case-sensitive. Additionally, version numbers have been restricted to single digits, due to the fact that implementations are known to handle multi-digit version numbers incorrectly. (<a href="#http.version" title="Protocol Versioning">Section&nbsp;2.6</a>)<a class="self" href="#rfc.section.A.2.p.2">&para;</a></p></div><div id="rfc.section.A.2.p.3"><p>Userinfo (i.e., username and password) are now disallowed in HTTP and HTTPS URIs, because of security issues related to their transmission on the wire. (<a href="#http.uri" title="http URI Scheme">Section&nbsp;2.7.1</a>)<a class="self" href="#rfc.section.A.2.p.3">&para;</a></p></div><div id="rfc.section.A.2.p.4"><p>The HTTPS URI scheme is now defined by this specification; previously, it was done in <a href="https://tools.ietf.org/html/rfc2818#section-2.4">Section 2.4</a> of <a href="#RFC2818" id="rfc.xref.RFC2818.4"><cite title="HTTP Over TLS">[RFC2818]</cite></a>. Furthermore, it implies end-to-end security. (<a href="#https.uri" title="https URI Scheme">Section&nbsp;2.7.2</a>)<a class="self" href="#rfc.section.A.2.p.4">&para;</a></p></div><div id="rfc.section.A.2.p.5"><p>HTTP messages can be (and often are) buffered by implementations; despite it sometimes being available as a stream, HTTP is fundamentally a message-oriented protocol. Minimum supported sizes for various protocol elements have been suggested, to improve interoperability. (<a href="#http.message" title="Message Format">Section&nbsp;3</a>)<a class="self" href="#rfc.section.A.2.p.5">&para;</a></p></div><div id="rfc.section.A.2.p.6"><p>Invalid whitespace around field-names is now required to be rejected, because accepting it represents a security vulnerability. The ABNF productions defining header fields now only list the field value. (<a href="#header.fields" title="Header Fields">Section&nbsp;3.2</a>)<a class="self" href="#rfc.section.A.2.p.6">&para;</a></p></div><div id="rfc.section.A.2.p.7"><p>Rules about implicit linear whitespace between certain grammar productions have been removed; now whitespace is only allowed where specifically defined in the ABNF. (<a href="#whitespace" title="Whitespace">Section&nbsp;3.2.3</a>)<a class="self" href="#rfc.section.A.2.p.7">&para;</a></p></div><div id="rfc.section.A.2.p.8"><p>Header fields that span multiple lines ("line folding") are deprecated. (<a href="#field.parsing" title="Field Parsing">Section&nbsp;3.2.4</a>)<a class="self" href="#rfc.section.A.2.p.8">&para;</a></p></div><div id="rfc.section.A.2.p.9"><p>The NUL octet is no longer allowed in comment and quoted-string text, and handling of backslash-escaping in them has been clarified. The quoted-pair rule no longer allows escaping control characters other than HTAB. Non-US-ASCII content in header fields and the reason phrase has been obsoleted and made opaque (the TEXT rule was removed). (<a href="#field.components" title="Field Value Components">Section&nbsp;3.2.6</a>)<a class="self" href="#rfc.section.A.2.p.9">&para;</a></p></div><div id="rfc.section.A.2.p.10"><p>Bogus <a href="#header.content-length" class="smpl">Content-Length</a> header fields are now required to be handled as errors by recipients. (<a href="#header.content-length" id="rfc.xref.header.content-length.2" title="Content-Length">Section&nbsp;3.3.2</a>)<a class="self" href="#rfc.section.A.2.p.10">&para;</a></p></div><div id="rfc.section.A.2.p.11"><p>The algorithm for determining the message body length has been clarified to indicate all of the special cases (e.g., driven by methods or status codes) that affect it, and that new protocol elements cannot define such special cases. CONNECT is a new, special case in determining message body length. "multipart/byteranges" is no longer a way of determining message body length detection. (<a href="#message.body.length" title="Message Body Length">Section&nbsp;3.3.3</a>)<a class="self" href="#rfc.section.A.2.p.11">&para;</a></p></div><div id="rfc.section.A.2.p.12"><p>The "identity" transfer coding token has been removed. (Sections <a href="#message.body" title="Message Body">3.3</a> and <a href="#transfer.codings" title="Transfer Codings">4</a>)<a class="self" href="#rfc.section.A.2.p.12">&para;</a></p></div><div id="rfc.section.A.2.p.13"><p>Chunk length does not include the count of the octets in the chunk header and trailer. Line folding in chunk extensions is disallowed. (<a href="#chunked.encoding" title="Chunked Transfer Coding">Section&nbsp;4.1</a>)<a class="self" href="#rfc.section.A.2.p.13">&para;</a></p></div><div id="rfc.section.A.2.p.14"><p>The meaning of the "deflate" content coding has been clarified. (<a href="#deflate.coding" title="Deflate Coding">Section&nbsp;4.2.2</a>)<a class="self" href="#rfc.section.A.2.p.14">&para;</a></p></div><div id="rfc.section.A.2.p.15"><p>The segment + query components of RFC 3986 have been used to define the request-target, instead of abs_path from RFC 1808. The asterisk-form of the request-target is only allowed with the OPTIONS method. (<a href="#request-target" title="Request Target">Section&nbsp;5.3</a>)<a class="self" href="#rfc.section.A.2.p.15">&para;</a></p></div><div id="rfc.section.A.2.p.16"><p>The term "Effective Request URI" has been introduced. (<a href="#effective.request.uri" title="Effective Request URI">Section&nbsp;5.5</a>)<a class="self" href="#rfc.section.A.2.p.16">&para;</a></p></div><div id="rfc.section.A.2.p.17"><p>Gateways do not need to generate <a href="#header.via" class="smpl">Via</a> header fields anymore. (<a href="#header.via" id="rfc.xref.header.via.2" title="Via">Section&nbsp;5.7.1</a>)<a class="self" href="#rfc.section.A.2.p.17">&para;</a></p></div><div id="rfc.section.A.2.p.18"><p>Exactly when "close" connection options have to be sent has been clarified. Also, "hop-by-hop" header fields are required to appear in the Connection header field; just because they're defined as hop-by-hop in this specification doesn't exempt them. (<a href="#header.connection" id="rfc.xref.header.connection.8" title="Connection">Section&nbsp;6.1</a>)<a class="self" href="#rfc.section.A.2.p.18">&para;</a></p></div><div id="rfc.section.A.2.p.19"><p>The limit of two connections per server has been removed. An idempotent sequence of requests is no longer required to be retried. The requirement to retry requests under certain circumstances when the server prematurely closes the connection has been removed. Also, some extraneous requirements about when servers are allowed to close connections prematurely have been removed. (<a href="#persistent.connections" title="Persistence">Section&nbsp;6.3</a>)<a class="self" href="#rfc.section.A.2.p.19">&para;</a></p></div><div id="rfc.section.A.2.p.20"><p>The semantics of the <a href="#header.upgrade" class="smpl">Upgrade</a> header field is now defined in responses other than 101 (this was incorporated from <a href="#RFC2817" id="rfc.xref.RFC2817.3"><cite title="Upgrading to TLS Within HTTP/1.1">[RFC2817]</cite></a>). Furthermore, the ordering in the field value is now significant. (<a href="#header.upgrade" id="rfc.xref.header.upgrade.3" title="Upgrade">Section&nbsp;6.7</a>)<a class="self" href="#rfc.section.A.2.p.20">&para;</a></p></div><div id="rfc.section.A.2.p.21"><p>Empty list elements in list productions (e.g., a list header field containing ", ,") have been deprecated. (<a href="#abnf.extension" title="ABNF List Extension: #rule">Section&nbsp;7</a>)<a class="self" href="#rfc.section.A.2.p.21">&para;</a></p></div><div id="rfc.section.A.2.p.22"><p>Registration of Transfer Codings now requires IETF Review (<a href="#transfer.coding.registry" title="Transfer Coding Registry">Section&nbsp;8.4</a>)<a class="self" href="#rfc.section.A.2.p.22">&para;</a></p></div><div id="rfc.section.A.2.p.23"><p>This specification now defines the Upgrade Token Registry, previously defined in <a href="https://tools.ietf.org/html/rfc2817#section-7.2">Section 7.2</a> of <a href="#RFC2817" id="rfc.xref.RFC2817.4"><cite title="Upgrading to TLS Within HTTP/1.1">[RFC2817]</cite></a>. (<a href="#upgrade.token.registry" title="Upgrade Token Registry">Section&nbsp;8.6</a>)<a class="self" href="#rfc.section.A.2.p.23">&para;</a></p></div><div id="rfc.section.A.2.p.24"><p>The expectation to support HTTP/0.9 requests has been removed. (<a href="#compatibility" title="HTTP Version History">Appendix&nbsp;A</a>)<a class="self" href="#rfc.section.A.2.p.24">&para;</a></p></div><div id="rfc.section.A.2.p.25"><p>Issues with the Keep-Alive and Proxy-Connection header fields in requests are pointed out, with use of the latter being discouraged altogether. (<a href="#compatibility.with.http.1.0.persistent.connections" title="Keep-Alive Connections">Appendix&nbsp;A.1.2</a>)<a class="self" href="#rfc.section.A.2.p.25">&para;</a></p></div></div></div><div id="collected.abnf"><h1 id="rfc.section.B"><a href="#rfc.section.B">B.</a>&nbsp;<a href="#collected.abnf">Collected ABNF</a></h1><div id="rfc.figure.u.72"><pre class="inline"><a href="#rule.whitespace" class="smpl">BWS</a> = OWS 
    737737 
    738738<a href="#header.connection" class="smpl">Connection</a> = *( "," OWS ) connection-option *( OWS "," [ OWS 
  • specs/rfc7231.html

    r2737 r2739  
    525525    } 
    526526} 
    527 </style><link rel="Contents" href="#rfc.toc"><link rel="Author" href="#rfc.authors"><link rel="Copyright" href="#rfc.copyrightnotice"><link rel="Index" href="#rfc.index"><link rel="Chapter" title="1 Introduction" href="#rfc.section.1"><link rel="Chapter" title="2 Resources" href="#rfc.section.2"><link rel="Chapter" title="3 Representations" href="#rfc.section.3"><link rel="Chapter" title="4 Request Methods" href="#rfc.section.4"><link rel="Chapter" title="5 Request Header Fields" href="#rfc.section.5"><link rel="Chapter" title="6 Response Status Codes" href="#rfc.section.6"><link rel="Chapter" title="7 Response Header Fields" href="#rfc.section.7"><link rel="Chapter" title="8 IANA Considerations" href="#rfc.section.8"><link rel="Chapter" title="9 Security Considerations" href="#rfc.section.9"><link rel="Chapter" title="10 Acknowledgments" href="#rfc.section.10"><link rel="Chapter" href="#rfc.section.11" title="11 References"><link rel="Appendix" title="A Differences between HTTP and MIME" href="#rfc.section.A"><link rel="Appendix" title="B Changes from RFC 2616" href="#rfc.section.B"><link rel="Appendix" title="C Imported ABNF" href="#rfc.section.C"><link rel="Appendix" title="D Collected ABNF" href="#rfc.section.D"><link href="rfc7230.html" rel="prev"><link href="rfc7232.html" rel="next"><link rel="Alternate" title="Authoritative ASCII Version" href="http://www.ietf.org/rfc/rfc7231.txt"><link rel="Help" title="RFC-Editor's Status Page" href="http://www.rfc-editor.org/info/rfc7231"><link rel="Help" title="Additional Information on tools.ietf.org" href="http://tools.ietf.org/html/rfc7231"><meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.718, 2015/04/08 13:10:26, XSLT vendor: SAXON 6.5.5 from Michael Kay http://saxon.sf.net/"><meta name="keywords" content="Hypertext Transfer Protocol, HTTP, HTTP semantics, HTTP payload, HTTP content, HTTP method, HTTP status code"><link rel="schema.dct" href="http://purl.org/dc/terms/"><meta name="dct.creator" content="Fielding, R."><meta name="dct.creator" content="Reschke, J. F."><meta name="dct.identifier" content="urn:ietf:rfc:7231"><meta name="dct.issued" scheme="ISO8601" content="2014-06"><meta name="dct.replaces" content="urn:ietf:rfc:2616"><meta name="dct.abstract" content="The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines the semantics of HTTP/1.1 messages, as expressed by request methods, request header fields, response status codes, and response header fields, along with the payload of messages (metadata and body content) and mechanisms for content negotiation."><meta name="dct.isPartOf" content="urn:issn:2070-1721"><meta name="description" content="The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines the semantics of HTTP/1.1 messages, as expressed by request methods, request header fields, response status codes, and response header fields, along with the payload of messages (metadata and body content) and mechanisms for content negotiation."></head><body onload="getMeta(7231,&#34;rfc.meta&#34;);"><table class="header" id="rfc.headerblock"><tbody><tr><td class="left">Internet Engineering Task Force (IETF)</td><td class="right">R. Fielding, Editor</td></tr><tr><td class="left">Request for Comments: 7231</td><td class="right">Adobe</td></tr><tr><td class="left">Obsoletes: <a href="https://tools.ietf.org/html/rfc2616">2616</a></td><td class="right">J. Reschke, Editor</td></tr><tr><td class="left">Updates: <a href="https://tools.ietf.org/html/rfc2817">2817</a></td><td class="right">greenbytes</td></tr><tr><td class="left">Category: Standards Track</td><td class="right">June 2014</td></tr><tr><td class="left">ISSN: 2070-1721</td><td class="right"></td></tr></tbody></table><p class="title" id="rfc.title">Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</p><h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1><p>The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines the semantics of HTTP/1.1 messages, as expressed by request methods, request header fields, response status codes, and response header fields, along with the payload of messages (metadata and body content) and mechanisms for content negotiation.</p><div id="rfc.meta" style="float: right; border: 1px solid black; margin: 2em; padding: 1em; display: none;"></div><div id="rfc.status"><h1><a href="#rfc.status">Status of This Memo</a></h1><p>This is an Internet Standards Track document.</p><p>This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.</p><p>Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at <a href="http://www.rfc-editor.org/info/rfc7231">http://www.rfc-editor.org/info/rfc7231</a>.</p></div><div id="rfc.copyrightnotice"><h1><a href="#rfc.copyrightnotice">Copyright Notice</a></h1><p>Copyright &copy; 2014 IETF Trust and the persons identified as the document authors. All rights reserved.</p><p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.</p><p>This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.</p></div><hr class="noprint"><div id="rfc.toc"><h1 class="np"><a href="#rfc.toc">Table of Contents</a></h1><ul class="toc"><li><a href="#rfc.section.1">1.</a>&nbsp;&nbsp;&nbsp;<a href="#introduction">Introduction</a><ul><li><a href="#rfc.section.1.1">1.1</a>&nbsp;&nbsp;&nbsp;<a href="#conformance">Conformance and Error Handling</a></li><li><a href="#rfc.section.1.2">1.2</a>&nbsp;&nbsp;&nbsp;<a href="#notation">Syntax Notation</a></li></ul></li><li><a href="#rfc.section.2">2.</a>&nbsp;&nbsp;&nbsp;<a href="#resources">Resources</a></li><li><a href="#rfc.section.3">3.</a>&nbsp;&nbsp;&nbsp;<a href="#representations">Representations</a><ul><li><a href="#rfc.section.3.1">3.1</a>&nbsp;&nbsp;&nbsp;<a href="#representation.metadata">Representation Metadata</a><ul><li><a href="#rfc.section.3.1.1">3.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#data.type">Processing Representation Data</a></li><li><a href="#rfc.section.3.1.2">3.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#data.encoding">Encoding for Compression or Integrity</a></li><li><a href="#rfc.section.3.1.3">3.1.3</a>&nbsp;&nbsp;&nbsp;<a href="#audience.language">Audience Language</a></li><li><a href="#rfc.section.3.1.4">3.1.4</a>&nbsp;&nbsp;&nbsp;<a href="#identification">Identification</a></li></ul></li><li><a href="#rfc.section.3.2">3.2</a>&nbsp;&nbsp;&nbsp;<a href="#representation.data">Representation Data</a></li><li><a href="#rfc.section.3.3">3.3</a>&nbsp;&nbsp;&nbsp;<a href="#payload">Payload Semantics</a></li><li><a href="#rfc.section.3.4">3.4</a>&nbsp;&nbsp;&nbsp;<a href="#content.negotiation">Content Negotiation</a><ul><li><a href="#rfc.section.3.4.1">3.4.1</a>&nbsp;&nbsp;&nbsp;<a href="#proactive.negotiation">Proactive Negotiation</a></li><li><a href="#rfc.section.3.4.2">3.4.2</a>&nbsp;&nbsp;&nbsp;<a href="#reactive.negotiation">Reactive Negotiation</a></li></ul></li></ul></li><li><a href="#rfc.section.4">4.</a>&nbsp;&nbsp;&nbsp;<a href="#methods">Request Methods</a><ul><li><a href="#rfc.section.4.1">4.1</a>&nbsp;&nbsp;&nbsp;<a href="#method.overview">Overview</a></li><li><a href="#rfc.section.4.2">4.2</a>&nbsp;&nbsp;&nbsp;<a href="#method.properties">Common Method Properties</a><ul><li><a href="#rfc.section.4.2.1">4.2.1</a>&nbsp;&nbsp;&nbsp;<a href="#safe.methods">Safe Methods</a></li><li><a href="#rfc.section.4.2.2">4.2.2</a>&nbsp;&nbsp;&nbsp;<a href="#idempotent.methods">Idempotent Methods</a></li><li><a href="#rfc.section.4.2.3">4.2.3</a>&nbsp;&nbsp;&nbsp;<a href="#cacheable.methods">Cacheable Methods</a></li></ul></li><li><a href="#rfc.section.4.3">4.3</a>&nbsp;&nbsp;&nbsp;<a href="#method.definitions">Method Definitions</a><ul><li><a href="#rfc.section.4.3.1">4.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#GET">GET</a></li><li><a href="#rfc.section.4.3.2">4.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#HEAD">HEAD</a></li><li><a href="#rfc.section.4.3.3">4.3.3</a>&nbsp;&nbsp;&nbsp;<a href="#POST">POST</a></li><li><a href="#rfc.section.4.3.4">4.3.4</a>&nbsp;&nbsp;&nbsp;<a href="#PUT">PUT</a></li><li><a href="#rfc.section.4.3.5">4.3.5</a>&nbsp;&nbsp;&nbsp;<a href="#DELETE">DELETE</a></li><li><a href="#rfc.section.4.3.6">4.3.6</a>&nbsp;&nbsp;&nbsp;<a href="#CONNECT">CONNECT</a></li><li><a href="#rfc.section.4.3.7">4.3.7</a>&nbsp;&nbsp;&nbsp;<a href="#OPTIONS">OPTIONS</a></li><li><a href="#rfc.section.4.3.8">4.3.8</a>&nbsp;&nbsp;&nbsp;<a href="#TRACE">TRACE</a></li></ul></li></ul></li><li><a href="#rfc.section.5">5.</a>&nbsp;&nbsp;&nbsp;<a href="#request.header.fields">Request Header Fields</a><ul><li><a href="#rfc.section.5.1">5.1</a>&nbsp;&nbsp;&nbsp;<a href="#request.controls">Controls</a><ul><li><a href="#rfc.section.5.1.1">5.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#header.expect">Expect</a></li><li><a href="#rfc.section.5.1.2">5.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.max-forwards">Max-Forwards</a></li></ul></li><li><a href="#rfc.section.5.2">5.2</a>&nbsp;&nbsp;&nbsp;<a href="#request.conditionals">Conditionals</a></li><li><a href="#rfc.section.5.3">5.3</a>&nbsp;&nbsp;&nbsp;<a href="#request.conneg">Content Negotiation</a><ul><li><a href="#rfc.section.5.3.1">5.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#quality.values">Quality Values</a></li><li><a href="#rfc.section.5.3.2">5.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.accept">Accept</a></li><li><a href="#rfc.section.5.3.3">5.3.3</a>&nbsp;&nbsp;&nbsp;<a href="#header.accept-charset">Accept-Charset</a></li><li><a href="#rfc.section.5.3.4">5.3.4</a>&nbsp;&nbsp;&nbsp;<a href="#header.accept-encoding">Accept-Encoding</a></li><li><a href="#rfc.section.5.3.5">5.3.5</a>&nbsp;&nbsp;&nbsp;<a href="#header.accept-language">Accept-Language</a></li></ul></li><li><a href="#rfc.section.5.4">5.4</a>&nbsp;&nbsp;&nbsp;<a href="#request.auth">Authentication Credentials</a></li><li><a href="#rfc.section.5.5">5.5</a>&nbsp;&nbsp;&nbsp;<a href="#request.context">Request Context</a><ul><li><a href="#rfc.section.5.5.1">5.5.1</a>&nbsp;&nbsp;&nbsp;<a href="#header.from">From</a></li><li><a href="#rfc.section.5.5.2">5.5.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.referer">Referer</a></li><li><a href="#rfc.section.5.5.3">5.5.3</a>&nbsp;&nbsp;&nbsp;<a href="#header.user-agent">User-Agent</a></li></ul></li></ul></li><li><a href="#rfc.section.6">6.</a>&nbsp;&nbsp;&nbsp;<a href="#status.codes">Response Status Codes</a><ul><li><a href="#rfc.section.6.1">6.1</a>&nbsp;&nbsp;&nbsp;<a href="#overview.of.status.codes">Overview of Status Codes</a></li><li><a href="#rfc.section.6.2">6.2</a>&nbsp;&nbsp;&nbsp;<a href="#status.1xx">Informational 1xx</a><ul><li><a href="#rfc.section.6.2.1">6.2.1</a>&nbsp;&nbsp;&nbsp;<a href="#status.100">100 Continue</a></li><li><a href="#rfc.section.6.2.2">6.2.2</a>&nbsp;&nbsp;&nbsp;<a href="#status.101">101 Switching Protocols</a></li></ul></li><li><a href="#rfc.section.6.3">6.3</a>&nbsp;&nbsp;&nbsp;<a href="#status.2xx">Successful 2xx</a><ul><li><a href="#rfc.section.6.3.1">6.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#status.200">200 OK</a></li><li><a href="#rfc.section.6.3.2">6.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#status.201">201 Created</a></li><li><a href="#rfc.section.6.3.3">6.3.3</a>&nbsp;&nbsp;&nbsp;<a href="#status.202">202 Accepted</a></li><li><a href="#rfc.section.6.3.4">6.3.4</a>&nbsp;&nbsp;&nbsp;<a href="#status.203">203 Non-Authoritative Information</a></li><li><a href="#rfc.section.6.3.5">6.3.5</a>&nbsp;&nbsp;&nbsp;<a href="#status.204">204 No Content</a></li><li><a href="#rfc.section.6.3.6">6.3.6</a>&nbsp;&nbsp;&nbsp;<a href="#status.205">205 Reset Content</a></li></ul></li><li><a href="#rfc.section.6.4">6.4</a>&nbsp;&nbsp;&nbsp;<a href="#status.3xx">Redirection 3xx</a><ul><li><a href="#rfc.section.6.4.1">6.4.1</a>&nbsp;&nbsp;&nbsp;<a href="#status.300">300 Multiple Choices</a></li><li><a href="#rfc.section.6.4.2">6.4.2</a>&nbsp;&nbsp;&nbsp;<a href="#status.301">301 Moved Permanently</a></li><li><a href="#rfc.section.6.4.3">6.4.3</a>&nbsp;&nbsp;&nbsp;<a href="#status.302">302 Found</a></li><li><a href="#rfc.section.6.4.4">6.4.4</a>&nbsp;&nbsp;&nbsp;<a href="#status.303">303 See Other</a></li><li><a href="#rfc.section.6.4.5">6.4.5</a>&nbsp;&nbsp;&nbsp;<a href="#status.305">305 Use Proxy</a></li><li><a href="#rfc.section.6.4.6">6.4.6</a>&nbsp;&nbsp;&nbsp;<a href="#status.306">306 (Unused)</a></li><li><a href="#rfc.section.6.4.7">6.4.7</a>&nbsp;&nbsp;&nbsp;<a href="#status.307">307 Temporary Redirect</a></li></ul></li><li><a href="#rfc.section.6.5">6.5</a>&nbsp;&nbsp;&nbsp;<a href="#status.4xx">Client Error 4xx</a><ul><li><a href="#rfc.section.6.5.1">6.5.1</a>&nbsp;&nbsp;&nbsp;<a href="#status.400">400 Bad Request</a></li><li><a href="#rfc.section.6.5.2">6.5.2</a>&nbsp;&nbsp;&nbsp;<a href="#status.402">402 Payment Required</a></li><li><a href="#rfc.section.6.5.3">6.5.3</a>&nbsp;&nbsp;&nbsp;<a href="#status.403">403 Forbidden</a></li><li><a href="#rfc.section.6.5.4">6.5.4</a>&nbsp;&nbsp;&nbsp;<a href="#status.404">404 Not Found</a></li><li><a href="#rfc.section.6.5.5">6.5.5</a>&nbsp;&nbsp;&nbsp;<a href="#status.405">405 Method Not Allowed</a></li><li><a href="#rfc.section.6.5.6">6.5.6</a>&nbsp;&nbsp;&nbsp;<a href="#status.406">406 Not Acceptable</a></li><li><a href="#rfc.section.6.5.7">6.5.7</a>&nbsp;&nbsp;&nbsp;<a href="#status.408">408 Request Timeout</a></li><li><a href="#rfc.section.6.5.8">6.5.8</a>&nbsp;&nbsp;&nbsp;<a href="#status.409">409 Conflict</a></li><li><a href="#rfc.section.6.5.9">6.5.9</a>&nbsp;&nbsp;&nbsp;<a href="#status.410">410 Gone</a></li><li><a href="#rfc.section.6.5.10">6.5.10</a>&nbsp;&nbsp;&nbsp;<a href="#status.411">411 Length Required</a></li><li><a href="#rfc.section.6.5.11">6.5.11</a>&nbsp;&nbsp;&nbsp;<a href="#status.413">413 Payload Too Large</a></li><li><a href="#rfc.section.6.5.12">6.5.12</a>&nbsp;&nbsp;&nbsp;<a href="#status.414">414 URI Too Long</a></li><li><a href="#rfc.section.6.5.13">6.5.13</a>&nbsp;&nbsp;&nbsp;<a href="#status.415">415 Unsupported Media Type</a></li><li><a href="#rfc.section.6.5.14">6.5.14</a>&nbsp;&nbsp;&nbsp;<a href="#status.417">417 Expectation Failed</a></li><li><a href="#rfc.section.6.5.15">6.5.15</a>&nbsp;&nbsp;&nbsp;<a href="#status.426">426 Upgrade Required</a></li></ul></li><li><a href="#rfc.section.6.6">6.6</a>&nbsp;&nbsp;&nbsp;<a href="#status.5xx">Server Error 5xx</a><ul><li><a href="#rfc.section.6.6.1">6.6.1</a>&nbsp;&nbsp;&nbsp;<a href="#status.500">500 Internal Server Error</a></li><li><a href="#rfc.section.6.6.2">6.6.2</a>&nbsp;&nbsp;&nbsp;<a href="#status.501">501 Not Implemented</a></li><li><a href="#rfc.section.6.6.3">6.6.3</a>&nbsp;&nbsp;&nbsp;<a href="#status.502">502 Bad Gateway</a></li><li><a href="#rfc.section.6.6.4">6.6.4</a>&nbsp;&nbsp;&nbsp;<a href="#status.503">503 Service Unavailable</a></li><li><a href="#rfc.section.6.6.5">6.6.5</a>&nbsp;&nbsp;&nbsp;<a href="#status.504">504 Gateway Timeout</a></li><li><a href="#rfc.section.6.6.6">6.6.6</a>&nbsp;&nbsp;&nbsp;<a href="#status.505">505 HTTP Version Not Supported</a></li></ul></li></ul></li><li><a href="#rfc.section.7">7.</a>&nbsp;&nbsp;&nbsp;<a href="#response.header.fields">Response Header Fields</a><ul><li><a href="#rfc.section.7.1">7.1</a>&nbsp;&nbsp;&nbsp;<a href="#response.control.data">Control Data</a><ul><li><a href="#rfc.section.7.1.1">7.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#origination.date">Origination Date</a></li><li><a href="#rfc.section.7.1.2">7.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.location">Location</a></li><li><a href="#rfc.section.7.1.3">7.1.3</a>&nbsp;&nbsp;&nbsp;<a href="#header.retry-after">Retry-After</a></li><li><a href="#rfc.section.7.1.4">7.1.4</a>&nbsp;&nbsp;&nbsp;<a href="#header.vary">Vary</a></li></ul></li><li><a href="#rfc.section.7.2">7.2</a>&nbsp;&nbsp;&nbsp;<a href="#response.validator">Validator Header Fields</a></li><li><a href="#rfc.section.7.3">7.3</a>&nbsp;&nbsp;&nbsp;<a href="#response.auth">Authentication Challenges</a></li><li><a href="#rfc.section.7.4">7.4</a>&nbsp;&nbsp;&nbsp;<a href="#response.context">Response Context</a><ul><li><a href="#rfc.section.7.4.1">7.4.1</a>&nbsp;&nbsp;&nbsp;<a href="#header.allow">Allow</a></li><li><a href="#rfc.section.7.4.2">7.4.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.server">Server</a></li></ul></li></ul></li><li><a href="#rfc.section.8">8.</a>&nbsp;&nbsp;&nbsp;<a href="#IANA.considerations">IANA Considerations</a><ul><li><a href="#rfc.section.8.1">8.1</a>&nbsp;&nbsp;&nbsp;<a href="#method.registry">Method Registry</a><ul><li><a href="#rfc.section.8.1.1">8.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#method.registry.procedure">Procedure</a></li><li><a href="#rfc.section.8.1.2">8.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#considerations.for.new.methods">Considerations for New Methods</a></li><li><a href="#rfc.section.8.1.3">8.1.3</a>&nbsp;&nbsp;&nbsp;<a href="#method.registration">Registrations</a></li></ul></li><li><a href="#rfc.section.8.2">8.2</a>&nbsp;&nbsp;&nbsp;<a href="#status.code.registry">Status Code Registry</a><ul><li><a href="#rfc.section.8.2.1">8.2.1</a>&nbsp;&nbsp;&nbsp;<a href="#status.code.registry.procedure">Procedure</a></li><li><a href="#rfc.section.8.2.2">8.2.2</a>&nbsp;&nbsp;&nbsp;<a href="#considerations.for.new.status.codes">Considerations for New Status Codes</a></li><li><a href="#rfc.section.8.2.3">8.2.3</a>&nbsp;&nbsp;&nbsp;<a href="#status.code.registration">Registrations</a></li></ul></li><li><a href="#rfc.section.8.3">8.3</a>&nbsp;&nbsp;&nbsp;<a href="#header.field.registry">Header Field Registry</a><ul><li><a href="#rfc.section.8.3.1">8.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#considerations.for.new.header.fields">Considerations for New Header Fields</a></li><li><a href="#rfc.section.8.3.2">8.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.field.registration">Registrations</a></li></ul></li><li><a href="#rfc.section.8.4">8.4</a>&nbsp;&nbsp;&nbsp;<a href="#content.coding.registry">Content Coding Registry</a><ul><li><a href="#rfc.section.8.4.1">8.4.1</a>&nbsp;&nbsp;&nbsp;<a href="#content.coding.procedure">Procedure</a></li><li><a href="#rfc.section.8.4.2">8.4.2</a>&nbsp;&nbsp;&nbsp;<a href="#content.coding.registration">Registrations</a></li></ul></li></ul></li><li><a href="#rfc.section.9">9.</a>&nbsp;&nbsp;&nbsp;<a href="#security.considerations">Security Considerations</a><ul><li><a href="#rfc.section.9.1">9.1</a>&nbsp;&nbsp;&nbsp;<a href="#attack.pathname">Attacks Based on File and Path Names</a></li><li><a href="#rfc.section.9.2">9.2</a>&nbsp;&nbsp;&nbsp;<a href="#attack.injection">Attacks Based on Command, Code, or Query Injection</a></li><li><a href="#rfc.section.9.3">9.3</a>&nbsp;&nbsp;&nbsp;<a href="#personal.information">Disclosure of Personal Information</a></li><li><a href="#rfc.section.9.4">9.4</a>&nbsp;&nbsp;&nbsp;<a href="#sensitive.information.in.uris">Disclosure of Sensitive Information in URIs</a></li><li><a href="#rfc.section.9.5">9.5</a>&nbsp;&nbsp;&nbsp;<a href="#fragment.disclosure">Disclosure of Fragment after Redirects</a></li><li><a href="#rfc.section.9.6">9.6</a>&nbsp;&nbsp;&nbsp;<a href="#disclosure.product.information">Disclosure of Product Information</a></li><li><a href="#rfc.section.9.7">9.7</a>&nbsp;&nbsp;&nbsp;<a href="#fingerprinting">Browser Fingerprinting</a></li></ul></li><li><a href="#rfc.section.10">10.</a>&nbsp;&nbsp;&nbsp;<a href="#acks">Acknowledgments</a></li><li><a href="#rfc.section.11">11.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references">References</a><ul><li><a href="#rfc.section.11.1">11.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references.1">Normative References</a></li><li><a href="#rfc.section.11.2">11.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references.2">Informative References</a></li></ul></li><li><a href="#rfc.section.A">A.</a>&nbsp;&nbsp;&nbsp;<a href="#differences.between.http.and.mime">Differences between HTTP and MIME</a><ul><li><a href="#rfc.section.A.1">A.1</a>&nbsp;&nbsp;&nbsp;<a href="#mime-version">MIME-Version</a></li><li><a href="#rfc.section.A.2">A.2</a>&nbsp;&nbsp;&nbsp;<a href="#conversion.to.canonical.form">Conversion to Canonical Form</a></li><li><a href="#rfc.section.A.3">A.3</a>&nbsp;&nbsp;&nbsp;<a href="#conversion.of.date.formats">Conversion of Date Formats</a></li><li><a href="#rfc.section.A.4">A.4</a>&nbsp;&nbsp;&nbsp;<a href="#conversion.content-encoding">Conversion of Content-Encoding</a></li><li><a href="#rfc.section.A.5">A.5</a>&nbsp;&nbsp;&nbsp;<a href="#conversion.content-transfer-encoding">Conversion of Content-Transfer-Encoding</a></li><li><a href="#rfc.section.A.6">A.6</a>&nbsp;&nbsp;&nbsp;<a href="#mhtml.line.length">MHTML and Line Length Limitations</a></li></ul></li><li><a href="#rfc.section.B">B.</a>&nbsp;&nbsp;&nbsp;<a href="#changes.from.rfc.2616">Changes from RFC 2616</a></li><li><a href="#rfc.section.C">C.</a>&nbsp;&nbsp;&nbsp;<a href="#imported.abnf">Imported ABNF</a></li><li><a href="#rfc.section.D">D.</a>&nbsp;&nbsp;&nbsp;<a href="#collected.abnf">Collected ABNF</a></li><li><a href="#rfc.index">Index</a></li><li><a href="#rfc.authors">Authors' Addresses</a></li></ul></div><div id="introduction"><h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;<a href="#introduction">Introduction</a></h1><div id="rfc.section.1.p.1"><p>Each Hypertext Transfer Protocol (HTTP) message is either a request or a response. A server listens on a connection for a request, parses each message received, interprets the message semantics in relation to the identified request target, and responds to that request with one or more response messages. A client constructs request messages to communicate specific intentions, examines received responses to see if the intentions were carried out, and determines how to interpret the results. This document defines HTTP/1.1 request and response semantics in terms of the architecture defined in <a href="#RFC7230" id="rfc.xref.RFC7230.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>.<a class="self" href="#rfc.section.1.p.1">&para;</a></p></div><div id="rfc.section.1.p.2"><p>HTTP provides a uniform interface for interacting with a resource (<a href="#resources" title="Resources">Section&nbsp;2</a>), regardless of its type, nature, or implementation, via the manipulation and transfer of representations (<a href="#representations" title="Representations">Section&nbsp;3</a>).<a class="self" href="#rfc.section.1.p.2">&para;</a></p></div><div id="rfc.section.1.p.3"><p>HTTP semantics include the intentions defined by each request method (<a href="#methods" title="Request Methods">Section&nbsp;4</a>), extensions to those semantics that might be described in request header fields (<a href="#request.header.fields" title="Request Header Fields">Section&nbsp;5</a>), the meaning of status codes to indicate a machine-readable response (<a href="#status.codes" title="Response Status Codes">Section&nbsp;6</a>), and the meaning of other control data and resource metadata that might be given in response header fields (<a href="#response.header.fields" title="Response Header Fields">Section&nbsp;7</a>).<a class="self" href="#rfc.section.1.p.3">&para;</a></p></div><div id="rfc.section.1.p.4"><p><span id="rfc.iref.c.1"></span> This document also defines representation metadata that describe how a payload is intended to be interpreted by a recipient, the request header fields that might influence content selection, and the various selection algorithms that are collectively referred to as "<dfn>content negotiation</dfn>" (<a href="#content.negotiation" title="Content Negotiation">Section&nbsp;3.4</a>).<a class="self" href="#rfc.section.1.p.4">&para;</a></p></div><div id="conformance"><h2 id="rfc.section.1.1"><a href="#rfc.section.1.1">1.1</a>&nbsp;<a href="#conformance">Conformance and Error Handling</a></h2><div id="rfc.section.1.1.p.1"><p>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in <a href="#RFC2119" id="rfc.xref.RFC2119.1"><cite title="Key words for use in RFCs to Indicate Requirement Levels">[RFC2119]</cite></a>.<a class="self" href="#rfc.section.1.1.p.1">&para;</a></p></div><div id="rfc.section.1.1.p.2"><p>Conformance criteria and considerations regarding error handling are defined in <a href="rfc7230.html#conformance" title="Conformance and Error Handling">Section 2.5</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>.<a class="self" href="#rfc.section.1.1.p.2">&para;</a></p></div></div><div id="notation"><h2 id="rfc.section.1.2"><a href="#rfc.section.1.2">1.2</a>&nbsp;<a href="#notation">Syntax Notation</a></h2><div id="rfc.section.1.2.p.1"><p>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> with a list extension, defined in <a href="rfc7230.html#abnf.extension" title="ABNF List Extension: #rule">Section 7</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>, that allows for compact definition of comma-separated lists using a '#' operator (similar to how the '*' operator indicates repetition). <a href="#imported.abnf" title="Imported ABNF">Appendix&nbsp;C</a> describes rules imported from other documents. <a href="#collected.abnf" title="Collected ABNF">Appendix&nbsp;D</a> shows the collected grammar with all list operators expanded to standard ABNF notation.<a class="self" href="#rfc.section.1.2.p.1">&para;</a></p></div><div id="rfc.section.1.2.p.2"><p>This specification uses the terms "character", "character encoding scheme", "charset", and "protocol element" as they are defined in <a href="#RFC6365" id="rfc.xref.RFC6365.1"><cite title="Terminology Used in Internationalization in the IETF">[RFC6365]</cite></a>.<a class="self" href="#rfc.section.1.2.p.2">&para;</a></p></div></div></div><div id="resources"><h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a href="#resources">Resources</a></h1><div id="rfc.section.2.p.1"><p>The target of an HTTP request is called a "<dfn>resource</dfn>". HTTP does not limit the nature of a resource; it merely defines an interface that might be used to interact with resources. Each resource is identified by a Uniform Resource Identifier (URI), as described in <a href="rfc7230.html#uri" title="Uniform Resource Identifiers">Section 2.7</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.4"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>.<a class="self" href="#rfc.section.2.p.1">&para;</a></p></div><div id="rfc.section.2.p.2"><p>When a client constructs an HTTP/1.1 request message, it sends the <a href="rfc7230.html#target-resource" class="smpl">target URI</a> in one of various forms, as defined in (<a href="rfc7230.html#request-target" title="Request Target">Section 5.3</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>). When a request is received, the server reconstructs an <a href="rfc7230.html#effective.request.uri" class="smpl">effective request URI</a> for the target resource (<a href="rfc7230.html#effective.request.uri" title="Effective Request URI">Section 5.5</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.6"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>).<a class="self" href="#rfc.section.2.p.2">&para;</a></p></div><div id="rfc.section.2.p.3"><p>One design goal of HTTP is to separate resource identification from request semantics, which is made possible by vesting the request semantics in the request method (<a href="#methods" title="Request Methods">Section&nbsp;4</a>) and a few request-modifying header fields (<a href="#request.header.fields" title="Request Header Fields">Section&nbsp;5</a>). If there is a conflict between the method semantics and any semantic implied by the URI itself, as described in <a href="#safe.methods" title="Safe Methods">Section&nbsp;4.2.1</a>, the method semantics take precedence.<a class="self" href="#rfc.section.2.p.3">&para;</a></p></div></div><div id="representations"><h1 id="rfc.section.3"><a href="#rfc.section.3">3.</a>&nbsp;<a href="#representations">Representations</a></h1><div id="rfc.section.3.p.1"><p>Considering that a resource could be anything, and that the uniform interface provided by HTTP is similar to a window through which one can observe and act upon such a thing only through the communication of messages to some independent actor on the other side, an abstraction is needed to represent ("take the place of") the current or desired state of that thing in our communications. That abstraction is called a representation <a href="#REST" id="rfc.xref.REST.1"><cite title="Architectural Styles and the Design of Network-based Software Architectures">[REST]</cite></a>.<a class="self" href="#rfc.section.3.p.1">&para;</a></p></div><div id="rfc.section.3.p.2"><p>For the purposes of HTTP, a "<dfn>representation</dfn>" is information that is intended to reflect a past, current, or desired state of a given resource, in a format that can be readily communicated via the protocol, and that consists of a set of representation metadata and a potentially unbounded stream of representation data.<a class="self" href="#rfc.section.3.p.2">&para;</a></p></div><div id="rfc.section.3.p.3"><p>An origin server might be provided with, or be capable of generating, multiple representations that are each intended to reflect the current state of a <a href="#resources" class="smpl">target resource</a>. In such cases, some algorithm is used by the origin server to select one of those representations as most applicable to a given request, usually based on <a href="#content.negotiation" class="smpl">content negotiation</a>. This "<dfn>selected representation</dfn>" is used to provide the data and metadata for evaluating conditional requests <a href="#RFC7232" id="rfc.xref.RFC7232.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[RFC7232]</cite></a> and constructing the payload for <a href="#status.200" class="smpl">200 (OK)</a> and <a href="rfc7232.html#status.304" class="smpl">304 (Not Modified)</a> responses to GET (<a href="#GET" id="rfc.xref.GET.1" title="GET">Section&nbsp;4.3.1</a>).<a class="self" href="#rfc.section.3.p.3">&para;</a></p></div><div id="representation.metadata"><h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a>&nbsp;<a href="#representation.metadata">Representation Metadata</a></h2><div id="rfc.section.3.1.p.1"><p>Representation header fields provide metadata about the representation. When a message includes a payload body, the representation header fields describe how to interpret the representation data enclosed in the payload body. In a response to a HEAD request, the representation header fields describe the representation data that would have been enclosed in the payload body if the same request had been a GET.<a class="self" href="#rfc.section.3.1.p.1">&para;</a></p></div><div id="rfc.section.3.1.p.2"><p>The following header fields convey representation metadata:<a class="self" href="#rfc.section.3.1.p.2">&para;</a></p></div><div id="rfc.table.u.1"><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Header Field Name</th><th>Defined in...</th></tr></thead><tbody><tr><td class="left">Content-Type</td><td class="left"><a href="#header.content-type" id="rfc.xref.header.content-type.1" title="Content-Type">Section&nbsp;3.1.1.5</a></td></tr><tr><td class="left">Content-Encoding</td><td class="left"><a href="#header.content-encoding" id="rfc.xref.header.content-encoding.1" title="Content-Encoding">Section&nbsp;3.1.2.2</a></td></tr><tr><td class="left">Content-Language</td><td class="left"><a href="#header.content-language" id="rfc.xref.header.content-language.1" title="Content-Language">Section&nbsp;3.1.3.2</a></td></tr><tr><td class="left">Content-Location</td><td class="left"><a href="#header.content-location" id="rfc.xref.header.content-location.1" title="Content-Location">Section&nbsp;3.1.4.2</a></td></tr></tbody></table></div><div id="data.type"><h3 id="rfc.section.3.1.1"><a href="#rfc.section.3.1.1">3.1.1</a>&nbsp;<a href="#data.type">Processing Representation Data</a></h3><div id="media.type"><h4 id="rfc.section.3.1.1.1"><a href="#rfc.section.3.1.1.1">3.1.1.1</a>&nbsp;<a href="#media.type">Media Type</a></h4><div id="rfc.section.3.1.1.1.p.1"><p>HTTP uses Internet media types <a href="#RFC2046" id="rfc.xref.RFC2046.1"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types">[RFC2046]</cite></a> in the <a href="#header.content-type" class="smpl">Content-Type</a> (<a href="#header.content-type" id="rfc.xref.header.content-type.2" title="Content-Type">Section&nbsp;3.1.1.5</a>) and <a href="#header.accept" class="smpl">Accept</a> (<a href="#header.accept" id="rfc.xref.header.accept.1" title="Accept">Section&nbsp;5.3.2</a>) header fields in order to provide open and extensible data typing and type negotiation. Media types define both a data format and various processing models: how to process that data in accordance with each context in which it is received.<a class="self" href="#rfc.section.3.1.1.1.p.1">&para;</a></p></div><div id="rfc.figure.u.1"><pre class="inline"><span id="rfc.iref.g.1"></span><span id="rfc.iref.g.2"></span><span id="rfc.iref.g.3"></span>  <a href="#media.type" class="smpl">media-type</a> = <a href="#media.type" class="smpl">type</a> "/" <a href="#media.type" class="smpl">subtype</a> *( <a href="#imported.abnf" class="smpl">OWS</a> ";" <a href="#imported.abnf" class="smpl">OWS</a> <a href="#rule.parameter" class="smpl">parameter</a> ) 
     527</style><link rel="Contents" href="#rfc.toc"><link rel="Author" href="#rfc.authors"><link rel="Copyright" href="#rfc.copyrightnotice"><link rel="Index" href="#rfc.index"><link rel="Chapter" title="1 Introduction" href="#rfc.section.1"><link rel="Chapter" title="2 Resources" href="#rfc.section.2"><link rel="Chapter" title="3 Representations" href="#rfc.section.3"><link rel="Chapter" title="4 Request Methods" href="#rfc.section.4"><link rel="Chapter" title="5 Request Header Fields" href="#rfc.section.5"><link rel="Chapter" title="6 Response Status Codes" href="#rfc.section.6"><link rel="Chapter" title="7 Response Header Fields" href="#rfc.section.7"><link rel="Chapter" title="8 IANA Considerations" href="#rfc.section.8"><link rel="Chapter" title="9 Security Considerations" href="#rfc.section.9"><link rel="Chapter" title="10 Acknowledgments" href="#rfc.section.10"><link rel="Chapter" href="#rfc.section.11" title="11 References"><link rel="Appendix" title="A Differences between HTTP and MIME" href="#rfc.section.A"><link rel="Appendix" title="B Changes from RFC 2616" href="#rfc.section.B"><link rel="Appendix" title="C Imported ABNF" href="#rfc.section.C"><link rel="Appendix" title="D Collected ABNF" href="#rfc.section.D"><link href="rfc7230.html" rel="prev"><link href="rfc7232.html" rel="next"><link rel="Alternate" title="Authoritative ASCII Version" href="http://www.ietf.org/rfc/rfc7231.txt"><link rel="Help" title="RFC-Editor's Status Page" href="http://www.rfc-editor.org/info/rfc7231"><link rel="Help" title="Additional Information on tools.ietf.org" href="http://tools.ietf.org/html/rfc7231"><meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.730, 2015/05/19 09:21:05, XSLT vendor: SAXON 6.5.5 from Michael Kay http://saxon.sf.net/"><meta name="keywords" content="Hypertext Transfer Protocol, HTTP, HTTP semantics, HTTP payload, HTTP content, HTTP method, HTTP status code"><link rel="schema.dct" href="http://purl.org/dc/terms/"><meta name="dct.creator" content="Fielding, R."><meta name="dct.creator" content="Reschke, J. F."><meta name="dct.identifier" content="urn:ietf:rfc:7231"><meta name="dct.issued" scheme="ISO8601" content="2014-06"><meta name="dct.replaces" content="urn:ietf:rfc:2616"><meta name="dct.abstract" content="The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines the semantics of HTTP/1.1 messages, as expressed by request methods, request header fields, response status codes, and response header fields, along with the payload of messages (metadata and body content) and mechanisms for content negotiation."><meta name="dct.isPartOf" content="urn:issn:2070-1721"><meta name="description" content="The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines the semantics of HTTP/1.1 messages, as expressed by request methods, request header fields, response status codes, and response header fields, along with the payload of messages (metadata and body content) and mechanisms for content negotiation."></head><body onload="getMeta(7231,&#34;rfc.meta&#34;);"><table class="header" id="rfc.headerblock"><tbody><tr><td class="left">Internet Engineering Task Force (IETF)</td><td class="right">R. Fielding, Editor</td></tr><tr><td class="left">Request for Comments: 7231</td><td class="right">Adobe</td></tr><tr><td class="left">Obsoletes: <a href="https://tools.ietf.org/html/rfc2616">2616</a></td><td class="right">J. Reschke, Editor</td></tr><tr><td class="left">Updates: <a href="https://tools.ietf.org/html/rfc2817">2817</a></td><td class="right">greenbytes</td></tr><tr><td class="left">Category: Standards Track</td><td class="right">June 2014</td></tr><tr><td class="left">ISSN: 2070-1721</td><td class="right"></td></tr></tbody></table><p class="title" id="rfc.title">Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</p><h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1><p>The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines the semantics of HTTP/1.1 messages, as expressed by request methods, request header fields, response status codes, and response header fields, along with the payload of messages (metadata and body content) and mechanisms for content negotiation.</p><div id="rfc.meta" style="float: right; border: 1px solid black; margin: 2em; padding: 1em; display: none;"></div><div id="rfc.status"><h1><a href="#rfc.status">Status of This Memo</a></h1><p>This is an Internet Standards Track document.</p><p>This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.</p><p>Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at <a href="http://www.rfc-editor.org/info/rfc7231">http://www.rfc-editor.org/info/rfc7231</a>.</p></div><div id="rfc.copyrightnotice"><h1><a href="#rfc.copyrightnotice">Copyright Notice</a></h1><p>Copyright &copy; 2014 IETF Trust and the persons identified as the document authors. All rights reserved.</p><p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.</p><p>This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.</p></div><hr class="noprint"><div id="rfc.toc"><h1 class="np"><a href="#rfc.toc">Table of Contents</a></h1><ul class="toc"><li><a href="#rfc.section.1">1.</a>&nbsp;&nbsp;&nbsp;<a href="#introduction">Introduction</a><ul><li><a href="#rfc.section.1.1">1.1</a>&nbsp;&nbsp;&nbsp;<a href="#conformance">Conformance and Error Handling</a></li><li><a href="#rfc.section.1.2">1.2</a>&nbsp;&nbsp;&nbsp;<a href="#notation">Syntax Notation</a></li></ul></li><li><a href="#rfc.section.2">2.</a>&nbsp;&nbsp;&nbsp;<a href="#resources">Resources</a></li><li><a href="#rfc.section.3">3.</a>&nbsp;&nbsp;&nbsp;<a href="#representations">Representations</a><ul><li><a href="#rfc.section.3.1">3.1</a>&nbsp;&nbsp;&nbsp;<a href="#representation.metadata">Representation Metadata</a><ul><li><a href="#rfc.section.3.1.1">3.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#data.type">Processing Representation Data</a></li><li><a href="#rfc.section.3.1.2">3.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#data.encoding">Encoding for Compression or Integrity</a></li><li><a href="#rfc.section.3.1.3">3.1.3</a>&nbsp;&nbsp;&nbsp;<a href="#audience.language">Audience Language</a></li><li><a href="#rfc.section.3.1.4">3.1.4</a>&nbsp;&nbsp;&nbsp;<a href="#identification">Identification</a></li></ul></li><li><a href="#rfc.section.3.2">3.2</a>&nbsp;&nbsp;&nbsp;<a href="#representation.data">Representation Data</a></li><li><a href="#rfc.section.3.3">3.3</a>&nbsp;&nbsp;&nbsp;<a href="#payload">Payload Semantics</a></li><li><a href="#rfc.section.3.4">3.4</a>&nbsp;&nbsp;&nbsp;<a href="#content.negotiation">Content Negotiation</a><ul><li><a href="#rfc.section.3.4.1">3.4.1</a>&nbsp;&nbsp;&nbsp;<a href="#proactive.negotiation">Proactive Negotiation</a></li><li><a href="#rfc.section.3.4.2">3.4.2</a>&nbsp;&nbsp;&nbsp;<a href="#reactive.negotiation">Reactive Negotiation</a></li></ul></li></ul></li><li><a href="#rfc.section.4">4.</a>&nbsp;&nbsp;&nbsp;<a href="#methods">Request Methods</a><ul><li><a href="#rfc.section.4.1">4.1</a>&nbsp;&nbsp;&nbsp;<a href="#method.overview">Overview</a></li><li><a href="#rfc.section.4.2">4.2</a>&nbsp;&nbsp;&nbsp;<a href="#method.properties">Common Method Properties</a><ul><li><a href="#rfc.section.4.2.1">4.2.1</a>&nbsp;&nbsp;&nbsp;<a href="#safe.methods">Safe Methods</a></li><li><a href="#rfc.section.4.2.2">4.2.2</a>&nbsp;&nbsp;&nbsp;<a href="#idempotent.methods">Idempotent Methods</a></li><li><a href="#rfc.section.4.2.3">4.2.3</a>&nbsp;&nbsp;&nbsp;<a href="#cacheable.methods">Cacheable Methods</a></li></ul></li><li><a href="#rfc.section.4.3">4.3</a>&nbsp;&nbsp;&nbsp;<a href="#method.definitions">Method Definitions</a><ul><li><a href="#rfc.section.4.3.1">4.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#GET">GET</a></li><li><a href="#rfc.section.4.3.2">4.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#HEAD">HEAD</a></li><li><a href="#rfc.section.4.3.3">4.3.3</a>&nbsp;&nbsp;&nbsp;<a href="#POST">POST</a></li><li><a href="#rfc.section.4.3.4">4.3.4</a>&nbsp;&nbsp;&nbsp;<a href="#PUT">PUT</a></li><li><a href="#rfc.section.4.3.5">4.3.5</a>&nbsp;&nbsp;&nbsp;<a href="#DELETE">DELETE</a></li><li><a href="#rfc.section.4.3.6">4.3.6</a>&nbsp;&nbsp;&nbsp;<a href="#CONNECT">CONNECT</a></li><li><a href="#rfc.section.4.3.7">4.3.7</a>&nbsp;&nbsp;&nbsp;<a href="#OPTIONS">OPTIONS</a></li><li><a href="#rfc.section.4.3.8">4.3.8</a>&nbsp;&nbsp;&nbsp;<a href="#TRACE">TRACE</a></li></ul></li></ul></li><li><a href="#rfc.section.5">5.</a>&nbsp;&nbsp;&nbsp;<a href="#request.header.fields">Request Header Fields</a><ul><li><a href="#rfc.section.5.1">5.1</a>&nbsp;&nbsp;&nbsp;<a href="#request.controls">Controls</a><ul><li><a href="#rfc.section.5.1.1">5.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#header.expect">Expect</a></li><li><a href="#rfc.section.5.1.2">5.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.max-forwards">Max-Forwards</a></li></ul></li><li><a href="#rfc.section.5.2">5.2</a>&nbsp;&nbsp;&nbsp;<a href="#request.conditionals">Conditionals</a></li><li><a href="#rfc.section.5.3">5.3</a>&nbsp;&nbsp;&nbsp;<a href="#request.conneg">Content Negotiation</a><ul><li><a href="#rfc.section.5.3.1">5.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#quality.values">Quality Values</a></li><li><a href="#rfc.section.5.3.2">5.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.accept">Accept</a></li><li><a href="#rfc.section.5.3.3">5.3.3</a>&nbsp;&nbsp;&nbsp;<a href="#header.accept-charset">Accept-Charset</a></li><li><a href="#rfc.section.5.3.4">5.3.4</a>&nbsp;&nbsp;&nbsp;<a href="#header.accept-encoding">Accept-Encoding</a></li><li><a href="#rfc.section.5.3.5">5.3.5</a>&nbsp;&nbsp;&nbsp;<a href="#header.accept-language">Accept-Language</a></li></ul></li><li><a href="#rfc.section.5.4">5.4</a>&nbsp;&nbsp;&nbsp;<a href="#request.auth">Authentication Credentials</a></li><li><a href="#rfc.section.5.5">5.5</a>&nbsp;&nbsp;&nbsp;<a href="#request.context">Request Context</a><ul><li><a href="#rfc.section.5.5.1">5.5.1</a>&nbsp;&nbsp;&nbsp;<a href="#header.from">From</a></li><li><a href="#rfc.section.5.5.2">5.5.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.referer">Referer</a></li><li><a href="#rfc.section.5.5.3">5.5.3</a>&nbsp;&nbsp;&nbsp;<a href="#header.user-agent">User-Agent</a></li></ul></li></ul></li><li><a href="#rfc.section.6">6.</a>&nbsp;&nbsp;&nbsp;<a href="#status.codes">Response Status Codes</a><ul><li><a href="#rfc.section.6.1">6.1</a>&nbsp;&nbsp;&nbsp;<a href="#overview.of.status.codes">Overview of Status Codes</a></li><li><a href="#rfc.section.6.2">6.2</a>&nbsp;&nbsp;&nbsp;<a href="#status.1xx">Informational 1xx</a><ul><li><a href="#rfc.section.6.2.1">6.2.1</a>&nbsp;&nbsp;&nbsp;<a href="#status.100">100 Continue</a></li><li><a href="#rfc.section.6.2.2">6.2.2</a>&nbsp;&nbsp;&nbsp;<a href="#status.101">101 Switching Protocols</a></li></ul></li><li><a href="#rfc.section.6.3">6.3</a>&nbsp;&nbsp;&nbsp;<a href="#status.2xx">Successful 2xx</a><ul><li><a href="#rfc.section.6.3.1">6.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#status.200">200 OK</a></li><li><a href="#rfc.section.6.3.2">6.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#status.201">201 Created</a></li><li><a href="#rfc.section.6.3.3">6.3.3</a>&nbsp;&nbsp;&nbsp;<a href="#status.202">202 Accepted</a></li><li><a href="#rfc.section.6.3.4">6.3.4</a>&nbsp;&nbsp;&nbsp;<a href="#status.203">203 Non-Authoritative Information</a></li><li><a href="#rfc.section.6.3.5">6.3.5</a>&nbsp;&nbsp;&nbsp;<a href="#status.204">204 No Content</a></li><li><a href="#rfc.section.6.3.6">6.3.6</a>&nbsp;&nbsp;&nbsp;<a href="#status.205">205 Reset Content</a></li></ul></li><li><a href="#rfc.section.6.4">6.4</a>&nbsp;&nbsp;&nbsp;<a href="#status.3xx">Redirection 3xx</a><ul><li><a href="#rfc.section.6.4.1">6.4.1</a>&nbsp;&nbsp;&nbsp;<a href="#status.300">300 Multiple Choices</a></li><li><a href="#rfc.section.6.4.2">6.4.2</a>&nbsp;&nbsp;&nbsp;<a href="#status.301">301 Moved Permanently</a></li><li><a href="#rfc.section.6.4.3">6.4.3</a>&nbsp;&nbsp;&nbsp;<a href="#status.302">302 Found</a></li><li><a href="#rfc.section.6.4.4">6.4.4</a>&nbsp;&nbsp;&nbsp;<a href="#status.303">303 See Other</a></li><li><a href="#rfc.section.6.4.5">6.4.5</a>&nbsp;&nbsp;&nbsp;<a href="#status.305">305 Use Proxy</a></li><li><a href="#rfc.section.6.4.6">6.4.6</a>&nbsp;&nbsp;&nbsp;<a href="#status.306">306 (Unused)</a></li><li><a href="#rfc.section.6.4.7">6.4.7</a>&nbsp;&nbsp;&nbsp;<a href="#status.307">307 Temporary Redirect</a></li></ul></li><li><a href="#rfc.section.6.5">6.5</a>&nbsp;&nbsp;&nbsp;<a href="#status.4xx">Client Error 4xx</a><ul><li><a href="#rfc.section.6.5.1">6.5.1</a>&nbsp;&nbsp;&nbsp;<a href="#status.400">400 Bad Request</a></li><li><a href="#rfc.section.6.5.2">6.5.2</a>&nbsp;&nbsp;&nbsp;<a href="#status.402">402 Payment Required</a></li><li><a href="#rfc.section.6.5.3">6.5.3</a>&nbsp;&nbsp;&nbsp;<a href="#status.403">403 Forbidden</a></li><li><a href="#rfc.section.6.5.4">6.5.4</a>&nbsp;&nbsp;&nbsp;<a href="#status.404">404 Not Found</a></li><li><a href="#rfc.section.6.5.5">6.5.5</a>&nbsp;&nbsp;&nbsp;<a href="#status.405">405 Method Not Allowed</a></li><li><a href="#rfc.section.6.5.6">6.5.6</a>&nbsp;&nbsp;&nbsp;<a href="#status.406">406 Not Acceptable</a></li><li><a href="#rfc.section.6.5.7">6.5.7</a>&nbsp;&nbsp;&nbsp;<a href="#status.408">408 Request Timeout</a></li><li><a href="#rfc.section.6.5.8">6.5.8</a>&nbsp;&nbsp;&nbsp;<a href="#status.409">409 Conflict</a></li><li><a href="#rfc.section.6.5.9">6.5.9</a>&nbsp;&nbsp;&nbsp;<a href="#status.410">410 Gone</a></li><li><a href="#rfc.section.6.5.10">6.5.10</a>&nbsp;&nbsp;&nbsp;<a href="#status.411">411 Length Required</a></li><li><a href="#rfc.section.6.5.11">6.5.11</a>&nbsp;&nbsp;&nbsp;<a href="#status.413">413 Payload Too Large</a></li><li><a href="#rfc.section.6.5.12">6.5.12</a>&nbsp;&nbsp;&nbsp;<a href="#status.414">414 URI Too Long</a></li><li><a href="#rfc.section.6.5.13">6.5.13</a>&nbsp;&nbsp;&nbsp;<a href="#status.415">415 Unsupported Media Type</a></li><li><a href="#rfc.section.6.5.14">6.5.14</a>&nbsp;&nbsp;&nbsp;<a href="#status.417">417 Expectation Failed</a></li><li><a href="#rfc.section.6.5.15">6.5.15</a>&nbsp;&nbsp;&nbsp;<a href="#status.426">426 Upgrade Required</a></li></ul></li><li><a href="#rfc.section.6.6">6.6</a>&nbsp;&nbsp;&nbsp;<a href="#status.5xx">Server Error 5xx</a><ul><li><a href="#rfc.section.6.6.1">6.6.1</a>&nbsp;&nbsp;&nbsp;<a href="#status.500">500 Internal Server Error</a></li><li><a href="#rfc.section.6.6.2">6.6.2</a>&nbsp;&nbsp;&nbsp;<a href="#status.501">501 Not Implemented</a></li><li><a href="#rfc.section.6.6.3">6.6.3</a>&nbsp;&nbsp;&nbsp;<a href="#status.502">502 Bad Gateway</a></li><li><a href="#rfc.section.6.6.4">6.6.4</a>&nbsp;&nbsp;&nbsp;<a href="#status.503">503 Service Unavailable</a></li><li><a href="#rfc.section.6.6.5">6.6.5</a>&nbsp;&nbsp;&nbsp;<a href="#status.504">504 Gateway Timeout</a></li><li><a href="#rfc.section.6.6.6">6.6.6</a>&nbsp;&nbsp;&nbsp;<a href="#status.505">505 HTTP Version Not Supported</a></li></ul></li></ul></li><li><a href="#rfc.section.7">7.</a>&nbsp;&nbsp;&nbsp;<a href="#response.header.fields">Response Header Fields</a><ul><li><a href="#rfc.section.7.1">7.1</a>&nbsp;&nbsp;&nbsp;<a href="#response.control.data">Control Data</a><ul><li><a href="#rfc.section.7.1.1">7.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#origination.date">Origination Date</a></li><li><a href="#rfc.section.7.1.2">7.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.location">Location</a></li><li><a href="#rfc.section.7.1.3">7.1.3</a>&nbsp;&nbsp;&nbsp;<a href="#header.retry-after">Retry-After</a></li><li><a href="#rfc.section.7.1.4">7.1.4</a>&nbsp;&nbsp;&nbsp;<a href="#header.vary">Vary</a></li></ul></li><li><a href="#rfc.section.7.2">7.2</a>&nbsp;&nbsp;&nbsp;<a href="#response.validator">Validator Header Fields</a></li><li><a href="#rfc.section.7.3">7.3</a>&nbsp;&nbsp;&nbsp;<a href="#response.auth">Authentication Challenges</a></li><li><a href="#rfc.section.7.4">7.4</a>&nbsp;&nbsp;&nbsp;<a href="#response.context">Response Context</a><ul><li><a href="#rfc.section.7.4.1">7.4.1</a>&nbsp;&nbsp;&nbsp;<a href="#header.allow">Allow</a></li><li><a href="#rfc.section.7.4.2">7.4.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.server">Server</a></li></ul></li></ul></li><li><a href="#rfc.section.8">8.</a>&nbsp;&nbsp;&nbsp;<a href="#IANA.considerations">IANA Considerations</a><ul><li><a href="#rfc.section.8.1">8.1</a>&nbsp;&nbsp;&nbsp;<a href="#method.registry">Method Registry</a><ul><li><a href="#rfc.section.8.1.1">8.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#method.registry.procedure">Procedure</a></li><li><a href="#rfc.section.8.1.2">8.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#considerations.for.new.methods">Considerations for New Methods</a></li><li><a href="#rfc.section.8.1.3">8.1.3</a>&nbsp;&nbsp;&nbsp;<a href="#method.registration">Registrations</a></li></ul></li><li><a href="#rfc.section.8.2">8.2</a>&nbsp;&nbsp;&nbsp;<a href="#status.code.registry">Status Code Registry</a><ul><li><a href="#rfc.section.8.2.1">8.2.1</a>&nbsp;&nbsp;&nbsp;<a href="#status.code.registry.procedure">Procedure</a></li><li><a href="#rfc.section.8.2.2">8.2.2</a>&nbsp;&nbsp;&nbsp;<a href="#considerations.for.new.status.codes">Considerations for New Status Codes</a></li><li><a href="#rfc.section.8.2.3">8.2.3</a>&nbsp;&nbsp;&nbsp;<a href="#status.code.registration">Registrations</a></li></ul></li><li><a href="#rfc.section.8.3">8.3</a>&nbsp;&nbsp;&nbsp;<a href="#header.field.registry">Header Field Registry</a><ul><li><a href="#rfc.section.8.3.1">8.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#considerations.for.new.header.fields">Considerations for New Header Fields</a></li><li><a href="#rfc.section.8.3.2">8.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.field.registration">Registrations</a></li></ul></li><li><a href="#rfc.section.8.4">8.4</a>&nbsp;&nbsp;&nbsp;<a href="#content.coding.registry">Content Coding Registry</a><ul><li><a href="#rfc.section.8.4.1">8.4.1</a>&nbsp;&nbsp;&nbsp;<a href="#content.coding.procedure">Procedure</a></li><li><a href="#rfc.section.8.4.2">8.4.2</a>&nbsp;&nbsp;&nbsp;<a href="#content.coding.registration">Registrations</a></li></ul></li></ul></li><li><a href="#rfc.section.9">9.</a>&nbsp;&nbsp;&nbsp;<a href="#security.considerations">Security Considerations</a><ul><li><a href="#rfc.section.9.1">9.1</a>&nbsp;&nbsp;&nbsp;<a href="#attack.pathname">Attacks Based on File and Path Names</a></li><li><a href="#rfc.section.9.2">9.2</a>&nbsp;&nbsp;&nbsp;<a href="#attack.injection">Attacks Based on Command, Code, or Query Injection</a></li><li><a href="#rfc.section.9.3">9.3</a>&nbsp;&nbsp;&nbsp;<a href="#personal.information">Disclosure of Personal Information</a></li><li><a href="#rfc.section.9.4">9.4</a>&nbsp;&nbsp;&nbsp;<a href="#sensitive.information.in.uris">Disclosure of Sensitive Information in URIs</a></li><li><a href="#rfc.section.9.5">9.5</a>&nbsp;&nbsp;&nbsp;<a href="#fragment.disclosure">Disclosure of Fragment after Redirects</a></li><li><a href="#rfc.section.9.6">9.6</a>&nbsp;&nbsp;&nbsp;<a href="#disclosure.product.information">Disclosure of Product Information</a></li><li><a href="#rfc.section.9.7">9.7</a>&nbsp;&nbsp;&nbsp;<a href="#fingerprinting">Browser Fingerprinting</a></li></ul></li><li><a href="#rfc.section.10">10.</a>&nbsp;&nbsp;&nbsp;<a href="#acks">Acknowledgments</a></li><li><a href="#rfc.section.11">11.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references">References</a><ul><li><a href="#rfc.section.11.1">11.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references.1">Normative References</a></li><li><a href="#rfc.section.11.2">11.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references.2">Informative References</a></li></ul></li><li><a href="#rfc.section.A">A.</a>&nbsp;&nbsp;&nbsp;<a href="#differences.between.http.and.mime">Differences between HTTP and MIME</a><ul><li><a href="#rfc.section.A.1">A.1</a>&nbsp;&nbsp;&nbsp;<a href="#mime-version">MIME-Version</a></li><li><a href="#rfc.section.A.2">A.2</a>&nbsp;&nbsp;&nbsp;<a href="#conversion.to.canonical.form">Conversion to Canonical Form</a></li><li><a href="#rfc.section.A.3">A.3</a>&nbsp;&nbsp;&nbsp;<a href="#conversion.of.date.formats">Conversion of Date Formats</a></li><li><a href="#rfc.section.A.4">A.4</a>&nbsp;&nbsp;&nbsp;<a href="#conversion.content-encoding">Conversion of Content-Encoding</a></li><li><a href="#rfc.section.A.5">A.5</a>&nbsp;&nbsp;&nbsp;<a href="#conversion.content-transfer-encoding">Conversion of Content-Transfer-Encoding</a></li><li><a href="#rfc.section.A.6">A.6</a>&nbsp;&nbsp;&nbsp;<a href="#mhtml.line.length">MHTML and Line Length Limitations</a></li></ul></li><li><a href="#rfc.section.B">B.</a>&nbsp;&nbsp;&nbsp;<a href="#changes.from.rfc.2616">Changes from RFC 2616</a></li><li><a href="#rfc.section.C">C.</a>&nbsp;&nbsp;&nbsp;<a href="#imported.abnf">Imported ABNF</a></li><li><a href="#rfc.section.D">D.</a>&nbsp;&nbsp;&nbsp;<a href="#collected.abnf">Collected ABNF</a></li><li><a href="#rfc.index">Index</a></li><li><a href="#rfc.authors">Authors' Addresses</a></li></ul></div><div id="introduction"><h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;<a href="#introduction">Introduction</a></h1><div id="rfc.section.1.p.1"><p>Each Hypertext Transfer Protocol (HTTP) message is either a request or a response. A server listens on a connection for a request, parses each message received, interprets the message semantics in relation to the identified request target, and responds to that request with one or more response messages. A client constructs request messages to communicate specific intentions, examines received responses to see if the intentions were carried out, and determines how to interpret the results. This document defines HTTP/1.1 request and response semantics in terms of the architecture defined in <a href="#RFC7230" id="rfc.xref.RFC7230.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>.<a class="self" href="#rfc.section.1.p.1">&para;</a></p></div><div id="rfc.section.1.p.2"><p>HTTP provides a uniform interface for interacting with a resource (<a href="#resources" title="Resources">Section&nbsp;2</a>), regardless of its type, nature, or implementation, via the manipulation and transfer of representations (<a href="#representations" title="Representations">Section&nbsp;3</a>).<a class="self" href="#rfc.section.1.p.2">&para;</a></p></div><div id="rfc.section.1.p.3"><p>HTTP semantics include the intentions defined by each request method (<a href="#methods" title="Request Methods">Section&nbsp;4</a>), extensions to those semantics that might be described in request header fields (<a href="#request.header.fields" title="Request Header Fields">Section&nbsp;5</a>), the meaning of status codes to indicate a machine-readable response (<a href="#status.codes" title="Response Status Codes">Section&nbsp;6</a>), and the meaning of other control data and resource metadata that might be given in response header fields (<a href="#response.header.fields" title="Response Header Fields">Section&nbsp;7</a>).<a class="self" href="#rfc.section.1.p.3">&para;</a></p></div><div id="rfc.section.1.p.4"><p><span id="rfc.iref.c.1"></span> This document also defines representation metadata that describe how a payload is intended to be interpreted by a recipient, the request header fields that might influence content selection, and the various selection algorithms that are collectively referred to as "<dfn>content negotiation</dfn>" (<a href="#content.negotiation" title="Content Negotiation">Section&nbsp;3.4</a>).<a class="self" href="#rfc.section.1.p.4">&para;</a></p></div><div id="conformance"><h2 id="rfc.section.1.1"><a href="#rfc.section.1.1">1.1</a>&nbsp;<a href="#conformance">Conformance and Error Handling</a></h2><div id="rfc.section.1.1.p.1"><p>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in <a href="#RFC2119" id="rfc.xref.RFC2119.1"><cite title="Key words for use in RFCs to Indicate Requirement Levels">[RFC2119]</cite></a>.<a class="self" href="#rfc.section.1.1.p.1">&para;</a></p></div><div id="rfc.section.1.1.p.2"><p>Conformance criteria and considerations regarding error handling are defined in <a href="rfc7230.html#conformance" title="Conformance and Error Handling">Section 2.5</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>.<a class="self" href="#rfc.section.1.1.p.2">&para;</a></p></div></div><div id="notation"><h2 id="rfc.section.1.2"><a href="#rfc.section.1.2">1.2</a>&nbsp;<a href="#notation">Syntax Notation</a></h2><div id="rfc.section.1.2.p.1"><p>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> with a list extension, defined in <a href="rfc7230.html#abnf.extension" title="ABNF List Extension: #rule">Section 7</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>, that allows for compact definition of comma-separated lists using a '#' operator (similar to how the '*' operator indicates repetition). <a href="#imported.abnf" title="Imported ABNF">Appendix&nbsp;C</a> describes rules imported from other documents. <a href="#collected.abnf" title="Collected ABNF">Appendix&nbsp;D</a> shows the collected grammar with all list operators expanded to standard ABNF notation.<a class="self" href="#rfc.section.1.2.p.1">&para;</a></p></div><div id="rfc.section.1.2.p.2"><p>This specification uses the terms "character", "character encoding scheme", "charset", and "protocol element" as they are defined in <a href="#RFC6365" id="rfc.xref.RFC6365.1"><cite title="Terminology Used in Internationalization in the IETF">[RFC6365]</cite></a>.<a class="self" href="#rfc.section.1.2.p.2">&para;</a></p></div></div></div><div id="resources"><h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a href="#resources">Resources</a></h1><div id="rfc.section.2.p.1"><p>The target of an HTTP request is called a "<dfn>resource</dfn>". HTTP does not limit the nature of a resource; it merely defines an interface that might be used to interact with resources. Each resource is identified by a Uniform Resource Identifier (URI), as described in <a href="rfc7230.html#uri" title="Uniform Resource Identifiers">Section 2.7</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.4"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>.<a class="self" href="#rfc.section.2.p.1">&para;</a></p></div><div id="rfc.section.2.p.2"><p>When a client constructs an HTTP/1.1 request message, it sends the <a href="rfc7230.html#target-resource" class="smpl">target URI</a> in one of various forms, as defined in (<a href="rfc7230.html#request-target" title="Request Target">Section 5.3</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>). When a request is received, the server reconstructs an <a href="rfc7230.html#effective.request.uri" class="smpl">effective request URI</a> for the target resource (<a href="rfc7230.html#effective.request.uri" title="Effective Request URI">Section 5.5</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.6"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>).<a class="self" href="#rfc.section.2.p.2">&para;</a></p></div><div id="rfc.section.2.p.3"><p>One design goal of HTTP is to separate resource identification from request semantics, which is made possible by vesting the request semantics in the request method (<a href="#methods" title="Request Methods">Section&nbsp;4</a>) and a few request-modifying header fields (<a href="#request.header.fields" title="Request Header Fields">Section&nbsp;5</a>). If there is a conflict between the method semantics and any semantic implied by the URI itself, as described in <a href="#safe.methods" title="Safe Methods">Section&nbsp;4.2.1</a>, the method semantics take precedence.<a class="self" href="#rfc.section.2.p.3">&para;</a></p></div></div><div id="representations"><h1 id="rfc.section.3"><a href="#rfc.section.3">3.</a>&nbsp;<a href="#representations">Representations</a></h1><div id="rfc.section.3.p.1"><p>Considering that a resource could be anything, and that the uniform interface provided by HTTP is similar to a window through which one can observe and act upon such a thing only through the communication of messages to some independent actor on the other side, an abstraction is needed to represent ("take the place of") the current or desired state of that thing in our communications. That abstraction is called a representation <a href="#REST" id="rfc.xref.REST.1"><cite title="Architectural Styles and the Design of Network-based Software Architectures">[REST]</cite></a>.<a class="self" href="#rfc.section.3.p.1">&para;</a></p></div><div id="rfc.section.3.p.2"><p>For the purposes of HTTP, a "<dfn>representation</dfn>" is information that is intended to reflect a past, current, or desired state of a given resource, in a format that can be readily communicated via the protocol, and that consists of a set of representation metadata and a potentially unbounded stream of representation data.<a class="self" href="#rfc.section.3.p.2">&para;</a></p></div><div id="rfc.section.3.p.3"><p>An origin server might be provided with, or be capable of generating, multiple representations that are each intended to reflect the current state of a <a href="#resources" class="smpl">target resource</a>. In such cases, some algorithm is used by the origin server to select one of those representations as most applicable to a given request, usually based on <a href="#content.negotiation" class="smpl">content negotiation</a>. This "<dfn>selected representation</dfn>" is used to provide the data and metadata for evaluating conditional requests <a href="#RFC7232" id="rfc.xref.RFC7232.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[RFC7232]</cite></a> and constructing the payload for <a href="#status.200" class="smpl">200 (OK)</a> and <a href="rfc7232.html#status.304" class="smpl">304 (Not Modified)</a> responses to GET (<a href="#GET" id="rfc.xref.GET.1" title="GET">Section&nbsp;4.3.1</a>).<a class="self" href="#rfc.section.3.p.3">&para;</a></p></div><div id="representation.metadata"><h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a>&nbsp;<a href="#representation.metadata">Representation Metadata</a></h2><div id="rfc.section.3.1.p.1"><p>Representation header fields provide metadata about the representation. When a message includes a payload body, the representation header fields describe how to interpret the representation data enclosed in the payload body. In a response to a HEAD request, the representation header fields describe the representation data that would have been enclosed in the payload body if the same request had been a GET.<a class="self" href="#rfc.section.3.1.p.1">&para;</a></p></div><div id="rfc.section.3.1.p.2" class="avoidbreakafter"><p>The following header fields convey representation metadata:<a class="self" href="#rfc.section.3.1.p.2">&para;</a></p></div><div id="rfc.table.u.1"><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Header Field Name</th><th>Defined in...</th></tr></thead><tbody><tr><td class="left">Content-Type</td><td class="left"><a href="#header.content-type" id="rfc.xref.header.content-type.1" title="Content-Type">Section&nbsp;3.1.1.5</a></td></tr><tr><td class="left">Content-Encoding</td><td class="left"><a href="#header.content-encoding" id="rfc.xref.header.content-encoding.1" title="Content-Encoding">Section&nbsp;3.1.2.2</a></td></tr><tr><td class="left">Content-Language</td><td class="left"><a href="#header.content-language" id="rfc.xref.header.content-language.1" title="Content-Language">Section&nbsp;3.1.3.2</a></td></tr><tr><td class="left">Content-Location</td><td class="left"><a href="#header.content-location" id="rfc.xref.header.content-location.1" title="Content-Location">Section&nbsp;3.1.4.2</a></td></tr></tbody></table></div><div id="data.type"><h3 id="rfc.section.3.1.1"><a href="#rfc.section.3.1.1">3.1.1</a>&nbsp;<a href="#data.type">Processing Representation Data</a></h3><div id="media.type"><h4 id="rfc.section.3.1.1.1"><a href="#rfc.section.3.1.1.1">3.1.1.1</a>&nbsp;<a href="#media.type">Media Type</a></h4><div id="rfc.section.3.1.1.1.p.1"><p>HTTP uses Internet media types <a href="#RFC2046" id="rfc.xref.RFC2046.1"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types">[RFC2046]</cite></a> in the <a href="#header.content-type" class="smpl">Content-Type</a> (<a href="#header.content-type" id="rfc.xref.header.content-type.2" title="Content-Type">Section&nbsp;3.1.1.5</a>) and <a href="#header.accept" class="smpl">Accept</a> (<a href="#header.accept" id="rfc.xref.header.accept.1" title="Accept">Section&nbsp;5.3.2</a>) header fields in order to provide open and extensible data typing and type negotiation. Media types define both a data format and various processing models: how to process that data in accordance with each context in which it is received.<a class="self" href="#rfc.section.3.1.1.1.p.1">&para;</a></p></div><div id="rfc.figure.u.1"><pre class="inline"><span id="rfc.iref.g.1"></span><span id="rfc.iref.g.2"></span><span id="rfc.iref.g.3"></span>  <a href="#media.type" class="smpl">media-type</a> = <a href="#media.type" class="smpl">type</a> "/" <a href="#media.type" class="smpl">subtype</a> *( <a href="#imported.abnf" class="smpl">OWS</a> ";" <a href="#imported.abnf" class="smpl">OWS</a> <a href="#rule.parameter" class="smpl">parameter</a> ) 
    528528  <a href="#media.type" class="smpl">type</a>       = <a href="#imported.abnf" class="smpl">token</a> 
    529529  <a href="#media.type" class="smpl">subtype</a>    = <a href="#imported.abnf" class="smpl">token</a> 
    530530</pre></div><div id="rule.parameter"><div id="rfc.section.3.1.1.1.p.2"><p> The type/subtype <em class="bcp14">MAY</em> be followed by parameters in the form of name=value pairs.<a class="self" href="#rfc.section.3.1.1.1.p.2">&para;</a></p></div></div><div id="rfc.figure.u.2"><pre class="inline"><span id="rfc.iref.g.4"></span>  <a href="#rule.parameter" class="smpl">parameter</a>      = <a href="#imported.abnf" class="smpl">token</a> "=" ( <a href="#imported.abnf" class="smpl">token</a> / <a href="#imported.abnf" class="smpl">quoted-string</a> ) 
    531 </pre></div><div id="rfc.section.3.1.1.1.p.3"><p>The type, subtype, and parameter name tokens are case-insensitive. Parameter values might or might not be case-sensitive, depending on the semantics of the parameter name. The presence or absence of a parameter might be significant to the processing of a media-type, depending on its definition within the media type registry.<a class="self" href="#rfc.section.3.1.1.1.p.3">&para;</a></p></div><div id="rfc.section.3.1.1.1.p.4"><p>A parameter value that matches the <a href="#imported.abnf" class="smpl">token</a> production can be transmitted either as a token or within a quoted-string. The quoted and unquoted values are equivalent. For example, the following examples are all equivalent, but the first is preferred for consistency:<a class="self" href="#rfc.section.3.1.1.1.p.4">&para;</a></p></div><div id="rfc.figure.u.3"><pre class="text">  text/html;charset=utf-8 
     531</pre></div><div id="rfc.section.3.1.1.1.p.3"><p>The type, subtype, and parameter name tokens are case-insensitive. Parameter values might or might not be case-sensitive, depending on the semantics of the parameter name. The presence or absence of a parameter might be significant to the processing of a media-type, depending on its definition within the media type registry.<a class="self" href="#rfc.section.3.1.1.1.p.3">&para;</a></p></div><div id="rfc.section.3.1.1.1.p.4" class="avoidbreakafter"><p>A parameter value that matches the <a href="#imported.abnf" class="smpl">token</a> production can be transmitted either as a token or within a quoted-string. The quoted and unquoted values are equivalent. For example, the following examples are all equivalent, but the first is preferred for consistency:<a class="self" href="#rfc.section.3.1.1.1.p.4">&para;</a></p></div><div id="rfc.figure.u.3"><pre class="text">  text/html;charset=utf-8 
    532532  text/html;charset=UTF-8 
    533533  Text/HTML;Charset="utf-8" 
     
    540540</pre></div><div id="rfc.section.3.1.2.2.p.2"><p>An example of its use is<a class="self" href="#rfc.section.3.1.2.2.p.2">&para;</a></p></div><div id="rfc.figure.u.9"><pre class="text">  Content-Encoding: gzip 
    541541</pre></div><div id="rfc.section.3.1.2.2.p.3"><p>If one or more encodings have been applied to a representation, the sender that applied the encodings <em class="bcp14">MUST</em> generate a Content-Encoding header field that lists the content codings in the order in which they were applied. Additional information about the encoding parameters can be provided by other header fields not defined by this specification.<a class="self" href="#rfc.section.3.1.2.2.p.3">&para;</a></p></div><div id="rfc.section.3.1.2.2.p.4"><p>Unlike Transfer-Encoding (<a href="rfc7230.html#header.transfer-encoding" title="Transfer-Encoding">Section 3.3.1</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.10"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>), the codings listed in Content-Encoding are a characteristic of the representation; the representation is defined in terms of the coded form, and all other metadata about the representation is about the coded form unless otherwise noted in the metadata definition. Typically, the representation is only decoded just prior to rendering or analogous usage.<a class="self" href="#rfc.section.3.1.2.2.p.4">&para;</a></p></div><div id="rfc.section.3.1.2.2.p.5"><p>If the media type includes an inherent encoding, such as a data format that is always compressed, then that encoding would not be restated in Content-Encoding even if it happens to be the same algorithm as one of the content codings. Such a content coding would only be listed if, for some bizarre reason, it is applied a second time to form the representation. Likewise, an origin server might choose to publish the same data as multiple representations that differ only in whether the coding is defined as part of <a href="#header.content-type" class="smpl">Content-Type</a> or Content-Encoding, since some user agents will behave differently in their handling of each response (e.g., open a "Save as ..." dialog instead of automatic decompression and rendering of content).<a class="self" href="#rfc.section.3.1.2.2.p.5">&para;</a></p></div><div id="rfc.section.3.1.2.2.p.6"><p>An origin server <em class="bcp14">MAY</em> respond with a status code of <a href="#status.415" class="smpl">415 (Unsupported Media Type)</a> if a representation in the request message has a content coding that is not acceptable.<a class="self" href="#rfc.section.3.1.2.2.p.6">&para;</a></p></div></div></div><div id="audience.language"><h3 id="rfc.section.3.1.3"><a href="#rfc.section.3.1.3">3.1.3</a>&nbsp;<a href="#audience.language">Audience Language</a></h3><div id="language.tags"><h4 id="rfc.section.3.1.3.1"><a href="#rfc.section.3.1.3.1">3.1.3.1</a>&nbsp;<a href="#language.tags">Language Tags</a></h4><div id="rfc.section.3.1.3.1.p.1"><p>A language tag, as defined in <a href="#RFC5646" id="rfc.xref.RFC5646.1"><cite title="Tags for Identifying Languages">[RFC5646]</cite></a>, identifies a natural language spoken, written, or otherwise conveyed by human beings for communication of information to other human beings. Computer languages are explicitly excluded.<a class="self" href="#rfc.section.3.1.3.1.p.1">&para;</a></p></div><div id="rfc.section.3.1.3.1.p.2"><p>HTTP uses language tags within the <a href="#header.accept-language" class="smpl">Accept-Language</a> and <a href="#header.content-language" class="smpl">Content-Language</a> header fields. <a href="#header.accept-language" class="smpl">Accept-Language</a> uses the broader language-range production defined in <a href="#header.accept-language" id="rfc.xref.header.accept-language.1" title="Accept-Language">Section&nbsp;5.3.5</a>, whereas <a href="#header.content-language" class="smpl">Content-Language</a> uses the language-tag production defined below.<a class="self" href="#rfc.section.3.1.3.1.p.2">&para;</a></p></div><div id="rfc.figure.u.10"><pre class="inline"><span id="rfc.iref.g.9"></span>  <a href="#language.tags" class="smpl">language-tag</a> = &lt;Language-Tag, see <a href="#RFC5646" id="rfc.xref.RFC5646.2"><cite title="Tags for Identifying Languages">[RFC5646]</cite></a>, <a href="https://tools.ietf.org/html/rfc5646#section-2.1">Section 2.1</a>&gt; 
    542 </pre></div><div id="rfc.section.3.1.3.1.p.3"><p>A language tag is a sequence of one or more case-insensitive subtags, each separated by a hyphen character ("-", %x2D). In most cases, a language tag consists of a primary language subtag that identifies a broad family of related languages (e.g., "en" = English), which is optionally followed by a series of subtags that refine or narrow that language's range (e.g., "en-CA" = the variety of English as communicated in Canada). Whitespace is not allowed within a language tag. Example tags include:<a class="self" href="#rfc.section.3.1.3.1.p.3">&para;</a></p></div><div id="rfc.figure.u.11"><pre class="text">  fr, en-US, es-419, az-Arab, x-pig-latin, man-Nkoo-GN 
     542</pre></div><div id="rfc.section.3.1.3.1.p.3" class="avoidbreakafter"><p>A language tag is a sequence of one or more case-insensitive subtags, each separated by a hyphen character ("-", %x2D). In most cases, a language tag consists of a primary language subtag that identifies a broad family of related languages (e.g., "en" = English), which is optionally followed by a series of subtags that refine or narrow that language's range (e.g., "en-CA" = the variety of English as communicated in Canada). Whitespace is not allowed within a language tag. Example tags include:<a class="self" href="#rfc.section.3.1.3.1.p.3">&para;</a></p></div><div id="rfc.figure.u.11"><pre class="text">  fr, en-US, es-419, az-Arab, x-pig-latin, man-Nkoo-GN 
    543543</pre></div><div id="rfc.section.3.1.3.1.p.4"><p>See <a href="#RFC5646" id="rfc.xref.RFC5646.3"><cite title="Tags for Identifying Languages">[RFC5646]</cite></a> for further information.<a class="self" href="#rfc.section.3.1.3.1.p.4">&para;</a></p></div></div><div id="header.content-language"><h4 id="rfc.section.3.1.3.2"><a href="#rfc.section.3.1.3.2">3.1.3.2</a>&nbsp;<a href="#header.content-language">Content-Language</a></h4><div id="rfc.section.3.1.3.2.p.1"><p>The "Content-Language" header field describes the natural language(s) of the intended audience for the representation. Note that this might not be equivalent to all the languages used within the representation.<a class="self" href="#rfc.section.3.1.3.2.p.1">&para;</a></p></div><div id="rfc.figure.u.12"><pre class="inline"><span id="rfc.iref.g.10"></span>  <a href="#header.content-language" class="smpl">Content-Language</a> = 1#<a href="#language.tags" class="smpl">language-tag</a> 
    544544</pre></div><div id="rfc.section.3.1.3.2.p.2"><p>Language tags are defined in <a href="#language.tags" title="Language Tags">Section&nbsp;3.1.3.1</a>. The primary purpose of Content-Language is to allow a user to identify and differentiate representations according to the users' own preferred language. Thus, if the content is intended only for a Danish-literate audience, the appropriate field is<a class="self" href="#rfc.section.3.1.3.2.p.2">&para;</a></p></div><div id="rfc.figure.u.13"><pre class="text">  Content-Language: da 
    545545</pre></div><div id="rfc.section.3.1.3.2.p.3"><p>If no Content-Language is specified, the default is that the content is intended for all language audiences. This might mean that the sender does not consider it to be specific to any natural language, or that the sender does not know for which language it is intended.<a class="self" href="#rfc.section.3.1.3.2.p.3">&para;</a></p></div><div id="rfc.section.3.1.3.2.p.4"><p>Multiple languages <em class="bcp14">MAY</em> be listed for content that is intended for multiple audiences. For example, a rendition of the "Treaty of Waitangi", presented simultaneously in the original Maori and English versions, would call for<a class="self" href="#rfc.section.3.1.3.2.p.4">&para;</a></p></div><div id="rfc.figure.u.14"><pre class="text">  Content-Language: mi, en 
    546546</pre></div><div id="rfc.section.3.1.3.2.p.5"><p>However, just because multiple languages are present within a representation does not mean that it is intended for multiple linguistic audiences. An example would be a beginner's language primer, such as "A First Lesson in Latin", which is clearly intended to be used by an English-literate audience. In this case, the Content-Language would properly only include "en".<a class="self" href="#rfc.section.3.1.3.2.p.5">&para;</a></p></div><div id="rfc.section.3.1.3.2.p.6"><p>Content-Language <em class="bcp14">MAY</em> be applied to any media type &#8212; it is not limited to textual documents.<a class="self" href="#rfc.section.3.1.3.2.p.6">&para;</a></p></div></div></div><div id="identification"><h3 id="rfc.section.3.1.4"><a href="#rfc.section.3.1.4">3.1.4</a>&nbsp;<a href="#identification">Identification</a></h3><div id="identifying.payload"><h4 id="rfc.section.3.1.4.1"><a href="#rfc.section.3.1.4.1">3.1.4.1</a>&nbsp;<a href="#identifying.payload">Identifying a Representation</a></h4><div id="rfc.section.3.1.4.1.p.1"><p>When a complete or partial representation is transferred in a message payload, it is often desirable for the sender to supply, or the recipient to determine, an identifier for a resource corresponding to that representation.<a class="self" href="#rfc.section.3.1.4.1.p.1">&para;</a></p></div><div id="rfc.section.3.1.4.1.p.2"><p>For a request message: <a class="self" href="#rfc.section.3.1.4.1.p.2">&para;</a></p><ul><li>If the request has a <a href="#header.content-location" class="smpl">Content-Location</a> header field, then the sender asserts that the payload is a representation of the resource identified by the Content-Location field-value. However, such an assertion cannot be trusted unless it can be verified by other means (not defined by this specification). The information might still be useful for revision history links.</li><li>Otherwise, the payload is unidentified.</li></ul></div><div id="rfc.section.3.1.4.1.p.3"><p>For a response message, the following rules are applied in order until a match is found: <a class="self" href="#rfc.section.3.1.4.1.p.3">&para;</a></p><ol><li>If the request method is GET or HEAD and the response status code is <a href="#status.200" class="smpl">200 (OK)</a>, <a href="#status.204" class="smpl">204 (No Content)</a>, <a href="rfc7233.html#status.206" class="smpl">206 (Partial Content)</a>, or <a href="rfc7232.html#status.304" class="smpl">304 (Not Modified)</a>, the payload is a representation of the resource identified by the effective request URI (<a href="rfc7230.html#effective.request.uri" title="Effective Request URI">Section 5.5</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.11"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>).</li><li>If the request method is GET or HEAD and the response status code is <a href="#status.203" class="smpl">203 (Non-Authoritative Information)</a>, the payload is a potentially modified or enhanced representation of the <a href="#resources" class="smpl">target resource</a> as provided by an intermediary.</li><li>If the response has a <a href="#header.content-location" class="smpl">Content-Location</a> header field and its field-value is a reference to the same URI as the effective request URI, the payload is a representation of the resource identified by the effective request URI.</li><li>If the response has a <a href="#header.content-location" class="smpl">Content-Location</a> header field and its field-value is a reference to a URI different from the effective request URI, then the sender asserts that the payload is a representation of the resource identified by the Content-Location field-value. However, such an assertion cannot be trusted unless it can be verified by other means (not defined by this specification).</li><li>Otherwise, the payload is unidentified.</li></ol></div></div><div id="header.content-location"><h4 id="rfc.section.3.1.4.2"><a href="#rfc.section.3.1.4.2">3.1.4.2</a>&nbsp;<a href="#header.content-location">Content-Location</a></h4><div id="rfc.section.3.1.4.2.p.1"><p>The "Content-Location" header field references a URI that can be used as an identifier for a specific resource corresponding to the representation in this message's payload. In other words, if one were to perform a GET request on this URI at the time of this message's generation, then a <a href="#status.200" class="smpl">200 (OK)</a> response would contain the same representation that is enclosed as payload in this message.<a class="self" href="#rfc.section.3.1.4.2.p.1">&para;</a></p></div><div id="rfc.figure.u.15"><pre class="inline"><span id="rfc.iref.g.11"></span>  <a href="#header.content-location" class="smpl">Content-Location</a> = <a href="#imported.abnf" class="smpl">absolute-URI</a> / <a href="#imported.abnf" class="smpl">partial-URI</a> 
    547 </pre></div><div id="rfc.section.3.1.4.2.p.2"><p>The Content-Location value is not a replacement for the effective Request URI (<a href="rfc7230.html#effective.request.uri" title="Effective Request URI">Section 5.5</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.12"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>). It is representation metadata. It has the same syntax and semantics as the header field of the same name defined for MIME body parts in <a href="https://tools.ietf.org/html/rfc2557#section-4">Section 4</a> of <a href="#RFC2557" id="rfc.xref.RFC2557.1"><cite title="MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)">[RFC2557]</cite></a>. However, its appearance in an HTTP message has some special implications for HTTP recipients.<a class="self" href="#rfc.section.3.1.4.2.p.2">&para;</a></p></div><div id="rfc.section.3.1.4.2.p.3"><p>If Content-Location is included in a <a href="#status.2xx" class="smpl">2xx (Successful)</a> response message and its value refers (after conversion to absolute form) to a URI that is the same as the effective request URI, then the recipient <em class="bcp14">MAY</em> consider the payload to be a current representation of that resource at the time indicated by the message origination date. For a GET (<a href="#GET" id="rfc.xref.GET.2" title="GET">Section&nbsp;4.3.1</a>) or HEAD (<a href="#HEAD" id="rfc.xref.HEAD.1" title="HEAD">Section&nbsp;4.3.2</a>) request, this is the same as the default semantics when no Content-Location is provided by the server. For a state-changing request like PUT (<a href="#PUT" id="rfc.xref.PUT.1" title="PUT">Section&nbsp;4.3.4</a>) or POST (<a href="#POST" id="rfc.xref.POST.1" title="POST">Section&nbsp;4.3.3</a>), it implies that the server's response contains the new representation of that resource, thereby distinguishing it from representations that might only report about the action (e.g., "It worked!"). This allows authoring applications to update their local copies without the need for a subsequent GET request.<a class="self" href="#rfc.section.3.1.4.2.p.3">&para;</a></p></div><div id="rfc.section.3.1.4.2.p.4"><p>If Content-Location is included in a <a href="#status.2xx" class="smpl">2xx (Successful)</a> response message and its field-value refers to a URI that differs from the effective request URI, then the origin server claims that the URI is an identifier for a different resource corresponding to the enclosed representation. Such a claim can only be trusted if both identifiers share the same resource owner, which cannot be programmatically determined via HTTP. <a class="self" href="#rfc.section.3.1.4.2.p.4">&para;</a></p><ul><li>For a response to a GET or HEAD request, this is an indication that the effective request URI refers to a resource that is subject to content negotiation and the Content-Location field-value is a more specific identifier for the <a href="#representations" class="smpl">selected representation</a>.</li><li>For a <a href="#status.201" class="smpl">201 (Created)</a> response to a state-changing method, a Content-Location field-value that is identical to the <a href="#header.location" class="smpl">Location</a> field-value indicates that this payload is a current representation of the newly created resource.</li><li>Otherwise, such a Content-Location indicates that this payload is a representation reporting on the requested action's status and that the same report is available (for future access with GET) at the given URI. For example, a purchase transaction made via a POST request might include a receipt document as the payload of the <a href="#status.200" class="smpl">200 (OK)</a> response; the Content-Location field-value provides an identifier for retrieving a copy of that same receipt in the future.</li></ul></div><div id="rfc.section.3.1.4.2.p.5"><p>A user agent that sends Content-Location in a request message is stating that its value refers to where the user agent originally obtained the content of the enclosed representation (prior to any modifications made by that user agent). In other words, the user agent is providing a back link to the source of the original representation.<a class="self" href="#rfc.section.3.1.4.2.p.5">&para;</a></p></div><div id="rfc.section.3.1.4.2.p.6"><p>An origin server that receives a Content-Location field in a request message <em class="bcp14">MUST</em> treat the information as transitory request context rather than as metadata to be saved verbatim as part of the representation. An origin server <em class="bcp14">MAY</em> use that context to guide in processing the request or to save it for other uses, such as within source links or versioning metadata. However, an origin server <em class="bcp14">MUST NOT</em> use such context information to alter the request semantics.<a class="self" href="#rfc.section.3.1.4.2.p.6">&para;</a></p></div><div id="rfc.section.3.1.4.2.p.7"><p>For example, if a client makes a PUT request on a negotiated resource and the origin server accepts that PUT (without redirection), then the new state of that resource is expected to be consistent with the one representation supplied in that PUT; the Content-Location cannot be used as a form of reverse content selection identifier to update only one of the negotiated representations. If the user agent had wanted the latter semantics, it would have applied the PUT directly to the Content-Location URI.<a class="self" href="#rfc.section.3.1.4.2.p.7">&para;</a></p></div></div></div></div><div id="representation.data"><h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a>&nbsp;<a href="#representation.data">Representation Data</a></h2><div id="rfc.section.3.2.p.1"><p>The representation data associated with an HTTP message is either provided as the payload body of the message or referred to by the message semantics and the effective request URI. The representation data is in a format and encoding defined by the representation metadata header fields.<a class="self" href="#rfc.section.3.2.p.1">&para;</a></p></div><div id="rfc.section.3.2.p.2"><p>The data type of the representation data is determined via the header fields <a href="#header.content-type" class="smpl">Content-Type</a> and <a href="#header.content-encoding" class="smpl">Content-Encoding</a>. These define a two-layer, ordered encoding model:<a class="self" href="#rfc.section.3.2.p.2">&para;</a></p></div><div id="rfc.figure.u.16"><pre class="text">  representation-data := Content-Encoding( Content-Type( bits ) ) 
     547</pre></div><div id="rfc.section.3.1.4.2.p.2"><p>The Content-Location value is not a replacement for the effective Request URI (<a href="rfc7230.html#effective.request.uri" title="Effective Request URI">Section 5.5</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.12"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>). It is representation metadata. It has the same syntax and semantics as the header field of the same name defined for MIME body parts in <a href="https://tools.ietf.org/html/rfc2557#section-4">Section 4</a> of <a href="#RFC2557" id="rfc.xref.RFC2557.1"><cite title="MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)">[RFC2557]</cite></a>. However, its appearance in an HTTP message has some special implications for HTTP recipients.<a class="self" href="#rfc.section.3.1.4.2.p.2">&para;</a></p></div><div id="rfc.section.3.1.4.2.p.3"><p>If Content-Location is included in a <a href="#status.2xx" class="smpl">2xx (Successful)</a> response message and its value refers (after conversion to absolute form) to a URI that is the same as the effective request URI, then the recipient <em class="bcp14">MAY</em> consider the payload to be a current representation of that resource at the time indicated by the message origination date. For a GET (<a href="#GET" id="rfc.xref.GET.2" title="GET">Section&nbsp;4.3.1</a>) or HEAD (<a href="#HEAD" id="rfc.xref.HEAD.1" title="HEAD">Section&nbsp;4.3.2</a>) request, this is the same as the default semantics when no Content-Location is provided by the server. For a state-changing request like PUT (<a href="#PUT" id="rfc.xref.PUT.1" title="PUT">Section&nbsp;4.3.4</a>) or POST (<a href="#POST" id="rfc.xref.POST.1" title="POST">Section&nbsp;4.3.3</a>), it implies that the server's response contains the new representation of that resource, thereby distinguishing it from representations that might only report about the action (e.g., "It worked!"). This allows authoring applications to update their local copies without the need for a subsequent GET request.<a class="self" href="#rfc.section.3.1.4.2.p.3">&para;</a></p></div><div id="rfc.section.3.1.4.2.p.4"><p>If Content-Location is included in a <a href="#status.2xx" class="smpl">2xx (Successful)</a> response message and its field-value refers to a URI that differs from the effective request URI, then the origin server claims that the URI is an identifier for a different resource corresponding to the enclosed representation. Such a claim can only be trusted if both identifiers share the same resource owner, which cannot be programmatically determined via HTTP. <a class="self" href="#rfc.section.3.1.4.2.p.4">&para;</a></p><ul><li>For a response to a GET or HEAD request, this is an indication that the effective request URI refers to a resource that is subject to content negotiation and the Content-Location field-value is a more specific identifier for the <a href="#representations" class="smpl">selected representation</a>.</li><li>For a <a href="#status.201" class="smpl">201 (Created)</a> response to a state-changing method, a Content-Location field-value that is identical to the <a href="#header.location" class="smpl">Location</a> field-value indicates that this payload is a current representation of the newly created resource.</li><li>Otherwise, such a Content-Location indicates that this payload is a representation reporting on the requested action's status and that the same report is available (for future access with GET) at the given URI. For example, a purchase transaction made via a POST request might include a receipt document as the payload of the <a href="#status.200" class="smpl">200 (OK)</a> response; the Content-Location field-value provides an identifier for retrieving a copy of that same receipt in the future.</li></ul></div><div id="rfc.section.3.1.4.2.p.5"><p>A user agent that sends Content-Location in a request message is stating that its value refers to where the user agent originally obtained the content of the enclosed representation (prior to any modifications made by that user agent). In other words, the user agent is providing a back link to the source of the original representation.<a class="self" href="#rfc.section.3.1.4.2.p.5">&para;</a></p></div><div id="rfc.section.3.1.4.2.p.6"><p>An origin server that receives a Content-Location field in a request message <em class="bcp14">MUST</em> treat the information as transitory request context rather than as metadata to be saved verbatim as part of the representation. An origin server <em class="bcp14">MAY</em> use that context to guide in processing the request or to save it for other uses, such as within source links or versioning metadata. However, an origin server <em class="bcp14">MUST NOT</em> use such context information to alter the request semantics.<a class="self" href="#rfc.section.3.1.4.2.p.6">&para;</a></p></div><div id="rfc.section.3.1.4.2.p.7"><p>For example, if a client makes a PUT request on a negotiated resource and the origin server accepts that PUT (without redirection), then the new state of that resource is expected to be consistent with the one representation supplied in that PUT; the Content-Location cannot be used as a form of reverse content selection identifier to update only one of the negotiated representations. If the user agent had wanted the latter semantics, it would have applied the PUT directly to the Content-Location URI.<a class="self" href="#rfc.section.3.1.4.2.p.7">&para;</a></p></div></div></div></div><div id="representation.data"><h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a>&nbsp;<a href="#representation.data">Representation Data</a></h2><div id="rfc.section.3.2.p.1"><p>The representation data associated with an HTTP message is either provided as the payload body of the message or referred to by the message semantics and the effective request URI. The representation data is in a format and encoding defined by the representation metadata header fields.<a class="self" href="#rfc.section.3.2.p.1">&para;</a></p></div><div id="rfc.section.3.2.p.2" class="avoidbreakafter"><p>The data type of the representation data is determined via the header fields <a href="#header.content-type" class="smpl">Content-Type</a> and <a href="#header.content-encoding" class="smpl">Content-Encoding</a>. These define a two-layer, ordered encoding model:<a class="self" href="#rfc.section.3.2.p.2">&para;</a></p></div><div id="rfc.figure.u.16"><pre class="text">  representation-data := Content-Encoding( Content-Type( bits ) ) 
    548548</pre></div></div><div id="payload"><h2 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a>&nbsp;<a href="#payload">Payload Semantics</a></h2><div id="rfc.section.3.3.p.1"><p>Some HTTP messages transfer a complete or partial representation as the message "<dfn>payload</dfn>". In some cases, a payload might contain only the associated representation's header fields (e.g., responses to HEAD) or only some part(s) of the representation data (e.g., the <a href="rfc7233.html#status.206" class="smpl">206 (Partial Content)</a> status code).<a class="self" href="#rfc.section.3.3.p.1">&para;</a></p></div><div id="rfc.section.3.3.p.2"><p>The purpose of a payload in a request is defined by the method semantics. For example, a representation in the payload of a PUT request (<a href="#PUT" id="rfc.xref.PUT.2" title="PUT">Section&nbsp;4.3.4</a>) represents the desired state of the <a href="#resources" class="smpl">target resource</a> if the request is successfully applied, whereas a representation in the payload of a POST request (<a href="#POST" id="rfc.xref.POST.2" title="POST">Section&nbsp;4.3.3</a>) represents information to be processed by the target resource.<a class="self" href="#rfc.section.3.3.p.2">&para;</a></p></div><div id="rfc.section.3.3.p.3"><p>In a response, the payload's purpose is defined by both the request method and the response status code. For example, the payload of a <a href="#status.200" class="smpl">200 (OK)</a> response to GET (<a href="#GET" id="rfc.xref.GET.3" title="GET">Section&nbsp;4.3.1</a>) represents the current state of the <a href="#resources" class="smpl">target resource</a>, as observed at the time of the message origination date (<a href="#header.date" id="rfc.xref.header.date.1" title="Date">Section&nbsp;7.1.1.2</a>), whereas the payload of the same status code in a response to POST might represent either the processing result or the new state of the target resource after applying the processing. Response messages with an error status code usually contain a payload that represents the error condition, such that it describes the error state and what next steps are suggested for resolving it.<a class="self" href="#rfc.section.3.3.p.3">&para;</a></p></div><div id="rfc.section.3.3.p.4"><p>Header fields that specifically describe the payload, rather than the associated representation, are referred to as "payload header fields". Payload header fields are defined in other parts of this specification, due to their impact on message parsing.<a class="self" href="#rfc.section.3.3.p.4">&para;</a></p></div><div id="rfc.table.u.2"><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Header Field Name</th><th>Defined in...</th></tr></thead><tbody><tr><td class="left">Content-Length</td><td class="left"><a href="rfc7230.html#header.content-length" title="Content-Length">Section 3.3.2</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.13"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a></td></tr><tr><td class="left">Content-Range</td><td class="left"><a href="rfc7233.html#header.content-range" title="Content-Range">Section 4.2</a> of <a href="#RFC7233" id="rfc.xref.RFC7233.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[RFC7233]</cite></a></td></tr><tr><td class="left">Trailer</td><td class="left"><a href="rfc7230.html#header.trailer" title="Trailer">Section 4.4</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.14"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a></td></tr><tr><td class="left">Transfer-Encoding</td><td class="left"><a href="rfc7230.html#header.transfer-encoding" title="Transfer-Encoding">Section 3.3.1</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.15"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a></td></tr></tbody></table></div></div><div id="content.negotiation"><h2 id="rfc.section.3.4"><a href="#rfc.section.3.4">3.4</a>&nbsp;<a href="#content.negotiation">Content Negotiation</a></h2><div id="rfc.section.3.4.p.1"><p>When responses convey payload information, whether indicating a success or an error, the origin server often has different ways of representing that information; for example, in different formats, languages, or encodings. Likewise, different users or user agents might have differing capabilities, characteristics, or preferences that could influence which representation, among those available, would be best to deliver. For this reason, HTTP provides mechanisms for <a href="#content.negotiation" class="smpl">content negotiation</a>.<a class="self" href="#rfc.section.3.4.p.1">&para;</a></p></div><div id="rfc.section.3.4.p.2"><p>This specification defines two patterns of content negotiation that can be made visible within the protocol: "proactive", where the server selects the representation based upon the user agent's stated preferences, and "reactive" negotiation, where the server provides a list of representations for the user agent to choose from. Other patterns of content negotiation include "conditional content", where the representation consists of multiple parts that are selectively rendered based on user agent parameters, "active content", where the representation contains a script that makes additional (more specific) requests based on the user agent characteristics, and "Transparent Content Negotiation" (<a href="#RFC2295" id="rfc.xref.RFC2295.1"><cite title="Transparent Content Negotiation in HTTP">[RFC2295]</cite></a>), where content selection is performed by an intermediary. These patterns are not mutually exclusive, and each has trade-offs in applicability and practicality.<a class="self" href="#rfc.section.3.4.p.2">&para;</a></p></div><div id="rfc.section.3.4.p.3"><p>Note that, in all cases, HTTP is not aware of the resource semantics. The consistency with which an origin server responds to requests, over time and over the varying dimensions of content negotiation, and thus the "sameness" of a resource's observed representations over time, is determined entirely by whatever entity or algorithm selects or generates those responses. HTTP pays no attention to the man behind the curtain.<a class="self" href="#rfc.section.3.4.p.3">&para;</a></p></div><div id="proactive.negotiation"><h3 id="rfc.section.3.4.1"><a href="#rfc.section.3.4.1">3.4.1</a>&nbsp;<a href="#proactive.negotiation">Proactive Negotiation</a></h3><div id="rfc.section.3.4.1.p.1"><p>When content negotiation preferences are sent by the user agent in a request to encourage an algorithm located at the server to select the preferred representation, it is called <dfn>proactive negotiation</dfn> (a.k.a., <dfn>server-driven negotiation</dfn>). Selection is based on the available representations for a response (the dimensions over which it might vary, such as language, content-coding, etc.) compared to various information supplied in the request, including both the explicit negotiation fields of <a href="#request.conneg" title="Content Negotiation">Section&nbsp;5.3</a> and implicit characteristics, such as the client's network address or parts of the <a href="#header.user-agent" class="smpl">User-Agent</a> field.<a class="self" href="#rfc.section.3.4.1.p.1">&para;</a></p></div><div id="rfc.section.3.4.1.p.2"><p>Proactive negotiation is advantageous when the algorithm for selecting from among the available representations is difficult to describe to a user agent, or when the server desires to send its "best guess" to the user agent along with the first response (hoping to avoid the round trip delay of a subsequent request if the "best guess" is good enough for the user). In order to improve the server's guess, a user agent <em class="bcp14">MAY</em> send request header fields that describe its preferences.<a class="self" href="#rfc.section.3.4.1.p.2">&para;</a></p></div><div id="rfc.section.3.4.1.p.3"><p>Proactive negotiation has serious disadvantages: <a class="self" href="#rfc.section.3.4.1.p.3">&para;</a></p><ul><li>It is impossible for the server to accurately determine what might be "best" for any given user, since that would require complete knowledge of both the capabilities of the user agent and the intended use for the response (e.g., does the user want to view it on screen or print it on paper?);</li><li>Having the user agent describe its capabilities in every request can be both very inefficient (given that only a small percentage of responses have multiple representations) and a potential risk to the user's privacy;</li><li>It complicates the implementation of an origin server and the algorithms for generating responses to a request; and,</li><li>It limits the reusability of responses for shared caching.</li></ul></div><div id="rfc.section.3.4.1.p.4"><p>A user agent cannot rely on proactive negotiation preferences being consistently honored, since the origin server might not implement proactive negotiation for the requested resource or might decide that sending a response that doesn't conform to the user agent's preferences is better than sending a <a href="#status.406" class="smpl">406 (Not Acceptable)</a> response.<a class="self" href="#rfc.section.3.4.1.p.4">&para;</a></p></div><div id="rfc.section.3.4.1.p.5"><p>A <a href="#header.vary" class="smpl">Vary</a> header field (<a href="#header.vary" id="rfc.xref.header.vary.1" title="Vary">Section&nbsp;7.1.4</a>) is often sent in a response subject to proactive negotiation to indicate what parts of the request information were used in the selection algorithm.<a class="self" href="#rfc.section.3.4.1.p.5">&para;</a></p></div></div><div id="reactive.negotiation"><h3 id="rfc.section.3.4.2"><a href="#rfc.section.3.4.2">3.4.2</a>&nbsp;<a href="#reactive.negotiation">Reactive Negotiation</a></h3><div id="rfc.section.3.4.2.p.1"><p>With <dfn>reactive negotiation</dfn> (a.k.a., <dfn>agent-driven negotiation</dfn>), selection of the best response representation (regardless of the status code) is performed by the user agent after receiving an initial response from the origin server that contains a list of resources for alternative representations. If the user agent is not satisfied by the initial response representation, it can perform a GET request on one or more of the alternative resources, selected based on metadata included in the list, to obtain a different form of representation for that response. Selection of alternatives might be performed automatically by the user agent or manually by the user selecting from a generated (possibly hypertext) menu.<a class="self" href="#rfc.section.3.4.2.p.1">&para;</a></p></div><div id="rfc.section.3.4.2.p.2"><p>Note that the above refers to representations of the response, in general, not representations of the resource. The alternative representations are only considered representations of the target resource if the response in which those alternatives are provided has the semantics of being a representation of the target resource (e.g., a <a href="#status.200" class="smpl">200 (OK)</a> response to a GET request) or has the semantics of providing links to alternative representations for the target resource (e.g., a <a href="#status.300" class="smpl">300 (Multiple Choices)</a> response to a GET request).<a class="self" href="#rfc.section.3.4.2.p.2">&para;</a></p></div><div id="rfc.section.3.4.2.p.3"><p>A server might choose not to send an initial representation, other than the list of alternatives, and thereby indicate that reactive negotiation by the user agent is preferred. For example, the alternatives listed in responses with the <a href="#status.300" class="smpl">300 (Multiple Choices)</a> and <a href="#status.406" class="smpl">406 (Not Acceptable)</a> status codes include information about the available representations so that the user or user agent can react by making a selection.<a class="self" href="#rfc.section.3.4.2.p.3">&para;</a></p></div><div id="rfc.section.3.4.2.p.4"><p>Reactive negotiation is advantageous when the response would vary over commonly used dimensions (such as type, language, or encoding), when the origin server is unable to determine a user agent's capabilities from examining the request, and generally when public caches are used to distribute server load and reduce network usage.<a class="self" href="#rfc.section.3.4.2.p.4">&para;</a></p></div><div id="rfc.section.3.4.2.p.5"><p>Reactive negotiation suffers from the disadvantages of transmitting a list of alternatives to the user agent, which degrades user-perceived latency if transmitted in the header section, and needing a second request to obtain an alternate representation. Furthermore, this specification does not define a mechanism for supporting automatic selection, though it does not prevent such a mechanism from being developed as an extension.<a class="self" href="#rfc.section.3.4.2.p.5">&para;</a></p></div></div></div></div><div id="methods"><h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a>&nbsp;<a href="#methods">Request Methods</a></h1><div id="method.overview"><h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a>&nbsp;<a href="#method.overview">Overview</a></h2><div id="rfc.section.4.1.p.1"><p>The request method token is the primary source of request semantics; it indicates the purpose for which the client has made this request and what is expected by the client as a successful result.<a class="self" href="#rfc.section.4.1.p.1">&para;</a></p></div><div id="rfc.section.4.1.p.2"><p>The request method's semantics might be further specialized by the semantics of some header fields when present in a request (<a href="#request.header.fields" title="Request Header Fields">Section&nbsp;5</a>) if those additional semantics do not conflict with the method. For example, a client can send conditional request header fields (<a href="#request.conditionals" title="Conditionals">Section&nbsp;5.2</a>) to make the requested action conditional on the current state of the target resource (<a href="#RFC7232" id="rfc.xref.RFC7232.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[RFC7232]</cite></a>).<a class="self" href="#rfc.section.4.1.p.2">&para;</a></p></div><div id="rfc.figure.u.17"><pre class="inline"><span id="rfc.iref.g.12"></span>  <a href="#method.overview" class="smpl">method</a> = <a href="#imported.abnf" class="smpl">token</a> 
    549549</pre></div><div id="rfc.section.4.1.p.3"><p>HTTP was originally designed to be usable as an interface to distributed object systems. The request method was envisioned as applying semantics to a <a href="#resources" class="smpl">target resource</a> in much the same way as invoking a defined method on an identified object would apply semantics. The method token is case-sensitive because it might be used as a gateway to object-based systems with case-sensitive method names.<a class="self" href="#rfc.section.4.1.p.3">&para;</a></p></div><div id="rfc.section.4.1.p.4"><p>Unlike distributed objects, the standardized request methods in HTTP are not resource-specific, since uniform interfaces provide for better visibility and reuse in network-based systems <a href="#REST" id="rfc.xref.REST.2"><cite title="Architectural Styles and the Design of Network-based Software Architectures">[REST]</cite></a>. Once defined, a standardized method ought to have the same semantics when applied to any resource, though each resource determines for itself whether those semantics are implemented or allowed.<a class="self" href="#rfc.section.4.1.p.4">&para;</a></p></div><div id="rfc.section.4.1.p.5"><p>This specification defines a number of standardized methods that are commonly used in HTTP, as outlined by the following table. By convention, standardized methods are defined in all-uppercase US-ASCII letters.<a class="self" href="#rfc.section.4.1.p.5">&para;</a></p></div><div id="rfc.table.1"><div id="table.of.methods"></div><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Method</th><th>Description</th><th>Sec.</th></tr></thead><tbody><tr><td class="left">GET</td><td class="left">Transfer a current representation of the target resource.</td><td class="left"><a href="#GET" id="rfc.xref.GET.4" title="GET">4.3.1</a></td></tr><tr><td class="left">HEAD</td><td class="left">Same as GET, but only transfer the status line and header section.</td><td class="left"><a href="#HEAD" id="rfc.xref.HEAD.2" title="HEAD">4.3.2</a></td></tr><tr><td class="left">POST</td><td class="left">Perform resource-specific processing on the request payload.</td><td class="left"><a href="#POST" id="rfc.xref.POST.3" title="POST">4.3.3</a></td></tr><tr><td class="left">PUT</td><td class="left">Replace all current representations of the target resource with the request payload.</td><td class="left"><a href="#PUT" id="rfc.xref.PUT.3" title="PUT">4.3.4</a></td></tr><tr><td class="left">DELETE</td><td class="left">Remove all current representations of the target resource.</td><td class="left"><a href="#DELETE" id="rfc.xref.DELETE.1" title="DELETE">4.3.5</a></td></tr><tr><td class="left">CONNECT</td><td class="left">Establish a tunnel to the server identified by the target resource.</td><td class="left"><a href="#CONNECT" id="rfc.xref.CONNECT.1" title="CONNECT">4.3.6</a></td></tr><tr><td class="left">OPTIONS</td><td class="left">Describe the communication options for the target resource.</td><td class="left"><a href="#OPTIONS" id="rfc.xref.OPTIONS.1" title="OPTIONS">4.3.7</a></td></tr><tr><td class="left">TRACE</td><td class="left">Perform a message loop-back test along the path to the target resource.</td><td class="left"><a href="#TRACE" id="rfc.xref.TRACE.1" title="TRACE">4.3.8</a></td></tr></tbody></table></div><div id="rfc.section.4.1.p.6"><p>All general-purpose servers <em class="bcp14">MUST</em> support the methods GET and HEAD. All other methods are <em class="bcp14">OPTIONAL</em>.<a class="self" href="#rfc.section.4.1.p.6">&para;</a></p></div><div id="rfc.section.4.1.p.7"><p>Additional methods, outside the scope of this specification, have been standardized for use in HTTP. All such methods ought to be registered within the "Hypertext Transfer Protocol (HTTP) Method Registry" maintained by IANA, as defined in <a href="#method.registry" title="Method Registry">Section&nbsp;8.1</a>.<a class="self" href="#rfc.section.4.1.p.7">&para;</a></p></div><div id="rfc.section.4.1.p.8"><p>The set of methods allowed by a target resource can be listed in an <a href="#header.allow" class="smpl">Allow</a> header field (<a href="#header.allow" id="rfc.xref.header.allow.1" title="Allow">Section&nbsp;7.4.1</a>). However, the set of allowed methods can change dynamically. When a request method is received that is unrecognized or not implemented by an origin server, the origin server <em class="bcp14">SHOULD</em> respond with the <a href="#status.501" class="smpl">501 (Not Implemented)</a> status code. When a request method is received that is known by an origin server but not allowed for the target resource, the origin server <em class="bcp14">SHOULD</em> respond with the <a href="#status.405" class="smpl">405 (Method Not Allowed)</a> status code.<a class="self" href="#rfc.section.4.1.p.8">&para;</a></p></div></div><div id="method.properties"><h2 id="rfc.section.4.2"><a href="#rfc.section.4.2">4.2</a>&nbsp;<a href="#method.properties">Common Method Properties</a></h2><div id="safe.methods"><h3 id="rfc.section.4.2.1"><a href="#rfc.section.4.2.1">4.2.1</a>&nbsp;<a href="#safe.methods">Safe Methods</a></h3><div id="rfc.section.4.2.1.p.1"><p>Request methods are considered "<dfn>safe</dfn>" if their defined semantics are essentially read-only; i.e., the client does not request, and does not expect, any state change on the origin server as a result of applying a safe method to a target resource. Likewise, reasonable use of a safe method is not expected to cause any harm, loss of property, or unusual burden on the origin server.<a class="self" href="#rfc.section.4.2.1.p.1">&para;</a></p></div><div id="rfc.section.4.2.1.p.2"><p>This definition of safe methods does not prevent an implementation from including behavior that is potentially harmful, that is not entirely read-only, or that causes side effects while invoking a safe method. What is important, however, is that the client did not request that additional behavior and cannot be held accountable for it. For example, most servers append request information to access log files at the completion of every response, regardless of the method, and that is considered safe even though the log storage might become full and crash the server. Likewise, a safe request initiated by selecting an advertisement on the Web will often have the side effect of charging an advertising account.<a class="self" href="#rfc.section.4.2.1.p.2">&para;</a></p></div><div id="rfc.section.4.2.1.p.3"><p>Of the request methods defined by this specification, the GET, HEAD, OPTIONS, and TRACE methods are defined to be safe.<a class="self" href="#rfc.section.4.2.1.p.3">&para;</a></p></div><div id="rfc.section.4.2.1.p.4"><p>The purpose of distinguishing between safe and unsafe methods is to allow automated retrieval processes (spiders) and cache performance optimization (pre-fetching) to work without fear of causing harm. In addition, it allows a user agent to apply appropriate constraints on the automated use of unsafe methods when processing potentially untrusted content.<a class="self" href="#rfc.section.4.2.1.p.4">&para;</a></p></div><div id="rfc.section.4.2.1.p.5"><p>A user agent <em class="bcp14">SHOULD</em> distinguish between safe and unsafe methods when presenting potential actions to a user, such that the user can be made aware of an unsafe action before it is requested.<a class="self" href="#rfc.section.4.2.1.p.5">&para;</a></p></div><div id="rfc.section.4.2.1.p.6"><p>When a resource is constructed such that parameters within the effective request URI have the effect of selecting an action, it is the resource owner's responsibility to ensure that the action is consistent with the request method semantics. For example, it is common for Web-based content editing software to use actions within query parameters, such as "page?do=delete". If the purpose of such a resource is to perform an unsafe action, then the resource owner <em class="bcp14">MUST</em> disable or disallow that action when it is accessed using a safe request method. Failure to do so will result in unfortunate side effects when automated processes perform a GET on every URI reference for the sake of link maintenance, pre-fetching, building a search index, etc.<a class="self" href="#rfc.section.4.2.1.p.6">&para;</a></p></div></div><div id="idempotent.methods"><h3 id="rfc.section.4.2.2"><a href="#rfc.section.4.2.2">4.2.2</a>&nbsp;<a href="#idempotent.methods">Idempotent Methods</a></h3><div id="rfc.section.4.2.2.p.1"><p>A request method is considered "<dfn id="idempotent">idempotent</dfn>" if the intended effect on the server of multiple identical requests with that method is the same as the effect for a single such request. Of the request methods defined by this specification, PUT, DELETE, and safe request methods are idempotent.<a class="self" href="#rfc.section.4.2.2.p.1">&para;</a></p></div><div id="rfc.section.4.2.2.p.2"><p>Like the definition of safe, the idempotent property only applies to what has been requested by the user; a server is free to log each request separately, retain a revision control history, or implement other non-idempotent side effects for each idempotent request.<a class="self" href="#rfc.section.4.2.2.p.2">&para;</a></p></div><div id="rfc.section.4.2.2.p.3"><p>Idempotent methods are distinguished because the request can be repeated automatically if a communication failure occurs before the client is able to read the server's response. For example, if a client sends a PUT request and the underlying connection is closed before any response is received, then the client can establish a new connection and retry the idempotent request. It knows that repeating the request will have the same intended effect, even if the original request succeeded, though the response might differ.<a class="self" href="#rfc.section.4.2.2.p.3">&para;</a></p></div></div><div id="cacheable.methods"><h3 id="rfc.section.4.2.3"><a href="#rfc.section.4.2.3">4.2.3</a>&nbsp;<a href="#cacheable.methods">Cacheable Methods</a></h3><div id="rfc.section.4.2.3.p.1"><p>Request methods can be defined as "<dfn id="cacheable">cacheable</dfn>" to indicate that responses to them are allowed to be stored for future reuse; for specific requirements see <a href="#RFC7234" id="rfc.xref.RFC7234.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>. In general, safe methods that do not depend on a current or authoritative response are defined as cacheable; this specification defines GET, HEAD, and POST as cacheable, although the overwhelming majority of cache implementations only support GET and HEAD.<a class="self" href="#rfc.section.4.2.3.p.1">&para;</a></p></div></div></div><div id="method.definitions"><h2 id="rfc.section.4.3"><a href="#rfc.section.4.3">4.3</a>&nbsp;<a href="#method.definitions">Method Definitions</a></h2><div id="GET"><h3 id="rfc.section.4.3.1"><a href="#rfc.section.4.3.1">4.3.1</a>&nbsp;<a href="#GET">GET</a></h3><div id="rfc.iref.g.13"></div><div id="rfc.section.4.3.1.p.1"><p>The GET method requests transfer of a current selected representation for the <a href="#resources" class="smpl">target resource</a>. GET is the primary mechanism of information retrieval and the focus of almost all performance optimizations. Hence, when people speak of retrieving some identifiable information via HTTP, they are generally referring to making a GET request.<a class="self" href="#rfc.section.4.3.1.p.1">&para;</a></p></div><div id="rfc.section.4.3.1.p.2"><p>It is tempting to think of resource identifiers as remote file system pathnames and of representations as being a copy of the contents of such files. In fact, that is how many resources are implemented (see <a href="#attack.pathname" title="Attacks Based on File and Path Names">Section&nbsp;9.1</a> for related security considerations). However, there are no such limitations in practice. The HTTP interface for a resource is just as likely to be implemented as a tree of content objects, a programmatic view on various database records, or a gateway to other information systems. Even when the URI mapping mechanism is tied to a file system, an origin server might be configured to execute the files with the request as input and send the output as the representation rather than transfer the files directly. Regardless, only the origin server needs to know how each of its resource identifiers corresponds to an implementation and how each implementation manages to select and send a current representation of the target resource in a response to GET.<a class="self" href="#rfc.section.4.3.1.p.2">&para;</a></p></div><div id="rfc.section.4.3.1.p.3"><p>A client can alter the semantics of GET to be a "range request", requesting transfer of only some part(s) of the selected representation, by sending a <a href="rfc7233.html#header.range" class="smpl">Range</a> header field in the request (<a href="#RFC7233" id="rfc.xref.RFC7233.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[RFC7233]</cite></a>).<a class="self" href="#rfc.section.4.3.1.p.3">&para;</a></p></div><div id="rfc.section.4.3.1.p.4"><p>A payload within a GET request message has no defined semantics; sending a payload body on a GET request might cause some existing implementations to reject the request.<a class="self" href="#rfc.section.4.3.1.p.4">&para;</a></p></div><div id="rfc.section.4.3.1.p.5"><p>The response to a GET request is cacheable; a cache <em class="bcp14">MAY</em> use it to satisfy subsequent GET and HEAD requests unless otherwise indicated by the Cache-Control header field (<a href="rfc7234.html#header.cache-control" title="Cache-Control">Section 5.2</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>).<a class="self" href="#rfc.section.4.3.1.p.5">&para;</a></p></div></div><div id="HEAD"><h3 id="rfc.section.4.3.2"><a href="#rfc.section.4.3.2">4.3.2</a>&nbsp;<a href="#HEAD">HEAD</a></h3><div id="rfc.iref.h.1"></div><div id="rfc.section.4.3.2.p.1"><p>The HEAD method is identical to GET except that the server <em class="bcp14">MUST NOT</em> send a message body in the response (i.e., the response terminates at the end of the header section). The server <em class="bcp14">SHOULD</em> send the same header fields in response to a HEAD request as it would have sent if the request had been a GET, except that the payload header fields (<a href="#payload" title="Payload Semantics">Section&nbsp;3.3</a>) <em class="bcp14">MAY</em> be omitted. This method can be used for obtaining metadata about the selected representation without transferring the representation data and is often used for testing hypertext links for validity, accessibility, and recent modification.<a class="self" href="#rfc.section.4.3.2.p.1">&para;</a></p></div><div id="rfc.section.4.3.2.p.2"><p>A payload within a HEAD request message has no defined semantics; sending a payload body on a HEAD request might cause some existing implementations to reject the request.<a class="self" href="#rfc.section.4.3.2.p.2">&para;</a></p></div><div id="rfc.section.4.3.2.p.3"><p>The response to a HEAD request is cacheable; a cache <em class="bcp14">MAY</em> use it to satisfy subsequent HEAD requests unless otherwise indicated by the Cache-Control header field (<a href="rfc7234.html#header.cache-control" title="Cache-Control">Section 5.2</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>). A HEAD response might also have an effect on previously cached responses to GET; see <a href="rfc7234.html#head.effects" title="Freshening Responses via HEAD">Section 4.3.5</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.4"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>.<a class="self" href="#rfc.section.4.3.2.p.3">&para;</a></p></div></div><div id="POST"><h3 id="rfc.section.4.3.3"><a href="#rfc.section.4.3.3">4.3.3</a>&nbsp;<a href="#POST">POST</a></h3><div id="rfc.section.4.3.3.p.1"><p>The POST method requests that the <a href="#resources" class="smpl">target resource</a> process the representation enclosed in the request according to the resource's own specific semantics. For example, POST is used for the following functions (among others): <a class="self" href="#rfc.section.4.3.3.p.1">&para;</a></p><ul><li>Providing a block of data, such as the fields entered into an HTML form, to a data-handling process;</li><li>Posting a message to a bulletin board, newsgroup, mailing list, blog, or similar group of articles;</li><li>Creating a new resource that has yet to be identified by the origin server; and</li><li>Appending data to a resource's existing representation(s).</li></ul></div><div id="rfc.section.4.3.3.p.2"><p>An origin server indicates response semantics by choosing an appropriate status code depending on the result of processing the POST request; almost all of the status codes defined by this specification might be received in a response to POST (the exceptions being <a href="rfc7233.html#status.206" class="smpl">206 (Partial Content)</a>, <a href="rfc7232.html#status.304" class="smpl">304 (Not Modified)</a>, and <a href="rfc7233.html#status.416" class="smpl">416 (Range Not Satisfiable)</a>).<a class="self" href="#rfc.section.4.3.3.p.2">&para;</a></p></div><div id="rfc.section.4.3.3.p.3"><p>If one or more resources has been created on the origin server as a result of successfully processing a POST request, the origin server <em class="bcp14">SHOULD</em> send a <a href="#status.201" class="smpl">201 (Created)</a> response containing a <a href="#header.location" class="smpl">Location</a> header field that provides an identifier for the primary resource created (<a href="#header.location" id="rfc.xref.header.location.1" title="Location">Section&nbsp;7.1.2</a>) and a representation that describes the status of the request while referring to the new resource(s).<a class="self" href="#rfc.section.4.3.3.p.3">&para;</a></p></div><div id="rfc.section.4.3.3.p.4"><p>Responses to POST requests are only cacheable when they include explicit freshness information (see <a href="rfc7234.html#calculating.freshness.lifetime" title="Calculating Freshness Lifetime">Section 4.2.1</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>). However, POST caching is not widely implemented. For cases where an origin server wishes the client to be able to cache the result of a POST in a way that can be reused by a later GET, the origin server <em class="bcp14">MAY</em> send a <a href="#status.200" class="smpl">200 (OK)</a> response containing the result and a <a href="#header.content-location" class="smpl">Content-Location</a> header field that has the same value as the POST's effective request URI (<a href="#header.content-location" id="rfc.xref.header.content-location.2" title="Content-Location">Section&nbsp;3.1.4.2</a>).<a class="self" href="#rfc.section.4.3.3.p.4">&para;</a></p></div><div id="rfc.section.4.3.3.p.5"><p>If the result of processing a POST would be equivalent to a representation of an existing resource, an origin server <em class="bcp14">MAY</em> redirect the user agent to that resource by sending a <a href="#status.303" class="smpl">303 (See Other)</a> response with the existing resource's identifier in the <a href="#header.location" class="smpl">Location</a> field. This has the benefits of providing the user agent a resource identifier and transferring the representation via a method more amenable to shared caching, though at the cost of an extra request if the user agent does not already have the representation cached.<a class="self" href="#rfc.section.4.3.3.p.5">&para;</a></p></div></div><div id="PUT"><h3 id="rfc.section.4.3.4"><a href="#rfc.section.4.3.4">4.3.4</a>&nbsp;<a href="#PUT">PUT</a></h3><div id="rfc.iref.p.1"></div><div id="rfc.section.4.3.4.p.1"><p>The PUT method requests that the state of the <a href="#resources" class="smpl">target resource</a> be created or replaced with the state defined by the representation enclosed in the request message payload. A successful PUT of a given representation would suggest that a subsequent GET on that same target resource will result in an equivalent representation being sent in a <a href="#status.200" class="smpl">200 (OK)</a> response. However, there is no guarantee that such a state change will be observable, since the target resource might be acted upon by other user agents in parallel, or might be subject to dynamic processing by the origin server, before any subsequent GET is received. A successful response only implies that the user agent's intent was achieved at the time of its processing by the origin server.<a class="self" href="#rfc.section.4.3.4.p.1">&para;</a></p></div><div id="rfc.section.4.3.4.p.2"><p>If the target resource does not have a current representation and the PUT successfully creates one, then the origin server <em class="bcp14">MUST</em> inform the user agent by sending a <a href="#status.201" class="smpl">201 (Created)</a> response. If the target resource does have a current representation and that representation is successfully modified in accordance with the state of the enclosed representation, then the origin server <em class="bcp14">MUST</em> send either a <a href="#status.200" class="smpl">200 (OK)</a> or a <a href="#status.204" class="smpl">204 (No Content)</a> response to indicate successful completion of the request.<a class="self" href="#rfc.section.4.3.4.p.2">&para;</a></p></div><div id="rfc.section.4.3.4.p.3"><p>An origin server <em class="bcp14">SHOULD</em> ignore unrecognized header fields received in a PUT request (i.e., do not save them as part of the resource state).<a class="self" href="#rfc.section.4.3.4.p.3">&para;</a></p></div><div id="rfc.section.4.3.4.p.4"><p>An origin server <em class="bcp14">SHOULD</em> verify that the PUT representation is consistent with any constraints the server has for the target resource that cannot or will not be changed by the PUT. This is particularly important when the origin server uses internal configuration information related to the URI in order to set the values for representation metadata on GET responses. When a PUT representation is inconsistent with the target resource, the origin server <em class="bcp14">SHOULD</em> either make them consistent, by transforming the representation or changing the resource configuration, or respond with an appropriate error message containing sufficient information to explain why the representation is unsuitable. The <a href="#status.409" class="smpl">409 (Conflict)</a> or <a href="#status.415" class="smpl">415 (Unsupported Media Type)</a> status codes are suggested, with the latter being specific to constraints on <a href="#header.content-type" class="smpl">Content-Type</a> values.<a class="self" href="#rfc.section.4.3.4.p.4">&para;</a></p></div><div id="rfc.section.4.3.4.p.5"><p>For example, if the target resource is configured to always have a <a href="#header.content-type" class="smpl">Content-Type</a> of "text/html" and the representation being PUT has a Content-Type of "image/jpeg", the origin server ought to do one of: <a class="self" href="#rfc.section.4.3.4.p.5">&para;</a></p><ol class="la"><li>reconfigure the target resource to reflect the new media type;</li><li>transform the PUT representation to a format consistent with that of the resource before saving it as the new resource state; or,</li><li>reject the request with a <a href="#status.415" class="smpl">415 (Unsupported Media Type)</a> response indicating that the target resource is limited to "text/html", perhaps including a link to a different resource that would be a suitable target for the new representation.</li></ol></div><div id="rfc.section.4.3.4.p.6"><p>HTTP does not define exactly how a PUT method affects the state of an origin server beyond what can be expressed by the intent of the user agent request and the semantics of the origin server response. It does not define what a resource might be, in any sense of that word, beyond the interface provided via HTTP. It does not define how resource state is "stored", nor how such storage might change as a result of a change in resource state, nor how the origin server translates resource state into representations. Generally speaking, all implementation details behind the resource interface are intentionally hidden by the server.<a class="self" href="#rfc.section.4.3.4.p.6">&para;</a></p></div><div id="rfc.section.4.3.4.p.7"><p>An origin server <em class="bcp14">MUST NOT</em> send a validator header field (<a href="#response.validator" title="Validator Header Fields">Section&nbsp;7.2</a>), such as an <a href="rfc7232.html#header.etag" class="smpl">ETag</a> or <a href="rfc7232.html#header.last-modified" class="smpl">Last-Modified</a> field, in a successful response to PUT unless the request's representation data was saved without any transformation applied to the body (i.e., the resource's new representation data is identical to the representation data received in the PUT request) and the validator field value reflects the new representation. This requirement allows a user agent to know when the representation body it has in memory remains current as a result of the PUT, thus not in need of being retrieved again from the origin server, and that the new validator(s) received in the response can be used for future conditional requests in order to prevent accidental overwrites (<a href="#request.conditionals" title="Conditionals">Section&nbsp;5.2</a>).<a class="self" href="#rfc.section.4.3.4.p.7">&para;</a></p></div><div id="rfc.section.4.3.4.p.8"><p>The fundamental difference between the POST and PUT methods is highlighted by the different intent for the enclosed representation. The target resource in a POST request is intended to handle the enclosed representation according to the resource's own semantics, whereas the enclosed representation in a PUT request is defined as replacing the state of the target resource. Hence, the intent of PUT is idempotent and visible to intermediaries, even though the exact effect is only known by the origin server.<a class="self" href="#rfc.section.4.3.4.p.8">&para;</a></p></div><div id="rfc.section.4.3.4.p.9"><p>Proper interpretation of a PUT request presumes that the user agent knows which target resource is desired. A service that selects a proper URI on behalf of the client, after receiving a state-changing request, <em class="bcp14">SHOULD</em> be implemented using the POST method rather than PUT. If the origin server will not make the requested PUT state change to the target resource and instead wishes to have it applied to a different resource, such as when the resource has been moved to a different URI, then the origin server <em class="bcp14">MUST</em> send an appropriate <a href="#status.3xx" class="smpl">3xx (Redirection)</a> response; the user agent <em class="bcp14">MAY</em> then make its own decision regarding whether or not to redirect the request.<a class="self" href="#rfc.section.4.3.4.p.9">&para;</a></p></div><div id="rfc.section.4.3.4.p.10"><p>A PUT request applied to the target resource can have side effects on other resources. For example, an article might have a URI for identifying "the current version" (a resource) that is separate from the URIs identifying each particular version (different resources that at one point shared the same state as the current version resource). A successful PUT request on "the current version" URI might therefore create a new version resource in addition to changing the state of the target resource, and might also cause links to be added between the related resources.<a class="self" href="#rfc.section.4.3.4.p.10">&para;</a></p></div><div id="rfc.section.4.3.4.p.11"><p>An origin server that allows PUT on a given target resource <em class="bcp14">MUST</em> send a <a href="#status.400" class="smpl">400 (Bad Request)</a> response to a PUT request that contains a <a href="rfc7233.html#header.content-range" class="smpl">Content-Range</a> header field (<a href="rfc7233.html#header.content-range" title="Content-Range">Section 4.2</a> of <a href="#RFC7233" id="rfc.xref.RFC7233.4"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[RFC7233]</cite></a>), since the payload is likely to be partial content that has been mistakenly PUT as a full representation. Partial content updates are possible by targeting a separately identified resource with state that overlaps a portion of the larger resource, or by using a different method that has been specifically defined for partial updates (for example, the PATCH method defined in <a href="#RFC5789" id="rfc.xref.RFC5789.1"><cite title="PATCH Method for HTTP">[RFC5789]</cite></a>).<a class="self" href="#rfc.section.4.3.4.p.11">&para;</a></p></div><div id="rfc.section.4.3.4.p.12"><p>Responses to the PUT method are not cacheable. If a successful PUT request passes through a cache that has one or more stored responses for the effective request URI, those stored responses will be invalidated (see <a href="rfc7234.html#invalidation" title="Invalidation">Section 4.4</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.6"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>).<a class="self" href="#rfc.section.4.3.4.p.12">&para;</a></p></div></div><div id="DELETE"><h3 id="rfc.section.4.3.5"><a href="#rfc.section.4.3.5">4.3.5</a>&nbsp;<a href="#DELETE">DELETE</a></h3><div id="rfc.iref.d.1"></div><div id="rfc.section.4.3.5.p.1"><p>The DELETE method requests that the origin server remove the association between the <a href="#resources" class="smpl">target resource</a> and its current functionality. In effect, this method is similar to the rm command in UNIX: it expresses a deletion operation on the URI mapping of the origin server rather than an expectation that the previously associated information be deleted.<a class="self" href="#rfc.section.4.3.5.p.1">&para;</a></p></div><div id="rfc.section.4.3.5.p.2"><p>If the target resource has one or more current representations, they might or might not be destroyed by the origin server, and the associated storage might or might not be reclaimed, depending entirely on the nature of the resource and its implementation by the origin server (which are beyond the scope of this specification). Likewise, other implementation aspects of a resource might need to be deactivated or archived as a result of a DELETE, such as database or gateway connections. In general, it is assumed that the origin server will only allow DELETE on resources for which it has a prescribed mechanism for accomplishing the deletion.<a class="self" href="#rfc.section.4.3.5.p.2">&para;</a></p></div><div id="rfc.section.4.3.5.p.3"><p>Relatively few resources allow the DELETE method &#8212; its primary use is for remote authoring environments, where the user has some direction regarding its effect. For example, a resource that was previously created using a PUT request, or identified via the Location header field after a <a href="#status.201" class="smpl">201 (Created)</a> response to a POST request, might allow a corresponding DELETE request to undo those actions. Similarly, custom user agent implementations that implement an authoring function, such as revision control clients using HTTP for remote operations, might use DELETE based on an assumption that the server's URI space has been crafted to correspond to a version repository.<a class="self" href="#rfc.section.4.3.5.p.3">&para;</a></p></div><div id="rfc.section.4.3.5.p.4"><p>If a DELETE method is successfully applied, the origin server <em class="bcp14">SHOULD</em> send a <a href="#status.202" class="smpl">202 (Accepted)</a> status code if the action will likely succeed but has not yet been enacted, a <a href="#status.204" class="smpl">204 (No Content)</a> status code if the action has been enacted and no further information is to be supplied, or a <a href="#status.200" class="smpl">200 (OK)</a> status code if the action has been enacted and the response message includes a representation describing the status.<a class="self" href="#rfc.section.4.3.5.p.4">&para;</a></p></div><div id="rfc.section.4.3.5.p.5"><p>A payload within a DELETE request message has no defined semantics; sending a payload body on a DELETE request might cause some existing implementations to reject the request.<a class="self" href="#rfc.section.4.3.5.p.5">&para;</a></p></div><div id="rfc.section.4.3.5.p.6"><p>Responses to the DELETE method are not cacheable. If a DELETE request passes through a cache that has one or more stored responses for the effective request URI, those stored responses will be invalidated (see <a href="rfc7234.html#invalidation" title="Invalidation">Section 4.4</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.7"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>).<a class="self" href="#rfc.section.4.3.5.p.6">&para;</a></p></div></div><div id="CONNECT"><h3 id="rfc.section.4.3.6"><a href="#rfc.section.4.3.6">4.3.6</a>&nbsp;<a href="#CONNECT">CONNECT</a></h3><div id="rfc.section.4.3.6.p.1"><p>The CONNECT method requests that the recipient establish a tunnel to the destination origin server identified by the request-target and, if successful, thereafter restrict its behavior to blind forwarding of packets, in both directions, until the tunnel is closed. Tunnels are commonly used to create an end-to-end virtual connection, through one or more proxies, which can then be secured using TLS (Transport Layer Security, <a href="#RFC5246" id="rfc.xref.RFC5246.1"><cite title="The Transport Layer Security (TLS) Protocol Version 1.2">[RFC5246]</cite></a>).<a class="self" href="#rfc.section.4.3.6.p.1">&para;</a></p></div><div id="rfc.section.4.3.6.p.2"><p>CONNECT is intended only for use in requests to a proxy. An origin server that receives a CONNECT request for itself <em class="bcp14">MAY</em> respond with a <a href="#status.2xx" class="smpl">2xx (Successful)</a> status code to indicate that a connection is established. However, most origin servers do not implement CONNECT.<a class="self" href="#rfc.section.4.3.6.p.2">&para;</a></p></div><div id="rfc.section.4.3.6.p.3"><p>A client sending a CONNECT request <em class="bcp14">MUST</em> send the authority form of request-target (<a href="rfc7230.html#request-target" title="Request Target">Section 5.3</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.16"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>); i.e., the request-target consists of only the host name and port number of the tunnel destination, separated by a colon. For example,<a class="self" href="#rfc.section.4.3.6.p.3">&para;</a></p></div><div id="rfc.figure.u.18"><pre class="text2">CONNECT server.example.com:80 HTTP/1.1 
     
    579579</pre></div><div id="rfc.section.5.3.2.p.11"><p>have the following precedence: <a class="self" href="#rfc.section.5.3.2.p.11">&para;</a></p><ol><li>text/plain;format=flowed</li><li>text/plain</li><li>text/*</li><li>*/*</li></ol></div><div id="rfc.section.5.3.2.p.12"><p>The media type quality factor associated with a given type is determined by finding the media range with the highest precedence that matches the type. For example,<a class="self" href="#rfc.section.5.3.2.p.12">&para;</a></p></div><div id="rfc.figure.u.28"><pre class="text">  Accept: text/*;q=0.3, text/html;q=0.7, text/html;level=1, 
    580580          text/html;level=2;q=0.4, */*;q=0.5 
    581 </pre></div><div id="rfc.section.5.3.2.p.13"><p>would cause the following values to be associated:<a class="self" href="#rfc.section.5.3.2.p.13">&para;</a></p></div><div id="rfc.table.u.6"><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Media Type</th><th>Quality Value</th></tr></thead><tbody><tr><td class="left">text/html;level=1</td><td class="left">1</td></tr><tr><td class="left">text/html</td><td class="left">0.7</td></tr><tr><td class="left">text/plain</td><td class="left">0.3</td></tr><tr><td class="left">image/jpeg</td><td class="left">0.5</td></tr><tr><td class="left">text/html;level=2</td><td class="left">0.4</td></tr><tr><td class="left">text/html;level=3</td><td class="left">0.7</td></tr></tbody></table></div><div id="rfc.section.5.3.2.p.14"><p><b>Note:</b> A user agent might be provided with a default set of quality values for certain media ranges. However, unless the user agent is a closed system that cannot interact with other rendering agents, this default set ought to be configurable by the user.<a class="self" href="#rfc.section.5.3.2.p.14">&para;</a></p></div></div><div id="header.accept-charset"><h3 id="rfc.section.5.3.3"><a href="#rfc.section.5.3.3">5.3.3</a>&nbsp;<a href="#header.accept-charset">Accept-Charset</a></h3><div id="rfc.section.5.3.3.p.1"><p>The "Accept-Charset" header field can be sent by a user agent to indicate what charsets are acceptable in textual response content. This field allows user agents capable of understanding more comprehensive or special-purpose charsets to signal that capability to an origin server that is capable of representing information in those charsets.<a class="self" href="#rfc.section.5.3.3.p.1">&para;</a></p></div><div id="rfc.figure.u.29"><pre class="inline"><span id="rfc.iref.g.22"></span>  <a href="#header.accept-charset" class="smpl">Accept-Charset</a> = 1#( ( <a href="#charset" class="smpl">charset</a> / "*" ) [ <a href="#quality.values" class="smpl">weight</a> ] ) 
     581</pre></div><div id="rfc.section.5.3.2.p.13" class="avoidbreakafter"><p>would cause the following values to be associated:<a class="self" href="#rfc.section.5.3.2.p.13">&para;</a></p></div><div id="rfc.table.u.6"><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Media Type</th><th>Quality Value</th></tr></thead><tbody><tr><td class="left">text/html;level=1</td><td class="left">1</td></tr><tr><td class="left">text/html</td><td class="left">0.7</td></tr><tr><td class="left">text/plain</td><td class="left">0.3</td></tr><tr><td class="left">image/jpeg</td><td class="left">0.5</td></tr><tr><td class="left">text/html;level=2</td><td class="left">0.4</td></tr><tr><td class="left">text/html;level=3</td><td class="left">0.7</td></tr></tbody></table></div><div id="rfc.section.5.3.2.p.14"><p><b>Note:</b> A user agent might be provided with a default set of quality values for certain media ranges. However, unless the user agent is a closed system that cannot interact with other rendering agents, this default set ought to be configurable by the user.<a class="self" href="#rfc.section.5.3.2.p.14">&para;</a></p></div></div><div id="header.accept-charset"><h3 id="rfc.section.5.3.3"><a href="#rfc.section.5.3.3">5.3.3</a>&nbsp;<a href="#header.accept-charset">Accept-Charset</a></h3><div id="rfc.section.5.3.3.p.1"><p>The "Accept-Charset" header field can be sent by a user agent to indicate what charsets are acceptable in textual response content. This field allows user agents capable of understanding more comprehensive or special-purpose charsets to signal that capability to an origin server that is capable of representing information in those charsets.<a class="self" href="#rfc.section.5.3.3.p.1">&para;</a></p></div><div id="rfc.figure.u.29"><pre class="inline"><span id="rfc.iref.g.22"></span>  <a href="#header.accept-charset" class="smpl">Accept-Charset</a> = 1#( ( <a href="#charset" class="smpl">charset</a> / "*" ) [ <a href="#quality.values" class="smpl">weight</a> ] ) 
    582582</pre></div><div id="rfc.section.5.3.3.p.2"><p>Charset names are defined in <a href="#charset" title="Charset">Section&nbsp;3.1.1.2</a>. A user agent <em class="bcp14">MAY</em> associate a quality value with each charset to indicate the user's relative preference for that charset, as defined in <a href="#quality.values" title="Quality Values">Section&nbsp;5.3.1</a>. An example is<a class="self" href="#rfc.section.5.3.3.p.2">&para;</a></p></div><div id="rfc.figure.u.30"><pre class="text">  Accept-Charset: iso-8859-5, unicode-1-1;q=0.8 
    583583</pre></div><div id="rfc.section.5.3.3.p.3"><p>The special value "*", if present in the Accept-Charset field, matches every charset that is not mentioned elsewhere in the Accept-Charset field. If no "*" is present in an Accept-Charset field, then any charsets not explicitly mentioned in the field are considered "not acceptable" to the client.<a class="self" href="#rfc.section.5.3.3.p.3">&para;</a></p></div><div id="rfc.section.5.3.3.p.4"><p>A request without any Accept-Charset header field implies that the user agent will accept any charset in response. Most general-purpose user agents do not send Accept-Charset, unless specifically configured to do so, because a detailed list of supported charsets makes it easier for a server to identify an individual by virtue of the user agent's request characteristics (<a href="#fingerprinting" title="Browser Fingerprinting">Section&nbsp;9.7</a>).<a class="self" href="#rfc.section.5.3.3.p.4">&para;</a></p></div><div id="rfc.section.5.3.3.p.5"><p>If an Accept-Charset header field is present in a request and none of the available representations for the response has a charset that is listed as acceptable, the origin server can either honor the header field, by sending a <a href="#status.406" class="smpl">406 (Not Acceptable)</a> response, or disregard the header field by treating the resource as if it is not subject to content negotiation.<a class="self" href="#rfc.section.5.3.3.p.5">&para;</a></p></div></div><div id="header.accept-encoding"><h3 id="rfc.section.5.3.4"><a href="#rfc.section.5.3.4">5.3.4</a>&nbsp;<a href="#header.accept-encoding">Accept-Encoding</a></h3><div id="rfc.section.5.3.4.p.1"><p>The "Accept-Encoding" header field can be used by user agents to indicate what response content-codings (<a href="#content.codings" title="Content Codings">Section&nbsp;3.1.2.1</a>) are acceptable in the response. An "identity" token is used as a synonym for "no encoding" in order to communicate when no encoding is preferred.<a class="self" href="#rfc.section.5.3.4.p.1">&para;</a></p></div><div id="rfc.figure.u.31"><pre class="inline"><span id="rfc.iref.g.23"></span><span id="rfc.iref.g.24"></span>  <a href="#header.accept-encoding" class="smpl">Accept-Encoding</a>  = #( <a href="#header.accept-encoding" class="smpl">codings</a> [ <a href="#quality.values" class="smpl">weight</a> ] ) 
     
    592592            &lt;language-range, see <a href="#RFC4647" id="rfc.xref.RFC4647.1"><cite title="Matching of Language Tags">[RFC4647]</cite></a>, <a href="https://tools.ietf.org/html/rfc4647#section-2.1">Section 2.1</a>&gt; 
    593593</pre></div><div id="rfc.section.5.3.5.p.2"><p>Each language-range can be given an associated quality value representing an estimate of the user's preference for the languages specified by that range, as defined in <a href="#quality.values" title="Quality Values">Section&nbsp;5.3.1</a>. For example,<a class="self" href="#rfc.section.5.3.5.p.2">&para;</a></p></div><div id="rfc.figure.u.34"><pre class="text">  Accept-Language: da, en-gb;q=0.8, en;q=0.7 
    594 </pre></div><div id="rfc.section.5.3.5.p.3"><p>would mean: "I prefer Danish, but will accept British English and other types of English".<a class="self" href="#rfc.section.5.3.5.p.3">&para;</a></p></div><div id="rfc.section.5.3.5.p.4"><p>A request without any Accept-Language header field implies that the user agent will accept any language in response. If the header field is present in a request and none of the available representations for the response have a matching language tag, the origin server can either disregard the header field by treating the response as if it is not subject to content negotiation or honor the header field by sending a <a href="#status.406" class="smpl">406 (Not Acceptable)</a> response. However, the latter is not encouraged, as doing so can prevent users from accessing content that they might be able to use (with translation software, for example).<a class="self" href="#rfc.section.5.3.5.p.4">&para;</a></p></div><div id="rfc.section.5.3.5.p.5"><p>Note that some recipients treat the order in which language tags are listed as an indication of descending priority, particularly for tags that are assigned equal quality values (no value is the same as q=1). However, this behavior cannot be relied upon. For consistency and to maximize interoperability, many user agents assign each language tag a unique quality value while also listing them in order of decreasing quality. Additional discussion of language priority lists can be found in <a href="https://tools.ietf.org/html/rfc4647#section-2.3">Section 2.3</a> of <a href="#RFC4647" id="rfc.xref.RFC4647.2"><cite title="Matching of Language Tags">[RFC4647]</cite></a>.<a class="self" href="#rfc.section.5.3.5.p.5">&para;</a></p></div><div id="rfc.section.5.3.5.p.6"><p>For matching, <a href="https://tools.ietf.org/html/rfc4647#section-3">Section 3</a> of <a href="#RFC4647" id="rfc.xref.RFC4647.3"><cite title="Matching of Language Tags">[RFC4647]</cite></a> defines several matching schemes. Implementations can offer the most appropriate matching scheme for their requirements. The "Basic Filtering" scheme (<a href="#RFC4647" id="rfc.xref.RFC4647.4"><cite title="Matching of Language Tags">[RFC4647]</cite></a>, <a href="https://tools.ietf.org/html/rfc4647#section-3.3.1">Section 3.3.1</a>) is identical to the matching scheme that was previously defined for HTTP in <a href="https://tools.ietf.org/html/rfc2616#section-14.4">Section 14.4</a> of <a href="#RFC2616" id="rfc.xref.RFC2616.1"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>.<a class="self" href="#rfc.section.5.3.5.p.6">&para;</a></p></div><div id="rfc.section.5.3.5.p.7"><p>It might be contrary to the privacy expectations of the user to send an Accept-Language header field with the complete linguistic preferences of the user in every request (<a href="#fingerprinting" title="Browser Fingerprinting">Section&nbsp;9.7</a>).<a class="self" href="#rfc.section.5.3.5.p.7">&para;</a></p></div><div id="rfc.section.5.3.5.p.8"><p>Since intelligibility is highly dependent on the individual user, user agents need to allow user control over the linguistic preference (either through configuration of the user agent itself or by defaulting to a user controllable system setting). A user agent that does not provide such control to the user <em class="bcp14">MUST NOT</em> send an Accept-Language header field.<a class="self" href="#rfc.section.5.3.5.p.8">&para;</a></p></div><div class="note"><div id="rfc.section.5.3.5.p.9"><p><b>Note:</b> User agents ought to provide guidance to users when setting a preference, since users are rarely familiar with the details of language matching as described above. For example, users might assume that on selecting "en-gb", they will be served any kind of English document if British English is not available. A user agent might suggest, in such a case, to add "en" to the list for better matching behavior.<a class="self" href="#rfc.section.5.3.5.p.9">&para;</a></p></div></div></div></div><div id="request.auth"><h2 id="rfc.section.5.4"><a href="#rfc.section.5.4">5.4</a>&nbsp;<a href="#request.auth">Authentication Credentials</a></h2><div id="rfc.section.5.4.p.1"><p>Two header fields are used for carrying authentication credentials, as defined in <a href="#RFC7235" id="rfc.xref.RFC7235.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Authentication">[RFC7235]</cite></a>. Note that various custom mechanisms for user authentication use the Cookie header field for this purpose, as defined in <a href="#RFC6265" id="rfc.xref.RFC6265.2"><cite title="HTTP State Management Mechanism">[RFC6265]</cite></a>.<a class="self" href="#rfc.section.5.4.p.1">&para;</a></p></div><div id="rfc.table.u.7"><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Header Field Name</th><th>Defined in...</th></tr></thead><tbody><tr><td class="left">Authorization</td><td class="left"><a href="rfc7235.html#header.authorization" title="Authorization">Section 4.2</a> of <a href="#RFC7235" id="rfc.xref.RFC7235.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Authentication">[RFC7235]</cite></a></td></tr><tr><td class="left">Proxy-Authorization</td><td class="left"><a href="rfc7235.html#header.proxy-authorization" title="Proxy-Authorization">Section 4.4</a> of <a href="#RFC7235" id="rfc.xref.RFC7235.4"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Authentication">[RFC7235]</cite></a></td></tr></tbody></table></div></div><div id="request.context"><h2 id="rfc.section.5.5"><a href="#rfc.section.5.5">5.5</a>&nbsp;<a href="#request.context">Request Context</a></h2><div id="rfc.section.5.5.p.1"><p>The following request header fields provide additional information about the request context, including information about the user, user agent, and resource behind the request.<a class="self" href="#rfc.section.5.5.p.1">&para;</a></p></div><div id="rfc.table.u.8"><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Header Field Name</th><th>Defined in...</th></tr></thead><tbody><tr><td class="left">From</td><td class="left"><a href="#header.from" id="rfc.xref.header.from.1" title="From">Section&nbsp;5.5.1</a></td></tr><tr><td class="left">Referer</td><td class="left"><a href="#header.referer" id="rfc.xref.header.referer.1" title="Referer">Section&nbsp;5.5.2</a></td></tr><tr><td class="left">User-Agent</td><td class="left"><a href="#header.user-agent" id="rfc.xref.header.user-agent.1" title="User-Agent">Section&nbsp;5.5.3</a></td></tr></tbody></table></div><div id="header.from"><h3 id="rfc.section.5.5.1"><a href="#rfc.section.5.5.1">5.5.1</a>&nbsp;<a href="#header.from">From</a></h3><div id="rfc.section.5.5.1.p.1"><p>The "From" header field contains an Internet email address for a human user who controls the requesting user agent. The address ought to be machine-usable, as defined by "mailbox" in <a href="https://tools.ietf.org/html/rfc5322#section-3.4">Section 3.4</a> of <a href="#RFC5322" id="rfc.xref.RFC5322.1"><cite title="Internet Message Format">[RFC5322]</cite></a>:<a class="self" href="#rfc.section.5.5.1.p.1">&para;</a></p></div><div id="rfc.figure.u.35"><pre class="inline"><span id="rfc.iref.g.27"></span>  <a href="#header.from" class="smpl">From</a>    = <a href="#header.from" class="smpl">mailbox</a> 
     594</pre></div><div id="rfc.section.5.3.5.p.3"><p>would mean: "I prefer Danish, but will accept British English and other types of English".<a class="self" href="#rfc.section.5.3.5.p.3">&para;</a></p></div><div id="rfc.section.5.3.5.p.4"><p>A request without any Accept-Language header field implies that the user agent will accept any language in response. If the header field is present in a request and none of the available representations for the response have a matching language tag, the origin server can either disregard the header field by treating the response as if it is not subject to content negotiation or honor the header field by sending a <a href="#status.406" class="smpl">406 (Not Acceptable)</a> response. However, the latter is not encouraged, as doing so can prevent users from accessing content that they might be able to use (with translation software, for example).<a class="self" href="#rfc.section.5.3.5.p.4">&para;</a></p></div><div id="rfc.section.5.3.5.p.5"><p>Note that some recipients treat the order in which language tags are listed as an indication of descending priority, particularly for tags that are assigned equal quality values (no value is the same as q=1). However, this behavior cannot be relied upon. For consistency and to maximize interoperability, many user agents assign each language tag a unique quality value while also listing them in order of decreasing quality. Additional discussion of language priority lists can be found in <a href="https://tools.ietf.org/html/rfc4647#section-2.3">Section 2.3</a> of <a href="#RFC4647" id="rfc.xref.RFC4647.2"><cite title="Matching of Language Tags">[RFC4647]</cite></a>.<a class="self" href="#rfc.section.5.3.5.p.5">&para;</a></p></div><div id="rfc.section.5.3.5.p.6"><p>For matching, <a href="https://tools.ietf.org/html/rfc4647#section-3">Section 3</a> of <a href="#RFC4647" id="rfc.xref.RFC4647.3"><cite title="Matching of Language Tags">[RFC4647]</cite></a> defines several matching schemes. Implementations can offer the most appropriate matching scheme for their requirements. The "Basic Filtering" scheme (<a href="#RFC4647" id="rfc.xref.RFC4647.4"><cite title="Matching of Language Tags">[RFC4647]</cite></a>, <a href="https://tools.ietf.org/html/rfc4647#section-3.3.1">Section 3.3.1</a>) is identical to the matching scheme that was previously defined for HTTP in <a href="https://tools.ietf.org/html/rfc2616#section-14.4">Section 14.4</a> of <a href="#RFC2616" id="rfc.xref.RFC2616.1"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>.<a class="self" href="#rfc.section.5.3.5.p.6">&para;</a></p></div><div id="rfc.section.5.3.5.p.7"><p>It might be contrary to the privacy expectations of the user to send an Accept-Language header field with the complete linguistic preferences of the user in every request (<a href="#fingerprinting" title="Browser Fingerprinting">Section&nbsp;9.7</a>).<a class="self" href="#rfc.section.5.3.5.p.7">&para;</a></p></div><div id="rfc.section.5.3.5.p.8"><p>Since intelligibility is highly dependent on the individual user, user agents need to allow user control over the linguistic preference (either through configuration of the user agent itself or by defaulting to a user controllable system setting). A user agent that does not provide such control to the user <em class="bcp14">MUST NOT</em> send an Accept-Language header field.<a class="self" href="#rfc.section.5.3.5.p.8">&para;</a></p></div><div class="note"><div id="rfc.section.5.3.5.p.9"><p><b>Note:</b> User agents ought to provide guidance to users when setting a preference, since users are rarely familiar with the details of language matching as described above. For example, users might assume that on selecting "en-gb", they will be served any kind of English document if British English is not available. A user agent might suggest, in such a case, to add "en" to the list for better matching behavior.<a class="self" href="#rfc.section.5.3.5.p.9">&para;</a></p></div></div></div></div><div id="request.auth"><h2 id="rfc.section.5.4"><a href="#rfc.section.5.4">5.4</a>&nbsp;<a href="#request.auth">Authentication Credentials</a></h2><div id="rfc.section.5.4.p.1"><p>Two header fields are used for carrying authentication credentials, as defined in <a href="#RFC7235" id="rfc.xref.RFC7235.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Authentication">[RFC7235]</cite></a>. Note that various custom mechanisms for user authentication use the Cookie header field for this purpose, as defined in <a href="#RFC6265" id="rfc.xref.RFC6265.2"><cite title="HTTP State Management Mechanism">[RFC6265]</cite></a>.<a class="self" href="#rfc.section.5.4.p.1">&para;</a></p></div><div id="rfc.table.u.7"><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Header Field Name</th><th>Defined in...</th></tr></thead><tbody><tr><td class="left">Authorization</td><td class="left"><a href="rfc7235.html#header.authorization" title="Authorization">Section 4.2</a> of <a href="#RFC7235" id="rfc.xref.RFC7235.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Authentication">[RFC7235]</cite></a></td></tr><tr><td class="left">Proxy-Authorization</td><td class="left"><a href="rfc7235.html#header.proxy-authorization" title="Proxy-Authorization">Section 4.4</a> of <a href="#RFC7235" id="rfc.xref.RFC7235.4"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Authentication">[RFC7235]</cite></a></td></tr></tbody></table></div></div><div id="request.context"><h2 id="rfc.section.5.5"><a href="#rfc.section.5.5">5.5</a>&nbsp;<a href="#request.context">Request Context</a></h2><div id="rfc.section.5.5.p.1"><p>The following request header fields provide additional information about the request context, including information about the user, user agent, and resource behind the request.<a class="self" href="#rfc.section.5.5.p.1">&para;</a></p></div><div id="rfc.table.u.8"><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Header Field Name</th><th>Defined in...</th></tr></thead><tbody><tr><td class="left">From</td><td class="left"><a href="#header.from" id="rfc.xref.header.from.1" title="From">Section&nbsp;5.5.1</a></td></tr><tr><td class="left">Referer</td><td class="left"><a href="#header.referer" id="rfc.xref.header.referer.1" title="Referer">Section&nbsp;5.5.2</a></td></tr><tr><td class="left">User-Agent</td><td class="left"><a href="#header.user-agent" id="rfc.xref.header.user-agent.1" title="User-Agent">Section&nbsp;5.5.3</a></td></tr></tbody></table></div><div id="header.from"><h3 id="rfc.section.5.5.1"><a href="#rfc.section.5.5.1">5.5.1</a>&nbsp;<a href="#header.from">From</a></h3><div id="rfc.section.5.5.1.p.1" class="avoidbreakafter"><p>The "From" header field contains an Internet email address for a human user who controls the requesting user agent. The address ought to be machine-usable, as defined by "mailbox" in <a href="https://tools.ietf.org/html/rfc5322#section-3.4">Section 3.4</a> of <a href="#RFC5322" id="rfc.xref.RFC5322.1"><cite title="Internet Message Format">[RFC5322]</cite></a>:<a class="self" href="#rfc.section.5.5.1.p.1">&para;</a></p></div><div id="rfc.figure.u.35"><pre class="inline"><span id="rfc.iref.g.27"></span>  <a href="#header.from" class="smpl">From</a>    = <a href="#header.from" class="smpl">mailbox</a> 
    595595   
    596596  <a href="#header.from" class="smpl">mailbox</a> = &lt;mailbox, see <a href="#RFC5322" id="rfc.xref.RFC5322.2"><cite title="Internet Message Format">[RFC5322]</cite></a>, <a href="https://tools.ietf.org/html/rfc5322#section-3.4">Section 3.4</a>&gt; 
    597 </pre></div><div id="rfc.section.5.5.1.p.2"><p>An example is:<a class="self" href="#rfc.section.5.5.1.p.2">&para;</a></p></div><div id="rfc.figure.u.36"><pre class="text">  From: webmaster@example.org 
     597</pre></div><div id="rfc.section.5.5.1.p.2" class="avoidbreakafter"><p>An example is:<a class="self" href="#rfc.section.5.5.1.p.2">&para;</a></p></div><div id="rfc.figure.u.36"><pre class="text">  From: webmaster@example.org 
    598598</pre></div><div id="rfc.section.5.5.1.p.3"><p>The From header field is rarely sent by non-robotic user agents. A user agent <em class="bcp14">SHOULD NOT</em> send a From header field without explicit configuration by the user, since that might conflict with the user's privacy interests or their site's security policy.<a class="self" href="#rfc.section.5.5.1.p.3">&para;</a></p></div><div id="rfc.section.5.5.1.p.4"><p>A robotic user agent <em class="bcp14">SHOULD</em> send a valid From header field so that the person responsible for running the robot can be contacted if problems occur on servers, such as if the robot is sending excessive, unwanted, or invalid requests.<a class="self" href="#rfc.section.5.5.1.p.4">&para;</a></p></div><div id="rfc.section.5.5.1.p.5"><p>A server <em class="bcp14">SHOULD NOT</em> use the From header field for access control or authentication, since most recipients will assume that the field value is public information.<a class="self" href="#rfc.section.5.5.1.p.5">&para;</a></p></div></div><div id="header.referer"><h3 id="rfc.section.5.5.2"><a href="#rfc.section.5.5.2">5.5.2</a>&nbsp;<a href="#header.referer">Referer</a></h3><div id="rfc.section.5.5.2.p.1"><p>The "Referer" [sic] header field allows the user agent to specify a URI reference for the resource from which the <a href="rfc7230.html#target-resource" class="smpl">target URI</a> was obtained (i.e., the "referrer", though the field name is misspelled). A user agent <em class="bcp14">MUST NOT</em> include the fragment and userinfo components of the URI reference <a href="#RFC3986" id="rfc.xref.RFC3986.1"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, if any, when generating the Referer field value.<a class="self" href="#rfc.section.5.5.2.p.1">&para;</a></p></div><div id="rfc.figure.u.37"><pre class="inline"><span id="rfc.iref.g.28"></span>  <a href="#header.referer" class="smpl">Referer</a> = <a href="#imported.abnf" class="smpl">absolute-URI</a> / <a href="#imported.abnf" class="smpl">partial-URI</a> 
    599 </pre></div><div id="rfc.section.5.5.2.p.2"><p>The Referer header field allows servers to generate back-links to other resources for simple analytics, logging, optimized caching, etc. It also allows obsolete or mistyped links to be found for maintenance. Some servers use the Referer header field as a means of denying links from other sites (so-called "deep linking") or restricting cross-site request forgery (CSRF), but not all requests contain it.<a class="self" href="#rfc.section.5.5.2.p.2">&para;</a></p></div><div id="rfc.section.5.5.2.p.3"><p>Example:<a class="self" href="#rfc.section.5.5.2.p.3">&para;</a></p></div><div id="rfc.figure.u.38"><pre class="text">  Referer: http://www.example.org/hypertext/Overview.html 
     599</pre></div><div id="rfc.section.5.5.2.p.2"><p>The Referer header field allows servers to generate back-links to other resources for simple analytics, logging, optimized caching, etc. It also allows obsolete or mistyped links to be found for maintenance. Some servers use the Referer header field as a means of denying links from other sites (so-called "deep linking") or restricting cross-site request forgery (CSRF), but not all requests contain it.<a class="self" href="#rfc.section.5.5.2.p.2">&para;</a></p></div><div id="rfc.section.5.5.2.p.3" class="avoidbreakafter"><p>Example:<a class="self" href="#rfc.section.5.5.2.p.3">&para;</a></p></div><div id="rfc.figure.u.38"><pre class="text">  Referer: http://www.example.org/hypertext/Overview.html 
    600600</pre></div><div id="rfc.section.5.5.2.p.4"><p>If the target URI was obtained from a source that does not have its own URI (e.g., input from the user keyboard, or an entry within the user's bookmarks/favorites), the user agent <em class="bcp14">MUST</em> either exclude the Referer field or send it with a value of "about:blank".<a class="self" href="#rfc.section.5.5.2.p.4">&para;</a></p></div><div id="rfc.section.5.5.2.p.5"><p>The Referer field has the potential to reveal information about the request context or browsing history of the user, which is a privacy concern if the referring resource's identifier reveals personal information (such as an account name) or a resource that is supposed to be confidential (such as behind a firewall or internal to a secured service). Most general-purpose user agents do not send the Referer header field when the referring resource is a local "file" or "data" URI. A user agent <em class="bcp14">MUST NOT</em> send a <a href="#header.referer" class="smpl">Referer</a> header field in an unsecured HTTP request if the referring page was received with a secure protocol. See <a href="#sensitive.information.in.uris" title="Disclosure of Sensitive Information in URIs">Section&nbsp;9.4</a> for additional security considerations.<a class="self" href="#rfc.section.5.5.2.p.5">&para;</a></p></div><div id="rfc.section.5.5.2.p.6"><p>Some intermediaries have been known to indiscriminately remove Referer header fields from outgoing requests. This has the unfortunate side effect of interfering with protection against CSRF attacks, which can be far more harmful to their users. Intermediaries and user agent extensions that wish to limit information disclosure in Referer ought to restrict their changes to specific edits, such as replacing internal domain names with pseudonyms or truncating the query and/or path components. An intermediary <em class="bcp14">SHOULD NOT</em> modify or delete the Referer header field when the field value shares the same scheme and host as the request target.<a class="self" href="#rfc.section.5.5.2.p.6">&para;</a></p></div></div><div id="header.user-agent"><h3 id="rfc.section.5.5.3"><a href="#rfc.section.5.5.3">5.5.3</a>&nbsp;<a href="#header.user-agent">User-Agent</a></h3><div id="rfc.section.5.5.3.p.1"><p>The "User-Agent" header field contains information about the user agent originating the request, which is often used by servers to help identify the scope of reported interoperability problems, to work around or tailor responses to avoid particular user agent limitations, and for analytics regarding browser or operating system use. A user agent <em class="bcp14">SHOULD</em> send a User-Agent field in each request unless specifically configured not to do so.<a class="self" href="#rfc.section.5.5.3.p.1">&para;</a></p></div><div id="rfc.figure.u.39"><pre class="inline"><span id="rfc.iref.g.29"></span>  <a href="#header.user-agent" class="smpl">User-Agent</a> = <a href="#header.user-agent" class="smpl">product</a> *( <a href="#imported.abnf" class="smpl">RWS</a> ( <a href="#header.user-agent" class="smpl">product</a> / <a href="#imported.abnf" class="smpl">comment</a> ) ) 
    601601</pre></div><div id="rfc.section.5.5.3.p.2"><p>The User-Agent field-value consists of one or more product identifiers, each followed by zero or more comments (<a href="rfc7230.html#header.fields" title="Header Fields">Section 3.2</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.23"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>), which together identify the user agent software and its significant subproducts. By convention, the product identifiers are listed in decreasing order of their significance for identifying the user agent software. Each product identifier consists of a name and optional version.<a class="self" href="#rfc.section.5.5.3.p.2">&para;</a></p></div><div id="rfc.figure.u.40"><pre class="inline"><span id="rfc.iref.g.30"></span><span id="rfc.iref.g.31"></span>  <a href="#header.user-agent" class="smpl">product</a>         = <a href="#imported.abnf" class="smpl">token</a> ["/" <a href="#header.user-agent" class="smpl">product-version</a>] 
    602602  <a href="#header.user-agent" class="smpl">product-version</a> = <a href="#imported.abnf" class="smpl">token</a> 
    603 </pre></div><div id="rfc.section.5.5.3.p.3"><p>A sender <em class="bcp14">SHOULD</em> limit generated product identifiers to what is necessary to identify the product; a sender <em class="bcp14">MUST NOT</em> generate advertising or other nonessential information within the product identifier. A sender <em class="bcp14">SHOULD NOT</em> generate information in <a href="#header.user-agent" class="smpl">product-version</a> that is not a version identifier (i.e., successive versions of the same product name ought to differ only in the product-version portion of the product identifier).<a class="self" href="#rfc.section.5.5.3.p.3">&para;</a></p></div><div id="rfc.section.5.5.3.p.4"><p>Example:<a class="self" href="#rfc.section.5.5.3.p.4">&para;</a></p></div><div id="rfc.figure.u.41"><pre class="text">  User-Agent: CERN-LineMode/2.15 libwww/2.17b3 
     603</pre></div><div id="rfc.section.5.5.3.p.3"><p>A sender <em class="bcp14">SHOULD</em> limit generated product identifiers to what is necessary to identify the product; a sender <em class="bcp14">MUST NOT</em> generate advertising or other nonessential information within the product identifier. A sender <em class="bcp14">SHOULD NOT</em> generate information in <a href="#header.user-agent" class="smpl">product-version</a> that is not a version identifier (i.e., successive versions of the same product name ought to differ only in the product-version portion of the product identifier).<a class="self" href="#rfc.section.5.5.3.p.3">&para;</a></p></div><div id="rfc.section.5.5.3.p.4" class="avoidbreakafter"><p>Example:<a class="self" href="#rfc.section.5.5.3.p.4">&para;</a></p></div><div id="rfc.figure.u.41"><pre class="text">  User-Agent: CERN-LineMode/2.15 libwww/2.17b3 
    604604</pre></div><div id="rfc.section.5.5.3.p.5"><p>A user agent <em class="bcp14">SHOULD NOT</em> generate a User-Agent field containing needlessly fine-grained detail and <em class="bcp14">SHOULD</em> limit the addition of subproducts by third parties. Overly long and detailed User-Agent field values increase request latency and the risk of a user being identified against their wishes ("fingerprinting").<a class="self" href="#rfc.section.5.5.3.p.5">&para;</a></p></div><div id="rfc.section.5.5.3.p.6"><p>Likewise, implementations are encouraged not to use the product tokens of other implementations in order to declare compatibility with them, as this circumvents the purpose of the field. If a user agent masquerades as a different user agent, recipients can assume that the user intentionally desires to see responses tailored for that identified user agent, even if they might not work as well for the actual user agent being used.<a class="self" href="#rfc.section.5.5.3.p.6">&para;</a></p></div></div></div></div><div id="status.codes"><h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a>&nbsp;<a href="#status.codes">Response Status Codes</a></h1><div id="rfc.section.6.p.1"><p>The status-code element is a three-digit integer code giving the result of the attempt to understand and satisfy the request.<a class="self" href="#rfc.section.6.p.1">&para;</a></p></div><div id="rfc.section.6.p.2"><p>HTTP status codes are extensible. HTTP clients are not required to understand the meaning of all registered status codes, though such understanding is obviously desirable. However, a client <em class="bcp14">MUST</em> understand the class of any status code, as indicated by the first digit, and treat an unrecognized status code as being equivalent to the x00 status code of that class, with the exception that a recipient <em class="bcp14">MUST NOT</em> cache a response with an unrecognized status code.<a class="self" href="#rfc.section.6.p.2">&para;</a></p></div><div id="rfc.section.6.p.3"><p>For example, if an unrecognized status code of 471 is received by a client, the client can assume that there was something wrong with its request and treat the response as if it had received a <a href="#status.400" class="smpl">400 (Bad Request)</a> status code. The response message will usually contain a representation that explains the status.<a class="self" href="#rfc.section.6.p.3">&para;</a></p></div><div id="rfc.section.6.p.4"><p>The first digit of the status-code defines the class of response. The last two digits do not have any categorization role. There are five values for the first digit: <a class="self" href="#rfc.section.6.p.4">&para;</a></p><ul><li><a href="#status.1xx" class="smpl">1xx (Informational)</a>: The request was received, continuing process</li><li><a href="#status.2xx" class="smpl">2xx (Successful)</a>: The request was successfully received, understood, and accepted</li><li><a href="#status.3xx" class="smpl">3xx (Redirection)</a>: Further action needs to be taken in order to complete the request</li><li><a href="#status.4xx" class="smpl">4xx (Client Error)</a>: The request contains bad syntax or cannot be fulfilled</li><li><a href="#status.5xx" class="smpl">5xx (Server Error)</a>: The server failed to fulfill an apparently valid request</li></ul></div><div id="overview.of.status.codes"><h2 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a>&nbsp;<a href="#overview.of.status.codes">Overview of Status Codes</a></h2><div id="rfc.section.6.1.p.1"><p>The status codes listed below are defined in this specification, <a href="rfc7232.html#status.code.definitions" title="Status Code Definitions">Section 4</a> of <a href="#RFC7232" id="rfc.xref.RFC7232.9"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[RFC7232]</cite></a>, <a href="rfc7233.html#range.response" title="Responses to a Range Request">Section 4</a> of <a href="#RFC7233" id="rfc.xref.RFC7233.7"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[RFC7233]</cite></a>, and <a href="rfc7235.html#status.code.definitions" title="Status Code Definitions">Section 3</a> of <a href="#RFC7235" id="rfc.xref.RFC7235.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Authentication">[RFC7235]</cite></a>. The reason phrases listed here are only recommendations &#8212; they can be replaced by local equivalents without affecting the protocol.<a class="self" href="#rfc.section.6.1.p.1">&para;</a></p></div><div id="rfc.section.6.1.p.2"><p>Responses with status codes that are defined as cacheable by default (e.g., 200, 203, 204, 206, 300, 301, 404, 405, 410, 414, and 501 in this specification) can be reused by a cache with heuristic expiration unless otherwise indicated by the method definition or explicit cache controls <a href="#RFC7234" id="rfc.xref.RFC7234.10"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>; all other status codes are not cacheable by default.<a class="self" href="#rfc.section.6.1.p.2">&para;</a></p></div><div id="rfc.table.u.9"><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Code</th><th>Reason-Phrase</th><th>Defined in...</th></tr></thead><tbody><tr><td class="left">100</td><td class="left">Continue</td><td class="left"><a href="#status.100" id="rfc.xref.status.100.1" title="100 Continue">Section&nbsp;6.2.1</a></td></tr><tr><td class="left">101</td><td class="left">Switching Protocols</td><td class="left"><a href="#status.101" id="rfc.xref.status.101.1" title="101 Switching Protocols">Section&nbsp;6.2.2</a></td></tr><tr><td class="left">200</td><td class="left">OK</td><td class="left"><a href="#status.200" id="rfc.xref.status.200.1" title="200 OK">Section&nbsp;6.3.1</a></td></tr><tr><td class="left">201</td><td class="left">Created</td><td class="left"><a href="#status.201" id="rfc.xref.status.201.1" title="201 Created">Section&nbsp;6.3.2</a></td></tr><tr><td class="left">202</td><td class="left">Accepted</td><td class="left"><a href="#status.202" id="rfc.xref.status.202.1" title="202 Accepted">Section&nbsp;6.3.3</a></td></tr><tr><td class="left">203</td><td class="left">Non-Authoritative Information</td><td class="left"><a href="#status.203" id="rfc.xref.status.203.1" title="203 Non-Authoritative Information">Section&nbsp;6.3.4</a></td></tr><tr><td class="left">204</td><td class="left">No Content</td><td class="left"><a href="#status.204" id="rfc.xref.status.204.1" title="204 No Content">Section&nbsp;6.3.5</a></td></tr><tr><td class="left">205</td><td class="left">Reset Content</td><td class="left"><a href="#status.205" id="rfc.xref.status.205.1" title="205 Reset Content">Section&nbsp;6.3.6</a></td></tr><tr><td class="left">206</td><td class="left">Partial Content</td><td id="status.206" class="left"><a href="rfc7233.html#status.206" title="206 Partial Content">Section 4.1</a> of <a href="#RFC7233" id="rfc.xref.RFC7233.8"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[RFC7233]</cite></a></td></tr><tr><td class="left">300</td><td class="left">Multiple Choices</td><td class="left"><a href="#status.300" id="rfc.xref.status.300.1" title="300 Multiple Choices">Section&nbsp;6.4.1</a></td></tr><tr><td class="left">301</td><td class="left">Moved Permanently</td><td class="left"><a href="#status.301" id="rfc.xref.status.301.1" title="301 Moved Permanently">Section&nbsp;6.4.2</a></td></tr><tr><td class="left">302</td><td class="left">Found</td><td class="left"><a href="#status.302" id="rfc.xref.status.302.1" title="302 Found">Section&nbsp;6.4.3</a></td></tr><tr><td class="left">303</td><td class="left">See Other</td><td class="left"><a href="#status.303" id="rfc.xref.status.303.1" title="303 See Other">Section&nbsp;6.4.4</a></td></tr><tr><td class="left">304</td><td class="left">Not Modified</td><td id="status.304" class="left"><a href="rfc7232.html#status.304" title="304 Not Modified">Section 4.1</a> of <a href="#RFC7232" id="rfc.xref.RFC7232.10"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[RFC7232]</cite></a></td></tr><tr><td class="left">305</td><td class="left">Use Proxy</td><td class="left"><a href="#status.305" id="rfc.xref.status.305.1" title="305 Use Proxy">Section&nbsp;6.4.5</a></td></tr><tr><td class="left">307</td><td class="left">Temporary Redirect</td><td class="left"><a href="#status.307" id="rfc.xref.status.307.1" title="307 Temporary Redirect">Section&nbsp;6.4.7</a></td></tr><tr><td class="left">400</td><td class="left">Bad Request</td><td class="left"><a href="#status.400" id="rfc.xref.status.400.1" title="400 Bad Request">Section&nbsp;6.5.1</a></td></tr><tr><td class="left">401</td><td class="left">Unauthorized</td><td id="status.401" class="left"><a href="rfc7235.html#status.401" title="401 Unauthorized">Section 3.1</a> of <a href="#RFC7235" id="rfc.xref.RFC7235.6"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Authentication">[RFC7235]</cite></a></td></tr><tr><td class="left">402</td><td class="left">Payment Required</td><td class="left"><a href="#status.402" id="rfc.xref.status.402.1" title="402 Payment Required">Section&nbsp;6.5.2</a></td></tr><tr><td class="left">403</td><td class="left">Forbidden</td><td class="left"><a href="#status.403" id="rfc.xref.status.403.1" title="403 Forbidden">Section&nbsp;6.5.3</a></td></tr><tr><td class="left">404</td><td class="left">Not Found</td><td class="left"><a href="#status.404" id="rfc.xref.status.404.1" title="404 Not Found">Section&nbsp;6.5.4</a></td></tr><tr><td class="left">405</td><td class="left">Method Not Allowed</td><td class="left"><a href="#status.405" id="rfc.xref.status.405.1" title="405 Method Not Allowed">Section&nbsp;6.5.5</a></td></tr><tr><td class="left">406</td><td class="left">Not Acceptable</td><td class="left"><a href="#status.406" id="rfc.xref.status.406.1" title="406 Not Acceptable">Section&nbsp;6.5.6</a></td></tr><tr><td class="left">407</td><td class="left">Proxy Authentication Required</td><td id="status.407" class="left"><a href="rfc7235.html#status.407" title="407 Proxy Authentication Required">Section 3.2</a> of <a href="#RFC7235" id="rfc.xref.RFC7235.7"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Authentication">[RFC7235]</cite></a></td></tr><tr><td class="left">408</td><td class="left">Request Timeout</td><td class="left"><a href="#status.408" id="rfc.xref.status.408.1" title="408 Request Timeout">Section&nbsp;6.5.7</a></td></tr><tr><td class="left">409</td><td class="left">Conflict</td><td class="left"><a href="#status.409" id="rfc.xref.status.409.1" title="409 Conflict">Section&nbsp;6.5.8</a></td></tr><tr><td class="left">410</td><td class="left">Gone</td><td class="left"><a href="#status.410" id="rfc.xref.status.410.1" title="410 Gone">Section&nbsp;6.5.9</a></td></tr><tr><td class="left">411</td><td class="left">Length Required</td><td class="left"><a href="#status.411" id="rfc.xref.status.411.1" title="411 Length Required">Section&nbsp;6.5.10</a></td></tr><tr><td class="left">412</td><td class="left">Precondition Failed</td><td id="status.412" class="left"><a href="rfc7232.html#status.412" title="412 Precondition Failed">Section 4.2</a> of <a href="#RFC7232" id="rfc.xref.RFC7232.11"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[RFC7232]</cite></a></td></tr><tr><td class="left">413</td><td class="left">Payload Too Large</td><td class="left"><a href="#status.413" id="rfc.xref.status.413.1" title="413 Payload Too Large">Section&nbsp;6.5.11</a></td></tr><tr><td class="left">414</td><td class="left">URI Too Long</td><td class="left"><a href="#status.414" id="rfc.xref.status.414.1" title="414 URI Too Long">Section&nbsp;6.5.12</a></td></tr><tr><td class="left">415</td><td class="left">Unsupported Media Type</td><td class="left"><a href="#status.415" id="rfc.xref.status.415.1" title="415 Unsupported Media Type">Section&nbsp;6.5.13</a></td></tr><tr><td class="left">416</td><td class="left">Range Not Satisfiable</td><td id="status.416" class="left"><a href="rfc7233.html#status.416" title="416 Range Not Satisfiable">Section 4.4</a> of <a href="#RFC7233" id="rfc.xref.RFC7233.9"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[RFC7233]</cite></a></td></tr><tr><td class="left">417</td><td class="left">Expectation Failed</td><td class="left"><a href="#status.417" id="rfc.xref.status.417.1" title="417 Expectation Failed">Section&nbsp;6.5.14</a></td></tr><tr><td class="left">426</td><td class="left">Upgrade Required</td><td class="left"><a href="#status.426" id="rfc.xref.status.426.1" title="426 Upgrade Required">Section&nbsp;6.5.15</a></td></tr><tr><td class="left">500</td><td class="left">Internal Server Error</td><td class="left"><a href="#status.500" id="rfc.xref.status.500.1" title="500 Internal Server Error">Section&nbsp;6.6.1</a></td></tr><tr><td class="left">501</td><td class="left">Not Implemented</td><td class="left"><a href="#status.501" id="rfc.xref.status.501.1" title="501 Not Implemented">Section&nbsp;6.6.2</a></td></tr><tr><td class="left">502</td><td class="left">Bad Gateway</td><td class="left"><a href="#status.502" id="rfc.xref.status.502.1" title="502 Bad Gateway">Section&nbsp;6.6.3</a></td></tr><tr><td class="left">503</td><td class="left">Service Unavailable</td><td class="left"><a href="#status.503" id="rfc.xref.status.503.1" title="503 Service Unavailable">Section&nbsp;6.6.4</a></td></tr><tr><td class="left">504</td><td class="left">Gateway Timeout</td><td class="left"><a href="#status.504" id="rfc.xref.status.504.1" title="504 Gateway Timeout">Section&nbsp;6.6.5</a></td></tr><tr><td class="left">505</td><td class="left">HTTP Version Not Supported</td><td class="left"><a href="#status.505" id="rfc.xref.status.505.1" title="505 HTTP Version Not Supported">Section&nbsp;6.6.6</a></td></tr></tbody></table></div><div id="rfc.section.6.1.p.3"><p>Note that this list is not exhaustive &#8212; it does not include extension status codes defined in other specifications. The complete list of status codes is maintained by IANA. See <a href="#status.code.registry" title="Status Code Registry">Section&nbsp;8.2</a> for details.<a class="self" href="#rfc.section.6.1.p.3">&para;</a></p></div></div><div id="status.1xx"><h2 id="rfc.section.6.2"><a href="#rfc.section.6.2">6.2</a>&nbsp;<a href="#status.1xx">Informational 1xx</a></h2><div id="rfc.section.6.2.p.1"><p>The <dfn>1xx (Informational)</dfn> class of status code indicates an interim response for communicating connection status or request progress prior to completing the requested action and sending a final response. 1xx responses are terminated by the first empty line after the status-line (the empty line signaling the end of the header section). Since HTTP/1.0 did not define any 1xx status codes, a server <em class="bcp14">MUST NOT</em> send a 1xx response to an HTTP/1.0 client.<a class="self" href="#rfc.section.6.2.p.1">&para;</a></p></div><div id="rfc.section.6.2.p.2"><p>A client <em class="bcp14">MUST</em> be able to parse one or more 1xx responses received prior to a final response, even if the client does not expect one. A user agent <em class="bcp14">MAY</em> ignore unexpected 1xx responses.<a class="self" href="#rfc.section.6.2.p.2">&para;</a></p></div><div id="rfc.section.6.2.p.3"><p>A proxy <em class="bcp14">MUST</em> forward 1xx responses unless the proxy itself requested the generation of the 1xx response. For example, if a proxy adds an "Expect: 100-continue" field when it forwards a request, then it need not forward the corresponding <a href="#status.100" class="smpl">100 (Continue)</a> response(s).<a class="self" href="#rfc.section.6.2.p.3">&para;</a></p></div><div id="status.100"><h3 id="rfc.section.6.2.1"><a href="#rfc.section.6.2.1">6.2.1</a>&nbsp;<a href="#status.100">100 Continue</a></h3><div id="rfc.section.6.2.1.p.1"><p>The <dfn>100 (Continue)</dfn> status code indicates that the initial part of a request has been received and has not yet been rejected by the server. The server intends to send a final response after the request has been fully received and acted upon.<a class="self" href="#rfc.section.6.2.1.p.1">&para;</a></p></div><div id="rfc.section.6.2.1.p.2"><p>When the request contains an <a href="#header.expect" class="smpl">Expect</a> header field that includes a <a href="#header.expect" class="smpl">100-continue</a> expectation, the 100 response indicates that the server wishes to receive the request payload body, as described in <a href="#header.expect" id="rfc.xref.header.expect.2" title="Expect">Section&nbsp;5.1.1</a>. The client ought to continue sending the request and discard the 100 response.<a class="self" href="#rfc.section.6.2.1.p.2">&para;</a></p></div><div id="rfc.section.6.2.1.p.3"><p>If the request did not contain an <a href="#header.expect" class="smpl">Expect</a> header field containing the <a href="#header.expect" class="smpl">100-continue</a> expectation, the client can simply discard this interim response.<a class="self" href="#rfc.section.6.2.1.p.3">&para;</a></p></div></div><div id="status.101"><h3 id="rfc.section.6.2.2"><a href="#rfc.section.6.2.2">6.2.2</a>&nbsp;<a href="#status.101">101 Switching Protocols</a></h3><div id="rfc.section.6.2.2.p.1"><p>The <dfn>101 (Switching Protocols)</dfn> status code indicates that the server understands and is willing to comply with the client's request, via the <a href="rfc7230.html#header.upgrade" class="smpl">Upgrade</a> header field (<a href="rfc7230.html#header.upgrade" title="Upgrade">Section 6.7</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.24"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>), for a change in the application protocol being used on this connection. The server <em class="bcp14">MUST</em> generate an Upgrade header field in the response that indicates which protocol(s) will be switched to immediately after the empty line that terminates the 101 response.<a class="self" href="#rfc.section.6.2.2.p.1">&para;</a></p></div><div id="rfc.section.6.2.2.p.2"><p>It is assumed that the server will only agree to switch protocols when it is advantageous to do so. For example, switching to a newer version of HTTP might be advantageous over older versions, and switching to a real-time, synchronous protocol might be advantageous when delivering resources that use such features.<a class="self" href="#rfc.section.6.2.2.p.2">&para;</a></p></div></div></div><div id="status.2xx"><h2 id="rfc.section.6.3"><a href="#rfc.section.6.3">6.3</a>&nbsp;<a href="#status.2xx">Successful 2xx</a></h2><div id="rfc.section.6.3.p.1"><p>The <dfn>2xx (Successful)</dfn> class of status code indicates that the client's request was successfully received, understood, and accepted.<a class="self" href="#rfc.section.6.3.p.1">&para;</a></p></div><div id="status.200"><h3 id="rfc.section.6.3.1"><a href="#rfc.section.6.3.1">6.3.1</a>&nbsp;<a href="#status.200">200 OK</a></h3><div id="rfc.section.6.3.1.p.1"><p>The <dfn>200 (OK)</dfn> status code indicates that the request has succeeded. The payload sent in a 200 response depends on the request method. For the methods defined by this specification, the intended meaning of the payload can be summarized as: <a class="self" href="#rfc.section.6.3.1.p.1">&para;</a></p><dl><dt>GET</dt><dd>a representation of the <a href="#resources" class="smpl">target resource</a>;</dd><dt>HEAD</dt><dd>the same representation as GET, but without the representation data;</dd><dt>POST</dt><dd>a representation of the status of, or results obtained from, the action;</dd><dt>PUT, DELETE</dt><dd>a representation of the status of the action;</dd><dt>OPTIONS</dt><dd>a representation of the communications options;</dd><dt>TRACE</dt><dd>a representation of the request message as received by the end server.</dd></dl></div><div id="rfc.section.6.3.1.p.2"><p>Aside from responses to CONNECT, a 200 response always has a payload, though an origin server <em class="bcp14">MAY</em> generate a payload body of zero length. If no payload is desired, an origin server ought to send <dfn>204 (No Content)</dfn> instead. For CONNECT, no payload is allowed because the successful result is a tunnel, which begins immediately after the 200 response header section.<a class="self" href="#rfc.section.6.3.1.p.2">&para;</a></p></div><div id="rfc.section.6.3.1.p.3"><p>A 200 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see <a href="rfc7234.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.2.2</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.11"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>).<a class="self" href="#rfc.section.6.3.1.p.3">&para;</a></p></div></div><div id="status.201"><h3 id="rfc.section.6.3.2"><a href="#rfc.section.6.3.2">6.3.2</a>&nbsp;<a href="#status.201">201 Created</a></h3><div id="rfc.section.6.3.2.p.1"><p>The <dfn>201 (Created)</dfn> status code indicates that the request has been fulfilled and has resulted in one or more new resources being created. The primary resource created by the request is identified by either a <a href="#header.location" class="smpl">Location</a> header field in the response or, if no <a href="#header.location" class="smpl">Location</a> field is received, by the effective request URI.<a class="self" href="#rfc.section.6.3.2.p.1">&para;</a></p></div><div id="rfc.section.6.3.2.p.2"><p>The 201 response payload typically describes and links to the resource(s) created. See <a href="#response.validator" title="Validator Header Fields">Section&nbsp;7.2</a> for a discussion of the meaning and purpose of validator header fields, such as <a href="rfc7232.html#header.etag" class="smpl">ETag</a> and <a href="rfc7232.html#header.last-modified" class="smpl">Last-Modified</a>, in a 201 response.<a class="self" href="#rfc.section.6.3.2.p.2">&para;</a></p></div></div><div id="status.202"><h3 id="rfc.section.6.3.3"><a href="#rfc.section.6.3.3">6.3.3</a>&nbsp;<a href="#status.202">202 Accepted</a></h3><div id="rfc.section.6.3.3.p.1"><p>The <dfn>202 (Accepted)</dfn> status code indicates that the request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place. There is no facility in HTTP for re-sending a status code from an asynchronous operation.<a class="self" href="#rfc.section.6.3.3.p.1">&para;</a></p></div><div id="rfc.section.6.3.3.p.2"><p>The 202 response is intentionally noncommittal. Its purpose is to allow a server to accept a request for some other process (perhaps a batch-oriented process that is only run once per day) without requiring that the user agent's connection to the server persist until the process is completed. The representation sent with this response ought to describe the request's current status and point to (or embed) a status monitor that can provide the user with an estimate of when the request will be fulfilled.<a class="self" href="#rfc.section.6.3.3.p.2">&para;</a></p></div></div><div id="status.203"><h3 id="rfc.section.6.3.4"><a href="#rfc.section.6.3.4">6.3.4</a>&nbsp;<a href="#status.203">203 Non-Authoritative Information</a></h3><div id="rfc.section.6.3.4.p.1"><p>The <dfn>203 (Non-Authoritative Information)</dfn> status code indicates that the request was successful but the enclosed payload has been modified from that of the origin server's <a href="#status.200" class="smpl">200 (OK)</a> response by a transforming proxy (<a href="rfc7230.html#message.transformations" title="Transformations">Section 5.7.2</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.25"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>). This status code allows the proxy to notify recipients when a transformation has been applied, since that knowledge might impact later decisions regarding the content. For example, future cache validation requests for the content might only be applicable along the same request path (through the same proxies).<a class="self" href="#rfc.section.6.3.4.p.1">&para;</a></p></div><div id="rfc.section.6.3.4.p.2"><p>The 203 response is similar to the Warning code of 214 Transformation Applied (<a href="rfc7234.html#header.warning" title="Warning">Section 5.5</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.12"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>), which has the advantage of being applicable to responses with any status code.<a class="self" href="#rfc.section.6.3.4.p.2">&para;</a></p></div><div id="rfc.section.6.3.4.p.3"><p>A 203 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see <a href="rfc7234.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.2.2</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.13"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>).<a class="self" href="#rfc.section.6.3.4.p.3">&para;</a></p></div></div><div id="status.204"><h3 id="rfc.section.6.3.5"><a href="#rfc.section.6.3.5">6.3.5</a>&nbsp;<a href="#status.204">204 No Content</a></h3><div id="rfc.section.6.3.5.p.1"><p>The <dfn>204 (No Content)</dfn> status code indicates that the server has successfully fulfilled the request and that there is no additional content to send in the response payload body. Metadata in the response header fields refer to the <a href="#resources" class="smpl">target resource</a> and its <a href="#representations" class="smpl">selected representation</a> after the requested action was applied.<a class="self" href="#rfc.section.6.3.5.p.1">&para;</a></p></div><div id="rfc.section.6.3.5.p.2"><p>For example, if a 204 status code is received in response to a PUT request and the response contains an <a href="rfc7232.html#header.etag" class="smpl">ETag</a> header field, then the PUT was successful and the ETag field-value contains the entity-tag for the new representation of that target resource.<a class="self" href="#rfc.section.6.3.5.p.2">&para;</a></p></div><div id="rfc.section.6.3.5.p.3"><p>The 204 response allows a server to indicate that the action has been successfully applied to the target resource, while implying that the user agent does not need to traverse away from its current "document view" (if any). The server assumes that the user agent will provide some indication of the success to its user, in accord with its own interface, and apply any new or updated metadata in the response to its active representation.<a class="self" href="#rfc.section.6.3.5.p.3">&para;</a></p></div><div id="rfc.section.6.3.5.p.4"><p>For example, a 204 status code is commonly used with document editing interfaces corresponding to a "save" action, such that the document being saved remains available to the user for editing. It is also frequently used with interfaces that expect automated data transfers to be prevalent, such as within distributed version control systems.<a class="self" href="#rfc.section.6.3.5.p.4">&para;</a></p></div><div id="rfc.section.6.3.5.p.5"><p>A 204 response is terminated by the first empty line after the header fields because it cannot contain a message body.<a class="self" href="#rfc.section.6.3.5.p.5">&para;</a></p></div><div id="rfc.section.6.3.5.p.6"><p>A 204 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see <a href="rfc7234.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.2.2</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.14"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>).<a class="self" href="#rfc.section.6.3.5.p.6">&para;</a></p></div></div><div id="status.205"><h3 id="rfc.section.6.3.6"><a href="#rfc.section.6.3.6">6.3.6</a>&nbsp;<a href="#status.205">205 Reset Content</a></h3><div id="rfc.section.6.3.6.p.1"><p>The <dfn>205 (Reset Content)</dfn> status code indicates that the server has fulfilled the request and desires that the user agent reset the "document view", which caused the request to be sent, to its original state as received from the origin server.<a class="self" href="#rfc.section.6.3.6.p.1">&para;</a></p></div><div id="rfc.section.6.3.6.p.2"><p>This response is intended to support a common data entry use case where the user receives content that supports data entry (a form, notepad, canvas, etc.), enters or manipulates data in that space, causes the entered data to be submitted in a request, and then the data entry mechanism is reset for the next entry so that the user can easily initiate another input action.<a class="self" href="#rfc.section.6.3.6.p.2">&para;</a></p></div><div id="rfc.section.6.3.6.p.3"><p>Since the 205 status code implies that no additional content will be provided, a server <em class="bcp14">MUST NOT</em> generate a payload in a 205 response. In other words, a server <em class="bcp14">MUST</em> do one of the following for a 205 response: a) indicate a zero-length body for the response by including a <a href="rfc7230.html#header.content-length" class="smpl">Content-Length</a> header field with a value of 0; b) indicate a zero-length payload for the response by including a <a href="rfc7230.html#header.transfer-encoding" class="smpl">Transfer-Encoding</a> header field with a value of chunked and a message body consisting of a single chunk of zero-length; or, c) close the connection immediately after sending the blank line terminating the header section.<a class="self" href="#rfc.section.6.3.6.p.3">&para;</a></p></div></div></div><div id="status.3xx"><h2 id="rfc.section.6.4"><a href="#rfc.section.6.4">6.4</a>&nbsp;<a href="#status.3xx">Redirection 3xx</a></h2><div id="rfc.section.6.4.p.1"><p>The <dfn>3xx (Redirection)</dfn> class of status code indicates that further action needs to be taken by the user agent in order to fulfill the request. If a <a href="#header.location" class="smpl">Location</a> header field (<a href="#header.location" id="rfc.xref.header.location.2" title="Location">Section&nbsp;7.1.2</a>) is provided, the user agent <em class="bcp14">MAY</em> automatically redirect its request to the URI referenced by the Location field value, even if the specific status code is not understood. Automatic redirection needs to done with care for methods not known to be <a href="#safe.methods" class="smpl">safe</a>, as defined in <a href="#safe.methods" title="Safe Methods">Section&nbsp;4.2.1</a>, since the user might not wish to redirect an unsafe request.<a class="self" href="#rfc.section.6.4.p.1">&para;</a></p></div><div id="rfc.section.6.4.p.2"><p>There are several types of redirects: <a class="self" href="#rfc.section.6.4.p.2">&para;</a></p><ol><li><p>Redirects that indicate the resource might be available at a different URI, as provided by the <a href="#header.location" class="smpl">Location</a> field, as in the status codes <a href="#status.301" class="smpl">301 (Moved Permanently)</a>, <a href="#status.302" class="smpl">302 (Found)</a>, and <a href="#status.307" class="smpl">307 (Temporary Redirect)</a>.</p></li><li><p>Redirection that offers a choice of matching resources, each capable of representing the original request target, as in the <a href="#status.300" class="smpl">300 (Multiple Choices)</a> status code.</p></li><li><p>Redirection to a different resource, identified by the <a href="#header.location" class="smpl">Location</a> field, that can represent an indirect response to the request, as in the <a href="#status.303" class="smpl">303 (See Other)</a> status code.</p></li><li><p>Redirection to a previously cached result, as in the <a href="rfc7232.html#status.304" class="smpl">304 (Not Modified)</a> status code.</p></li></ol></div><div class="note"><div id="rfc.section.6.4.p.3"><p><b>Note:</b> In HTTP/1.0, the status codes <a href="#status.301" class="smpl">301 (Moved Permanently)</a> and <a href="#status.302" class="smpl">302 (Found)</a> were defined for the first type of redirect (<a href="#RFC1945" id="rfc.xref.RFC1945.1"><cite title="Hypertext Transfer Protocol -- HTTP/1.0">[RFC1945]</cite></a>, <a href="https://tools.ietf.org/html/rfc1945#section-9.3">Section 9.3</a>). Early user agents split on whether the method applied to the redirect target would be the same as the original request or would be rewritten as GET. Although HTTP originally defined the former semantics for <a href="#status.301" class="smpl">301</a> and <a href="#status.302" class="smpl">302</a> (to match its original implementation at CERN), and defined <a href="#status.303" class="smpl">303 (See Other)</a> to match the latter semantics, prevailing practice gradually converged on the latter semantics for <a href="#status.301" class="smpl">301</a> and <a href="#status.302" class="smpl">302</a> as well. The first revision of HTTP/1.1 added <a href="#status.307" class="smpl">307 (Temporary Redirect)</a> to indicate the former semantics without being impacted by divergent practice. Over 10 years later, most user agents still do method rewriting for <a href="#status.301" class="smpl">301</a> and <a href="#status.302" class="smpl">302</a>; therefore, this specification makes that behavior conformant when the original request is POST.<a class="self" href="#rfc.section.6.4.p.3">&para;</a></p></div></div><div id="rfc.section.6.4.p.4"><p>A client <em class="bcp14">SHOULD</em> detect and intervene in cyclical redirections (i.e., "infinite" redirection loops).<a class="self" href="#rfc.section.6.4.p.4">&para;</a></p></div><div class="note"><div id="rfc.section.6.4.p.5"><p><b>Note:</b> An earlier version of this specification recommended a maximum of five redirections (<a href="#RFC2068" id="rfc.xref.RFC2068.2"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2068]</cite></a>, <a href="https://tools.ietf.org/html/rfc2068#section-10.3">Section 10.3</a>). Content developers need to be aware that some clients might implement such a fixed limitation.<a class="self" href="#rfc.section.6.4.p.5">&para;</a></p></div></div><div id="status.300"><h3 id="rfc.section.6.4.1"><a href="#rfc.section.6.4.1">6.4.1</a>&nbsp;<a href="#status.300">300 Multiple Choices</a></h3><div id="rfc.section.6.4.1.p.1"><p>The <dfn>300 (Multiple Choices)</dfn> status code indicates that the <a href="#resources" class="smpl">target resource</a> has more than one representation, each with its own more specific identifier, and information about the alternatives is being provided so that the user (or user agent) can select a preferred representation by redirecting its request to one or more of those identifiers. In other words, the server desires that the user agent engage in reactive negotiation to select the most appropriate representation(s) for its needs (<a href="#content.negotiation" title="Content Negotiation">Section&nbsp;3.4</a>).<a class="self" href="#rfc.section.6.4.1.p.1">&para;</a></p></div><div id="rfc.section.6.4.1.p.2"><p>If the server has a preferred choice, the server <em class="bcp14">SHOULD</em> generate a <a href="#header.location" class="smpl">Location</a> header field containing a preferred choice's URI reference. The user agent <em class="bcp14">MAY</em> use the Location field value for automatic redirection.<a class="self" href="#rfc.section.6.4.1.p.2">&para;</a></p></div><div id="rfc.section.6.4.1.p.3"><p>For request methods other than HEAD, the server <em class="bcp14">SHOULD</em> generate a payload in the 300 response containing a list of representation metadata and URI reference(s) from which the user or user agent can choose the one most preferred. The user agent <em class="bcp14">MAY</em> make a selection from that list automatically if it understands the provided media type. A specific format for automatic selection is not defined by this specification because HTTP tries to remain orthogonal to the definition of its payloads. In practice, the representation is provided in some easily parsed format believed to be acceptable to the user agent, as determined by shared design or content negotiation, or in some commonly accepted hypertext format.<a class="self" href="#rfc.section.6.4.1.p.3">&para;</a></p></div><div id="rfc.section.6.4.1.p.4"><p>A 300 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see <a href="rfc7234.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.2.2</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.15"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>).<a class="self" href="#rfc.section.6.4.1.p.4">&para;</a></p></div><div class="note"><div id="rfc.section.6.4.1.p.5"><p><b>Note:</b> The original proposal for the 300 status code defined the URI header field as providing a list of alternative representations, such that it would be usable for 200, 300, and 406 responses and be transferred in responses to the HEAD method. However, lack of deployment and disagreement over syntax led to both URI and Alternates (a subsequent proposal) being dropped from this specification. It is possible to communicate the list using a set of Link header fields <a href="#RFC5988" id="rfc.xref.RFC5988.1"><cite title="Web Linking">[RFC5988]</cite></a>, each with a relationship of "alternate", though deployment is a chicken-and-egg problem.<a class="self" href="#rfc.section.6.4.1.p.5">&para;</a></p></div></div></div><div id="status.301"><h3 id="rfc.section.6.4.2"><a href="#rfc.section.6.4.2">6.4.2</a>&nbsp;<a href="#status.301">301 Moved Permanently</a></h3><div id="rfc.section.6.4.2.p.1"><p>The <dfn>301 (Moved Permanently)</dfn> status code indicates that the <a href="#resources" class="smpl">target resource</a> has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs. Clients with link-editing capabilities ought to automatically re-link references to the effective request URI to one or more of the new references sent by the server, where possible.<a class="self" href="#rfc.section.6.4.2.p.1">&para;</a></p></div><div id="rfc.section.6.4.2.p.2"><p>The server <em class="bcp14">SHOULD</em> generate a <a href="#header.location" class="smpl">Location</a> header field in the response containing a preferred URI reference for the new permanent URI. The user agent <em class="bcp14">MAY</em> use the Location field value for automatic redirection. The server's response payload usually contains a short hypertext note with a hyperlink to the new URI(s).<a class="self" href="#rfc.section.6.4.2.p.2">&para;</a></p></div><div class="note"><div id="rfc.section.6.4.2.p.3"><p><b>Note:</b> For historical reasons, a user agent <em class="bcp14">MAY</em> change the request method from POST to GET for the subsequent request. If this behavior is undesired, the <a href="#status.307" class="smpl">307 (Temporary Redirect)</a> status code can be used instead.<a class="self" href="#rfc.section.6.4.2.p.3">&para;</a></p></div></div><div id="rfc.section.6.4.2.p.4"><p>A 301 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see <a href="rfc7234.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.2.2</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.16"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>).<a class="self" href="#rfc.section.6.4.2.p.4">&para;</a></p></div></div><div id="status.302"><h3 id="rfc.section.6.4.3"><a href="#rfc.section.6.4.3">6.4.3</a>&nbsp;<a href="#status.302">302 Found</a></h3><div id="rfc.section.6.4.3.p.1"><p>The <dfn>302 (Found)</dfn> status code indicates that the target resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client ought to continue to use the effective request URI for future requests.<a class="self" href="#rfc.section.6.4.3.p.1">&para;</a></p></div><div id="rfc.section.6.4.3.p.2"><p>The server <em class="bcp14">SHOULD</em> generate a <a href="#header.location" class="smpl">Location</a> header field in the response containing a URI reference for the different URI. The user agent <em class="bcp14">MAY</em> use the Location field value for automatic redirection. The server's response payload usually contains a short hypertext note with a hyperlink to the different URI(s).<a class="self" href="#rfc.section.6.4.3.p.2">&para;</a></p></div><div class="note"><div id="rfc.section.6.4.3.p.3"><p><b>Note:</b> For historical reasons, a user agent <em class="bcp14">MAY</em> change the request method from POST to GET for the subsequent request. If this behavior is undesired, the <a href="#status.307" class="smpl">307 (Temporary Redirect)</a> status code can be used instead.<a class="self" href="#rfc.section.6.4.3.p.3">&para;</a></p></div></div></div><div id="status.303"><h3 id="rfc.section.6.4.4"><a href="#rfc.section.6.4.4">6.4.4</a>&nbsp;<a href="#status.303">303 See Other</a></h3><div id="rfc.section.6.4.4.p.1"><p>The <dfn>303 (See Other)</dfn> status code indicates that the server is redirecting the user agent to a different resource, as indicated by a URI in the <a href="#header.location" class="smpl">Location</a> header field, which is intended to provide an indirect response to the original request. A user agent can perform a retrieval request targeting that URI (a GET or HEAD request if using HTTP), which might also be redirected, and present the eventual result as an answer to the original request. Note that the new URI in the Location header field is not considered equivalent to the effective request URI.<a class="self" href="#rfc.section.6.4.4.p.1">&para;</a></p></div><div id="rfc.section.6.4.4.p.2"><p>This status code is applicable to any HTTP method. It is primarily used to allow the output of a POST action to redirect the user agent to a selected resource, since doing so provides the information corresponding to the POST response in a form that can be separately identified, bookmarked, and cached, independent of the original request.<a class="self" href="#rfc.section.6.4.4.p.2">&para;</a></p></div><div id="rfc.section.6.4.4.p.3"><p>A 303 response to a GET request indicates that the origin server does not have a representation of the <a href="#resources" class="smpl">target resource</a> that can be transferred by the server over HTTP. However, the <a href="#header.location" class="smpl">Location</a> field value refers to a resource that is descriptive of the target resource, such that making a retrieval request on that other resource might result in a representation that is useful to recipients without implying that it represents the original target resource. Note that answers to the questions of what can be represented, what representations are adequate, and what might be a useful description are outside the scope of HTTP.<a class="self" href="#rfc.section.6.4.4.p.3">&para;</a></p></div><div id="rfc.section.6.4.4.p.4"><p>Except for responses to a HEAD request, the representation of a 303 response ought to contain a short hypertext note with a hyperlink to the same URI reference provided in the <a href="#header.location" class="smpl">Location</a> header field.<a class="self" href="#rfc.section.6.4.4.p.4">&para;</a></p></div></div><div id="status.305"><h3 id="rfc.section.6.4.5"><a href="#rfc.section.6.4.5">6.4.5</a>&nbsp;<a href="#status.305">305 Use Proxy</a></h3><div id="rfc.section.6.4.5.p.1"><p>The <dfn>305 (Use Proxy)</dfn> status code was defined in a previous version of this specification and is now deprecated (<a href="#changes.from.rfc.2616" title="Changes from RFC 2616">Appendix&nbsp;B</a>).<a class="self" href="#rfc.section.6.4.5.p.1">&para;</a></p></div></div><div id="status.306"><h3 id="rfc.section.6.4.6"><a href="#rfc.section.6.4.6">6.4.6</a>&nbsp;<a href="#status.306">306 (Unused)</a></h3><div id="rfc.section.6.4.6.p.1"><p>The 306 status code was defined in a previous version of this specification, is no longer used, and the code is reserved.<a class="self" href="#rfc.section.6.4.6.p.1">&para;</a></p></div></div><div id="status.307"><h3 id="rfc.section.6.4.7"><a href="#rfc.section.6.4.7">6.4.7</a>&nbsp;<a href="#status.307">307 Temporary Redirect</a></h3><div id="rfc.section.6.4.7.p.1"><p>The <dfn>307 (Temporary Redirect)</dfn> status code indicates that the <a href="#resources" class="smpl">target resource</a> resides temporarily under a different URI and the user agent <em class="bcp14">MUST NOT</em> change the request method if it performs an automatic redirection to that URI. Since the redirection can change over time, the client ought to continue using the original effective request URI for future requests.<a class="self" href="#rfc.section.6.4.7.p.1">&para;</a></p></div><div id="rfc.section.6.4.7.p.2"><p>The server <em class="bcp14">SHOULD</em> generate a <a href="#header.location" class="smpl">Location</a> header field in the response containing a URI reference for the different URI. The user agent <em class="bcp14">MAY</em> use the Location field value for automatic redirection. The server's response payload usually contains a short hypertext note with a hyperlink to the different URI(s).<a class="self" href="#rfc.section.6.4.7.p.2">&para;</a></p></div><div class="note"><div id="rfc.section.6.4.7.p.3"><p><b>Note:</b> This status code is similar to <a href="#status.302" class="smpl">302 (Found)</a>, except that it does not allow changing the request method from POST to GET. This specification defines no equivalent counterpart for <a href="#status.301" class="smpl">301 (Moved 
    605605    Permanently)</a> (<a href="#RFC7238" id="rfc.xref.RFC7238.1"><cite title="The Hypertext Transfer Protocol (HTTP) Status Code 308 (Permanent Redirect)">[RFC7238]</cite></a>, however, defines the status code 308 (Permanent Redirect) for this purpose).<a class="self" href="#rfc.section.6.4.7.p.3">&para;</a></p></div></div></div></div><div id="status.4xx"><h2 id="rfc.section.6.5"><a href="#rfc.section.6.5">6.5</a>&nbsp;<a href="#status.4xx">Client Error 4xx</a></h2><div id="rfc.section.6.5.p.1"><p>The <dfn>4xx (Client Error)</dfn> class of status code indicates that the client seems to have erred. Except when responding to a HEAD request, the server <em class="bcp14">SHOULD</em> send a representation containing an explanation of the error situation, and whether it is a temporary or permanent condition. These status codes are applicable to any request method. User agents <em class="bcp14">SHOULD</em> display any included representation to the user.<a class="self" href="#rfc.section.6.5.p.1">&para;</a></p></div><div id="status.400"><h3 id="rfc.section.6.5.1"><a href="#rfc.section.6.5.1">6.5.1</a>&nbsp;<a href="#status.400">400 Bad Request</a></h3><div id="rfc.section.6.5.1.p.1"><p>The <dfn>400 (Bad Request)</dfn> status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).<a class="self" href="#rfc.section.6.5.1.p.1">&para;</a></p></div></div><div id="status.402"><h3 id="rfc.section.6.5.2"><a href="#rfc.section.6.5.2">6.5.2</a>&nbsp;<a href="#status.402">402 Payment Required</a></h3><div id="rfc.section.6.5.2.p.1"><p>The <dfn>402 (Payment Required)</dfn> status code is reserved for future use.<a class="self" href="#rfc.section.6.5.2.p.1">&para;</a></p></div></div><div id="status.403"><h3 id="rfc.section.6.5.3"><a href="#rfc.section.6.5.3">6.5.3</a>&nbsp;<a href="#status.403">403 Forbidden</a></h3><div id="rfc.section.6.5.3.p.1"><p>The <dfn>403 (Forbidden)</dfn> status code indicates that the server understood the request but refuses to authorize it. A server that wishes to make public why the request has been forbidden can describe that reason in the response payload (if any).<a class="self" href="#rfc.section.6.5.3.p.1">&para;</a></p></div><div id="rfc.section.6.5.3.p.2"><p>If authentication credentials were provided in the request, the server considers them insufficient to grant access. The client <em class="bcp14">SHOULD NOT</em> automatically repeat the request with the same credentials. The client <em class="bcp14">MAY</em> repeat the request with new or different credentials. However, a request might be forbidden for reasons unrelated to the credentials.<a class="self" href="#rfc.section.6.5.3.p.2">&para;</a></p></div><div id="rfc.section.6.5.3.p.3"><p>An origin server that wishes to "hide" the current existence of a forbidden <a href="#resources" class="smpl">target resource</a> <em class="bcp14">MAY</em> instead respond with a status code of <a href="#status.404" class="smpl">404 (Not Found)</a>.<a class="self" href="#rfc.section.6.5.3.p.3">&para;</a></p></div></div><div id="status.404"><h3 id="rfc.section.6.5.4"><a href="#rfc.section.6.5.4">6.5.4</a>&nbsp;<a href="#status.404">404 Not Found</a></h3><div id="rfc.section.6.5.4.p.1"><p>The <dfn>404 (Not Found)</dfn> status code indicates that the origin server did not find a current representation for the <a href="#resources" class="smpl">target resource</a> or is not willing to disclose that one exists. A 404 status code does not indicate whether this lack of representation is temporary or permanent; the <a href="#status.410" class="smpl">410 (Gone)</a> status code is preferred over 404 if the origin server knows, presumably through some configurable means, that the condition is likely to be permanent.<a class="self" href="#rfc.section.6.5.4.p.1">&para;</a></p></div><div id="rfc.section.6.5.4.p.2"><p>A 404 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see <a href="rfc7234.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.2.2</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.17"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>).<a class="self" href="#rfc.section.6.5.4.p.2">&para;</a></p></div></div><div id="status.405"><h3 id="rfc.section.6.5.5"><a href="#rfc.section.6.5.5">6.5.5</a>&nbsp;<a href="#status.405">405 Method Not Allowed</a></h3><div id="rfc.section.6.5.5.p.1"><p>The <dfn>405 (Method Not Allowed)</dfn> status code indicates that the method received in the request-line is known by the origin server but not supported by the <a href="#resources" class="smpl">target resource</a>. The origin server <em class="bcp14">MUST</em> generate an <a href="#header.allow" class="smpl">Allow</a> header field in a 405 response containing a list of the target resource's currently supported methods.<a class="self" href="#rfc.section.6.5.5.p.1">&para;</a></p></div><div id="rfc.section.6.5.5.p.2"><p>A 405 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see <a href="rfc7234.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.2.2</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.18"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>).<a class="self" href="#rfc.section.6.5.5.p.2">&para;</a></p></div></div><div id="status.406"><h3 id="rfc.section.6.5.6"><a href="#rfc.section.6.5.6">6.5.6</a>&nbsp;<a href="#status.406">406 Not Acceptable</a></h3><div id="rfc.section.6.5.6.p.1"><p>The <dfn>406 (Not Acceptable)</dfn> status code indicates that the <a href="#resources" class="smpl">target resource</a> does not have a current representation that would be acceptable to the user agent, according to the <a href="#proactive.negotiation" class="smpl">proactive negotiation</a> header fields received in the request (<a href="#request.conneg" title="Content Negotiation">Section&nbsp;5.3</a>), and the server is unwilling to supply a default representation.<a class="self" href="#rfc.section.6.5.6.p.1">&para;</a></p></div><div id="rfc.section.6.5.6.p.2"><p>The server <em class="bcp14">SHOULD</em> generate a payload containing a list of available representation characteristics and corresponding resource identifiers from which the user or user agent can choose the one most appropriate. A user agent <em class="bcp14">MAY</em> automatically select the most appropriate choice from that list. However, this specification does not define any standard for such automatic selection, as described in <a href="#status.300" id="rfc.xref.status.300.2" title="300 Multiple Choices">Section&nbsp;6.4.1</a>.<a class="self" href="#rfc.section.6.5.6.p.2">&para;</a></p></div></div><div id="status.408"><h3 id="rfc.section.6.5.7"><a href="#rfc.section.6.5.7">6.5.7</a>&nbsp;<a href="#status.408">408 Request Timeout</a></h3><div id="rfc.section.6.5.7.p.1"><p>The <dfn>408 (Request Timeout)</dfn> status code indicates that the server did not receive a complete request message within the time that it was prepared to wait. A server <em class="bcp14">SHOULD</em> send the "<a href="rfc7230.html#header.connection" class="smpl">close</a>" connection option (<a href="rfc7230.html#header.connection" title="Connection">Section 6.1</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.26"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>) in the response, since 408 implies that the server has decided to close the connection rather than continue waiting. If the client has an outstanding request in transit, the client <em class="bcp14">MAY</em> repeat that request on a new connection.<a class="self" href="#rfc.section.6.5.7.p.1">&para;</a></p></div></div><div id="status.409"><h3 id="rfc.section.6.5.8"><a href="#rfc.section.6.5.8">6.5.8</a>&nbsp;<a href="#status.409">409 Conflict</a></h3><div id="rfc.section.6.5.8.p.1"><p>The <dfn>409 (Conflict)</dfn> status code indicates that the request could not be completed due to a conflict with the current state of the target resource. This code is used in situations where the user might be able to resolve the conflict and resubmit the request. The server <em class="bcp14">SHOULD</em> generate a payload that includes enough information for a user to recognize the source of the conflict.<a class="self" href="#rfc.section.6.5.8.p.1">&para;</a></p></div><div id="rfc.section.6.5.8.p.2"><p>Conflicts are most likely to occur in response to a PUT request. For example, if versioning were being used and the representation being PUT included changes to a resource that conflict with those made by an earlier (third-party) request, the origin server might use a 409 response to indicate that it can't complete the request. In this case, the response representation would likely contain information useful for merging the differences based on the revision history.<a class="self" href="#rfc.section.6.5.8.p.2">&para;</a></p></div></div><div id="status.410"><h3 id="rfc.section.6.5.9"><a href="#rfc.section.6.5.9">6.5.9</a>&nbsp;<a href="#status.410">410 Gone</a></h3><div id="rfc.section.6.5.9.p.1"><p>The <dfn>410 (Gone)</dfn> status code indicates that access to the <a href="#resources" class="smpl">target resource</a> is no longer available at the origin server and that this condition is likely to be permanent. If the origin server does not know, or has no facility to determine, whether or not the condition is permanent, the status code <a href="#status.404" class="smpl">404 (Not Found)</a> ought to be used instead.<a class="self" href="#rfc.section.6.5.9.p.1">&para;</a></p></div><div id="rfc.section.6.5.9.p.2"><p>The 410 response is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable and that the server owners desire that remote links to that resource be removed. Such an event is common for limited-time, promotional services and for resources belonging to individuals no longer associated with the origin server's site. It is not necessary to mark all permanently unavailable resources as "gone" or to keep the mark for any length of time &#8212; that is left to the discretion of the server owner.<a class="self" href="#rfc.section.6.5.9.p.2">&para;</a></p></div><div id="rfc.section.6.5.9.p.3"><p>A 410 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see <a href="rfc7234.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.2.2</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.19"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>).<a class="self" href="#rfc.section.6.5.9.p.3">&para;</a></p></div></div><div id="status.411"><h3 id="rfc.section.6.5.10"><a href="#rfc.section.6.5.10">6.5.10</a>&nbsp;<a href="#status.411">411 Length Required</a></h3><div id="rfc.section.6.5.10.p.1"><p>The <dfn>411 (Length Required)</dfn> status code indicates that the server refuses to accept the request without a defined <a href="rfc7230.html#header.content-length" class="smpl">Content-Length</a> (<a href="rfc7230.html#header.content-length" title="Content-Length">Section 3.3.2</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.27"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>). The client <em class="bcp14">MAY</em> repeat the request if it adds a valid Content-Length header field containing the length of the message body in the request message.<a class="self" href="#rfc.section.6.5.10.p.1">&para;</a></p></div></div><div id="status.413"><h3 id="rfc.section.6.5.11"><a href="#rfc.section.6.5.11">6.5.11</a>&nbsp;<a href="#status.413">413 Payload Too Large</a></h3><div id="rfc.section.6.5.11.p.1"><p>The <dfn>413 (Payload Too Large)</dfn> status code indicates that the server is refusing to process a request because the request payload is larger than the server is willing or able to process. The server <em class="bcp14">MAY</em> close the connection to prevent the client from continuing the request.<a class="self" href="#rfc.section.6.5.11.p.1">&para;</a></p></div><div id="rfc.section.6.5.11.p.2"><p>If the condition is temporary, the server <em class="bcp14">SHOULD</em> generate a <a href="#header.retry-after" class="smpl">Retry-After</a> header field to indicate that it is temporary and after what time the client <em class="bcp14">MAY</em> try again.<a class="self" href="#rfc.section.6.5.11.p.2">&para;</a></p></div></div><div id="status.414"><h3 id="rfc.section.6.5.12"><a href="#rfc.section.6.5.12">6.5.12</a>&nbsp;<a href="#status.414">414 URI Too Long</a></h3><div id="rfc.section.6.5.12.p.1"><p>The <dfn>414 (URI Too Long)</dfn> status code indicates that the server is refusing to service the request because the request-target (<a href="rfc7230.html#request-target" title="Request Target">Section 5.3</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.28"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>) is longer than the server is willing to interpret. This rare condition is only likely to occur when a client has improperly converted a POST request to a GET request with long query information, when the client has descended into a "black hole" of redirection (e.g., a redirected URI prefix that points to a suffix of itself) or when the server is under attack by a client attempting to exploit potential security holes.<a class="self" href="#rfc.section.6.5.12.p.1">&para;</a></p></div><div id="rfc.section.6.5.12.p.2"><p>A 414 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see <a href="rfc7234.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.2.2</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.20"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>).<a class="self" href="#rfc.section.6.5.12.p.2">&para;</a></p></div></div><div id="status.415"><h3 id="rfc.section.6.5.13"><a href="#rfc.section.6.5.13">6.5.13</a>&nbsp;<a href="#status.415">415 Unsupported Media Type</a></h3><div id="rfc.section.6.5.13.p.1"><p>The <dfn>415 (Unsupported Media Type)</dfn> status code indicates that the origin server is refusing to service the request because the payload is in a format not supported by this method on the <a href="#resources" class="smpl">target resource</a>. The format problem might be due to the request's indicated <a href="#header.content-type" class="smpl">Content-Type</a> or <a href="#header.content-encoding" class="smpl">Content-Encoding</a>, or as a result of inspecting the data directly.<a class="self" href="#rfc.section.6.5.13.p.1">&para;</a></p></div></div><div id="status.417"><h3 id="rfc.section.6.5.14"><a href="#rfc.section.6.5.14">6.5.14</a>&nbsp;<a href="#status.417">417 Expectation Failed</a></h3><div id="rfc.section.6.5.14.p.1"><p>The <dfn>417 (Expectation Failed)</dfn> status code indicates that the expectation given in the request's <a href="#header.expect" class="smpl">Expect</a> header field (<a href="#header.expect" id="rfc.xref.header.expect.3" title="Expect">Section&nbsp;5.1.1</a>) could not be met by at least one of the inbound servers.<a class="self" href="#rfc.section.6.5.14.p.1">&para;</a></p></div></div><div id="status.426"><h3 id="rfc.section.6.5.15"><a href="#rfc.section.6.5.15">6.5.15</a>&nbsp;<a href="#status.426">426 Upgrade Required</a></h3><div id="rfc.section.6.5.15.p.1"><p>The <dfn>426 (Upgrade Required)</dfn> status code indicates that the server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol. The server <em class="bcp14">MUST</em> send an <a href="rfc7230.html#header.upgrade" class="smpl">Upgrade</a> header field in a 426 response to indicate the required protocol(s) (<a href="rfc7230.html#header.upgrade" title="Upgrade">Section 6.7</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.29"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>).<a class="self" href="#rfc.section.6.5.15.p.1">&para;</a></p></div><div id="rfc.figure.u.42"><p>Example:</p><pre class="text">HTTP/1.1 426 Upgrade Required 
     
    679679</pre></div><div id="rfc.section.7.1.4.p.2"><p>A Vary field value of "*" signals that anything about the request might play a role in selecting the response representation, possibly including elements outside the message syntax (e.g., the client's network address). A recipient will not be able to determine whether this response is appropriate for a later request without forwarding the request to the origin server. A proxy <em class="bcp14">MUST NOT</em> generate a Vary field with a "*" value.<a class="self" href="#rfc.section.7.1.4.p.2">&para;</a></p></div><div id="rfc.section.7.1.4.p.3"><p>A Vary field value consisting of a comma-separated list of names indicates that the named request header fields, known as the selecting header fields, might have a role in selecting the representation. The potential selecting header fields are not limited to those defined by this specification.<a class="self" href="#rfc.section.7.1.4.p.3">&para;</a></p></div><div id="rfc.figure.u.59"><p>For example, a response that contains</p><pre class="text">  Vary: accept-encoding, accept-language 
    680680</pre><p>indicates that the origin server might have used the request's <a href="#header.accept-encoding" class="smpl">Accept-Encoding</a> and <a href="#header.accept-language" class="smpl">Accept-Language</a> fields (or lack thereof) as determining factors while choosing the content for this response.</p></div><div id="rfc.section.7.1.4.p.4"><p>An origin server might send Vary with a list of fields for two purposes: <a class="self" href="#rfc.section.7.1.4.p.4">&para;</a></p><ol><li><p>To inform cache recipients that they <em class="bcp14">MUST NOT</em> use this response to satisfy a later request unless the later request has the same values for the listed fields as the original request (<a href="rfc7234.html#caching.negotiated.responses" title="Calculating Secondary Keys with Vary">Section 4.1</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.26"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>). In other words, Vary expands the cache key required to match a new request to the stored cache entry.</p></li><li><p>To inform user agent recipients that this response is subject to content negotiation (<a href="#request.conneg" title="Content Negotiation">Section&nbsp;5.3</a>) and that a different representation might be sent in a subsequent request if additional parameters are provided in the listed header fields (<a href="#proactive.negotiation" class="smpl">proactive negotiation</a>).</p></li></ol></div><div id="rfc.section.7.1.4.p.5"><p>An origin server <em class="bcp14">SHOULD</em> send a Vary header field when its algorithm for selecting a representation varies based on aspects of the request message other than the method and request target, unless the variance cannot be crossed or the origin server has been deliberately configured to prevent cache transparency. For example, there is no need to send the Authorization field name in Vary because reuse across users is constrained by the field definition (<a href="rfc7235.html#header.authorization" title="Authorization">Section 4.2</a> of <a href="#RFC7235" id="rfc.xref.RFC7235.8"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Authentication">[RFC7235]</cite></a>). Likewise, an origin server might use Cache-Control directives (<a href="rfc7234.html#header.cache-control" title="Cache-Control">Section 5.2</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.27"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>) to supplant Vary if it considers the variance less significant than the performance cost of Vary's impact on caching.<a class="self" href="#rfc.section.7.1.4.p.5">&para;</a></p></div></div></div><div id="response.validator"><h2 id="rfc.section.7.2"><a href="#rfc.section.7.2">7.2</a>&nbsp;<a href="#response.validator">Validator Header Fields</a></h2><div id="rfc.section.7.2.p.1"><p>Validator header fields convey metadata about the <a href="#representations" class="smpl">selected representation</a> (<a href="#representations" title="Representations">Section&nbsp;3</a>). In responses to safe requests, validator fields describe the selected representation chosen by the origin server while handling the response. Note that, depending on the status code semantics, the <a href="#representations" class="smpl">selected representation</a> for a given response is not necessarily the same as the representation enclosed as response payload.<a class="self" href="#rfc.section.7.2.p.1">&para;</a></p></div><div id="rfc.section.7.2.p.2"><p>In a successful response to a state-changing request, validator fields describe the new representation that has replaced the prior <a href="#representations" class="smpl">selected representation</a> as a result of processing the request.<a class="self" href="#rfc.section.7.2.p.2">&para;</a></p></div><div id="rfc.section.7.2.p.3"><p>For example, an ETag header field in a <a href="#status.201" class="smpl">201 (Created)</a> response communicates the entity-tag of the newly created resource's representation, so that it can be used in later conditional requests to prevent the "lost update" problem <a href="#RFC7232" id="rfc.xref.RFC7232.12"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[RFC7232]</cite></a>.<a class="self" href="#rfc.section.7.2.p.3">&para;</a></p></div><div id="rfc.table.u.11"><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Header Field Name</th><th>Defined in...</th></tr></thead><tbody><tr><td class="left">ETag</td><td class="left"><a href="rfc7232.html#header.etag" title="ETag">Section 2.3</a> of <a href="#RFC7232" id="rfc.xref.RFC7232.13"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[RFC7232]</cite></a></td></tr><tr><td class="left">Last-Modified</td><td class="left"><a href="rfc7232.html#header.last-modified" title="Last-Modified">Section 2.2</a> of <a href="#RFC7232" id="rfc.xref.RFC7232.14"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[RFC7232]</cite></a></td></tr></tbody></table></div></div><div id="response.auth"><h2 id="rfc.section.7.3"><a href="#rfc.section.7.3">7.3</a>&nbsp;<a href="#response.auth">Authentication Challenges</a></h2><div id="rfc.section.7.3.p.1"><p>Authentication challenges indicate what mechanisms are available for the client to provide authentication credentials in future requests.<a class="self" href="#rfc.section.7.3.p.1">&para;</a></p></div><div id="rfc.table.u.12"><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Header Field Name</th><th>Defined in...</th></tr></thead><tbody><tr><td class="left">WWW-Authenticate</td><td class="left"><a href="rfc7235.html#header.www-authenticate" title="WWW-Authenticate">Section 4.1</a> of <a href="#RFC7235" id="rfc.xref.RFC7235.9"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Authentication">[RFC7235]</cite></a></td></tr><tr><td class="left">Proxy-Authenticate</td><td class="left"><a href="rfc7235.html#header.proxy-authenticate" title="Proxy-Authenticate">Section 4.3</a> of <a href="#RFC7235" id="rfc.xref.RFC7235.10"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Authentication">[RFC7235]</cite></a></td></tr></tbody></table></div></div><div id="response.context"><h2 id="rfc.section.7.4"><a href="#rfc.section.7.4">7.4</a>&nbsp;<a href="#response.context">Response Context</a></h2><div id="rfc.section.7.4.p.1"><p>The remaining response header fields provide more information about the <a href="#resources" class="smpl">target resource</a> for potential use in later requests.<a class="self" href="#rfc.section.7.4.p.1">&para;</a></p></div><div id="rfc.table.u.13"><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Header Field Name</th><th>Defined in...</th></tr></thead><tbody><tr><td class="left">Accept-Ranges</td><td class="left"><a href="rfc7233.html#header.accept-ranges" title="Accept-Ranges">Section 2.3</a> of <a href="#RFC7233" id="rfc.xref.RFC7233.10"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[RFC7233]</cite></a></td></tr><tr><td class="left">Allow</td><td class="left"><a href="#header.allow" id="rfc.xref.header.allow.2" title="Allow">Section&nbsp;7.4.1</a></td></tr><tr><td class="left">Server</td><td class="left"><a href="#header.server" id="rfc.xref.header.server.1" title="Server">Section&nbsp;7.4.2</a></td></tr></tbody></table></div><div id="header.allow"><h3 id="rfc.section.7.4.1"><a href="#rfc.section.7.4.1">7.4.1</a>&nbsp;<a href="#header.allow">Allow</a></h3><div id="rfc.section.7.4.1.p.1"><p>The "Allow" header field lists the set of methods advertised as supported by the <a href="#resources" class="smpl">target resource</a>. The purpose of this field is strictly to inform the recipient of valid request methods associated with the resource.<a class="self" href="#rfc.section.7.4.1.p.1">&para;</a></p></div><div id="rfc.figure.u.60"><pre class="inline"><span id="rfc.iref.g.53"></span>  <a href="#header.allow" class="smpl">Allow</a> = #<a href="#method.overview" class="smpl">method</a> 
    681 </pre></div><div id="rfc.section.7.4.1.p.2"><p>Example of use:<a class="self" href="#rfc.section.7.4.1.p.2">&para;</a></p></div><div id="rfc.figure.u.61"><pre class="text">  Allow: GET, HEAD, PUT 
     681</pre></div><div id="rfc.section.7.4.1.p.2" class="avoidbreakafter"><p>Example of use:<a class="self" href="#rfc.section.7.4.1.p.2">&para;</a></p></div><div id="rfc.figure.u.61"><pre class="text">  Allow: GET, HEAD, PUT 
    682682</pre></div><div id="rfc.section.7.4.1.p.3"><p>The actual set of allowed methods is defined by the origin server at the time of each request. An origin server <em class="bcp14">MUST</em> generate an Allow field in a <a href="#status.405" class="smpl">405 (Method Not Allowed)</a> response and <em class="bcp14">MAY</em> do so in any other response. An empty Allow field value indicates that the resource allows no methods, which might occur in a 405 response if the resource has been temporarily disabled by configuration.<a class="self" href="#rfc.section.7.4.1.p.3">&para;</a></p></div><div id="rfc.section.7.4.1.p.4"><p>A proxy <em class="bcp14">MUST NOT</em> modify the Allow header field &#8212; it does not need to understand all of the indicated methods in order to handle them according to the generic message handling rules.<a class="self" href="#rfc.section.7.4.1.p.4">&para;</a></p></div></div><div id="header.server"><h3 id="rfc.section.7.4.2"><a href="#rfc.section.7.4.2">7.4.2</a>&nbsp;<a href="#header.server">Server</a></h3><div id="rfc.section.7.4.2.p.1"><p>The "Server" header field contains information about the software used by the origin server to handle the request, which is often used by clients to help identify the scope of reported interoperability problems, to work around or tailor requests to avoid particular server limitations, and for analytics regarding server or operating system use. An origin server <em class="bcp14">MAY</em> generate a Server field in its responses.<a class="self" href="#rfc.section.7.4.2.p.1">&para;</a></p></div><div id="rfc.figure.u.62"><pre class="inline"><span id="rfc.iref.g.54"></span>  <a href="#header.server" class="smpl">Server</a> = <a href="#header.user-agent" class="smpl">product</a> *( <a href="#imported.abnf" class="smpl">RWS</a> ( <a href="#header.user-agent" class="smpl">product</a> / <a href="#imported.abnf" class="smpl">comment</a> ) ) 
    683 </pre></div><div id="rfc.section.7.4.2.p.2"><p>The Server field-value consists of one or more product identifiers, each followed by zero or more comments (<a href="rfc7230.html#header.fields" title="Header Fields">Section 3.2</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.31"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>), which together identify the origin server software and its significant subproducts. By convention, the product identifiers are listed in decreasing order of their significance for identifying the origin server software. Each product identifier consists of a name and optional version, as defined in <a href="#header.user-agent" id="rfc.xref.header.user-agent.2" title="User-Agent">Section&nbsp;5.5.3</a>.<a class="self" href="#rfc.section.7.4.2.p.2">&para;</a></p></div><div id="rfc.section.7.4.2.p.3"><p>Example:<a class="self" href="#rfc.section.7.4.2.p.3">&para;</a></p></div><div id="rfc.figure.u.63"><pre class="text">  Server: CERN/3.0 libwww/2.17 
    684 </pre></div><div id="rfc.section.7.4.2.p.4"><p>An origin server <em class="bcp14">SHOULD NOT</em> generate a Server field containing needlessly fine-grained detail and <em class="bcp14">SHOULD</em> limit the addition of subproducts by third parties. Overly long and detailed Server field values increase response latency and potentially reveal internal implementation details that might make it (slightly) easier for attackers to find and exploit known security holes.<a class="self" href="#rfc.section.7.4.2.p.4">&para;</a></p></div></div></div></div><div id="IANA.considerations"><h1 id="rfc.section.8"><a href="#rfc.section.8">8.</a>&nbsp;<a href="#IANA.considerations">IANA Considerations</a></h1><div id="method.registry"><h2 id="rfc.section.8.1"><a href="#rfc.section.8.1">8.1</a>&nbsp;<a href="#method.registry">Method Registry</a></h2><div id="rfc.section.8.1.p.1"><p>The "Hypertext Transfer Protocol (HTTP) Method Registry" defines the namespace for the request method token (<a href="#methods" title="Request Methods">Section&nbsp;4</a>). The method registry has been created and is now maintained at &lt;<a href="http://www.iana.org/assignments/http-methods">http://www.iana.org/assignments/http-methods</a>&gt;.<a class="self" href="#rfc.section.8.1.p.1">&para;</a></p></div><div id="method.registry.procedure"><h3 id="rfc.section.8.1.1"><a href="#rfc.section.8.1.1">8.1.1</a>&nbsp;<a href="#method.registry.procedure">Procedure</a></h3><div id="rfc.section.8.1.1.p.1"><p>HTTP method registrations <em class="bcp14">MUST</em> include the following fields: <a class="self" href="#rfc.section.8.1.1.p.1">&para;</a></p><ul><li>Method Name (see <a href="#methods" title="Request Methods">Section&nbsp;4</a>)</li><li>Safe ("yes" or "no", see <a href="#safe.methods" title="Safe Methods">Section&nbsp;4.2.1</a>)</li><li>Idempotent ("yes" or "no", see <a href="#idempotent.methods" title="Idempotent Methods">Section&nbsp;4.2.2</a>)</li><li>Pointer to specification text</li></ul></div><div id="rfc.section.8.1.1.p.2"><p>Values to be added to this namespace require IETF Review (see <a href="#RFC5226" id="rfc.xref.RFC5226.1"><cite title="Guidelines for Writing an IANA Considerations Section in RFCs">[RFC5226]</cite></a>, <a href="https://tools.ietf.org/html/rfc5226#section-4.1">Section 4.1</a>).<a class="self" href="#rfc.section.8.1.1.p.2">&para;</a></p></div></div><div id="considerations.for.new.methods"><h3 id="rfc.section.8.1.2"><a href="#rfc.section.8.1.2">8.1.2</a>&nbsp;<a href="#considerations.for.new.methods">Considerations for New Methods</a></h3><div id="rfc.section.8.1.2.p.1"><p>Standardized methods are generic; that is, they are potentially applicable to any resource, not just one particular media type, kind of resource, or application. As such, it is preferred that new methods be registered in a document that isn't specific to a single application or data format, since orthogonal technologies deserve orthogonal specification.<a class="self" href="#rfc.section.8.1.2.p.1">&para;</a></p></div><div id="rfc.section.8.1.2.p.2"><p>Since message parsing (<a href="rfc7230.html#message.body" title="Message Body">Section 3.3</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.32"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>) needs to be independent of method semantics (aside from responses to HEAD), definitions of new methods cannot change the parsing algorithm or prohibit the presence of a message body on either the request or the response message. Definitions of new methods can specify that only a zero-length message body is allowed by requiring a Content-Length header field with a value of "0".<a class="self" href="#rfc.section.8.1.2.p.2">&para;</a></p></div><div id="rfc.section.8.1.2.p.3"><p>A new method definition needs to indicate whether it is safe (<a href="#safe.methods" title="Safe Methods">Section&nbsp;4.2.1</a>), idempotent (<a href="#idempotent.methods" title="Idempotent Methods">Section&nbsp;4.2.2</a>), cacheable (<a href="#cacheable.methods" title="Cacheable Methods">Section&nbsp;4.2.3</a>), what semantics are to be associated with the payload body if any is present in the request and what refinements the method makes to header field or status code semantics. If the new method is cacheable, its definition ought to describe how, and under what conditions, a cache can store a response and use it to satisfy a subsequent request. The new method ought to describe whether it can be made conditional (<a href="#request.conditionals" title="Conditionals">Section&nbsp;5.2</a>) and, if so, how a server responds when the condition is false. Likewise, if the new method might have some use for partial response semantics (<a href="#RFC7233" id="rfc.xref.RFC7233.11"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[RFC7233]</cite></a>), it ought to document this, too.<a class="self" href="#rfc.section.8.1.2.p.3">&para;</a></p></div><div class="note"><div id="rfc.section.8.1.2.p.4"><p><b>Note:</b> Avoid defining a method name that starts with "M-", since that prefix might be misinterpreted as having the semantics assigned to it by <a href="#RFC2774" id="rfc.xref.RFC2774.1"><cite title="An HTTP Extension Framework">[RFC2774]</cite></a>.<a class="self" href="#rfc.section.8.1.2.p.4">&para;</a></p></div></div></div><div id="method.registration"><h3 id="rfc.section.8.1.3"><a href="#rfc.section.8.1.3">8.1.3</a>&nbsp;<a href="#method.registration">Registrations</a></h3><div id="rfc.section.8.1.3.p.1"><p>The "Hypertext Transfer Protocol (HTTP) Method Registry" has been populated with the registrations below:<a class="self" href="#rfc.section.8.1.3.p.1">&para;</a></p></div><div id="rfc.table.2"><div id="iana.method.registration.table"></div><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Method</th><th>Safe</th><th>Idempotent</th><th>Reference</th></tr></thead><tbody><tr><td class="left">CONNECT</td><td class="left">no</td><td class="left">no</td><td class="left"><a href="#CONNECT" id="rfc.xref.CONNECT.2" title="CONNECT">Section&nbsp;4.3.6</a> </td></tr><tr><td class="left">DELETE</td><td class="left">no</td><td class="left">yes</td><td class="left"><a href="#DELETE" id="rfc.xref.DELETE.2" title="DELETE">Section&nbsp;4.3.5</a> </td></tr><tr><td class="left">GET</td><td class="left">yes</td><td class="left">yes</td><td class="left"><a href="#GET" id="rfc.xref.GET.5" title="GET">Section&nbsp;4.3.1</a> </td></tr><tr><td class="left">HEAD</td><td class="left">yes</td><td class="left">yes</td><td class="left"><a href="#HEAD" id="rfc.xref.HEAD.3" title="HEAD">Section&nbsp;4.3.2</a> </td></tr><tr><td class="left">OPTIONS</td><td class="left">yes</td><td class="left">yes</td><td class="left"><a href="#OPTIONS" id="rfc.xref.OPTIONS.3" title="OPTIONS">Section&nbsp;4.3.7</a> </td></tr><tr><td class="left">POST</td><td class="left">no</td><td class="left">no</td><td class="left"><a href="#POST" id="rfc.xref.POST.4" title="POST">Section&nbsp;4.3.3</a> </td></tr><tr><td class="left">PUT</td><td class="left">no</td><td class="left">yes</td><td class="left"><a href="#PUT" id="rfc.xref.PUT.4" title="PUT">Section&nbsp;4.3.4</a> </td></tr><tr><td class="left">TRACE</td><td class="left">yes</td><td class="left">yes</td><td class="left"><a href="#TRACE" id="rfc.xref.TRACE.3" title="TRACE">Section&nbsp;4.3.8</a> </td></tr></tbody></table></div></div></div><div id="status.code.registry"><h2 id="rfc.section.8.2"><a href="#rfc.section.8.2">8.2</a>&nbsp;<a href="#status.code.registry">Status Code Registry</a></h2><div id="rfc.section.8.2.p.1"><p>The "Hypertext Transfer Protocol (HTTP) Status Code Registry" defines the namespace for the response status-code token (<a href="#status.codes" title="Response Status Codes">Section&nbsp;6</a>). The status code registry is maintained at &lt;<a href="http://www.iana.org/assignments/http-status-codes">http://www.iana.org/assignments/http-status-codes</a>&gt;.<a class="self" href="#rfc.section.8.2.p.1">&para;</a></p></div><div id="rfc.section.8.2.p.2"><p>This section replaces the registration procedure for HTTP Status Codes previously defined in <a href="https://tools.ietf.org/html/rfc2817#section-7.1">Section 7.1</a> of <a href="#RFC2817" id="rfc.xref.RFC2817.1"><cite title="Upgrading to TLS Within HTTP/1.1">[RFC2817]</cite></a>.<a class="self" href="#rfc.section.8.2.p.2">&para;</a></p></div><div id="status.code.registry.procedure"><h3 id="rfc.section.8.2.1"><a href="#rfc.section.8.2.1">8.2.1</a>&nbsp;<a href="#status.code.registry.procedure">Procedure</a></h3><div id="rfc.section.8.2.1.p.1"><p>A registration <em class="bcp14">MUST</em> include the following fields: <a class="self" href="#rfc.section.8.2.1.p.1">&para;</a></p><ul><li>Status Code (3 digits)</li><li>Short Description</li><li>Pointer to specification text</li></ul></div><div id="rfc.section.8.2.1.p.2"><p>Values to be added to the HTTP status code namespace require IETF Review (see <a href="#RFC5226" id="rfc.xref.RFC5226.2"><cite title="Guidelines for Writing an IANA Considerations Section in RFCs">[RFC5226]</cite></a>, <a href="https://tools.ietf.org/html/rfc5226#section-4.1">Section 4.1</a>).<a class="self" href="#rfc.section.8.2.1.p.2">&para;</a></p></div></div><div id="considerations.for.new.status.codes"><h3 id="rfc.section.8.2.2"><a href="#rfc.section.8.2.2">8.2.2</a>&nbsp;<a href="#considerations.for.new.status.codes">Considerations for New Status Codes</a></h3><div id="rfc.section.8.2.2.p.1"><p>When it is necessary to express semantics for a response that are not defined by current status codes, a new status code can be registered. Status codes are generic; they are potentially applicable to any resource, not just one particular media type, kind of resource, or application of HTTP. As such, it is preferred that new status codes be registered in a document that isn't specific to a single application.<a class="self" href="#rfc.section.8.2.2.p.1">&para;</a></p></div><div id="rfc.section.8.2.2.p.2"><p>New status codes are required to fall under one of the categories defined in <a href="#status.codes" title="Response Status Codes">Section&nbsp;6</a>. To allow existing parsers to process the response message, new status codes cannot disallow a payload, although they can mandate a zero-length payload body.<a class="self" href="#rfc.section.8.2.2.p.2">&para;</a></p></div><div id="rfc.section.8.2.2.p.3"><p>Proposals for new status codes that are not yet widely deployed ought to avoid allocating a specific number for the code until there is clear consensus that it will be registered; instead, early drafts can use a notation such as "4NN", or "3N0" .. "3N9", to indicate the class of the proposed status code(s) without consuming a number prematurely.<a class="self" href="#rfc.section.8.2.2.p.3">&para;</a></p></div><div id="rfc.section.8.2.2.p.4"><p>The definition of a new status code ought to explain the request conditions that would cause a response containing that status code (e.g., combinations of request header fields and/or method(s)) along with any dependencies on response header fields (e.g., what fields are required, what fields can modify the semantics, and what header field semantics are further refined when used with the new status code).<a class="self" href="#rfc.section.8.2.2.p.4">&para;</a></p></div><div id="rfc.section.8.2.2.p.5"><p>The definition of a new status code ought to specify whether or not it is cacheable. Note that all status codes can be cached if the response they occur in has explicit freshness information; however, status codes that are defined as being cacheable are allowed to be cached without explicit freshness information. Likewise, the definition of a status code can place constraints upon cache behavior. See <a href="#RFC7234" id="rfc.xref.RFC7234.28"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a> for more information.<a class="self" href="#rfc.section.8.2.2.p.5">&para;</a></p></div><div id="rfc.section.8.2.2.p.6"><p>Finally, the definition of a new status code ought to indicate whether the payload has any implied association with an identified resource (<a href="#identifying.payload" title="Identifying a Representation">Section&nbsp;3.1.4.1</a>).<a class="self" href="#rfc.section.8.2.2.p.6">&para;</a></p></div></div><div id="status.code.registration"><h3 id="rfc.section.8.2.3"><a href="#rfc.section.8.2.3">8.2.3</a>&nbsp;<a href="#status.code.registration">Registrations</a></h3><div id="rfc.section.8.2.3.p.1"><p>The status code registry has been updated with the registrations below:<a class="self" href="#rfc.section.8.2.3.p.1">&para;</a></p></div><div id="rfc.table.3"><div id="iana.status.code.registration.table"></div><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Value</th><th>Description</th><th>Reference</th></tr></thead><tbody><tr><td class="left">100</td><td class="left">Continue</td><td class="left"><a href="#status.100" id="rfc.xref.status.100.2" title="100 Continue">Section&nbsp;6.2.1</a> </td></tr><tr><td class="left">101</td><td class="left">Switching Protocols</td><td class="left"><a href="#status.101" id="rfc.xref.status.101.2" title="101 Switching Protocols">Section&nbsp;6.2.2</a> </td></tr><tr><td class="left">200</td><td class="left">OK</td><td class="left"><a href="#status.200" id="rfc.xref.status.200.2" title="200 OK">Section&nbsp;6.3.1</a> </td></tr><tr><td class="left">201</td><td class="left">Created</td><td class="left"><a href="#status.201" id="rfc.xref.status.201.2" title="201 Created">Section&nbsp;6.3.2</a> </td></tr><tr><td class="left">202</td><td class="left">Accepted</td><td class="left"><a href="#status.202" id="rfc.xref.status.202.2" title="202 Accepted">Section&nbsp;6.3.3</a> </td></tr><tr><td class="left">203</td><td class="left">Non-Authoritative Information</td><td class="left"><a href="#status.203" id="rfc.xref.status.203.2" title="203 Non-Authoritative Information">Section&nbsp;6.3.4</a> </td></tr><tr><td class="left">204</td><td class="left">No Content</td><td class="left"><a href="#status.204" id="rfc.xref.status.204.2" title="204 No Content">Section&nbsp;6.3.5</a> </td></tr><tr><td class="left">205</td><td class="left">Reset Content</td><td class="left"><a href="#status.205" id="rfc.xref.status.205.2" title="205 Reset Content">Section&nbsp;6.3.6</a> </td></tr><tr><td class="left">300</td><td class="left">Multiple Choices</td><td class="left"><a href="#status.300" id="rfc.xref.status.300.3" title="300 Multiple Choices">Section&nbsp;6.4.1</a> </td></tr><tr><td class="left">301</td><td class="left">Moved Permanently</td><td class="left"><a href="#status.301" id="rfc.xref.status.301.2" title="301 Moved Permanently">Section&nbsp;6.4.2</a> </td></tr><tr><td class="left">302</td><td class="left">Found</td><td class="left"><a href="#status.302" id="rfc.xref.status.302.2" title="302 Found">Section&nbsp;6.4.3</a> </td></tr><tr><td class="left">303</td><td class="left">See Other</td><td class="left"><a href="#status.303" id="rfc.xref.status.303.2" title="303 See Other">Section&nbsp;6.4.4</a> </td></tr><tr><td class="left">305</td><td class="left">Use Proxy</td><td class="left"><a href="#status.305" id="rfc.xref.status.305.2" title="305 Use Proxy">Section&nbsp;6.4.5</a> </td></tr><tr><td class="left">306</td><td class="left">(Unused)</td><td class="left"><a href="#status.306" id="rfc.xref.status.306.1" title="306 (Unused)">Section&nbsp;6.4.6</a> </td></tr><tr><td class="left">307</td><td class="left">Temporary Redirect</td><td class="left"><a href="#status.307" id="rfc.xref.status.307.2" title="307 Temporary Redirect">Section&nbsp;6.4.7</a> </td></tr><tr><td class="left">400</td><td class="left">Bad Request</td><td class="left"><a href="#status.400" id="rfc.xref.status.400.2" title="400 Bad Request">Section&nbsp;6.5.1</a> </td></tr><tr><td class="left">402</td><td class="left">Payment Required</td><td class="left"><a href="#status.402" id="rfc.xref.status.402.2" title="402 Payment Required">Section&nbsp;6.5.2</a> </td></tr><tr><td class="left">403</td><td class="left">Forbidden</td><td class="left"><a href="#status.403" id="rfc.xref.status.403.2" title="403 Forbidden">Section&nbsp;6.5.3</a> </td></tr><tr><td class="left">404</td><td class="left">Not Found</td><td class="left"><a href="#status.404" id="rfc.xref.status.404.2" title="404 Not Found">Section&nbsp;6.5.4</a> </td></tr><tr><td class="left">405</td><td class="left">Method Not Allowed</td><td class="left"><a href="#status.405" id="rfc.xref.status.405.2" title="405 Method Not Allowed">Section&nbsp;6.5.5</a> </td></tr><tr><td class="left">406</td><td class="left">Not Acceptable</td><td class="left"><a href="#status.406" id="rfc.xref.status.406.2" title="406 Not Acceptable">Section&nbsp;6.5.6</a> </td></tr><tr><td class="left">408</td><td class="left">Request Timeout</td><td class="left"><a href="#status.408" id="rfc.xref.status.408.2" title="408 Request Timeout">Section&nbsp;6.5.7</a> </td></tr><tr><td class="left">409</td><td class="left">Conflict</td><td class="left"><a href="#status.409" id="rfc.xref.status.409.2" title="409 Conflict">Section&nbsp;6.5.8</a> </td></tr><tr><td class="left">410</td><td class="left">Gone</td><td class="left"><a href="#status.410" id="rfc.xref.status.410.2" title="410 Gone">Section&nbsp;6.5.9</a> </td></tr><tr><td class="left">411</td><td class="left">Length Required</td><td class="left"><a href="#status.411" id="rfc.xref.status.411.2" title="411 Length Required">Section&nbsp;6.5.10</a> </td></tr><tr><td class="left">413</td><td class="left">Payload Too Large</td><td class="left"><a href="#status.413" id="rfc.xref.status.413.2" title="413 Payload Too Large">Section&nbsp;6.5.11</a> </td></tr><tr><td class="left">414</td><td class="left">URI Too Long</td><td class="left"><a href="#status.414" id="rfc.xref.status.414.2" title="414 URI Too Long">Section&nbsp;6.5.12</a> </td></tr><tr><td class="left">415</td><td class="left">Unsupported Media Type</td><td class="left"><a href="#status.415" id="rfc.xref.status.415.2" title="415 Unsupported Media Type">Section&nbsp;6.5.13</a> </td></tr><tr><td class="left">417</td><td class="left">Expectation Failed</td><td class="left"><a href="#status.417" id="rfc.xref.status.417.2" title="417 Expectation Failed">Section&nbsp;6.5.14</a> </td></tr><tr><td class="left">426</td><td class="left">Upgrade Required</td><td class="left"><a href="#status.426" id="rfc.xref.status.426.2" title="426 Upgrade Required">Section&nbsp;6.5.15</a> </td></tr><tr><td class="left">500</td><td class="left">Internal Server Error</td><td class="left"><a href="#status.500" id="rfc.xref.status.500.2" title="500 Internal Server Error">Section&nbsp;6.6.1</a> </td></tr><tr><td class="left">501</td><td class="left">Not Implemented</td><td class="left"><a href="#status.501" id="rfc.xref.status.501.2" title="501 Not Implemented">Section&nbsp;6.6.2</a> </td></tr><tr><td class="left">502</td><td class="left">Bad Gateway</td><td class="left"><a href="#status.502" id="rfc.xref.status.502.2" title="502 Bad Gateway">Section&nbsp;6.6.3</a> </td></tr><tr><td class="left">503</td><td class="left">Service Unavailable</td><td class="left"><a href="#status.503" id="rfc.xref.status.503.2" title="503 Service Unavailable">Section&nbsp;6.6.4</a> </td></tr><tr><td class="left">504</td><td class="left">Gateway Timeout</td><td class="left"><a href="#status.504" id="rfc.xref.status.504.2" title="504 Gateway Timeout">Section&nbsp;6.6.5</a> </td></tr><tr><td class="left">505</td><td class="left">HTTP Version Not Supported</td><td class="left"><a href="#status.505" id="rfc.xref.status.505.2" title="505 HTTP Version Not Supported">Section&nbsp;6.6.6</a> </td></tr></tbody></table></div></div></div><div id="header.field.registry"><h2 id="rfc.section.8.3"><a href="#rfc.section.8.3">8.3</a>&nbsp;<a href="#header.field.registry">Header Field Registry</a></h2><div id="rfc.section.8.3.p.1"><p>HTTP header fields are registered within the "Message Headers" registry located at &lt;<a href="http://www.iana.org/assignments/message-headers">http://www.iana.org/assignments/message-headers</a>&gt;, as defined by <a href="#BCP90" id="rfc.xref.BCP90.1"><cite title="Registration Procedures for Message Header Fields">[BCP90]</cite></a>.<a class="self" href="#rfc.section.8.3.p.1">&para;</a></p></div><div id="considerations.for.new.header.fields"><h3 id="rfc.section.8.3.1"><a href="#rfc.section.8.3.1">8.3.1</a>&nbsp;<a href="#considerations.for.new.header.fields">Considerations for New Header Fields</a></h3><div id="rfc.section.8.3.1.p.1"><p>Header fields are key:value pairs that can be used to communicate data about the message, its payload, the target resource, or the connection (i.e., control data). See <a href="rfc7230.html#header.fields" title="Header Fields">Section 3.2</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.33"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a> for a general definition of header field syntax in HTTP messages.<a class="self" href="#rfc.section.8.3.1.p.1">&para;</a></p></div><div id="rfc.section.8.3.1.p.2"><p>The requirements for header field names are defined in <a href="#BCP90" id="rfc.xref.BCP90.2"><cite title="Registration Procedures for Message Header Fields">[BCP90]</cite></a>.<a class="self" href="#rfc.section.8.3.1.p.2">&para;</a></p></div><div id="rfc.section.8.3.1.p.3"><p>Authors of specifications defining new fields are advised to keep the name as short as practical and not to prefix the name with "X-" unless the header field will never be used on the Internet. (The "X-" prefix idiom has been extensively misused in practice; it was intended to only be used as a mechanism for avoiding name collisions inside proprietary software or intranet processing, since the prefix would ensure that private names never collide with a newly registered Internet name; see <a href="#BCP178" id="rfc.xref.BCP178.1"><cite title="Deprecating the &#34;X-&#34; Prefix and Similar Constructs in Application Protocols">[BCP178]</cite></a> for further information).<a class="self" href="#rfc.section.8.3.1.p.3">&para;</a></p></div><div id="rfc.section.8.3.1.p.4"><p>New header field values typically have their syntax defined using ABNF (<a href="#RFC5234" id="rfc.xref.RFC5234.2"><cite title="Augmented BNF for Syntax Specifications: ABNF">[RFC5234]</cite></a>), using the extension defined in <a href="rfc7230.html#abnf.extension" title="ABNF List Extension: #rule">Section 7</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.34"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a> as necessary, and are usually constrained to the range of US-ASCII characters. Header fields needing a greater range of characters can use an encoding such as the one defined in <a href="#RFC5987" id="rfc.xref.RFC5987.1"><cite title="Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters">[RFC5987]</cite></a>.<a class="self" href="#rfc.section.8.3.1.p.4">&para;</a></p></div><div id="rfc.section.8.3.1.p.5"><p>Leading and trailing whitespace in raw field values is removed upon field parsing (<a href="rfc7230.html#field.parsing" title="Field Parsing">Section 3.2.4</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.35"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>). Field definitions where leading or trailing whitespace in values is significant will have to use a container syntax such as quoted-string (<a href="rfc7230.html#field.components" title="Field Value Components">Section 3.2.6</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.36"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>).<a class="self" href="#rfc.section.8.3.1.p.5">&para;</a></p></div><div id="rfc.section.8.3.1.p.6"><p>Because commas (",") are used as a generic delimiter between field-values, they need to be treated with care if they are allowed in the field-value. Typically, components that might contain a comma are protected with double-quotes using the quoted-string ABNF production.<a class="self" href="#rfc.section.8.3.1.p.6">&para;</a></p></div><div id="rfc.section.8.3.1.p.7"><p>For example, a textual date and a URI (either of which might contain a comma) could be safely carried in field-values like these:<a class="self" href="#rfc.section.8.3.1.p.7">&para;</a></p></div><div id="rfc.figure.u.64"><pre class="text">  Example-URI-Field: "http://example.com/a.html,foo", 
     683</pre></div><div id="rfc.section.7.4.2.p.2"><p>The Server field-value consists of one or more product identifiers, each followed by zero or more comments (<a href="rfc7230.html#header.fields" title="Header Fields">Section 3.2</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.31"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>), which together identify the origin server software and its significant subproducts. By convention, the product identifiers are listed in decreasing order of their significance for identifying the origin server software. Each product identifier consists of a name and optional version, as defined in <a href="#header.user-agent" id="rfc.xref.header.user-agent.2" title="User-Agent">Section&nbsp;5.5.3</a>.<a class="self" href="#rfc.section.7.4.2.p.2">&para;</a></p></div><div id="rfc.section.7.4.2.p.3" class="avoidbreakafter"><p>Example:<a class="self" href="#rfc.section.7.4.2.p.3">&para;</a></p></div><div id="rfc.figure.u.63"><pre class="text">  Server: CERN/3.0 libwww/2.17 
     684</pre></div><div id="rfc.section.7.4.2.p.4"><p>An origin server <em class="bcp14">SHOULD NOT</em> generate a Server field containing needlessly fine-grained detail and <em class="bcp14">SHOULD</em> limit the addition of subproducts by third parties. Overly long and detailed Server field values increase response latency and potentially reveal internal implementation details that might make it (slightly) easier for attackers to find and exploit known security holes.<a class="self" href="#rfc.section.7.4.2.p.4">&para;</a></p></div></div></div></div><div id="IANA.considerations"><h1 id="rfc.section.8"><a href="#rfc.section.8">8.</a>&nbsp;<a href="#IANA.considerations">IANA Considerations</a></h1><div id="method.registry"><h2 id="rfc.section.8.1"><a href="#rfc.section.8.1">8.1</a>&nbsp;<a href="#method.registry">Method Registry</a></h2><div id="rfc.section.8.1.p.1"><p>The "Hypertext Transfer Protocol (HTTP) Method Registry" defines the namespace for the request method token (<a href="#methods" title="Request Methods">Section&nbsp;4</a>). The method registry has been created and is now maintained at &lt;<a href="http://www.iana.org/assignments/http-methods">http://www.iana.org/assignments/http-methods</a>&gt;.<a class="self" href="#rfc.section.8.1.p.1">&para;</a></p></div><div id="method.registry.procedure"><h3 id="rfc.section.8.1.1"><a href="#rfc.section.8.1.1">8.1.1</a>&nbsp;<a href="#method.registry.procedure">Procedure</a></h3><div id="rfc.section.8.1.1.p.1"><p>HTTP method registrations <em class="bcp14">MUST</em> include the following fields: <a class="self" href="#rfc.section.8.1.1.p.1">&para;</a></p><ul><li>Method Name (see <a href="#methods" title="Request Methods">Section&nbsp;4</a>)</li><li>Safe ("yes" or "no", see <a href="#safe.methods" title="Safe Methods">Section&nbsp;4.2.1</a>)</li><li>Idempotent ("yes" or "no", see <a href="#idempotent.methods" title="Idempotent Methods">Section&nbsp;4.2.2</a>)</li><li>Pointer to specification text</li></ul></div><div id="rfc.section.8.1.1.p.2"><p>Values to be added to this namespace require IETF Review (see <a href="#RFC5226" id="rfc.xref.RFC5226.1"><cite title="Guidelines for Writing an IANA Considerations Section in RFCs">[RFC5226]</cite></a>, <a href="https://tools.ietf.org/html/rfc5226#section-4.1">Section 4.1</a>).<a class="self" href="#rfc.section.8.1.1.p.2">&para;</a></p></div></div><div id="considerations.for.new.methods"><h3 id="rfc.section.8.1.2"><a href="#rfc.section.8.1.2">8.1.2</a>&nbsp;<a href="#considerations.for.new.methods">Considerations for New Methods</a></h3><div id="rfc.section.8.1.2.p.1"><p>Standardized methods are generic; that is, they are potentially applicable to any resource, not just one particular media type, kind of resource, or application. As such, it is preferred that new methods be registered in a document that isn't specific to a single application or data format, since orthogonal technologies deserve orthogonal specification.<a class="self" href="#rfc.section.8.1.2.p.1">&para;</a></p></div><div id="rfc.section.8.1.2.p.2"><p>Since message parsing (<a href="rfc7230.html#message.body" title="Message Body">Section 3.3</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.32"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>) needs to be independent of method semantics (aside from responses to HEAD), definitions of new methods cannot change the parsing algorithm or prohibit the presence of a message body on either the request or the response message. Definitions of new methods can specify that only a zero-length message body is allowed by requiring a Content-Length header field with a value of "0".<a class="self" href="#rfc.section.8.1.2.p.2">&para;</a></p></div><div id="rfc.section.8.1.2.p.3"><p>A new method definition needs to indicate whether it is safe (<a href="#safe.methods" title="Safe Methods">Section&nbsp;4.2.1</a>), idempotent (<a href="#idempotent.methods" title="Idempotent Methods">Section&nbsp;4.2.2</a>), cacheable (<a href="#cacheable.methods" title="Cacheable Methods">Section&nbsp;4.2.3</a>), what semantics are to be associated with the payload body if any is present in the request and what refinements the method makes to header field or status code semantics. If the new method is cacheable, its definition ought to describe how, and under what conditions, a cache can store a response and use it to satisfy a subsequent request. The new method ought to describe whether it can be made conditional (<a href="#request.conditionals" title="Conditionals">Section&nbsp;5.2</a>) and, if so, how a server responds when the condition is false. Likewise, if the new method might have some use for partial response semantics (<a href="#RFC7233" id="rfc.xref.RFC7233.11"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[RFC7233]</cite></a>), it ought to document this, too.<a class="self" href="#rfc.section.8.1.2.p.3">&para;</a></p></div><div class="note"><div id="rfc.section.8.1.2.p.4"><p><b>Note:</b> Avoid defining a method name that starts with "M-", since that prefix might be misinterpreted as having the semantics assigned to it by <a href="#RFC2774" id="rfc.xref.RFC2774.1"><cite title="An HTTP Extension Framework">[RFC2774]</cite></a>.<a class="self" href="#rfc.section.8.1.2.p.4">&para;</a></p></div></div></div><div id="method.registration"><h3 id="rfc.section.8.1.3"><a href="#rfc.section.8.1.3">8.1.3</a>&nbsp;<a href="#method.registration">Registrations</a></h3><div id="rfc.section.8.1.3.p.1" class="avoidbreakafter"><p>The "Hypertext Transfer Protocol (HTTP) Method Registry" has been populated with the registrations below:<a class="self" href="#rfc.section.8.1.3.p.1">&para;</a></p></div><div id="rfc.table.2"><div id="iana.method.registration.table"></div><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Method</th><th>Safe</th><th>Idempotent</th><th>Reference</th></tr></thead><tbody><tr><td class="left">CONNECT</td><td class="left">no</td><td class="left">no</td><td class="left"><a href="#CONNECT" id="rfc.xref.CONNECT.2" title="CONNECT">Section&nbsp;4.3.6</a> </td></tr><tr><td class="left">DELETE</td><td class="left">no</td><td class="left">yes</td><td class="left"><a href="#DELETE" id="rfc.xref.DELETE.2" title="DELETE">Section&nbsp;4.3.5</a> </td></tr><tr><td class="left">GET</td><td class="left">yes</td><td class="left">yes</td><td class="left"><a href="#GET" id="rfc.xref.GET.5" title="GET">Section&nbsp;4.3.1</a> </td></tr><tr><td class="left">HEAD</td><td class="left">yes</td><td class="left">yes</td><td class="left"><a href="#HEAD" id="rfc.xref.HEAD.3" title="HEAD">Section&nbsp;4.3.2</a> </td></tr><tr><td class="left">OPTIONS</td><td class="left">yes</td><td class="left">yes</td><td class="left"><a href="#OPTIONS" id="rfc.xref.OPTIONS.3" title="OPTIONS">Section&nbsp;4.3.7</a> </td></tr><tr><td class="left">POST</td><td class="left">no</td><td class="left">no</td><td class="left"><a href="#POST" id="rfc.xref.POST.4" title="POST">Section&nbsp;4.3.3</a> </td></tr><tr><td class="left">PUT</td><td class="left">no</td><td class="left">yes</td><td class="left"><a href="#PUT" id="rfc.xref.PUT.4" title="PUT">Section&nbsp;4.3.4</a> </td></tr><tr><td class="left">TRACE</td><td class="left">yes</td><td class="left">yes</td><td class="left"><a href="#TRACE" id="rfc.xref.TRACE.3" title="TRACE">Section&nbsp;4.3.8</a> </td></tr></tbody></table></div></div></div><div id="status.code.registry"><h2 id="rfc.section.8.2"><a href="#rfc.section.8.2">8.2</a>&nbsp;<a href="#status.code.registry">Status Code Registry</a></h2><div id="rfc.section.8.2.p.1"><p>The "Hypertext Transfer Protocol (HTTP) Status Code Registry" defines the namespace for the response status-code token (<a href="#status.codes" title="Response Status Codes">Section&nbsp;6</a>). The status code registry is maintained at &lt;<a href="http://www.iana.org/assignments/http-status-codes">http://www.iana.org/assignments/http-status-codes</a>&gt;.<a class="self" href="#rfc.section.8.2.p.1">&para;</a></p></div><div id="rfc.section.8.2.p.2"><p>This section replaces the registration procedure for HTTP Status Codes previously defined in <a href="https://tools.ietf.org/html/rfc2817#section-7.1">Section 7.1</a> of <a href="#RFC2817" id="rfc.xref.RFC2817.1"><cite title="Upgrading to TLS Within HTTP/1.1">[RFC2817]</cite></a>.<a class="self" href="#rfc.section.8.2.p.2">&para;</a></p></div><div id="status.code.registry.procedure"><h3 id="rfc.section.8.2.1"><a href="#rfc.section.8.2.1">8.2.1</a>&nbsp;<a href="#status.code.registry.procedure">Procedure</a></h3><div id="rfc.section.8.2.1.p.1"><p>A registration <em class="bcp14">MUST</em> include the following fields: <a class="self" href="#rfc.section.8.2.1.p.1">&para;</a></p><ul><li>Status Code (3 digits)</li><li>Short Description</li><li>Pointer to specification text</li></ul></div><div id="rfc.section.8.2.1.p.2"><p>Values to be added to the HTTP status code namespace require IETF Review (see <a href="#RFC5226" id="rfc.xref.RFC5226.2"><cite title="Guidelines for Writing an IANA Considerations Section in RFCs">[RFC5226]</cite></a>, <a href="https://tools.ietf.org/html/rfc5226#section-4.1">Section 4.1</a>).<a class="self" href="#rfc.section.8.2.1.p.2">&para;</a></p></div></div><div id="considerations.for.new.status.codes"><h3 id="rfc.section.8.2.2"><a href="#rfc.section.8.2.2">8.2.2</a>&nbsp;<a href="#considerations.for.new.status.codes">Considerations for New Status Codes</a></h3><div id="rfc.section.8.2.2.p.1"><p>When it is necessary to express semantics for a response that are not defined by current status codes, a new status code can be registered. Status codes are generic; they are potentially applicable to any resource, not just one particular media type, kind of resource, or application of HTTP. As such, it is preferred that new status codes be registered in a document that isn't specific to a single application.<a class="self" href="#rfc.section.8.2.2.p.1">&para;</a></p></div><div id="rfc.section.8.2.2.p.2"><p>New status codes are required to fall under one of the categories defined in <a href="#status.codes" title="Response Status Codes">Section&nbsp;6</a>. To allow existing parsers to process the response message, new status codes cannot disallow a payload, although they can mandate a zero-length payload body.<a class="self" href="#rfc.section.8.2.2.p.2">&para;</a></p></div><div id="rfc.section.8.2.2.p.3"><p>Proposals for new status codes that are not yet widely deployed ought to avoid allocating a specific number for the code until there is clear consensus that it will be registered; instead, early drafts can use a notation such as "4NN", or "3N0" .. "3N9", to indicate the class of the proposed status code(s) without consuming a number prematurely.<a class="self" href="#rfc.section.8.2.2.p.3">&para;</a></p></div><div id="rfc.section.8.2.2.p.4"><p>The definition of a new status code ought to explain the request conditions that would cause a response containing that status code (e.g., combinations of request header fields and/or method(s)) along with any dependencies on response header fields (e.g., what fields are required, what fields can modify the semantics, and what header field semantics are further refined when used with the new status code).<a class="self" href="#rfc.section.8.2.2.p.4">&para;</a></p></div><div id="rfc.section.8.2.2.p.5"><p>The definition of a new status code ought to specify whether or not it is cacheable. Note that all status codes can be cached if the response they occur in has explicit freshness information; however, status codes that are defined as being cacheable are allowed to be cached without explicit freshness information. Likewise, the definition of a status code can place constraints upon cache behavior. See <a href="#RFC7234" id="rfc.xref.RFC7234.28"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a> for more information.<a class="self" href="#rfc.section.8.2.2.p.5">&para;</a></p></div><div id="rfc.section.8.2.2.p.6"><p>Finally, the definition of a new status code ought to indicate whether the payload has any implied association with an identified resource (<a href="#identifying.payload" title="Identifying a Representation">Section&nbsp;3.1.4.1</a>).<a class="self" href="#rfc.section.8.2.2.p.6">&para;</a></p></div></div><div id="status.code.registration"><h3 id="rfc.section.8.2.3"><a href="#rfc.section.8.2.3">8.2.3</a>&nbsp;<a href="#status.code.registration">Registrations</a></h3><div id="rfc.section.8.2.3.p.1" class="avoidbreakafter"><p>The status code registry has been updated with the registrations below:<a class="self" href="#rfc.section.8.2.3.p.1">&para;</a></p></div><div id="rfc.table.3"><div id="iana.status.code.registration.table"></div><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Value</th><th>Description</th><th>Reference</th></tr></thead><tbody><tr><td class="left">100</td><td class="left">Continue</td><td class="left"><a href="#status.100" id="rfc.xref.status.100.2" title="100 Continue">Section&nbsp;6.2.1</a> </td></tr><tr><td class="left">101</td><td class="left">Switching Protocols</td><td class="left"><a href="#status.101" id="rfc.xref.status.101.2" title="101 Switching Protocols">Section&nbsp;6.2.2</a> </td></tr><tr><td class="left">200</td><td class="left">OK</td><td class="left"><a href="#status.200" id="rfc.xref.status.200.2" title="200 OK">Section&nbsp;6.3.1</a> </td></tr><tr><td class="left">201</td><td class="left">Created</td><td class="left"><a href="#status.201" id="rfc.xref.status.201.2" title="201 Created">Section&nbsp;6.3.2</a> </td></tr><tr><td class="left">202</td><td class="left">Accepted</td><td class="left"><a href="#status.202" id="rfc.xref.status.202.2" title="202 Accepted">Section&nbsp;6.3.3</a> </td></tr><tr><td class="left">203</td><td class="left">Non-Authoritative Information</td><td class="left"><a href="#status.203" id="rfc.xref.status.203.2" title="203 Non-Authoritative Information">Section&nbsp;6.3.4</a> </td></tr><tr><td class="left">204</td><td class="left">No Content</td><td class="left"><a href="#status.204" id="rfc.xref.status.204.2" title="204 No Content">Section&nbsp;6.3.5</a> </td></tr><tr><td class="left">205</td><td class="left">Reset Content</td><td class="left"><a href="#status.205" id="rfc.xref.status.205.2" title="205 Reset Content">Section&nbsp;6.3.6</a> </td></tr><tr><td class="left">300</td><td class="left">Multiple Choices</td><td class="left"><a href="#status.300" id="rfc.xref.status.300.3" title="300 Multiple Choices">Section&nbsp;6.4.1</a> </td></tr><tr><td class="left">301</td><td class="left">Moved Permanently</td><td class="left"><a href="#status.301" id="rfc.xref.status.301.2" title="301 Moved Permanently">Section&nbsp;6.4.2</a> </td></tr><tr><td class="left">302</td><td class="left">Found</td><td class="left"><a href="#status.302" id="rfc.xref.status.302.2" title="302 Found">Section&nbsp;6.4.3</a> </td></tr><tr><td class="left">303</td><td class="left">See Other</td><td class="left"><a href="#status.303" id="rfc.xref.status.303.2" title="303 See Other">Section&nbsp;6.4.4</a> </td></tr><tr><td class="left">305</td><td class="left">Use Proxy</td><td class="left"><a href="#status.305" id="rfc.xref.status.305.2" title="305 Use Proxy">Section&nbsp;6.4.5</a> </td></tr><tr><td class="left">306</td><td class="left">(Unused)</td><td class="left"><a href="#status.306" id="rfc.xref.status.306.1" title="306 (Unused)">Section&nbsp;6.4.6</a> </td></tr><tr><td class="left">307</td><td class="left">Temporary Redirect</td><td class="left"><a href="#status.307" id="rfc.xref.status.307.2" title="307 Temporary Redirect">Section&nbsp;6.4.7</a> </td></tr><tr><td class="left">400</td><td class="left">Bad Request</td><td class="left"><a href="#status.400" id="rfc.xref.status.400.2" title="400 Bad Request">Section&nbsp;6.5.1</a> </td></tr><tr><td class="left">402</td><td class="left">Payment Required</td><td class="left"><a href="#status.402" id="rfc.xref.status.402.2" title="402 Payment Required">Section&nbsp;6.5.2</a> </td></tr><tr><td class="left">403</td><td class="left">Forbidden</td><td class="left"><a href="#status.403" id="rfc.xref.status.403.2" title="403 Forbidden">Section&nbsp;6.5.3</a> </td></tr><tr><td class="left">404</td><td class="left">Not Found</td><td class="left"><a href="#status.404" id="rfc.xref.status.404.2" title="404 Not Found">Section&nbsp;6.5.4</a> </td></tr><tr><td class="left">405</td><td class="left">Method Not Allowed</td><td class="left"><a href="#status.405" id="rfc.xref.status.405.2" title="405 Method Not Allowed">Section&nbsp;6.5.5</a> </td></tr><tr><td class="left">406</td><td class="left">Not Acceptable</td><td class="left"><a href="#status.406" id="rfc.xref.status.406.2" title="406 Not Acceptable">Section&nbsp;6.5.6</a> </td></tr><tr><td class="left">408</td><td class="left">Request Timeout</td><td class="left"><a href="#status.408" id="rfc.xref.status.408.2" title="408 Request Timeout">Section&nbsp;6.5.7</a> </td></tr><tr><td class="left">409</td><td class="left">Conflict</td><td class="left"><a href="#status.409" id="rfc.xref.status.409.2" title="409 Conflict">Section&nbsp;6.5.8</a> </td></tr><tr><td class="left">410</td><td class="left">Gone</td><td class="left"><a href="#status.410" id="rfc.xref.status.410.2" title="410 Gone">Section&nbsp;6.5.9</a> </td></tr><tr><td class="left">411</td><td class="left">Length Required</td><td class="left"><a href="#status.411" id="rfc.xref.status.411.2" title="411 Length Required">Section&nbsp;6.5.10</a> </td></tr><tr><td class="left">413</td><td class="left">Payload Too Large</td><td class="left"><a href="#status.413" id="rfc.xref.status.413.2" title="413 Payload Too Large">Section&nbsp;6.5.11</a> </td></tr><tr><td class="left">414</td><td class="left">URI Too Long</td><td class="left"><a href="#status.414" id="rfc.xref.status.414.2" title="414 URI Too Long">Section&nbsp;6.5.12</a> </td></tr><tr><td class="left">415</td><td class="left">Unsupported Media Type</td><td class="left"><a href="#status.415" id="rfc.xref.status.415.2" title="415 Unsupported Media Type">Section&nbsp;6.5.13</a> </td></tr><tr><td class="left">417</td><td class="left">Expectation Failed</td><td class="left"><a href="#status.417" id="rfc.xref.status.417.2" title="417 Expectation Failed">Section&nbsp;6.5.14</a> </td></tr><tr><td class="left">426</td><td class="left">Upgrade Required</td><td class="left"><a href="#status.426" id="rfc.xref.status.426.2" title="426 Upgrade Required">Section&nbsp;6.5.15</a> </td></tr><tr><td class="left">500</td><td class="left">Internal Server Error</td><td class="left"><a href="#status.500" id="rfc.xref.status.500.2" title="500 Internal Server Error">Section&nbsp;6.6.1</a> </td></tr><tr><td class="left">501</td><td class="left">Not Implemented</td><td class="left"><a href="#status.501" id="rfc.xref.status.501.2" title="501 Not Implemented">Section&nbsp;6.6.2</a> </td></tr><tr><td class="left">502</td><td class="left">Bad Gateway</td><td class="left"><a href="#status.502" id="rfc.xref.status.502.2" title="502 Bad Gateway">Section&nbsp;6.6.3</a> </td></tr><tr><td class="left">503</td><td class="left">Service Unavailable</td><td class="left"><a href="#status.503" id="rfc.xref.status.503.2" title="503 Service Unavailable">Section&nbsp;6.6.4</a> </td></tr><tr><td class="left">504</td><td class="left">Gateway Timeout</td><td class="left"><a href="#status.504" id="rfc.xref.status.504.2" title="504 Gateway Timeout">Section&nbsp;6.6.5</a> </td></tr><tr><td class="left">505</td><td class="left">HTTP Version Not Supported</td><td class="left"><a href="#status.505" id="rfc.xref.status.505.2" title="505 HTTP Version Not Supported">Section&nbsp;6.6.6</a> </td></tr></tbody></table></div></div></div><div id="header.field.registry"><h2 id="rfc.section.8.3"><a href="#rfc.section.8.3">8.3</a>&nbsp;<a href="#header.field.registry">Header Field Registry</a></h2><div id="rfc.section.8.3.p.1"><p>HTTP header fields are registered within the "Message Headers" registry located at &lt;<a href="http://www.iana.org/assignments/message-headers">http://www.iana.org/assignments/message-headers</a>&gt;, as defined by <a href="#BCP90" id="rfc.xref.BCP90.1"><cite title="Registration Procedures for Message Header Fields">[BCP90]</cite></a>.<a class="self" href="#rfc.section.8.3.p.1">&para;</a></p></div><div id="considerations.for.new.header.fields"><h3 id="rfc.section.8.3.1"><a href="#rfc.section.8.3.1">8.3.1</a>&nbsp;<a href="#considerations.for.new.header.fields">Considerations for New Header Fields</a></h3><div id="rfc.section.8.3.1.p.1"><p>Header fields are key:value pairs that can be used to communicate data about the message, its payload, the target resource, or the connection (i.e., control data). See <a href="rfc7230.html#header.fields" title="Header Fields">Section 3.2</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.33"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a> for a general definition of header field syntax in HTTP messages.<a class="self" href="#rfc.section.8.3.1.p.1">&para;</a></p></div><div id="rfc.section.8.3.1.p.2"><p>The requirements for header field names are defined in <a href="#BCP90" id="rfc.xref.BCP90.2"><cite title="Registration Procedures for Message Header Fields">[BCP90]</cite></a>.<a class="self" href="#rfc.section.8.3.1.p.2">&para;</a></p></div><div id="rfc.section.8.3.1.p.3"><p>Authors of specifications defining new fields are advised to keep the name as short as practical and not to prefix the name with "X-" unless the header field will never be used on the Internet. (The "X-" prefix idiom has been extensively misused in practice; it was intended to only be used as a mechanism for avoiding name collisions inside proprietary software or intranet processing, since the prefix would ensure that private names never collide with a newly registered Internet name; see <a href="#BCP178" id="rfc.xref.BCP178.1"><cite title="Deprecating the &#34;X-&#34; Prefix and Similar Constructs in Application Protocols">[BCP178]</cite></a> for further information).<a class="self" href="#rfc.section.8.3.1.p.3">&para;</a></p></div><div id="rfc.section.8.3.1.p.4"><p>New header field values typically have their syntax defined using ABNF (<a href="#RFC5234" id="rfc.xref.RFC5234.2"><cite title="Augmented BNF for Syntax Specifications: ABNF">[RFC5234]</cite></a>), using the extension defined in <a href="rfc7230.html#abnf.extension" title="ABNF List Extension: #rule">Section 7</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.34"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a> as necessary, and are usually constrained to the range of US-ASCII characters. Header fields needing a greater range of characters can use an encoding such as the one defined in <a href="#RFC5987" id="rfc.xref.RFC5987.1"><cite title="Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters">[RFC5987]</cite></a>.<a class="self" href="#rfc.section.8.3.1.p.4">&para;</a></p></div><div id="rfc.section.8.3.1.p.5"><p>Leading and trailing whitespace in raw field values is removed upon field parsing (<a href="rfc7230.html#field.parsing" title="Field Parsing">Section 3.2.4</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.35"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>). Field definitions where leading or trailing whitespace in values is significant will have to use a container syntax such as quoted-string (<a href="rfc7230.html#field.components" title="Field Value Components">Section 3.2.6</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.36"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>).<a class="self" href="#rfc.section.8.3.1.p.5">&para;</a></p></div><div id="rfc.section.8.3.1.p.6"><p>Because commas (",") are used as a generic delimiter between field-values, they need to be treated with care if they are allowed in the field-value. Typically, components that might contain a comma are protected with double-quotes using the quoted-string ABNF production.<a class="self" href="#rfc.section.8.3.1.p.6">&para;</a></p></div><div id="rfc.section.8.3.1.p.7" class="avoidbreakafter"><p>For example, a textual date and a URI (either of which might contain a comma) could be safely carried in field-values like these:<a class="self" href="#rfc.section.8.3.1.p.7">&para;</a></p></div><div id="rfc.figure.u.64"><pre class="text">  Example-URI-Field: "http://example.com/a.html,foo", 
    685685                     "http://without-a-comma.example.com/" 
    686686  Example-Date-Field: "Sat, 04 May 1996", "Wed, 14 Sep 2005" 
    687 </pre></div><div id="rfc.section.8.3.1.p.8"><p>Note that double-quote delimiters almost always are used with the quoted-string production; using a different syntax inside double-quotes will likely cause unnecessary confusion.<a class="self" href="#rfc.section.8.3.1.p.8">&para;</a></p></div><div id="rfc.section.8.3.1.p.9"><p>Many header fields use a format including (case-insensitively) named parameters (for instance, <a href="#header.content-type" class="smpl">Content-Type</a>, defined in <a href="#header.content-type" id="rfc.xref.header.content-type.3" title="Content-Type">Section&nbsp;3.1.1.5</a>). Allowing both unquoted (token) and quoted (quoted-string) syntax for the parameter value enables recipients to use existing parser components. When allowing both forms, the meaning of a parameter value ought to be independent of the syntax used for it (for an example, see the notes on parameter handling for media types in <a href="#media.type" title="Media Type">Section&nbsp;3.1.1.1</a>).<a class="self" href="#rfc.section.8.3.1.p.9">&para;</a></p></div><div id="rfc.section.8.3.1.p.10"><p>Authors of specifications defining new header fields are advised to consider documenting: <a class="self" href="#rfc.section.8.3.1.p.10">&para;</a></p><ul><li><p>Whether the field is a single value or whether it can be a list (delimited by commas; see <a href="rfc7230.html#header.fields" title="Header Fields">Section 3.2</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.37"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>).</p><p>If it does not use the list syntax, document how to treat messages where the field occurs multiple times (a sensible default would be to ignore the field, but this might not always be the right choice).</p><p>Note that intermediaries and software libraries might combine multiple header field instances into a single one, despite the field's definition not allowing the list syntax. A robust format enables recipients to discover these situations (good example: "Content-Type", as the comma can only appear inside quoted strings; bad example: "Location", as a comma can occur inside a URI).</p></li><li><p>Under what conditions the header field can be used; e.g., only in responses or requests, in all messages, only on responses to a particular request method, etc.</p></li><li><p>Whether the field should be stored by origin servers that understand it upon a PUT request.</p></li><li><p>Whether the field semantics are further refined by the context, such as by existing request methods or status codes.</p></li><li><p>Whether it is appropriate to list the field-name in the <a href="rfc7230.html#header.connection" class="smpl">Connection</a> header field (i.e., if the header field is to be hop-by-hop; see <a href="rfc7230.html#header.connection" title="Connection">Section 6.1</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.38"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>).</p></li><li><p>Under what conditions intermediaries are allowed to insert, delete, or modify the field's value.</p></li><li><p>Whether it is appropriate to list the field-name in a <a href="#header.vary" class="smpl">Vary</a> response header field (e.g., when the request header field is used by an origin server's content selection algorithm; see <a href="#header.vary" id="rfc.xref.header.vary.3" title="Vary">Section&nbsp;7.1.4</a>).</p></li><li><p>Whether the header field is useful or allowable in trailers (see <a href="rfc7230.html#chunked.encoding" title="Chunked Transfer Coding">Section 4.1</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.39"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>).</p></li><li><p>Whether the header field ought to be preserved across redirects.</p></li><li><p>Whether it introduces any additional security considerations, such as disclosure of privacy-related data.</p></li></ul></div></div><div id="header.field.registration"><h3 id="rfc.section.8.3.2"><a href="#rfc.section.8.3.2">8.3.2</a>&nbsp;<a href="#header.field.registration">Registrations</a></h3><div id="rfc.section.8.3.2.p.1"><p>The "Message Headers" registry has been updated with the following permanent registrations:<a class="self" href="#rfc.section.8.3.2.p.1">&para;</a></p></div><div id="rfc.table.4"><div id="iana.header.registration.table"></div><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Header Field Name</th><th>Protocol</th><th>Status</th><th>Reference</th></tr></thead><tbody><tr><td class="left">Accept</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.accept" id="rfc.xref.header.accept.3" title="Accept">Section&nbsp;5.3.2</a> </td></tr><tr><td class="left">Accept-Charset</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.accept-charset" id="rfc.xref.header.accept-charset.2" title="Accept-Charset">Section&nbsp;5.3.3</a> </td></tr><tr><td class="left">Accept-Encoding</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.accept-encoding" id="rfc.xref.header.accept-encoding.3" title="Accept-Encoding">Section&nbsp;5.3.4</a> </td></tr><tr><td class="left">Accept-Language</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.accept-language" id="rfc.xref.header.accept-language.3" title="Accept-Language">Section&nbsp;5.3.5</a> </td></tr><tr><td class="left">Allow</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.allow" id="rfc.xref.header.allow.3" title="Allow">Section&nbsp;7.4.1</a> </td></tr><tr><td class="left">Content-Encoding</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.content-encoding" id="rfc.xref.header.content-encoding.3" title="Content-Encoding">Section&nbsp;3.1.2.2</a> </td></tr><tr><td class="left">Content-Language</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.content-language" id="rfc.xref.header.content-language.2" title="Content-Language">Section&nbsp;3.1.3.2</a> </td></tr><tr><td class="left">Content-Location</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.content-location" id="rfc.xref.header.content-location.4" title="Content-Location">Section&nbsp;3.1.4.2</a> </td></tr><tr><td class="left">Content-Type</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.content-type" id="rfc.xref.header.content-type.4" title="Content-Type">Section&nbsp;3.1.1.5</a> </td></tr><tr><td class="left">Date</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.date" id="rfc.xref.header.date.3" title="Date">Section&nbsp;7.1.1.2</a> </td></tr><tr><td class="left">Expect</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.expect" id="rfc.xref.header.expect.4" title="Expect">Section&nbsp;5.1.1</a> </td></tr><tr><td class="left">From</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.from" id="rfc.xref.header.from.2" title="From">Section&nbsp;5.5.1</a> </td></tr><tr><td class="left">Location</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.location" id="rfc.xref.header.location.4" title="Location">Section&nbsp;7.1.2</a> </td></tr><tr><td class="left">Max-Forwards</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.max-forwards" id="rfc.xref.header.max-forwards.4" title="Max-Forwards">Section&nbsp;5.1.2</a> </td></tr><tr><td class="left">MIME-Version</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#mime-version" id="rfc.xref.mime-version.1" title="MIME-Version">Appendix&nbsp;A.1</a> </td></tr><tr><td class="left">Referer</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.referer" id="rfc.xref.header.referer.2" title="Referer">Section&nbsp;5.5.2</a> </td></tr><tr><td class="left">Retry-After</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.retry-after" id="rfc.xref.header.retry-after.3" title="Retry-After">Section&nbsp;7.1.3</a> </td></tr><tr><td class="left">Server</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.server" id="rfc.xref.header.server.2" title="Server">Section&nbsp;7.4.2</a> </td></tr><tr><td class="left">User-Agent</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.user-agent" id="rfc.xref.header.user-agent.3" title="User-Agent">Section&nbsp;5.5.3</a> </td></tr><tr><td class="left">Vary</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.vary" id="rfc.xref.header.vary.4" title="Vary">Section&nbsp;7.1.4</a> </td></tr></tbody></table></div><div id="rfc.section.8.3.2.p.2"><p>The change controller for the above registrations is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".<a class="self" href="#rfc.section.8.3.2.p.2">&para;</a></p></div></div></div><div id="content.coding.registry"><h2 id="rfc.section.8.4"><a href="#rfc.section.8.4">8.4</a>&nbsp;<a href="#content.coding.registry">Content Coding Registry</a></h2><div id="rfc.section.8.4.p.1"><p>The "HTTP Content Coding Registry" defines the namespace for content coding names (<a href="rfc7230.html#compression.codings" title="Compression Codings">Section 4.2</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.40"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>). The content coding registry is maintained at &lt;<a href="http://www.iana.org/assignments/http-parameters">http://www.iana.org/assignments/http-parameters</a>&gt;.<a class="self" href="#rfc.section.8.4.p.1">&para;</a></p></div><div id="content.coding.procedure"><h3 id="rfc.section.8.4.1"><a href="#rfc.section.8.4.1">8.4.1</a>&nbsp;<a href="#content.coding.procedure">Procedure</a></h3><div id="rfc.section.8.4.1.p.1"><p>Content coding registrations <em class="bcp14">MUST</em> include the following fields: <a class="self" href="#rfc.section.8.4.1.p.1">&para;</a></p><ul><li>Name</li><li>Description</li><li>Pointer to specification text</li></ul></div><div id="rfc.section.8.4.1.p.2"><p>Names of content codings <em class="bcp14">MUST NOT</em> overlap with names of transfer codings (<a href="rfc7230.html#transfer.codings" title="Transfer Codings">Section 4</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.41"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>), unless the encoding transformation is identical (as is the case for the compression codings defined in <a href="rfc7230.html#compression.codings" title="Compression Codings">Section 4.2</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.42"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>).<a class="self" href="#rfc.section.8.4.1.p.2">&para;</a></p></div><div id="rfc.section.8.4.1.p.3"><p>Values to be added to this namespace require IETF Review (see <a href="https://tools.ietf.org/html/rfc5226#section-4.1">Section 4.1</a> of <a href="#RFC5226" id="rfc.xref.RFC5226.3"><cite title="Guidelines for Writing an IANA Considerations Section in RFCs">[RFC5226]</cite></a>) and <em class="bcp14">MUST</em> conform to the purpose of content coding defined in this section.<a class="self" href="#rfc.section.8.4.1.p.3">&para;</a></p></div></div><div id="content.coding.registration"><h3 id="rfc.section.8.4.2"><a href="#rfc.section.8.4.2">8.4.2</a>&nbsp;<a href="#content.coding.registration">Registrations</a></h3><div id="rfc.section.8.4.2.p.1"><p>The "HTTP Content Coding Registry" has been updated with the registrations below:<a class="self" href="#rfc.section.8.4.2.p.1">&para;</a></p></div><div id="rfc.table.5"><div id="iana.content.coding.registration.table"></div><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Name</th><th>Description</th><th>Reference</th></tr></thead><tbody><tr><td class="left">identity</td><td class="left">Reserved (synonym for "no encoding" in <a href="#header.accept-encoding" class="smpl">Accept-Encoding</a>)</td><td class="left"><a href="#header.accept-encoding" id="rfc.xref.header.accept-encoding.4" title="Accept-Encoding">Section&nbsp;5.3.4</a> </td></tr></tbody></table></div></div></div></div><div id="security.considerations"><h1 id="rfc.section.9"><a href="#rfc.section.9">9.</a>&nbsp;<a href="#security.considerations">Security Considerations</a></h1><div id="rfc.section.9.p.1"><p>This section is meant to inform developers, information providers, and users of known security concerns relevant to HTTP semantics and its use for transferring information over the Internet. Considerations related to message syntax, parsing, and routing are discussed in <a href="rfc7230.html#security.considerations" title="Security Considerations">Section 9</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.43"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>.<a class="self" href="#rfc.section.9.p.1">&para;</a></p></div><div id="rfc.section.9.p.2"><p>The list of considerations below is not exhaustive. Most security concerns related to HTTP semantics are about securing server-side applications (code behind the HTTP interface), securing user agent processing of payloads received via HTTP, or secure use of the Internet in general, rather than security of the protocol. Various organizations maintain topical information and links to current research on Web application security (e.g., <a href="#OWASP" id="rfc.xref.OWASP.1"><cite title="A Guide to Building Secure Web Applications and Web Services">[OWASP]</cite></a>).<a class="self" href="#rfc.section.9.p.2">&para;</a></p></div><div id="attack.pathname"><h2 id="rfc.section.9.1"><a href="#rfc.section.9.1">9.1</a>&nbsp;<a href="#attack.pathname">Attacks Based on File and Path Names</a></h2><div id="rfc.section.9.1.p.1"><p>Origin servers frequently make use of their local file system to manage the mapping from effective request URI to resource representations. Most file systems are not designed to protect against malicious file or path names. Therefore, an origin server needs to avoid accessing names that have a special significance to the system when mapping the request target to files, folders, or directories.<a class="self" href="#rfc.section.9.1.p.1">&para;</a></p></div><div id="rfc.section.9.1.p.2"><p>For example, UNIX, Microsoft Windows, and other operating systems use ".." as a path component to indicate a directory level above the current one, and they use specially named paths or file names to send data to system devices. Similar naming conventions might exist within other types of storage systems. Likewise, local storage systems have an annoying tendency to prefer user-friendliness over security when handling invalid or unexpected characters, recomposition of decomposed characters, and case-normalization of case-insensitive names.<a class="self" href="#rfc.section.9.1.p.2">&para;</a></p></div><div id="rfc.section.9.1.p.3"><p>Attacks based on such special names tend to focus on either denial-of-service (e.g., telling the server to read from a COM port) or disclosure of configuration and source files that are not meant to be served.<a class="self" href="#rfc.section.9.1.p.3">&para;</a></p></div></div><div id="attack.injection"><h2 id="rfc.section.9.2"><a href="#rfc.section.9.2">9.2</a>&nbsp;<a href="#attack.injection">Attacks Based on Command, Code, or Query Injection</a></h2><div id="rfc.section.9.2.p.1"><p>Origin servers often use parameters within the URI as a means of identifying system services, selecting database entries, or choosing a data source. However, data received in a request cannot be trusted. An attacker could construct any of the request data elements (method, request-target, header fields, or body) to contain data that might be misinterpreted as a command, code, or query when passed through a command invocation, language interpreter, or database interface.<a class="self" href="#rfc.section.9.2.p.1">&para;</a></p></div><div id="rfc.section.9.2.p.2"><p>For example, SQL injection is a common attack wherein additional query language is inserted within some part of the request-target or header fields (e.g., <a href="rfc7230.html#header.host" class="smpl">Host</a>, <a href="#header.referer" class="smpl">Referer</a>, etc.). If the received data is used directly within a SELECT statement, the query language might be interpreted as a database command instead of a simple string value. This type of implementation vulnerability is extremely common, in spite of being easy to prevent.<a class="self" href="#rfc.section.9.2.p.2">&para;</a></p></div><div id="rfc.section.9.2.p.3"><p>In general, resource implementations ought to avoid use of request data in contexts that are processed or interpreted as instructions. Parameters ought to be compared to fixed strings and acted upon as a result of that comparison, rather than passed through an interface that is not prepared for untrusted data. Received data that isn't based on fixed parameters ought to be carefully filtered or encoded to avoid being misinterpreted.<a class="self" href="#rfc.section.9.2.p.3">&para;</a></p></div><div id="rfc.section.9.2.p.4"><p>Similar considerations apply to request data when it is stored and later processed, such as within log files, monitoring tools, or when included within a data format that allows embedded scripts.<a class="self" href="#rfc.section.9.2.p.4">&para;</a></p></div></div><div id="personal.information"><h2 id="rfc.section.9.3"><a href="#rfc.section.9.3">9.3</a>&nbsp;<a href="#personal.information">Disclosure of Personal Information</a></h2><div id="rfc.section.9.3.p.1"><p>Clients are often privy to large amounts of personal information, including both information provided by the user to interact with resources (e.g., the user's name, location, mail address, passwords, encryption keys, etc.) and information about the user's browsing activity over time (e.g., history, bookmarks, etc.). Implementations need to prevent unintentional disclosure of personal information.<a class="self" href="#rfc.section.9.3.p.1">&para;</a></p></div></div><div id="sensitive.information.in.uris"><h2 id="rfc.section.9.4"><a href="#rfc.section.9.4">9.4</a>&nbsp;<a href="#sensitive.information.in.uris">Disclosure of Sensitive Information in URIs</a></h2><div id="rfc.section.9.4.p.1"><p>URIs are intended to be shared, not secured, even when they identify secure resources. URIs are often shown on displays, added to templates when a page is printed, and stored in a variety of unprotected bookmark lists. It is therefore unwise to include information within a URI that is sensitive, personally identifiable, or a risk to disclose.<a class="self" href="#rfc.section.9.4.p.1">&para;</a></p></div><div id="rfc.section.9.4.p.2"><p>Authors of services ought to avoid GET-based forms for the submission of sensitive data because that data will be placed in the request-target. Many existing servers, proxies, and user agents log or display the request-target in places where it might be visible to third parties. Such services ought to use POST-based form submission instead.<a class="self" href="#rfc.section.9.4.p.2">&para;</a></p></div><div id="rfc.section.9.4.p.3"><p>Since the <a href="#header.referer" class="smpl">Referer</a> header field tells a target site about the context that resulted in a request, it has the potential to reveal information about the user's immediate browsing history and any personal information that might be found in the referring resource's URI. Limitations on the Referer header field are described in <a href="#header.referer" id="rfc.xref.header.referer.3" title="Referer">Section&nbsp;5.5.2</a> to address some of its security considerations.<a class="self" href="#rfc.section.9.4.p.3">&para;</a></p></div></div><div id="fragment.disclosure"><h2 id="rfc.section.9.5"><a href="#rfc.section.9.5">9.5</a>&nbsp;<a href="#fragment.disclosure">Disclosure of Fragment after Redirects</a></h2><div id="rfc.section.9.5.p.1"><p>Although fragment identifiers used within URI references are not sent in requests, implementers ought to be aware that they will be visible to the user agent and any extensions or scripts running as a result of the response. In particular, when a redirect occurs and the original request's fragment identifier is inherited by the new reference in <a href="#header.location" class="smpl">Location</a> (<a href="#header.location" id="rfc.xref.header.location.5" title="Location">Section&nbsp;7.1.2</a>), this might have the effect of disclosing one site's fragment to another site. If the first site uses personal information in fragments, it ought to ensure that redirects to other sites include a (possibly empty) fragment component in order to block that inheritance.<a class="self" href="#rfc.section.9.5.p.1">&para;</a></p></div></div><div id="disclosure.product.information"><h2 id="rfc.section.9.6"><a href="#rfc.section.9.6">9.6</a>&nbsp;<a href="#disclosure.product.information">Disclosure of Product Information</a></h2><div id="rfc.section.9.6.p.1"><p>The <a href="#header.user-agent" class="smpl">User-Agent</a> (<a href="#header.user-agent" id="rfc.xref.header.user-agent.4" title="User-Agent">Section&nbsp;5.5.3</a>), <a href="rfc7230.html#header.via" class="smpl">Via</a> (<a href="rfc7230.html#header.via" title="Via">Section 5.7.1</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.44"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>), and <a href="#header.server" class="smpl">Server</a> (<a href="#header.server" id="rfc.xref.header.server.3" title="Server">Section&nbsp;7.4.2</a>) header fields often reveal information about the respective sender's software systems. In theory, this can make it easier for an attacker to exploit known security holes; in practice, attackers tend to try all potential holes regardless of the apparent software versions being used.<a class="self" href="#rfc.section.9.6.p.1">&para;</a></p></div><div id="rfc.section.9.6.p.2"><p>Proxies that serve as a portal through a network firewall ought to take special precautions regarding the transfer of header information that might identify hosts behind the firewall. The <a href="rfc7230.html#header.via" class="smpl">Via</a> header field allows intermediaries to replace sensitive machine names with pseudonyms.<a class="self" href="#rfc.section.9.6.p.2">&para;</a></p></div></div><div id="fingerprinting"><h2 id="rfc.section.9.7"><a href="#rfc.section.9.7">9.7</a>&nbsp;<a href="#fingerprinting">Browser Fingerprinting</a></h2><div id="rfc.section.9.7.p.1"><p>Browser fingerprinting is a set of techniques for identifying a specific user agent over time through its unique set of characteristics. These characteristics might include information related to its TCP behavior, feature capabilities, and scripting environment, though of particular interest here is the set of unique characteristics that might be communicated via HTTP. Fingerprinting is considered a privacy concern because it enables tracking of a user agent's behavior over time without the corresponding controls that the user might have over other forms of data collection (e.g., cookies). Many general-purpose user agents (i.e., Web browsers) have taken steps to reduce their fingerprints.<a class="self" href="#rfc.section.9.7.p.1">&para;</a></p></div><div id="rfc.section.9.7.p.2"><p>There are a number of request header fields that might reveal information to servers that is sufficiently unique to enable fingerprinting. The <a href="#header.from" class="smpl">From</a> header field is the most obvious, though it is expected that From will only be sent when self-identification is desired by the user. Likewise, Cookie header fields are deliberately designed to enable re-identification, so fingerprinting concerns only apply to situations where cookies are disabled or restricted by the user agent's configuration.<a class="self" href="#rfc.section.9.7.p.2">&para;</a></p></div><div id="rfc.section.9.7.p.3"><p>The <a href="#header.user-agent" class="smpl">User-Agent</a> header field might contain enough information to uniquely identify a specific device, usually when combined with other characteristics, particularly if the user agent sends excessive details about the user's system or extensions. However, the source of unique information that is least expected by users is <a href="#proactive.negotiation" class="smpl">proactive negotiation</a> (<a href="#request.conneg" title="Content Negotiation">Section&nbsp;5.3</a>), including the <a href="#header.accept" class="smpl">Accept</a>, <a href="#header.accept-charset" class="smpl">Accept-Charset</a>, <a href="#header.accept-encoding" class="smpl">Accept-Encoding</a>, and <a href="#header.accept-language" class="smpl">Accept-Language</a> header fields.<a class="self" href="#rfc.section.9.7.p.3">&para;</a></p></div><div id="rfc.section.9.7.p.4"><p>In addition to the fingerprinting concern, detailed use of the <a href="#header.accept-language" class="smpl">Accept-Language</a> header field can reveal information the user might consider to be of a private nature. For example, understanding a given language set might be strongly correlated to membership in a particular ethnic group. An approach that limits such loss of privacy would be for a user agent to omit the sending of Accept-Language except for sites that have been whitelisted, perhaps via interaction after detecting a <a href="#header.vary" class="smpl">Vary</a> header field that indicates language negotiation might be useful.<a class="self" href="#rfc.section.9.7.p.4">&para;</a></p></div><div id="rfc.section.9.7.p.5"><p>In environments where proxies are used to enhance privacy, user agents ought to be conservative in sending proactive negotiation header fields. General-purpose user agents that provide a high degree of header field configurability ought to inform users about the loss of privacy that might result if too much detail is provided. As an extreme privacy measure, proxies could filter the proactive negotiation header fields in relayed requests.<a class="self" href="#rfc.section.9.7.p.5">&para;</a></p></div></div></div><div id="acks"><h1 id="rfc.section.10"><a href="#rfc.section.10">10.</a>&nbsp;<a href="#acks">Acknowledgments</a></h1><div id="rfc.section.10.p.1"><p>See <a href="rfc7230.html#acks" title="Acknowledgments">Section 10</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.45"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>.<a class="self" href="#rfc.section.10.p.1">&para;</a></p></div></div><h1 id="rfc.references"><a id="rfc.section.11" href="#rfc.section.11">11.</a> References</h1><h2 id="rfc.references.1"><a href="#rfc.section.11.1" id="rfc.section.11.1">11.1</a> Normative References</h2><table><tr><td class="reference"><b id="RFC2045">[RFC2045]</b></td><td class="top">Freed, N. and N. Borenstein, &#8220;<a href="https://tools.ietf.org/html/rfc2045">Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</a>&#8221;, RFC&nbsp;2045, November&nbsp;1996.</td></tr><tr><td class="reference"><b id="RFC2046">[RFC2046]</b></td><td class="top">Freed, N. and N. Borenstein, &#8220;<a href="https://tools.ietf.org/html/rfc2046">Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types</a>&#8221;, RFC&nbsp;2046, November&nbsp;1996.</td></tr><tr><td class="reference"><b id="RFC2119">[RFC2119]</b></td><td class="top">Bradner, S., &#8220;<a href="https://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>&#8221;, BCP&nbsp;14, RFC&nbsp;2119, March&nbsp;1997.</td></tr><tr><td class="reference"><b id="RFC3986">[RFC3986]</b></td><td class="top">Berners-Lee, T., Fielding, R., and L. Masinter, &#8220;<a href="https://tools.ietf.org/html/rfc3986">Uniform Resource Identifier (URI): Generic Syntax</a>&#8221;, STD&nbsp;66, RFC&nbsp;3986, January&nbsp;2005.</td></tr><tr><td class="reference"><b id="RFC4647">[RFC4647]</b></td><td class="top">Phillips, A., Ed. and M. Davis, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc4647">Matching of Language Tags</a>&#8221;, BCP&nbsp;47, RFC&nbsp;4647, September&nbsp;2006.</td></tr><tr><td class="reference"><b id="RFC5234">[RFC5234]</b></td><td class="top">Crocker, D., Ed. and P. Overell, &#8220;<a href="https://tools.ietf.org/html/rfc5234">Augmented BNF for Syntax Specifications: ABNF</a>&#8221;, STD&nbsp;68, RFC&nbsp;5234, January&nbsp;2008.</td></tr><tr><td class="reference"><b id="RFC5646">[RFC5646]</b></td><td class="top">Phillips, A., Ed. and M. Davis, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc5646">Tags for Identifying Languages</a>&#8221;, BCP&nbsp;47, RFC&nbsp;5646, September&nbsp;2009.</td></tr><tr><td class="reference"><b id="RFC6365">[RFC6365]</b></td><td class="top">Hoffman, P. and J. Klensin, &#8220;<a href="https://tools.ietf.org/html/rfc6365">Terminology Used in Internationalization in the IETF</a>&#8221;, BCP&nbsp;166, RFC&nbsp;6365, September&nbsp;2011.</td></tr><tr><td class="reference"><b id="RFC7230">[RFC7230]</b></td><td class="top">Fielding, R., Ed. and J. Reschke, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc7230">Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</a>&#8221;, RFC&nbsp;7230, June&nbsp;2014.</td></tr><tr><td class="reference"><b id="RFC7232">[RFC7232]</b></td><td class="top">Fielding, R., Ed. and J. Reschke, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc7232">Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</a>&#8221;, RFC&nbsp;7232, June&nbsp;2014.</td></tr><tr><td class="reference"><b id="RFC7233">[RFC7233]</b></td><td class="top">Fielding, R., Ed., Lafon, Y., Ed., and J. Reschke, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc7233">Hypertext Transfer Protocol (HTTP/1.1): Range Requests</a>&#8221;, RFC&nbsp;7233, June&nbsp;2014.</td></tr><tr><td class="reference"><b id="RFC7234">[RFC7234]</b></td><td class="top">Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc7234">Hypertext Transfer Protocol (HTTP/1.1): Caching</a>&#8221;, RFC&nbsp;7234, June&nbsp;2014.</td></tr><tr><td class="reference"><b id="RFC7235">[RFC7235]</b></td><td class="top">Fielding, R., Ed. and J. Reschke, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc7235">Hypertext Transfer Protocol (HTTP/1.1): Authentication</a>&#8221;, RFC&nbsp;7235, June&nbsp;2014.</td></tr></table><h2 id="rfc.references.2"><a href="#rfc.section.11.2" id="rfc.section.11.2">11.2</a> Informative References</h2><table><tr><td class="reference"><b id="BCP13">[BCP13]</b></td><td class="top">Freed, N., Klensin, J., and T. Hansen, &#8220;<a href="https://tools.ietf.org/html/rfc6838">Media Type Specifications and Registration Procedures</a>&#8221;, BCP&nbsp;13, RFC&nbsp;6838, January&nbsp;2013.</td></tr><tr><td class="reference"><b id="BCP178">[BCP178]</b></td><td class="top">Saint-Andre, P., Crocker, D., and M. Nottingham, &#8220;<a href="https://tools.ietf.org/html/rfc6648">Deprecating the "X-" Prefix and Similar Constructs in Application Protocols</a>&#8221;, BCP&nbsp;178, RFC&nbsp;6648, June&nbsp;2012.</td></tr><tr><td class="reference"><b id="BCP90">[BCP90]</b></td><td class="top">Klyne, G., Nottingham, M., and J. Mogul, &#8220;<a href="https://tools.ietf.org/html/rfc3864">Registration Procedures for Message Header Fields</a>&#8221;, BCP&nbsp;90, RFC&nbsp;3864, September&nbsp;2004.</td></tr><tr><td class="reference"><b id="OWASP">[OWASP]</b></td><td class="top">van der Stock, A., Ed., &#8220;<a href="https://www.owasp.org/">A Guide to Building Secure Web Applications and Web Services</a>&#8221;, The Open Web Application Security Project (OWASP)&nbsp;2.0.1, July&nbsp;2005, &lt;<a href="https://www.owasp.org/">https://www.owasp.org/</a>&gt;.</td></tr><tr><td class="reference"><b id="REST">[REST]</b></td><td class="top">Fielding, R., &#8220;<a href="http://roy.gbiv.com/pubs/dissertation/top.htm">Architectural Styles and the Design of Network-based Software Architectures</a>&#8221;, Doctoral Dissertation, University of California, Irvine, September&nbsp;2000, &lt;<a href="http://roy.gbiv.com/pubs/dissertation/top.htm">http://roy.gbiv.com/pubs/dissertation/top.htm</a>&gt;.</td></tr><tr><td class="reference"><b id="RFC1945">[RFC1945]</b></td><td class="top">Berners-Lee, T., Fielding, R., and H. Nielsen, &#8220;<a href="https://tools.ietf.org/html/rfc1945">Hypertext Transfer Protocol -- HTTP/1.0</a>&#8221;, RFC&nbsp;1945, May&nbsp;1996.</td></tr><tr><td class="reference"><b id="RFC2049">[RFC2049]</b></td><td class="top">Freed, N. and N. Borenstein, &#8220;<a href="https://tools.ietf.org/html/rfc2049">Multipurpose Internet Mail Extensions (MIME) Part Five: Conformance Criteria and Examples</a>&#8221;, RFC&nbsp;2049, November&nbsp;1996.</td></tr><tr><td class="reference"><b id="RFC2068">[RFC2068]</b></td><td class="top">Fielding, R., Gettys, J., Mogul, J., Nielsen, H., and T. Berners-Lee, &#8220;<a href="https://tools.ietf.org/html/rfc2068">Hypertext Transfer Protocol -- HTTP/1.1</a>&#8221;, RFC&nbsp;2068, January&nbsp;1997.</td></tr><tr><td class="reference"><b id="RFC2295">[RFC2295]</b></td><td class="top">Holtman, K. and A. Mutz, &#8220;<a href="https://tools.ietf.org/html/rfc2295">Transparent Content Negotiation in HTTP</a>&#8221;, RFC&nbsp;2295, March&nbsp;1998.</td></tr><tr><td class="reference"><b id="RFC2388">[RFC2388]</b></td><td class="top">Masinter, L., &#8220;<a href="https://tools.ietf.org/html/rfc2388">Returning Values from Forms: multipart/form-data</a>&#8221;, RFC&nbsp;2388, August&nbsp;1998.</td></tr><tr><td class="reference"><b id="RFC2557">[RFC2557]</b></td><td class="top">Palme, F., Hopmann, A., Shelness, N., and E. Stefferud, &#8220;<a href="https://tools.ietf.org/html/rfc2557">MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)</a>&#8221;, RFC&nbsp;2557, March&nbsp;1999.</td></tr><tr><td class="reference"><b id="RFC2616">[RFC2616]</b></td><td class="top">Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, &#8220;<a href="https://tools.ietf.org/html/rfc2616">Hypertext Transfer Protocol -- HTTP/1.1</a>&#8221;, RFC&nbsp;2616, June&nbsp;1999.</td></tr><tr><td class="reference"><b id="RFC2774">[RFC2774]</b></td><td class="top">Frystyk, H., Leach, P., and S. Lawrence, &#8220;<a href="https://tools.ietf.org/html/rfc2774">An HTTP Extension Framework</a>&#8221;, RFC&nbsp;2774, February&nbsp;2000.</td></tr><tr><td class="reference"><b id="RFC2817">[RFC2817]</b></td><td class="top">Khare, R. and S. Lawrence, &#8220;<a href="https://tools.ietf.org/html/rfc2817">Upgrading to TLS Within HTTP/1.1</a>&#8221;, RFC&nbsp;2817, May&nbsp;2000.</td></tr><tr><td class="reference"><b id="RFC2978">[RFC2978]</b></td><td class="top">Freed, N. and J. Postel, &#8220;<a href="https://tools.ietf.org/html/rfc2978">IANA Charset Registration Procedures</a>&#8221;, BCP&nbsp;19, RFC&nbsp;2978, October&nbsp;2000.</td></tr><tr><td class="reference"><b id="RFC5226">[RFC5226]</b></td><td class="top">Narten, T. and H. Alvestrand, &#8220;<a href="https://tools.ietf.org/html/rfc5226">Guidelines for Writing an IANA Considerations Section in RFCs</a>&#8221;, BCP&nbsp;26, RFC&nbsp;5226, May&nbsp;2008.</td></tr><tr><td class="reference"><b id="RFC5246">[RFC5246]</b></td><td class="top">Dierks, T. and E. Rescorla, &#8220;<a href="https://tools.ietf.org/html/rfc5246">The Transport Layer Security (TLS) Protocol Version 1.2</a>&#8221;, RFC&nbsp;5246, August&nbsp;2008.</td></tr><tr><td class="reference"><b id="RFC5322">[RFC5322]</b></td><td class="top">Resnick, P., &#8220;<a href="https://tools.ietf.org/html/rfc5322">Internet Message Format</a>&#8221;, RFC&nbsp;5322, October&nbsp;2008.</td></tr><tr><td class="reference"><b id="RFC5789">[RFC5789]</b></td><td class="top">Dusseault, L. and J. Snell, &#8220;<a href="https://tools.ietf.org/html/rfc5789">PATCH Method for HTTP</a>&#8221;, RFC&nbsp;5789, March&nbsp;2010.</td></tr><tr><td class="reference"><b id="RFC5905">[RFC5905]</b></td><td class="top">Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch, &#8220;<a href="https://tools.ietf.org/html/rfc5905">Network Time Protocol Version 4: Protocol and Algorithms Specification</a>&#8221;, RFC&nbsp;5905, June&nbsp;2010.</td></tr><tr><td class="reference"><b id="RFC5987">[RFC5987]</b></td><td class="top">Reschke, J., &#8220;<a href="https://tools.ietf.org/html/rfc5987">Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters</a>&#8221;, RFC&nbsp;5987, August&nbsp;2010.</td></tr><tr><td class="reference"><b id="RFC5988">[RFC5988]</b></td><td class="top">Nottingham, M., &#8220;<a href="https://tools.ietf.org/html/rfc5988">Web Linking</a>&#8221;, RFC&nbsp;5988, October&nbsp;2010.</td></tr><tr><td class="reference"><b id="RFC6265">[RFC6265]</b></td><td class="top">Barth, A., &#8220;<a href="https://tools.ietf.org/html/rfc6265">HTTP State Management Mechanism</a>&#8221;, RFC&nbsp;6265, April&nbsp;2011.</td></tr><tr><td class="reference"><b id="RFC6266">[RFC6266]</b></td><td class="top">Reschke, J., &#8220;<a href="https://tools.ietf.org/html/rfc6266">Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)</a>&#8221;, RFC&nbsp;6266, June&nbsp;2011.</td></tr><tr><td class="reference"><b id="RFC7238">[RFC7238]</b></td><td class="top">Reschke, J., &#8220;<a href="https://tools.ietf.org/html/rfc7238">The Hypertext Transfer Protocol (HTTP) Status Code 308 (Permanent Redirect)</a>&#8221;, RFC&nbsp;7238, June&nbsp;2014.</td></tr></table><div id="differences.between.http.and.mime"><h1 id="rfc.section.A" class="np"><a href="#rfc.section.A">A.</a>&nbsp;<a href="#differences.between.http.and.mime">Differences between HTTP and MIME</a></h1><div id="rfc.section.A.p.1"><p>HTTP/1.1 uses many of the constructs defined for the Internet Message Format <a href="#RFC5322" id="rfc.xref.RFC5322.7"><cite title="Internet Message Format">[RFC5322]</cite></a> and the Multipurpose Internet Mail Extensions (MIME) <a href="#RFC2045" id="rfc.xref.RFC2045.2"><cite title="Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies">[RFC2045]</cite></a> to allow a message body to be transmitted in an open variety of representations and with extensible header fields. However, RFC 2045 is focused only on email; applications of HTTP have many characteristics that differ from email; hence, HTTP has features that differ from MIME. These differences were carefully chosen to optimize performance over binary connections, to allow greater freedom in the use of new media types, to make date comparisons easier, and to acknowledge the practice of some early HTTP servers and clients.<a class="self" href="#rfc.section.A.p.1">&para;</a></p></div><div id="rfc.section.A.p.2"><p>This appendix describes specific areas where HTTP differs from MIME. Proxies and gateways to and from strict MIME environments need to be aware of these differences and provide the appropriate conversions where necessary.<a class="self" href="#rfc.section.A.p.2">&para;</a></p></div><div id="mime-version"><h2 id="rfc.section.A.1"><a href="#rfc.section.A.1">A.1</a>&nbsp;<a href="#mime-version">MIME-Version</a></h2><div id="rfc.section.A.1.p.1"><p>HTTP is not a MIME-compliant protocol. However, messages can include a single MIME-Version header field to indicate what version of the MIME protocol was used to construct the message. Use of the MIME-Version header field indicates that the message is in full conformance with the MIME protocol (as defined in <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>). Senders are responsible for ensuring full conformance (where possible) when exporting HTTP messages to strict MIME environments.<a class="self" href="#rfc.section.A.1.p.1">&para;</a></p></div></div><div id="conversion.to.canonical.form"><h2 id="rfc.section.A.2"><a href="#rfc.section.A.2">A.2</a>&nbsp;<a href="#conversion.to.canonical.form">Conversion to Canonical Form</a></h2><div id="rfc.section.A.2.p.1"><p>MIME requires that an Internet mail body part be converted to canonical form prior to being transferred, as described in <a href="https://tools.ietf.org/html/rfc2049#section-4">Section 4</a> of <a href="#RFC2049" id="rfc.xref.RFC2049.1"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Five: Conformance Criteria and Examples">[RFC2049]</cite></a>. <a href="#canonicalization.and.text.defaults" title="Canonicalization and Text Defaults">Section&nbsp;3.1.1.3</a> of this document describes the forms allowed for subtypes of the "text" media type when transmitted over HTTP. <a href="#RFC2046" id="rfc.xref.RFC2046.4"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types">[RFC2046]</cite></a> requires that content with a type of "text" represent line breaks as CRLF and forbids the use of CR or LF outside of line break sequences. HTTP allows CRLF, bare CR, and bare LF to indicate a line break within text content.<a class="self" href="#rfc.section.A.2.p.1">&para;</a></p></div><div id="rfc.section.A.2.p.2"><p>A proxy or gateway from HTTP to a strict MIME environment ought to translate all line breaks within the text media types described in <a href="#canonicalization.and.text.defaults" title="Canonicalization and Text Defaults">Section&nbsp;3.1.1.3</a> of this document to the RFC 2049 canonical form of CRLF. Note, however, this might be complicated by the presence of a <a href="#header.content-encoding" class="smpl">Content-Encoding</a> and by the fact that HTTP allows the use of some charsets that do not use octets 13 and 10 to represent CR and LF, respectively.<a class="self" href="#rfc.section.A.2.p.2">&para;</a></p></div><div id="rfc.section.A.2.p.3"><p>Conversion will break any cryptographic checksums applied to the original content unless the original content is already in canonical form. Therefore, the canonical form is recommended for any content that uses such checksums in HTTP.<a class="self" href="#rfc.section.A.2.p.3">&para;</a></p></div></div><div id="conversion.of.date.formats"><h2 id="rfc.section.A.3"><a href="#rfc.section.A.3">A.3</a>&nbsp;<a href="#conversion.of.date.formats">Conversion of Date Formats</a></h2><div id="rfc.section.A.3.p.1"><p>HTTP/1.1 uses a restricted set of date formats (<a href="#http.date" title="Date/Time Formats">Section&nbsp;7.1.1.1</a>) to simplify the process of date comparison. Proxies and gateways from other protocols ought to ensure that any <a href="#header.date" class="smpl">Date</a> header field present in a message conforms to one of the HTTP/1.1 formats and rewrite the date if necessary.<a class="self" href="#rfc.section.A.3.p.1">&para;</a></p></div></div><div id="conversion.content-encoding"><h2 id="rfc.section.A.4"><a href="#rfc.section.A.4">A.4</a>&nbsp;<a href="#conversion.content-encoding">Conversion of Content-Encoding</a></h2><div id="rfc.section.A.4.p.1"><p>MIME does not include any concept equivalent to HTTP/1.1's <a href="#header.content-encoding" class="smpl">Content-Encoding</a> header field. Since this acts as a modifier on the media type, proxies and gateways from HTTP to MIME-compliant protocols ought to either change the value of the <a href="#header.content-type" class="smpl">Content-Type</a> header field or decode the representation before forwarding the message. (Some experimental applications of Content-Type for Internet mail have used a media-type parameter of ";conversions=&lt;content-coding&gt;" to perform a function equivalent to Content-Encoding. However, this parameter is not part of the MIME standards).<a class="self" href="#rfc.section.A.4.p.1">&para;</a></p></div></div><div id="conversion.content-transfer-encoding"><h2 id="rfc.section.A.5"><a href="#rfc.section.A.5">A.5</a>&nbsp;<a href="#conversion.content-transfer-encoding">Conversion of Content-Transfer-Encoding</a></h2><div id="rfc.section.A.5.p.1"><p>HTTP does not use the Content-Transfer-Encoding field of MIME. Proxies and gateways from MIME-compliant protocols to HTTP need to remove any Content-Transfer-Encoding prior to delivering the response message to an HTTP client.<a class="self" href="#rfc.section.A.5.p.1">&para;</a></p></div><div id="rfc.section.A.5.p.2"><p>Proxies and gateways from HTTP to MIME-compliant protocols are responsible for ensuring that the message is in the correct format and encoding for safe transport on that protocol, where "safe transport" is defined by the limitations of the protocol being used. Such a proxy or gateway ought to transform and label the data with an appropriate Content-Transfer-Encoding if doing so will improve the likelihood of safe transport over the destination protocol.<a class="self" href="#rfc.section.A.5.p.2">&para;</a></p></div></div><div id="mhtml.line.length"><h2 id="rfc.section.A.6"><a href="#rfc.section.A.6">A.6</a>&nbsp;<a href="#mhtml.line.length">MHTML and Line Length Limitations</a></h2><div id="rfc.section.A.6.p.1"><p>HTTP implementations that share code with MHTML <a href="#RFC2557" id="rfc.xref.RFC2557.2"><cite title="MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)">[RFC2557]</cite></a> implementations need to be aware of MIME line length limitations. Since HTTP does not have this limitation, HTTP does not fold long lines. MHTML messages being transported by HTTP follow all conventions of MHTML, including line length limitations and folding, canonicalization, etc., since HTTP transfers message-bodies as payload and, aside from the "multipart/byteranges" type (<a href="rfc7233.html#internet.media.type.multipart.byteranges" title="Internet Media Type multipart/byteranges">Appendix A</a> of <a href="#RFC7233" id="rfc.xref.RFC7233.12"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[RFC7233]</cite></a>), does not interpret the content or any MIME header lines that might be contained therein.<a class="self" href="#rfc.section.A.6.p.1">&para;</a></p></div></div></div><div id="changes.from.rfc.2616"><h1 id="rfc.section.B"><a href="#rfc.section.B">B.</a>&nbsp;<a href="#changes.from.rfc.2616">Changes from RFC 2616</a></h1><div id="rfc.section.B.p.1"><p>The primary changes in this revision have been editorial in nature: extracting the messaging syntax and partitioning HTTP semantics into separate documents for the core features, conditional requests, partial requests, caching, and authentication. The conformance language has been revised to clearly target requirements and the terminology has been improved to distinguish payload from representations and representations from resources.<a class="self" href="#rfc.section.B.p.1">&para;</a></p></div><div id="rfc.section.B.p.2"><p>A new requirement has been added that semantics embedded in a URI be disabled when those semantics are inconsistent with the request method, since this is a common cause of interoperability failure. (<a href="#resources" title="Resources">Section&nbsp;2</a>)<a class="self" href="#rfc.section.B.p.2">&para;</a></p></div><div id="rfc.section.B.p.3"><p>An algorithm has been added for determining if a payload is associated with a specific identifier. (<a href="#identifying.payload" title="Identifying a Representation">Section&nbsp;3.1.4.1</a>)<a class="self" href="#rfc.section.B.p.3">&para;</a></p></div><div id="rfc.section.B.p.4"><p>The default charset of ISO-8859-1 for text media types has been removed; the default is now whatever the media type definition says. Likewise, special treatment of ISO-8859-1 has been removed from the <a href="#header.accept-charset" class="smpl">Accept-Charset</a> header field. (<a href="#canonicalization.and.text.defaults" title="Canonicalization and Text Defaults">Section&nbsp;3.1.1.3</a> and <a href="#header.accept-charset" id="rfc.xref.header.accept-charset.3" title="Accept-Charset">Section&nbsp;5.3.3</a>)<a class="self" href="#rfc.section.B.p.4">&para;</a></p></div><div id="rfc.section.B.p.5"><p>The definition of <a href="#header.content-location" class="smpl">Content-Location</a> has been changed to no longer affect the base URI for resolving relative URI references, due to poor implementation support and the undesirable effect of potentially breaking relative links in content-negotiated resources. (<a href="#header.content-location" id="rfc.xref.header.content-location.5" title="Content-Location">Section&nbsp;3.1.4.2</a>)<a class="self" href="#rfc.section.B.p.5">&para;</a></p></div><div id="rfc.section.B.p.6"><p>To be consistent with the method-neutral parsing algorithm of <a href="#RFC7230" id="rfc.xref.RFC7230.46"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>, the definition of GET has been relaxed so that requests can have a body, even though a body has no meaning for GET. (<a href="#GET" id="rfc.xref.GET.6" title="GET">Section&nbsp;4.3.1</a>)<a class="self" href="#rfc.section.B.p.6">&para;</a></p></div><div id="rfc.section.B.p.7"><p>Servers are no longer required to handle all Content-* header fields and use of <a href="rfc7233.html#header.content-range" class="smpl">Content-Range</a> has been explicitly banned in PUT requests. (<a href="#PUT" id="rfc.xref.PUT.5" title="PUT">Section&nbsp;4.3.4</a>)<a class="self" href="#rfc.section.B.p.7">&para;</a></p></div><div id="rfc.section.B.p.8"><p>Definition of the CONNECT method has been moved from <a href="#RFC2817" id="rfc.xref.RFC2817.2"><cite title="Upgrading to TLS Within HTTP/1.1">[RFC2817]</cite></a> to this specification. (<a href="#CONNECT" id="rfc.xref.CONNECT.3" title="CONNECT">Section&nbsp;4.3.6</a>)<a class="self" href="#rfc.section.B.p.8">&para;</a></p></div><div id="rfc.section.B.p.9"><p>The <a href="#OPTIONS" class="smpl" id="rfc.extref.o.11">OPTIONS</a> and <a href="#TRACE" class="smpl" id="rfc.extref.t.50">TRACE</a> request methods have been defined as being safe. (<a href="#OPTIONS" id="rfc.xref.OPTIONS.4" title="OPTIONS">Section&nbsp;4.3.7</a> and <a href="#TRACE" id="rfc.xref.TRACE.4" title="TRACE">Section&nbsp;4.3.8</a>)<a class="self" href="#rfc.section.B.p.9">&para;</a></p></div><div id="rfc.section.B.p.10"><p>The <a href="#header.expect" class="smpl">Expect</a> header field's extension mechanism has been removed due to widely-deployed broken implementations. (<a href="#header.expect" id="rfc.xref.header.expect.5" title="Expect">Section&nbsp;5.1.1</a>)<a class="self" href="#rfc.section.B.p.10">&para;</a></p></div><div id="rfc.section.B.p.11"><p>The <a href="#header.max-forwards" class="smpl">Max-Forwards</a> header field has been restricted to the <a href="#OPTIONS" class="smpl" id="rfc.extref.o.12">OPTIONS</a> and <a href="#TRACE" class="smpl" id="rfc.extref.t.51">TRACE</a> methods; previously, extension methods could have used it as well. (<a href="#header.max-forwards" id="rfc.xref.header.max-forwards.5" title="Max-Forwards">Section&nbsp;5.1.2</a>)<a class="self" href="#rfc.section.B.p.11">&para;</a></p></div><div id="rfc.section.B.p.12"><p>The "about:blank" URI has been suggested as a value for the <a href="#header.referer" class="smpl">Referer</a> header field when no referring URI is applicable, which distinguishes that case from others where the Referer field is not sent or has been removed. (<a href="#header.referer" id="rfc.xref.header.referer.4" title="Referer">Section&nbsp;5.5.2</a>)<a class="self" href="#rfc.section.B.p.12">&para;</a></p></div><div id="rfc.section.B.p.13"><p>The following status codes are now cacheable (that is, they can be stored and reused by a cache without explicit freshness information present): 204, 404, 405, 414, 501. (<a href="#status.codes" title="Response Status Codes">Section&nbsp;6</a>)<a class="self" href="#rfc.section.B.p.13">&para;</a></p></div><div id="rfc.section.B.p.14"><p>The <a href="#status.201" class="smpl">201 (Created)</a> status description has been changed to allow for the possibility that more than one resource has been created. (<a href="#status.201" id="rfc.xref.status.201.3" title="201 Created">Section&nbsp;6.3.2</a>)<a class="self" href="#rfc.section.B.p.14">&para;</a></p></div><div id="rfc.section.B.p.15"><p>The definition of <a href="#status.203" class="smpl">203 (Non-Authoritative Information)</a> has been broadened to include cases of payload transformations as well. (<a href="#status.203" id="rfc.xref.status.203.3" title="203 Non-Authoritative Information">Section&nbsp;6.3.4</a>)<a class="self" href="#rfc.section.B.p.15">&para;</a></p></div><div id="rfc.section.B.p.16"><p>The set of request methods that are safe to automatically redirect is no longer closed; user agents are able to make that determination based upon the request method semantics. The redirect status codes <a href="#status.301" class="smpl">301</a>, <a href="#status.302" class="smpl">302</a>, and <a href="#status.307" class="smpl">307</a> no longer have normative requirements on response payloads and user interaction. (<a href="#status.3xx" id="rfc.xref.status.3xx.1" title="Redirection 3xx">Section&nbsp;6.4</a>)<a class="self" href="#rfc.section.B.p.16">&para;</a></p></div><div id="rfc.section.B.p.17"><p>The status codes <a href="#status.301" class="smpl">301</a> and <a href="#status.302" class="smpl">302</a> have been changed to allow user agents to rewrite the method from POST to GET. (Sections <a href="#status.301" id="rfc.xref.status.301.3" title="301 Moved Permanently">6.4.2</a> and <a href="#status.302" id="rfc.xref.status.302.3" title="302 Found">6.4.3</a>)<a class="self" href="#rfc.section.B.p.17">&para;</a></p></div><div id="rfc.section.B.p.18"><p>The description of the <a href="#status.303" class="smpl">303 (See Other)</a> status code has been changed to allow it to be cached if explicit freshness information is given, and a specific definition has been added for a 303 response to GET. (<a href="#status.303" id="rfc.xref.status.303.3" title="303 See Other">Section&nbsp;6.4.4</a>)<a class="self" href="#rfc.section.B.p.18">&para;</a></p></div><div id="rfc.section.B.p.19"><p>The <a href="#status.305" class="smpl">305 (Use Proxy)</a> status code has been deprecated due to security concerns regarding in-band configuration of a proxy. (<a href="#status.305" id="rfc.xref.status.305.3" title="305 Use Proxy">Section&nbsp;6.4.5</a>)<a class="self" href="#rfc.section.B.p.19">&para;</a></p></div><div id="rfc.section.B.p.20"><p>The <a href="#status.400" class="smpl">400 (Bad Request)</a> status code has been relaxed so that it isn't limited to syntax errors. (<a href="#status.400" id="rfc.xref.status.400.3" title="400 Bad Request">Section&nbsp;6.5.1</a>)<a class="self" href="#rfc.section.B.p.20">&para;</a></p></div><div id="rfc.section.B.p.21"><p>The <a href="#status.426" class="smpl">426 (Upgrade Required)</a> status code has been incorporated from <a href="#RFC2817" id="rfc.xref.RFC2817.3"><cite title="Upgrading to TLS Within HTTP/1.1">[RFC2817]</cite></a>. (<a href="#status.426" id="rfc.xref.status.426.3" title="426 Upgrade Required">Section&nbsp;6.5.15</a>)<a class="self" href="#rfc.section.B.p.21">&para;</a></p></div><div id="rfc.section.B.p.22"><p>The target of requirements on HTTP-date and the Date header field have been reduced to those systems generating the date, rather than all systems sending a date. (<a href="#origination.date" title="Origination Date">Section&nbsp;7.1.1</a>)<a class="self" href="#rfc.section.B.p.22">&para;</a></p></div><div id="rfc.section.B.p.23"><p>The syntax of the <a href="#header.location" class="smpl">Location</a> header field has been changed to allow all URI references, including relative references and fragments, along with some clarifications as to when use of fragments would not be appropriate. (<a href="#header.location" id="rfc.xref.header.location.6" title="Location">Section&nbsp;7.1.2</a>)<a class="self" href="#rfc.section.B.p.23">&para;</a></p></div><div id="rfc.section.B.p.24"><p><a href="#header.allow" class="smpl">Allow</a> has been reclassified as a response header field, removing the option to specify it in a PUT request. Requirements relating to the content of Allow have been relaxed; correspondingly, clients are not required to always trust its value. (<a href="#header.allow" id="rfc.xref.header.allow.4" title="Allow">Section&nbsp;7.4.1</a>)<a class="self" href="#rfc.section.B.p.24">&para;</a></p></div><div id="rfc.section.B.p.25"><p>A Method Registry has been defined. (<a href="#method.registry" title="Method Registry">Section&nbsp;8.1</a>)<a class="self" href="#rfc.section.B.p.25">&para;</a></p></div><div id="rfc.section.B.p.26"><p>The Status Code Registry has been redefined by this specification; previously, it was defined in <a href="https://tools.ietf.org/html/rfc2817#section-7.1">Section 7.1</a> of <a href="#RFC2817" id="rfc.xref.RFC2817.4"><cite title="Upgrading to TLS Within HTTP/1.1">[RFC2817]</cite></a>. (<a href="#status.code.registry" title="Status Code Registry">Section&nbsp;8.2</a>)<a class="self" href="#rfc.section.B.p.26">&para;</a></p></div><div id="rfc.section.B.p.27"><p>Registration of content codings has been changed to require IETF Review. (<a href="#content.coding.registry" title="Content Coding Registry">Section&nbsp;8.4</a>)<a class="self" href="#rfc.section.B.p.27">&para;</a></p></div><div id="rfc.section.B.p.28"><p>The Content-Disposition header field has been removed since it is now defined by <a href="#RFC6266" id="rfc.xref.RFC6266.1"><cite title="Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)">[RFC6266]</cite></a>.<a class="self" href="#rfc.section.B.p.28">&para;</a></p></div><div id="rfc.section.B.p.29"><p>The Content-MD5 header field has been removed because it was inconsistently implemented with respect to partial responses.<a class="self" href="#rfc.section.B.p.29">&para;</a></p></div></div><div id="imported.abnf"><h1 id="rfc.section.C"><a href="#rfc.section.C">C.</a>&nbsp;<a href="#imported.abnf">Imported ABNF</a></h1><div id="rfc.section.C.p.1"><p>The following core rules are included by reference, as defined in <a href="https://tools.ietf.org/html/rfc5234#appendix-B.1">Appendix B.1</a> of <a href="#RFC5234" id="rfc.xref.RFC5234.3"><cite title="Augmented BNF for Syntax Specifications: ABNF">[RFC5234]</cite></a>: ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote), HEXDIG (hexadecimal 0-9/A-F/a-f), HTAB (horizontal tab), LF (line feed), OCTET (any 8-bit sequence of data), SP (space), and VCHAR (any visible US-ASCII character).<a class="self" href="#rfc.section.C.p.1">&para;</a></p></div><div id="rfc.section.C.p.2"><p>The rules below are defined in <a href="#RFC7230" id="rfc.xref.RFC7230.47"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>:<a class="self" href="#rfc.section.C.p.2">&para;</a></p></div><div id="rfc.figure.u.65"><pre class="inline">  <a href="#imported.abnf" class="smpl">BWS</a>           = &lt;BWS, see <a href="#RFC7230" id="rfc.xref.RFC7230.48"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>, <a href="rfc7230.html#whitespace" title="Whitespace">Section 3.2.3</a>&gt; 
     687</pre></div><div id="rfc.section.8.3.1.p.8"><p>Note that double-quote delimiters almost always are used with the quoted-string production; using a different syntax inside double-quotes will likely cause unnecessary confusion.<a class="self" href="#rfc.section.8.3.1.p.8">&para;</a></p></div><div id="rfc.section.8.3.1.p.9"><p>Many header fields use a format including (case-insensitively) named parameters (for instance, <a href="#header.content-type" class="smpl">Content-Type</a>, defined in <a href="#header.content-type" id="rfc.xref.header.content-type.3" title="Content-Type">Section&nbsp;3.1.1.5</a>). Allowing both unquoted (token) and quoted (quoted-string) syntax for the parameter value enables recipients to use existing parser components. When allowing both forms, the meaning of a parameter value ought to be independent of the syntax used for it (for an example, see the notes on parameter handling for media types in <a href="#media.type" title="Media Type">Section&nbsp;3.1.1.1</a>).<a class="self" href="#rfc.section.8.3.1.p.9">&para;</a></p></div><div id="rfc.section.8.3.1.p.10"><p>Authors of specifications defining new header fields are advised to consider documenting: <a class="self" href="#rfc.section.8.3.1.p.10">&para;</a></p><ul><li><p>Whether the field is a single value or whether it can be a list (delimited by commas; see <a href="rfc7230.html#header.fields" title="Header Fields">Section 3.2</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.37"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>).</p><p>If it does not use the list syntax, document how to treat messages where the field occurs multiple times (a sensible default would be to ignore the field, but this might not always be the right choice).</p><p>Note that intermediaries and software libraries might combine multiple header field instances into a single one, despite the field's definition not allowing the list syntax. A robust format enables recipients to discover these situations (good example: "Content-Type", as the comma can only appear inside quoted strings; bad example: "Location", as a comma can occur inside a URI).</p></li><li><p>Under what conditions the header field can be used; e.g., only in responses or requests, in all messages, only on responses to a particular request method, etc.</p></li><li><p>Whether the field should be stored by origin servers that understand it upon a PUT request.</p></li><li><p>Whether the field semantics are further refined by the context, such as by existing request methods or status codes.</p></li><li><p>Whether it is appropriate to list the field-name in the <a href="rfc7230.html#header.connection" class="smpl">Connection</a> header field (i.e., if the header field is to be hop-by-hop; see <a href="rfc7230.html#header.connection" title="Connection">Section 6.1</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.38"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>).</p></li><li><p>Under what conditions intermediaries are allowed to insert, delete, or modify the field's value.</p></li><li><p>Whether it is appropriate to list the field-name in a <a href="#header.vary" class="smpl">Vary</a> response header field (e.g., when the request header field is used by an origin server's content selection algorithm; see <a href="#header.vary" id="rfc.xref.header.vary.3" title="Vary">Section&nbsp;7.1.4</a>).</p></li><li><p>Whether the header field is useful or allowable in trailers (see <a href="rfc7230.html#chunked.encoding" title="Chunked Transfer Coding">Section 4.1</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.39"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>).</p></li><li><p>Whether the header field ought to be preserved across redirects.</p></li><li><p>Whether it introduces any additional security considerations, such as disclosure of privacy-related data.</p></li></ul></div></div><div id="header.field.registration"><h3 id="rfc.section.8.3.2"><a href="#rfc.section.8.3.2">8.3.2</a>&nbsp;<a href="#header.field.registration">Registrations</a></h3><div id="rfc.section.8.3.2.p.1" class="avoidbreakafter"><p>The "Message Headers" registry has been updated with the following permanent registrations:<a class="self" href="#rfc.section.8.3.2.p.1">&para;</a></p></div><div id="rfc.table.4"><div id="iana.header.registration.table"></div><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Header Field Name</th><th>Protocol</th><th>Status</th><th>Reference</th></tr></thead><tbody><tr><td class="left">Accept</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.accept" id="rfc.xref.header.accept.3" title="Accept">Section&nbsp;5.3.2</a> </td></tr><tr><td class="left">Accept-Charset</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.accept-charset" id="rfc.xref.header.accept-charset.2" title="Accept-Charset">Section&nbsp;5.3.3</a> </td></tr><tr><td class="left">Accept-Encoding</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.accept-encoding" id="rfc.xref.header.accept-encoding.3" title="Accept-Encoding">Section&nbsp;5.3.4</a> </td></tr><tr><td class="left">Accept-Language</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.accept-language" id="rfc.xref.header.accept-language.3" title="Accept-Language">Section&nbsp;5.3.5</a> </td></tr><tr><td class="left">Allow</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.allow" id="rfc.xref.header.allow.3" title="Allow">Section&nbsp;7.4.1</a> </td></tr><tr><td class="left">Content-Encoding</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.content-encoding" id="rfc.xref.header.content-encoding.3" title="Content-Encoding">Section&nbsp;3.1.2.2</a> </td></tr><tr><td class="left">Content-Language</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.content-language" id="rfc.xref.header.content-language.2" title="Content-Language">Section&nbsp;3.1.3.2</a> </td></tr><tr><td class="left">Content-Location</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.content-location" id="rfc.xref.header.content-location.4" title="Content-Location">Section&nbsp;3.1.4.2</a> </td></tr><tr><td class="left">Content-Type</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.content-type" id="rfc.xref.header.content-type.4" title="Content-Type">Section&nbsp;3.1.1.5</a> </td></tr><tr><td class="left">Date</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.date" id="rfc.xref.header.date.3" title="Date">Section&nbsp;7.1.1.2</a> </td></tr><tr><td class="left">Expect</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.expect" id="rfc.xref.header.expect.4" title="Expect">Section&nbsp;5.1.1</a> </td></tr><tr><td class="left">From</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.from" id="rfc.xref.header.from.2" title="From">Section&nbsp;5.5.1</a> </td></tr><tr><td class="left">Location</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.location" id="rfc.xref.header.location.4" title="Location">Section&nbsp;7.1.2</a> </td></tr><tr><td class="left">Max-Forwards</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.max-forwards" id="rfc.xref.header.max-forwards.4" title="Max-Forwards">Section&nbsp;5.1.2</a> </td></tr><tr><td class="left">MIME-Version</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#mime-version" id="rfc.xref.mime-version.1" title="MIME-Version">Appendix&nbsp;A.1</a> </td></tr><tr><td class="left">Referer</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.referer" id="rfc.xref.header.referer.2" title="Referer">Section&nbsp;5.5.2</a> </td></tr><tr><td class="left">Retry-After</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.retry-after" id="rfc.xref.header.retry-after.3" title="Retry-After">Section&nbsp;7.1.3</a> </td></tr><tr><td class="left">Server</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.server" id="rfc.xref.header.server.2" title="Server">Section&nbsp;7.4.2</a> </td></tr><tr><td class="left">User-Agent</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.user-agent" id="rfc.xref.header.user-agent.3" title="User-Agent">Section&nbsp;5.5.3</a> </td></tr><tr><td class="left">Vary</td><td class="left">http</td><td class="left">standard</td><td class="left"><a href="#header.vary" id="rfc.xref.header.vary.4" title="Vary">Section&nbsp;7.1.4</a> </td></tr></tbody></table></div><div id="rfc.section.8.3.2.p.2"><p>The change controller for the above registrations is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".<a class="self" href="#rfc.section.8.3.2.p.2">&para;</a></p></div></div></div><div id="content.coding.registry"><h2 id="rfc.section.8.4"><a href="#rfc.section.8.4">8.4</a>&nbsp;<a href="#content.coding.registry">Content Coding Registry</a></h2><div id="rfc.section.8.4.p.1"><p>The "HTTP Content Coding Registry" defines the namespace for content coding names (<a href="rfc7230.html#compression.codings" title="Compression Codings">Section 4.2</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.40"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>). The content coding registry is maintained at &lt;<a href="http://www.iana.org/assignments/http-parameters">http://www.iana.org/assignments/http-parameters</a>&gt;.<a class="self" href="#rfc.section.8.4.p.1">&para;</a></p></div><div id="content.coding.procedure"><h3 id="rfc.section.8.4.1"><a href="#rfc.section.8.4.1">8.4.1</a>&nbsp;<a href="#content.coding.procedure">Procedure</a></h3><div id="rfc.section.8.4.1.p.1"><p>Content coding registrations <em class="bcp14">MUST</em> include the following fields: <a class="self" href="#rfc.section.8.4.1.p.1">&para;</a></p><ul><li>Name</li><li>Description</li><li>Pointer to specification text</li></ul></div><div id="rfc.section.8.4.1.p.2"><p>Names of content codings <em class="bcp14">MUST NOT</em> overlap with names of transfer codings (<a href="rfc7230.html#transfer.codings" title="Transfer Codings">Section 4</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.41"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>), unless the encoding transformation is identical (as is the case for the compression codings defined in <a href="rfc7230.html#compression.codings" title="Compression Codings">Section 4.2</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.42"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>).<a class="self" href="#rfc.section.8.4.1.p.2">&para;</a></p></div><div id="rfc.section.8.4.1.p.3"><p>Values to be added to this namespace require IETF Review (see <a href="https://tools.ietf.org/html/rfc5226#section-4.1">Section 4.1</a> of <a href="#RFC5226" id="rfc.xref.RFC5226.3"><cite title="Guidelines for Writing an IANA Considerations Section in RFCs">[RFC5226]</cite></a>) and <em class="bcp14">MUST</em> conform to the purpose of content coding defined in this section.<a class="self" href="#rfc.section.8.4.1.p.3">&para;</a></p></div></div><div id="content.coding.registration"><h3 id="rfc.section.8.4.2"><a href="#rfc.section.8.4.2">8.4.2</a>&nbsp;<a href="#content.coding.registration">Registrations</a></h3><div id="rfc.section.8.4.2.p.1" class="avoidbreakafter"><p>The "HTTP Content Coding Registry" has been updated with the registrations below:<a class="self" href="#rfc.section.8.4.2.p.1">&para;</a></p></div><div id="rfc.table.5"><div id="iana.content.coding.registration.table"></div><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th>Name</th><th>Description</th><th>Reference</th></tr></thead><tbody><tr><td class="left">identity</td><td class="left">Reserved (synonym for "no encoding" in <a href="#header.accept-encoding" class="smpl">Accept-Encoding</a>)</td><td class="left"><a href="#header.accept-encoding" id="rfc.xref.header.accept-encoding.4" title="Accept-Encoding">Section&nbsp;5.3.4</a> </td></tr></tbody></table></div></div></div></div><div id="security.considerations"><h1 id="rfc.section.9"><a href="#rfc.section.9">9.</a>&nbsp;<a href="#security.considerations">Security Considerations</a></h1><div id="rfc.section.9.p.1"><p>This section is meant to inform developers, information providers, and users of known security concerns relevant to HTTP semantics and its use for transferring information over the Internet. Considerations related to message syntax, parsing, and routing are discussed in <a href="rfc7230.html#security.considerations" title="Security Considerations">Section 9</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.43"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>.<a class="self" href="#rfc.section.9.p.1">&para;</a></p></div><div id="rfc.section.9.p.2"><p>The list of considerations below is not exhaustive. Most security concerns related to HTTP semantics are about securing server-side applications (code behind the HTTP interface), securing user agent processing of payloads received via HTTP, or secure use of the Internet in general, rather than security of the protocol. Various organizations maintain topical information and links to current research on Web application security (e.g., <a href="#OWASP" id="rfc.xref.OWASP.1"><cite title="A Guide to Building Secure Web Applications and Web Services">[OWASP]</cite></a>).<a class="self" href="#rfc.section.9.p.2">&para;</a></p></div><div id="attack.pathname"><h2 id="rfc.section.9.1"><a href="#rfc.section.9.1">9.1</a>&nbsp;<a href="#attack.pathname">Attacks Based on File and Path Names</a></h2><div id="rfc.section.9.1.p.1"><p>Origin servers frequently make use of their local file system to manage the mapping from effective request URI to resource representations. Most file systems are not designed to protect against malicious file or path names. Therefore, an origin server needs to avoid accessing names that have a special significance to the system when mapping the request target to files, folders, or directories.<a class="self" href="#rfc.section.9.1.p.1">&para;</a></p></div><div id="rfc.section.9.1.p.2"><p>For example, UNIX, Microsoft Windows, and other operating systems use ".." as a path component to indicate a directory level above the current one, and they use specially named paths or file names to send data to system devices. Similar naming conventions might exist within other types of storage systems. Likewise, local storage systems have an annoying tendency to prefer user-friendliness over security when handling invalid or unexpected characters, recomposition of decomposed characters, and case-normalization of case-insensitive names.<a class="self" href="#rfc.section.9.1.p.2">&para;</a></p></div><div id="rfc.section.9.1.p.3"><p>Attacks based on such special names tend to focus on either denial-of-service (e.g., telling the server to read from a COM port) or disclosure of configuration and source files that are not meant to be served.<a class="self" href="#rfc.section.9.1.p.3">&para;</a></p></div></div><div id="attack.injection"><h2 id="rfc.section.9.2"><a href="#rfc.section.9.2">9.2</a>&nbsp;<a href="#attack.injection">Attacks Based on Command, Code, or Query Injection</a></h2><div id="rfc.section.9.2.p.1"><p>Origin servers often use parameters within the URI as a means of identifying system services, selecting database entries, or choosing a data source. However, data received in a request cannot be trusted. An attacker could construct any of the request data elements (method, request-target, header fields, or body) to contain data that might be misinterpreted as a command, code, or query when passed through a command invocation, language interpreter, or database interface.<a class="self" href="#rfc.section.9.2.p.1">&para;</a></p></div><div id="rfc.section.9.2.p.2"><p>For example, SQL injection is a common attack wherein additional query language is inserted within some part of the request-target or header fields (e.g., <a href="rfc7230.html#header.host" class="smpl">Host</a>, <a href="#header.referer" class="smpl">Referer</a>, etc.). If the received data is used directly within a SELECT statement, the query language might be interpreted as a database command instead of a simple string value. This type of implementation vulnerability is extremely common, in spite of being easy to prevent.<a class="self" href="#rfc.section.9.2.p.2">&para;</a></p></div><div id="rfc.section.9.2.p.3"><p>In general, resource implementations ought to avoid use of request data in contexts that are processed or interpreted as instructions. Parameters ought to be compared to fixed strings and acted upon as a result of that comparison, rather than passed through an interface that is not prepared for untrusted data. Received data that isn't based on fixed parameters ought to be carefully filtered or encoded to avoid being misinterpreted.<a class="self" href="#rfc.section.9.2.p.3">&para;</a></p></div><div id="rfc.section.9.2.p.4"><p>Similar considerations apply to request data when it is stored and later processed, such as within log files, monitoring tools, or when included within a data format that allows embedded scripts.<a class="self" href="#rfc.section.9.2.p.4">&para;</a></p></div></div><div id="personal.information"><h2 id="rfc.section.9.3"><a href="#rfc.section.9.3">9.3</a>&nbsp;<a href="#personal.information">Disclosure of Personal Information</a></h2><div id="rfc.section.9.3.p.1"><p>Clients are often privy to large amounts of personal information, including both information provided by the user to interact with resources (e.g., the user's name, location, mail address, passwords, encryption keys, etc.) and information about the user's browsing activity over time (e.g., history, bookmarks, etc.). Implementations need to prevent unintentional disclosure of personal information.<a class="self" href="#rfc.section.9.3.p.1">&para;</a></p></div></div><div id="sensitive.information.in.uris"><h2 id="rfc.section.9.4"><a href="#rfc.section.9.4">9.4</a>&nbsp;<a href="#sensitive.information.in.uris">Disclosure of Sensitive Information in URIs</a></h2><div id="rfc.section.9.4.p.1"><p>URIs are intended to be shared, not secured, even when they identify secure resources. URIs are often shown on displays, added to templates when a page is printed, and stored in a variety of unprotected bookmark lists. It is therefore unwise to include information within a URI that is sensitive, personally identifiable, or a risk to disclose.<a class="self" href="#rfc.section.9.4.p.1">&para;</a></p></div><div id="rfc.section.9.4.p.2"><p>Authors of services ought to avoid GET-based forms for the submission of sensitive data because that data will be placed in the request-target. Many existing servers, proxies, and user agents log or display the request-target in places where it might be visible to third parties. Such services ought to use POST-based form submission instead.<a class="self" href="#rfc.section.9.4.p.2">&para;</a></p></div><div id="rfc.section.9.4.p.3"><p>Since the <a href="#header.referer" class="smpl">Referer</a> header field tells a target site about the context that resulted in a request, it has the potential to reveal information about the user's immediate browsing history and any personal information that might be found in the referring resource's URI. Limitations on the Referer header field are described in <a href="#header.referer" id="rfc.xref.header.referer.3" title="Referer">Section&nbsp;5.5.2</a> to address some of its security considerations.<a class="self" href="#rfc.section.9.4.p.3">&para;</a></p></div></div><div id="fragment.disclosure"><h2 id="rfc.section.9.5"><a href="#rfc.section.9.5">9.5</a>&nbsp;<a href="#fragment.disclosure">Disclosure of Fragment after Redirects</a></h2><div id="rfc.section.9.5.p.1"><p>Although fragment identifiers used within URI references are not sent in requests, implementers ought to be aware that they will be visible to the user agent and any extensions or scripts running as a result of the response. In particular, when a redirect occurs and the original request's fragment identifier is inherited by the new reference in <a href="#header.location" class="smpl">Location</a> (<a href="#header.location" id="rfc.xref.header.location.5" title="Location">Section&nbsp;7.1.2</a>), this might have the effect of disclosing one site's fragment to another site. If the first site uses personal information in fragments, it ought to ensure that redirects to other sites include a (possibly empty) fragment component in order to block that inheritance.<a class="self" href="#rfc.section.9.5.p.1">&para;</a></p></div></div><div id="disclosure.product.information"><h2 id="rfc.section.9.6"><a href="#rfc.section.9.6">9.6</a>&nbsp;<a href="#disclosure.product.information">Disclosure of Product Information</a></h2><div id="rfc.section.9.6.p.1"><p>The <a href="#header.user-agent" class="smpl">User-Agent</a> (<a href="#header.user-agent" id="rfc.xref.header.user-agent.4" title="User-Agent">Section&nbsp;5.5.3</a>), <a href="rfc7230.html#header.via" class="smpl">Via</a> (<a href="rfc7230.html#header.via" title="Via">Section 5.7.1</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.44"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>), and <a href="#header.server" class="smpl">Server</a> (<a href="#header.server" id="rfc.xref.header.server.3" title="Server">Section&nbsp;7.4.2</a>) header fields often reveal information about the respective sender's software systems. In theory, this can make it easier for an attacker to exploit known security holes; in practice, attackers tend to try all potential holes regardless of the apparent software versions being used.<a class="self" href="#rfc.section.9.6.p.1">&para;</a></p></div><div id="rfc.section.9.6.p.2"><p>Proxies that serve as a portal through a network firewall ought to take special precautions regarding the transfer of header information that might identify hosts behind the firewall. The <a href="rfc7230.html#header.via" class="smpl">Via</a> header field allows intermediaries to replace sensitive machine names with pseudonyms.<a class="self" href="#rfc.section.9.6.p.2">&para;</a></p></div></div><div id="fingerprinting"><h2 id="rfc.section.9.7"><a href="#rfc.section.9.7">9.7</a>&nbsp;<a href="#fingerprinting">Browser Fingerprinting</a></h2><div id="rfc.section.9.7.p.1"><p>Browser fingerprinting is a set of techniques for identifying a specific user agent over time through its unique set of characteristics. These characteristics might include information related to its TCP behavior, feature capabilities, and scripting environment, though of particular interest here is the set of unique characteristics that might be communicated via HTTP. Fingerprinting is considered a privacy concern because it enables tracking of a user agent's behavior over time without the corresponding controls that the user might have over other forms of data collection (e.g., cookies). Many general-purpose user agents (i.e., Web browsers) have taken steps to reduce their fingerprints.<a class="self" href="#rfc.section.9.7.p.1">&para;</a></p></div><div id="rfc.section.9.7.p.2"><p>There are a number of request header fields that might reveal information to servers that is sufficiently unique to enable fingerprinting. The <a href="#header.from" class="smpl">From</a> header field is the most obvious, though it is expected that From will only be sent when self-identification is desired by the user. Likewise, Cookie header fields are deliberately designed to enable re-identification, so fingerprinting concerns only apply to situations where cookies are disabled or restricted by the user agent's configuration.<a class="self" href="#rfc.section.9.7.p.2">&para;</a></p></div><div id="rfc.section.9.7.p.3"><p>The <a href="#header.user-agent" class="smpl">User-Agent</a> header field might contain enough information to uniquely identify a specific device, usually when combined with other characteristics, particularly if the user agent sends excessive details about the user's system or extensions. However, the source of unique information that is least expected by users is <a href="#proactive.negotiation" class="smpl">proactive negotiation</a> (<a href="#request.conneg" title="Content Negotiation">Section&nbsp;5.3</a>), including the <a href="#header.accept" class="smpl">Accept</a>, <a href="#header.accept-charset" class="smpl">Accept-Charset</a>, <a href="#header.accept-encoding" class="smpl">Accept-Encoding</a>, and <a href="#header.accept-language" class="smpl">Accept-Language</a> header fields.<a class="self" href="#rfc.section.9.7.p.3">&para;</a></p></div><div id="rfc.section.9.7.p.4"><p>In addition to the fingerprinting concern, detailed use of the <a href="#header.accept-language" class="smpl">Accept-Language</a> header field can reveal information the user might consider to be of a private nature. For example, understanding a given language set might be strongly correlated to membership in a particular ethnic group. An approach that limits such loss of privacy would be for a user agent to omit the sending of Accept-Language except for sites that have been whitelisted, perhaps via interaction after detecting a <a href="#header.vary" class="smpl">Vary</a> header field that indicates language negotiation might be useful.<a class="self" href="#rfc.section.9.7.p.4">&para;</a></p></div><div id="rfc.section.9.7.p.5"><p>In environments where proxies are used to enhance privacy, user agents ought to be conservative in sending proactive negotiation header fields. General-purpose user agents that provide a high degree of header field configurability ought to inform users about the loss of privacy that might result if too much detail is provided. As an extreme privacy measure, proxies could filter the proactive negotiation header fields in relayed requests.<a class="self" href="#rfc.section.9.7.p.5">&para;</a></p></div></div></div><div id="acks"><h1 id="rfc.section.10"><a href="#rfc.section.10">10.</a>&nbsp;<a href="#acks">Acknowledgments</a></h1><div id="rfc.section.10.p.1"><p>See <a href="rfc7230.html#acks" title="Acknowledgments">Section 10</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.45"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>.<a class="self" href="#rfc.section.10.p.1">&para;</a></p></div></div><h1 id="rfc.references"><a id="rfc.section.11" href="#rfc.section.11">11.</a> References</h1><h2 id="rfc.references.1"><a href="#rfc.section.11.1" id="rfc.section.11.1">11.1</a> Normative References</h2><table><tr><td class="reference"><b id="RFC2045">[RFC2045]</b></td><td class="top">Freed, N. and N. Borenstein, &#8220;<a href="https://tools.ietf.org/html/rfc2045">Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</a>&#8221;, RFC&nbsp;2045, November&nbsp;1996.</td></tr><tr><td class="reference"><b id="RFC2046">[RFC2046]</b></td><td class="top">Freed, N. and N. Borenstein, &#8220;<a href="https://tools.ietf.org/html/rfc2046">Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types</a>&#8221;, RFC&nbsp;2046, November&nbsp;1996.</td></tr><tr><td class="reference"><b id="RFC2119">[RFC2119]</b></td><td class="top">Bradner, S., &#8220;<a href="https://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>&#8221;, BCP&nbsp;14, RFC&nbsp;2119, March&nbsp;1997.</td></tr><tr><td class="reference"><b id="RFC3986">[RFC3986]</b></td><td class="top">Berners-Lee, T., Fielding, R., and L. Masinter, &#8220;<a href="https://tools.ietf.org/html/rfc3986">Uniform Resource Identifier (URI): Generic Syntax</a>&#8221;, STD&nbsp;66, RFC&nbsp;3986, January&nbsp;2005.</td></tr><tr><td class="reference"><b id="RFC4647">[RFC4647]</b></td><td class="top">Phillips, A., Ed. and M. Davis, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc4647">Matching of Language Tags</a>&#8221;, BCP&nbsp;47, RFC&nbsp;4647, September&nbsp;2006.</td></tr><tr><td class="reference"><b id="RFC5234">[RFC5234]</b></td><td class="top">Crocker, D., Ed. and P. Overell, &#8220;<a href="https://tools.ietf.org/html/rfc5234">Augmented BNF for Syntax Specifications: ABNF</a>&#8221;, STD&nbsp;68, RFC&nbsp;5234, January&nbsp;2008.</td></tr><tr><td class="reference"><b id="RFC5646">[RFC5646]</b></td><td class="top">Phillips, A., Ed. and M. Davis, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc5646">Tags for Identifying Languages</a>&#8221;, BCP&nbsp;47, RFC&nbsp;5646, September&nbsp;2009.</td></tr><tr><td class="reference"><b id="RFC6365">[RFC6365]</b></td><td class="top">Hoffman, P. and J. Klensin, &#8220;<a href="https://tools.ietf.org/html/rfc6365">Terminology Used in Internationalization in the IETF</a>&#8221;, BCP&nbsp;166, RFC&nbsp;6365, September&nbsp;2011.</td></tr><tr><td class="reference"><b id="RFC7230">[RFC7230]</b></td><td class="top">Fielding, R., Ed. and J. Reschke, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc7230">Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</a>&#8221;, RFC&nbsp;7230, June&nbsp;2014.</td></tr><tr><td class="reference"><b id="RFC7232">[RFC7232]</b></td><td class="top">Fielding, R., Ed. and J. Reschke, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc7232">Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</a>&#8221;, RFC&nbsp;7232, June&nbsp;2014.</td></tr><tr><td class="reference"><b id="RFC7233">[RFC7233]</b></td><td class="top">Fielding, R., Ed., Lafon, Y., Ed., and J. Reschke, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc7233">Hypertext Transfer Protocol (HTTP/1.1): Range Requests</a>&#8221;, RFC&nbsp;7233, June&nbsp;2014.</td></tr><tr><td class="reference"><b id="RFC7234">[RFC7234]</b></td><td class="top">Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc7234">Hypertext Transfer Protocol (HTTP/1.1): Caching</a>&#8221;, RFC&nbsp;7234, June&nbsp;2014.</td></tr><tr><td class="reference"><b id="RFC7235">[RFC7235]</b></td><td class="top">Fielding, R., Ed. and J. Reschke, Ed., &#8220;<a href="https://tools.ietf.org/html/rfc7235">Hypertext Transfer Protocol (HTTP/1.1): Authentication</a>&#8221;, RFC&nbsp;7235, June&nbsp;2014.</td></tr></table><h2 id="rfc.references.2"><a href="#rfc.section.11.2" id="rfc.section.11.2">11.2</a> Informative References</h2><table><tr><td class="reference"><b id="BCP13">[BCP13]</b></td><td class="top">Freed, N., Klensin, J., and T. Hansen, &#8220;<a href="https://tools.ietf.org/html/rfc6838">Media Type Specifications and Registration Procedures</a>&#8221;, BCP&nbsp;13, RFC&nbsp;6838, January&nbsp;2013.</td></tr><tr><td class="reference"><b id="BCP178">[BCP178]</b></td><td class="top">Saint-Andre, P., Crocker, D., and M. Nottingham, &#8220;<a href="https://tools.ietf.org/html/rfc6648">Deprecating the "X-" Prefix and Similar Constructs in Application Protocols</a>&#8221;, BCP&nbsp;178, RFC&nbsp;6648, June&nbsp;2012.</td></tr><tr><td class="reference"><b id="BCP90">[BCP90]</b></td><td class="top">Klyne, G., Nottingham, M., and J. Mogul, &#8220;<a href="https://tools.ietf.org/html/rfc3864">Registration Procedures for Message Header Fields</a>&#8221;, BCP&nbsp;90, RFC&nbsp;3864, September&nbsp;2004.</td></tr><tr><td class="reference"><b id="OWASP">[OWASP]</b></td><td class="top">van der Stock, A., Ed., &#8220;<a href="https://www.owasp.org/">A Guide to Building Secure Web Applications and Web Services</a>&#8221;, The Open Web Application Security Project (OWASP)&nbsp;2.0.1, July&nbsp;2005, &lt;<a href="https://www.owasp.org/">https://www.owasp.org/</a>&gt;.</td></tr><tr><td class="reference"><b id="REST">[REST]</b></td><td class="top">Fielding, R., &#8220;<a href="http://roy.gbiv.com/pubs/dissertation/top.htm">Architectural Styles and the Design of Network-based Software Architectures</a>&#8221;, Doctoral Dissertation, University of California, Irvine, September&nbsp;2000, &lt;<a href="http://roy.gbiv.com/pubs/dissertation/top.htm">http://roy.gbiv.com/pubs/dissertation/top.htm</a>&gt;.</td></tr><tr><td class="reference"><b id="RFC1945">[RFC1945]</b></td><td class="top">Berners-Lee, T., Fielding, R., and H. Nielsen, &#8220;<a href="https://tools.ietf.org/html/rfc1945">Hypertext Transfer Protocol -- HTTP/1.0</a>&#8221;, RFC&nbsp;1945, May&nbsp;1996.</td></tr><tr><td class="reference"><b id="RFC2049">[RFC2049]</b></td><td class="top">Freed, N. and N. Borenstein, &#8220;<a href="https://tools.ietf.org/html/rfc2049">Multipurpose Internet Mail Extensions (MIME) Part Five: Conformance Criteria and Examples</a>&#8221;, RFC&nbsp;2049, November&nbsp;1996.</td></tr><tr><td class="reference"><b id="RFC2068">[RFC2068]</b></td><td class="top">Fielding, R., Gettys, J., Mogul, J., Nielsen, H., and T. Berners-Lee, &#8220;<a href="https://tools.ietf.org/html/rfc2068">Hypertext Transfer Protocol -- HTTP/1.1</a>&#8221;, RFC&nbsp;2068, January&nbsp;1997.</td></tr><tr><td class="reference"><b id="RFC2295">[RFC2295]</b></td><td class="top">Holtman, K. and A. Mutz, &#8220;<a href="https://tools.ietf.org/html/rfc2295">Transparent Content Negotiation in HTTP</a>&#8221;, RFC&nbsp;2295, March&nbsp;1998.</td></tr><tr><td class="reference"><b id="RFC2388">[RFC2388]</b></td><td class="top">Masinter, L., &#8220;<a href="https://tools.ietf.org/html/rfc2388">Returning Values from Forms: multipart/form-data</a>&#8221;, RFC&nbsp;2388, August&nbsp;1998.</td></tr><tr><td class="reference"><b id="RFC2557">[RFC2557]</b></td><td class="top">Palme, F., Hopmann, A., Shelness, N., and E. Stefferud, &#8220;<a href="https://tools.ietf.org/html/rfc2557">MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)</a>&#8221;, RFC&nbsp;2557, March&nbsp;1999.</td></tr><tr><td class="reference"><b id="RFC2616">[RFC2616]</b></td><td class="top">Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, &#8220;<a href="https://tools.ietf.org/html/rfc2616">Hypertext Transfer Protocol -- HTTP/1.1</a>&#8221;, RFC&nbsp;2616, June&nbsp;1999.</td></tr><tr><td class="reference"><b id="RFC2774">[RFC2774]</b></td><td class="top">Frystyk, H., Leach, P., and S. Lawrence, &#8220;<a href="https://tools.ietf.org/html/rfc2774">An HTTP Extension Framework</a>&#8221;, RFC&nbsp;2774, February&nbsp;2000.</td></tr><tr><td class="reference"><b id="RFC2817">[RFC2817]</b></td><td class="top">Khare, R. and S. Lawrence, &#8220;<a href="https://tools.ietf.org/html/rfc2817">Upgrading to TLS Within HTTP/1.1</a>&#8221;, RFC&nbsp;2817, May&nbsp;2000.</td></tr><tr><td class="reference"><b id="RFC2978">[RFC2978]</b></td><td class="top">Freed, N. and J. Postel, &#8220;<a href="https://tools.ietf.org/html/rfc2978">IANA Charset Registration Procedures</a>&#8221;, BCP&nbsp;19, RFC&nbsp;2978, October&nbsp;2000.</td></tr><tr><td class="reference"><b id="RFC5226">[RFC5226]</b></td><td class="top">Narten, T. and H. Alvestrand, &#8220;<a href="https://tools.ietf.org/html/rfc5226">Guidelines for Writing an IANA Considerations Section in RFCs</a>&#8221;, BCP&nbsp;26, RFC&nbsp;5226, May&nbsp;2008.</td></tr><tr><td class="reference"><b id="RFC5246">[RFC5246]</b></td><td class="top">Dierks, T. and E. Rescorla, &#8220;<a href="https://tools.ietf.org/html/rfc5246">The Transport Layer Security (TLS) Protocol Version 1.2</a>&#8221;, RFC&nbsp;5246, August&nbsp;2008.</td></tr><tr><td class="reference"><b id="RFC5322">[RFC5322]</b></td><td class="top">Resnick, P., &#8220;<a href="https://tools.ietf.org/html/rfc5322">Internet Message Format</a>&#8221;, RFC&nbsp;5322, October&nbsp;2008.</td></tr><tr><td class="reference"><b id="RFC5789">[RFC5789]</b></td><td class="top">Dusseault, L. and J. Snell, &#8220;<a href="https://tools.ietf.org/html/rfc5789">PATCH Method for HTTP</a>&#8221;, RFC&nbsp;5789, March&nbsp;2010.</td></tr><tr><td class="reference"><b id="RFC5905">[RFC5905]</b></td><td class="top">Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch, &#8220;<a href="https://tools.ietf.org/html/rfc5905">Network Time Protocol Version 4: Protocol and Algorithms Specification</a>&#8221;, RFC&nbsp;5905, June&nbsp;2010.</td></tr><tr><td class="reference"><b id="RFC5987">[RFC5987]</b></td><td class="top">Reschke, J., &#8220;<a href="https://tools.ietf.org/html/rfc5987">Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters</a>&#8221;, RFC&nbsp;5987, August&nbsp;2010.</td></tr><tr><td class="reference"><b id="RFC5988">[RFC5988]</b></td><td class="top">Nottingham, M., &#8220;<a href="https://tools.ietf.org/html/rfc5988">Web Linking</a>&#8221;, RFC&nbsp;5988, October&nbsp;2010.</td></tr><tr><td class="reference"><b id="RFC6265">[RFC6265]</b></td><td class="top">Barth, A., &#8220;<a href="https://tools.ietf.org/html/rfc6265">HTTP State Management Mechanism</a>&#8221;, RFC&nbsp;6265, April&nbsp;2011.</td></tr><tr><td class="reference"><b id="RFC6266">[RFC6266]</b></td><td class="top">Reschke, J., &#8220;<a href="https://tools.ietf.org/html/rfc6266">Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)</a>&#8221;, RFC&nbsp;6266, June&nbsp;2011.</td></tr><tr><td class="reference"><b id="RFC7238">[RFC7238]</b></td><td class="top">Reschke, J., &#8220;<a href="https://tools.ietf.org/html/rfc7238">The Hypertext Transfer Protocol (HTTP) Status Code 308 (Permanent Redirect)</a>&#8221;, RFC&nbsp;7238, June&nbsp;2014.</td></tr></table><div id="differences.between.http.and.mime"><h1 id="rfc.section.A" class="np"><a href="#rfc.section.A">A.</a>&nbsp;<a href="#differences.between.http.and.mime">Differences between HTTP and MIME</a></h1><div id="rfc.section.A.p.1"><p>HTTP/1.1 uses many of the constructs defined for the Internet Message Format <a href="#RFC5322" id="rfc.xref.RFC5322.7"><cite title="Internet Message Format">[RFC5322]</cite></a> and the Multipurpose Internet Mail Extensions (MIME) <a href="#RFC2045" id="rfc.xref.RFC2045.2"><cite title="Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies">[RFC2045]</cite></a> to allow a message body to be transmitted in an open variety of representations and with extensible header fields. However, RFC 2045 is focused only on email; applications of HTTP have many characteristics that differ from email; hence, HTTP has features that differ from MIME. These differences were carefully chosen to optimize performance over binary connections, to allow greater freedom in the use of new media types, to make date comparisons easier, and to acknowledge the practice of some early HTTP servers and clients.<a class="self" href="#rfc.section.A.p.1">&para;</a></p></div><div id="rfc.section.A.p.2"><p>This appendix describes specific areas where HTTP differs from MIME. Proxies and gateways to and from strict MIME environments need to be aware of these differences and provide the appropriate conversions where necessary.<a class="self" href="#rfc.section.A.p.2">&para;</a></p></div><div id="mime-version"><h2 id="rfc.section.A.1"><a href="#rfc.section.A.1">A.1</a>&nbsp;<a href="#mime-version">MIME-Version</a></h2><div id="rfc.section.A.1.p.1"><p>HTTP is not a MIME-compliant protocol. However, messages can include a single MIME-Version header field to indicate what version of the MIME protocol was used to construct the message. Use of the MIME-Version header field indicates that the message is in full conformance with the MIME protocol (as defined in <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>). Senders are responsible for ensuring full conformance (where possible) when exporting HTTP messages to strict MIME environments.<a class="self" href="#rfc.section.A.1.p.1">&para;</a></p></div></div><div id="conversion.to.canonical.form"><h2 id="rfc.section.A.2"><a href="#rfc.section.A.2">A.2</a>&nbsp;<a href="#conversion.to.canonical.form">Conversion to Canonical Form</a></h2><div id="rfc.section.A.2.p.1"><p>MIME requires that an Internet mail body part be converted to canonical form prior to being transferred, as described in <a href="https://tools.ietf.org/html/rfc2049#section-4">Section 4</a> of <a href="#RFC2049" id="rfc.xref.RFC2049.1"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Five: Conformance Criteria and Examples">[RFC2049]</cite></a>. <a href="#canonicalization.and.text.defaults" title="Canonicalization and Text Defaults">Section&nbsp;3.1.1.3</a> of this document describes the forms allowed for subtypes of the "text" media type when transmitted over HTTP. <a href="#RFC2046" id="rfc.xref.RFC2046.4"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types">[RFC2046]</cite></a> requires that content with a type of "text" represent line breaks as CRLF and forbids the use of CR or LF outside of line break sequences. HTTP allows CRLF, bare CR, and bare LF to indicate a line break within text content.<a class="self" href="#rfc.section.A.2.p.1">&para;</a></p></div><div id="rfc.section.A.2.p.2"><p>A proxy or gateway from HTTP to a strict MIME environment ought to translate all line breaks within the text media types described in <a href="#canonicalization.and.text.defaults" title="Canonicalization and Text Defaults">Section&nbsp;3.1.1.3</a> of this document to the RFC 2049 canonical form of CRLF. Note, however, this might be complicated by the presence of a <a href="#header.content-encoding" class="smpl">Content-Encoding</a> and by the fact that HTTP allows the use of some charsets that do not use octets 13 and 10 to represent CR and LF, respectively.<a class="self" href="#rfc.section.A.2.p.2">&para;</a></p></div><div id="rfc.section.A.2.p.3"><p>Conversion will break any cryptographic checksums applied to the original content unless the original content is already in canonical form. Therefore, the canonical form is recommended for any content that uses such checksums in HTTP.<a class="self" href="#rfc.section.A.2.p.3">&para;</a></p></div></div><div id="conversion.of.date.formats"><h2 id="rfc.section.A.3"><a href="#rfc.section.A.3">A.3</a>&nbsp;<a href="#conversion.of.date.formats">Conversion of Date Formats</a></h2><div id="rfc.section.A.3.p.1"><p>HTTP/1.1 uses a restricted set of date formats (<a href="#http.date" title="Date/Time Formats">Section&nbsp;7.1.1.1</a>) to simplify the process of date comparison. Proxies and gateways from other protocols ought to ensure that any <a href="#header.date" class="smpl">Date</a> header field present in a message conforms to one of the HTTP/1.1 formats and rewrite the date if necessary.<a class="self" href="#rfc.section.A.3.p.1">&para;</a></p></div></div><div id="conversion.content-encoding"><h2 id="rfc.section.A.4"><a href="#rfc.section.A.4">A.4</a>&nbsp;<a href="#conversion.content-encoding">Conversion of Content-Encoding</a></h2><div id="rfc.section.A.4.p.1"><p>MIME does not include any concept equivalent to HTTP/1.1's <a href="#header.content-encoding" class="smpl">Content-Encoding</a> header field. Since this acts as a modifier on the media type, proxies and gateways from HTTP to MIME-compliant protocols ought to either change the value of the <a href="#header.content-type" class="smpl">Content-Type</a> header field or decode the representation before forwarding the message. (Some experimental applications of Content-Type for Internet mail have used a media-type parameter of ";conversions=&lt;content-coding&gt;" to perform a function equivalent to Content-Encoding. However, this parameter is not part of the MIME standards).<a class="self" href="#rfc.section.A.4.p.1">&para;</a></p></div></div><div id="conversion.content-transfer-encoding"><h2 id="rfc.section.A.5"><a href="#rfc.section.A.5">A.5</a>&nbsp;<a href="#conversion.content-transfer-encoding">Conversion of Content-Transfer-Encoding</a></h2><div id="rfc.section.A.5.p.1"><p>HTTP does not use the Content-Transfer-Encoding field of MIME. Proxies and gateways from MIME-compliant protocols to HTTP need to remove any Content-Transfer-Encoding prior to delivering the response message to an HTTP client.<a class="self" href="#rfc.section.A.5.p.1">&para;</a></p></div><div id="rfc.section.A.5.p.2"><p>Proxies and gateways from HTTP to MIME-compliant protocols are responsible for ensuring that the message is in the correct format and encoding for safe transport on that protocol, where "safe transport" is defined by the limitations of the protocol being used. Such a proxy or gateway ought to transform and label the data with an appropriate Content-Transfer-Encoding if doing so will improve the likelihood of safe transport over the destination protocol.<a class="self" href="#rfc.section.A.5.p.2">&para;</a></p></div></div><div id="mhtml.line.length"><h2 id="rfc.section.A.6"><a href="#rfc.section.A.6">A.6</a>&nbsp;<a href="#mhtml.line.length">MHTML and Line Length Limitations</a></h2><div id="rfc.section.A.6.p.1"><p>HTTP implementations that share code with MHTML <a href="#RFC2557" id="rfc.xref.RFC2557.2"><cite title="MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)">[RFC2557]</cite></a> implementations need to be aware of MIME line length limitations. Since HTTP does not have this limitation, HTTP does not fold long lines. MHTML messages being transported by HTTP follow all conventions of MHTML, including line length limitations and folding, canonicalization, etc., since HTTP transfers message-bodies as payload and, aside from the "multipart/byteranges" type (<a href="rfc7233.html#internet.media.type.multipart.byteranges" title="Internet Media Type multipart/byteranges">Appendix A</a> of <a href="#RFC7233" id="rfc.xref.RFC7233.12"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[RFC7233]</cite></a>), does not interpret the content or any MIME header lines that might be contained therein.<a class="self" href="#rfc.section.A.6.p.1">&para;</a></p></div></div></div><div id="changes.from.rfc.2616"><h1 id="rfc.section.B"><a href="#rfc.section.B">B.</a>&nbsp;<a href="#changes.from.rfc.2616">Changes from RFC 2616</a></h1><div id="rfc.section.B.p.1"><p>The primary changes in this revision have been editorial in nature: extracting the messaging syntax and partitioning HTTP semantics into separate documents for the core features, conditional requests, partial requests, caching, and authentication. The conformance language has been revised to clearly target requirements and the terminology has been improved to distinguish payload from representations and representations from resources.<a class="self" href="#rfc.section.B.p.1">&para;</a></p></div><div id="rfc.section.B.p.2"><p>A new requirement has been added that semantics embedded in a URI be disabled when those semantics are inconsistent with the request method, since this is a common cause of interoperability failure. (<a href="#resources" title="Resources">Section&nbsp;2</a>)<a class="self" href="#rfc.section.B.p.2">&para;</a></p></div><div id="rfc.section.B.p.3"><p>An algorithm has been added for determining if a payload is associated with a specific identifier. (<a href="#identifying.payload" title="Identifying a Representation">Section&nbsp;3.1.4.1</a>)<a class="self" href="#rfc.section.B.p.3">&para;</a></p></div><div id="rfc.section.B.p.4"><p>The default charset of ISO-8859-1 for text media types has been removed; the default is now whatever the media type definition says. Likewise, special treatment of ISO-8859-1 has been removed from the <a href="#header.accept-charset" class="smpl">Accept-Charset</a> header field. (<a href="#canonicalization.and.text.defaults" title="Canonicalization and Text Defaults">Section&nbsp;3.1.1.3</a> and <a href="#header.accept-charset" id="rfc.xref.header.accept-charset.3" title="Accept-Charset">Section&nbsp;5.3.3</a>)<a class="self" href="#rfc.section.B.p.4">&para;</a></p></div><div id="rfc.section.B.p.5"><p>The definition of <a href="#header.content-location" class="smpl">Content-Location</a> has been changed to no longer affect the base URI for resolving relative URI references, due to poor implementation support and the undesirable effect of potentially breaking relative links in content-negotiated resources. (<a href="#header.content-location" id="rfc.xref.header.content-location.5" title="Content-Location">Section&nbsp;3.1.4.2</a>)<a class="self" href="#rfc.section.B.p.5">&para;</a></p></div><div id="rfc.section.B.p.6"><p>To be consistent with the method-neutral parsing algorithm of <a href="#RFC7230" id="rfc.xref.RFC7230.46"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>, the definition of GET has been relaxed so that requests can have a body, even though a body has no meaning for GET. (<a href="#GET" id="rfc.xref.GET.6" title="GET">Section&nbsp;4.3.1</a>)<a class="self" href="#rfc.section.B.p.6">&para;</a></p></div><div id="rfc.section.B.p.7"><p>Servers are no longer required to handle all Content-* header fields and use of <a href="rfc7233.html#header.content-range" class="smpl">Content-Range</a> has been explicitly banned in PUT requests. (<a href="#PUT" id="rfc.xref.PUT.5" title="PUT">Section&nbsp;4.3.4</a>)<a class="self" href="#rfc.section.B.p.7">&para;</a></p></div><div id="rfc.section.B.p.8"><p>Definition of the CONNECT method has been moved from <a href="#RFC2817" id="rfc.xref.RFC2817.2"><cite title="Upgrading to TLS Within HTTP/1.1">[RFC2817]</cite></a> to this specification. (<a href="#CONNECT" id="rfc.xref.CONNECT.3" title="CONNECT">Section&nbsp;4.3.6</a>)<a class="self" href="#rfc.section.B.p.8">&para;</a></p></div><div id="rfc.section.B.p.9"><p>The <a href="#OPTIONS" class="smpl" id="rfc.extref.o.11">OPTIONS</a> and <a href="#TRACE" class="smpl" id="rfc.extref.t.50">TRACE</a> request methods have been defined as being safe. (<a href="#OPTIONS" id="rfc.xref.OPTIONS.4" title="OPTIONS">Section&nbsp;4.3.7</a> and <a href="#TRACE" id="rfc.xref.TRACE.4" title="TRACE">Section&nbsp;4.3.8</a>)<a class="self" href="#rfc.section.B.p.9">&para;</a></p></div><div id="rfc.section.B.p.10"><p>The <a href="#header.expect" class="smpl">Expect</a> header field's extension mechanism has been removed due to widely-deployed broken implementations. (<a href="#header.expect" id="rfc.xref.header.expect.5" title="Expect">Section&nbsp;5.1.1</a>)<a class="self" href="#rfc.section.B.p.10">&para;</a></p></div><div id="rfc.section.B.p.11"><p>The <a href="#header.max-forwards" class="smpl">Max-Forwards</a> header field has been restricted to the <a href="#OPTIONS" class="smpl" id="rfc.extref.o.12">OPTIONS</a> and <a href="#TRACE" class="smpl" id="rfc.extref.t.51">TRACE</a> methods; previously, extension methods could have used it as well. (<a href="#header.max-forwards" id="rfc.xref.header.max-forwards.5" title="Max-Forwards">Section&nbsp;5.1.2</a>)<a class="self" href="#rfc.section.B.p.11">&para;</a></p></div><div id="rfc.section.B.p.12"><p>The "about:blank" URI has been suggested as a value for the <a href="#header.referer" class="smpl">Referer</a> header field when no referring URI is applicable, which distinguishes that case from others where the Referer field is not sent or has been removed. (<a href="#header.referer" id="rfc.xref.header.referer.4" title="Referer">Section&nbsp;5.5.2</a>)<a class="self" href="#rfc.section.B.p.12">&para;</a></p></div><div id="rfc.section.B.p.13"><p>The following status codes are now cacheable (that is, they can be stored and reused by a cache without explicit freshness information present): 204, 404, 405, 414, 501. (<a href="#status.codes" title="Response Status Codes">Section&nbsp;6</a>)<a class="self" href="#rfc.section.B.p.13">&para;</a></p></div><div id="rfc.section.B.p.14"><p>The <a href="#status.201" class="smpl">201 (Created)</a> status description has been changed to allow for the possibility that more than one resource has been created. (<a href="#status.201" id="rfc.xref.status.201.3" title="201 Created">Section&nbsp;6.3.2</a>)<a class="self" href="#rfc.section.B.p.14">&para;</a></p></div><div id="rfc.section.B.p.15"><p>The definition of <a href="#status.203" class="smpl">203 (Non-Authoritative Information)</a> has been broadened to include cases of payload transformations as well. (<a href="#status.203" id="rfc.xref.status.203.3" title="203 Non-Authoritative Information">Section&nbsp;6.3.4</a>)<a class="self" href="#rfc.section.B.p.15">&para;</a></p></div><div id="rfc.section.B.p.16"><p>The set of request methods that are safe to automatically redirect is no longer closed; user agents are able to make that determination based upon the request method semantics. The redirect status codes <a href="#status.301" class="smpl">301</a>, <a href="#status.302" class="smpl">302</a>, and <a href="#status.307" class="smpl">307</a> no longer have normative requirements on response payloads and user interaction. (<a href="#status.3xx" id="rfc.xref.status.3xx.1" title="Redirection 3xx">Section&nbsp;6.4</a>)<a class="self" href="#rfc.section.B.p.16">&para;</a></p></div><div id="rfc.section.B.p.17"><p>The status codes <a href="#status.301" class="smpl">301</a> and <a href="#status.302" class="smpl">302</a> have been changed to allow user agents to rewrite the method from POST to GET. (Sections <a href="#status.301" id="rfc.xref.status.301.3" title="301 Moved Permanently">6.4.2</a> and <a href="#status.302" id="rfc.xref.status.302.3" title="302 Found">6.4.3</a>)<a class="self" href="#rfc.section.B.p.17">&para;</a></p></div><div id="rfc.section.B.p.18"><p>The description of the <a href="#status.303" class="smpl">303 (See Other)</a> status code has been changed to allow it to be cached if explicit freshness information is given, and a specific definition has been added for a 303 response to GET. (<a href="#status.303" id="rfc.xref.status.303.3" title="303 See Other">Section&nbsp;6.4.4</a>)<a class="self" href="#rfc.section.B.p.18">&para;</a></p></div><div id="rfc.section.B.p.19"><p>The <a href="#status.305" class="smpl">305 (Use Proxy)</a> status code has been deprecated due to security concerns regarding in-band configuration of a proxy. (<a href="#status.305" id="rfc.xref.status.305.3" title="305 Use Proxy">Section&nbsp;6.4.5</a>)<a class="self" href="#rfc.section.B.p.19">&para;</a></p></div><div id="rfc.section.B.p.20"><p>The <a href="#status.400" class="smpl">400 (Bad Request)</a> status code has been relaxed so that it isn't limited to syntax errors. (<a href="#status.400" id="rfc.xref.status.400.3" title="400 Bad Request">Section&nbsp;6.5.1</a>)<a class="self" href="#rfc.section.B.p.20">&para;</a></p></div><div id="rfc.section.B.p.21"><p>The <a href="#status.426" class="smpl">426 (Upgrade Required)</a> status code has been incorporated from <a href="#RFC2817" id="rfc.xref.RFC2817.3"><cite title="Upgrading to TLS Within HTTP/1.1">[RFC2817]</cite></a>. (<a href="#status.426" id="rfc.xref.status.426.3" title="426 Upgrade Required">Section&nbsp;6.5.15</a>)<a class="self" href="#rfc.section.B.p.21">&para;</a></p></div><div id="rfc.section.B.p.22"><p>The target of requirements on HTTP-date and the Date header field have been reduced to those systems generating the date, rather than all systems sending a date. (<a href="#origination.date" title="Origination Date">Section&nbsp;7.1.1</a>)<a class="self" href="#rfc.section.B.p.22">&para;</a></p></div><div id="rfc.section.B.p.23"><p>The syntax of the <a href="#header.location" class="smpl">Location</a> header field has been changed to allow all URI references, including relative references and fragments, along with some clarifications as to when use of fragments would not be appropriate. (<a href="#header.location" id="rfc.xref.header.location.6" title="Location">Section&nbsp;7.1.2</a>)<a class="self" href="#rfc.section.B.p.23">&para;</a></p></div><div id="rfc.section.B.p.24"><p><a href="#header.allow" class="smpl">Allow</a> has been reclassified as a response header field, removing the option to specify it in a PUT request. Requirements relating to the content of Allow have been relaxed; correspondingly, clients are not required to always trust its value. (<a href="#header.allow" id="rfc.xref.header.allow.4" title="Allow">Section&nbsp;7.4.1</a>)<a class="self" href="#rfc.section.B.p.24">&para;</a></p></div><div id="rfc.section.B.p.25"><p>A Method Registry has been defined. (<a href="#method.registry" title="Method Registry">Section&nbsp;8.1</a>)<a class="self" href="#rfc.section.B.p.25">&para;</a></p></div><div id="rfc.section.B.p.26"><p>The Status Code Registry has been redefined by this specification; previously, it was defined in <a href="https://tools.ietf.org/html/rfc2817#section-7.1">Section 7.1</a> of <a href="#RFC2817" id="rfc.xref.RFC2817.4"><cite title="Upgrading to TLS Within HTTP/1.1">[RFC2817]</cite></a>. (<a href="#status.code.registry" title="Status Code Registry">Section&nbsp;8.2</a>)<a class="self" href="#rfc.section.B.p.26">&para;</a></p></div><div id="rfc.section.B.p.27"><p>Registration of content codings has been changed to require IETF Review. (<a href="#content.coding.registry" title="Content Coding Registry">Section&nbsp;8.4</a>)<a class="self" href="#rfc.section.B.p.27">&para;</a></p></div><div id="rfc.section.B.p.28"><p>The Content-Disposition header field has been removed since it is now defined by <a href="#RFC6266" id="rfc.xref.RFC6266.1"><cite title="Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)">[RFC6266]</cite></a>.<a class="self" href="#rfc.section.B.p.28">&para;</a></p></div><div id="rfc.section.B.p.29"><p>The Content-MD5 header field has been removed because it was inconsistently implemented with respect to partial responses.<a class="self" href="#rfc.section.B.p.29">&para;</a></p></div></div><div id="imported.abnf"><h1 id="rfc.section.C"><a href="#rfc.section.C">C.</a>&nbsp;<a href="#imported.abnf">Imported ABNF</a></h1><div id="rfc.section.C.p.1"><p>The following core rules are included by reference, as defined in <a href="https://tools.ietf.org/html/rfc5234#appendix-B.1">Appendix B.1</a> of <a href="#RFC5234" id="rfc.xref.RFC5234.3"><cite title="Augmented BNF for Syntax Specifications: ABNF">[RFC5234]</cite></a>: ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote), HEXDIG (hexadecimal 0-9/A-F/a-f), HTAB (horizontal tab), LF (line feed), OCTET (any 8-bit sequence of data), SP (space), and VCHAR (any visible US-ASCII character).<a class="self" href="#rfc.section.C.p.1">&para;</a></p></div><div id="rfc.section.C.p.2" class="avoidbreakafter"><p>The rules below are defined in <a href="#RFC7230" id="rfc.xref.RFC7230.47"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>:<a class="self" href="#rfc.section.C.p.2">&para;</a></p></div><div id="rfc.figure.u.65"><pre class="inline">  <a href="#imported.abnf" class="smpl">BWS</a>           = &lt;BWS, see <a href="#RFC7230" id="rfc.xref.RFC7230.48"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>, <a href="rfc7230.html#whitespace" title="Whitespace">Section 3.2.3</a>&gt; 
    688688  <a href="#imported.abnf" class="smpl">OWS</a>           = &lt;OWS, see <a href="#RFC7230" id="rfc.xref.RFC7230.49"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>, <a href="rfc7230.html#whitespace" title="Whitespace">Section 3.2.3</a>&gt; 
    689689  <a href="#imported.abnf" class="smpl">RWS</a>           = &lt;RWS, see <a href="#RFC7230" id="rfc.xref.RFC7230.50"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>, <a href="rfc7230.html#whitespace" title="Whitespace">Section 3.2.3</a>&gt; 
  • specs/rfc7232.html

    r2737 r2739  
    525525    } 
    526526} 
    527 </style><link rel="Contents" href="#rfc.toc"><link rel="Author" href="#rfc.authors"><link rel="Copyright" href="#rfc.copyrightnotice"><link rel="Index" href="#rfc.index"><link rel="Chapter" title="1 Introduction" href="#rfc.section.1"><link rel="Chapter" title="2 Validators" href="#rfc.section.2"><link rel="Chapter" title="3 Precondition Header Fields" href="#rfc.section.3"><link rel="Chapter" title="4 Status Code Definitions" href="#rfc.section.4"><link rel="Chapter" title="5 Evaluation" href="#rfc.section.5"><link rel="Chapter" title="6 Precedence" href="#rfc.section.6"><link rel="Chapter" title="7 IANA Considerations" href="#rfc.section.7"><link rel="Chapter" title="8 Security Considerations" href="#rfc.section.8"><link rel="Chapter" title="9 Acknowledgments" href="#rfc.section.9"><link rel="Chapter" href="#rfc.section.10" title="10 References"><link rel="Appendix" title="A Changes from RFC 2616" href="#rfc.section.A"><link rel="Appendix" title="B Imported ABNF" href="#rfc.section.B"><link rel="Appendix" title="C Collected ABNF" href="#rfc.section.C"><link href="rfc7231.html" rel="prev"><link href="rfc7233.html" rel="next"><link rel="Alternate" title="Authoritative ASCII Version" href="http://www.ietf.org/rfc/rfc7232.txt"><link rel="Help" title="RFC-Editor's Status Page" href="http://www.rfc-editor.org/info/rfc7232"><link rel="Help" title="Additional Information on tools.ietf.org" href="http://tools.ietf.org/html/rfc7232"><meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.718, 2015/04/08 13:10:26, XSLT vendor: SAXON 6.5.5 from Michael Kay http://saxon.sf.net/"><meta name="keywords" content="Hypertext Transfer Protocol, HTTP, HTTP conditional requests"><link rel="schema.dct" href="http://purl.org/dc/terms/"><meta name="dct.creator" content="Fielding, R."><meta name="dct.creator" content="Reschke, J. F."><meta name="dct.identifier" content="urn:ietf:rfc:7232"><meta name="dct.issued" scheme="ISO8601" content="2014-06"><meta name="dct.replaces" content="urn:ietf:rfc:2616"><meta name="dct.abstract" content="The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines HTTP/1.1 conditional requests, including metadata header fields for indicating state changes, request header fields for making preconditions on such state, and rules for constructing the responses to a conditional request when one or more preconditions evaluate to false."><meta name="dct.isPartOf" content="urn:issn:2070-1721"><meta name="description" content="The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines HTTP/1.1 conditional requests, including metadata header fields for indicating state changes, request header fields for making preconditions on such state, and rules for constructing the responses to a conditional request when one or more preconditions evaluate to false."></head><body onload="getMeta(7232,&#34;rfc.meta&#34;);"><table class="header" id="rfc.headerblock"><tbody><tr><td class="left">Internet Engineering Task Force (IETF)</td><td class="right">R. Fielding, Editor</td></tr><tr><td class="left">Request for Comments: 7232</td><td class="right">Adobe</td></tr><tr><td class="left">Obsoletes: <a href="https://tools.ietf.org/html/rfc2616">2616</a></td><td class="right">J. Reschke, Editor</td></tr><tr><td class="left">Category: Standards Track</td><td class="right">greenbytes</td></tr><tr><td class="left">ISSN: 2070-1721</td><td class="right">June 2014</td></tr></tbody></table><p class="title" id="rfc.title">Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</p><h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1><p>The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines HTTP/1.1 conditional requests, including metadata header fields for indicating state changes, request header fields for making preconditions on such state, and rules for constructing the responses to a conditional request when one or more preconditions evaluate to false.</p><div id="rfc.meta" style="float: right; border: 1px solid black; margin: 2em; padding: 1em; display: none;"></div><div id="rfc.status"><h1><a href="#rfc.status">Status of This Memo</a></h1><p>This is an Internet Standards Track document.</p><p>This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.</p><p>Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at <a href="http://www.rfc-editor.org/info/rfc7232">http://www.rfc-editor.org/info/rfc7232</a>.</p></div><div id="rfc.copyrightnotice"><h1><a href="#rfc.copyrightnotice">Copyright Notice</a></h1><p>Copyright &copy; 2014 IETF Trust and the persons identified as the document authors. All rights reserved.</p><p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.</p><p>This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.</p></div><hr class="noprint"><div id="rfc.toc"><h1 class="np"><a href="#rfc.toc">Table of Contents</a></h1><ul class="toc"><li><a href="#rfc.section.1">1.</a>&nbsp;&nbsp;&nbsp;<a href="#introduction">Introduction</a><ul><li><a href="#rfc.section.1.1">1.1</a>&nbsp;&nbsp;&nbsp;<a href="#conformance">Conformance and Error Handling</a></li><li><a href="#rfc.section.1.2">1.2</a>&nbsp;&nbsp;&nbsp;<a href="#notation">Syntax Notation</a></li></ul></li><li><a href="#rfc.section.2">2.</a>&nbsp;&nbsp;&nbsp;<a href="#validators">Validators</a><ul><li><a href="#rfc.section.2.1">2.1</a>&nbsp;&nbsp;&nbsp;<a href="#weak.and.strong.validators">Weak versus Strong</a></li><li><a href="#rfc.section.2.2">2.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.last-modified">Last-Modified</a><ul><li><a href="#rfc.section.2.2.1">2.2.1</a>&nbsp;&nbsp;&nbsp;<a href="#lastmod.generation">Generation</a></li><li><a href="#rfc.section.2.2.2">2.2.2</a>&nbsp;&nbsp;&nbsp;<a href="#lastmod.comparison">Comparison</a></li></ul></li><li><a href="#rfc.section.2.3">2.3</a>&nbsp;&nbsp;&nbsp;<a href="#header.etag">ETag</a><ul><li><a href="#rfc.section.2.3.1">2.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#entity.tag.generation">Generation</a></li><li><a href="#rfc.section.2.3.2">2.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#entity.tag.comparison">Comparison</a></li><li><a href="#rfc.section.2.3.3">2.3.3</a>&nbsp;&nbsp;&nbsp;<a href="#example.entity.tag.vs.conneg">Example: Entity-Tags Varying on Content-Negotiated Resources</a></li></ul></li><li><a href="#rfc.section.2.4">2.4</a>&nbsp;&nbsp;&nbsp;<a href="#when.to.use.entity.tags.and.last-modified.dates">When to Use Entity-Tags and Last-Modified Dates</a></li></ul></li><li><a href="#rfc.section.3">3.</a>&nbsp;&nbsp;&nbsp;<a href="#preconditions">Precondition Header Fields</a><ul><li><a href="#rfc.section.3.1">3.1</a>&nbsp;&nbsp;&nbsp;<a href="#header.if-match">If-Match</a></li><li><a href="#rfc.section.3.2">3.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.if-none-match">If-None-Match</a></li><li><a href="#rfc.section.3.3">3.3</a>&nbsp;&nbsp;&nbsp;<a href="#header.if-modified-since">If-Modified-Since</a></li><li><a href="#rfc.section.3.4">3.4</a>&nbsp;&nbsp;&nbsp;<a href="#header.if-unmodified-since">If-Unmodified-Since</a></li><li><a href="#rfc.section.3.5">3.5</a>&nbsp;&nbsp;&nbsp;<a href="#header.if-range">If-Range</a></li></ul></li><li><a href="#rfc.section.4">4.</a>&nbsp;&nbsp;&nbsp;<a href="#status.code.definitions">Status Code Definitions</a><ul><li><a href="#rfc.section.4.1">4.1</a>&nbsp;&nbsp;&nbsp;<a href="#status.304">304 Not Modified</a></li><li><a href="#rfc.section.4.2">4.2</a>&nbsp;&nbsp;&nbsp;<a href="#status.412">412 Precondition Failed</a></li></ul></li><li><a href="#rfc.section.5">5.</a>&nbsp;&nbsp;&nbsp;<a href="#evaluation">Evaluation</a></li><li><a href="#rfc.section.6">6.</a>&nbsp;&nbsp;&nbsp;<a href="#precedence">Precedence</a></li><li><a href="#rfc.section.7">7.</a>&nbsp;&nbsp;&nbsp;<a href="#IANA.considerations">IANA Considerations</a><ul><li><a href="#rfc.section.7.1">7.1</a>&nbsp;&nbsp;&nbsp;<a href="#status.code.registration">Status Code Registration</a></li><li><a href="#rfc.section.7.2">7.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.field.registration">Header Field Registration</a></li></ul></li><li><a href="#rfc.section.8">8.</a>&nbsp;&nbsp;&nbsp;<a href="#security.considerations">Security Considerations</a></li><li><a href="#rfc.section.9">9.</a>&nbsp;&nbsp;&nbsp;<a href="#acks">Acknowledgments</a></li><li><a href="#rfc.section.10">10.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references">References</a><ul><li><a href="#rfc.section.10.1">10.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references.1">Normative References</a></li><li><a href="#rfc.section.10.2">10.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references.2">Informative References</a></li></ul></li><li><a href="#rfc.section.A">A.</a>&nbsp;&nbsp;&nbsp;<a href="#changes.from.rfc.2616">Changes from RFC 2616</a></li><li><a href="#rfc.section.B">B.</a>&nbsp;&nbsp;&nbsp;<a href="#imported.abnf">Imported ABNF</a></li><li><a href="#rfc.section.C">C.</a>&nbsp;&nbsp;&nbsp;<a href="#collected.abnf">Collected ABNF</a></li><li><a href="#rfc.index">Index</a></li><li><a href="#rfc.authors">Authors' Addresses</a></li></ul></div><div id="introduction"><h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;<a href="#introduction">Introduction</a></h1><div id="rfc.section.1.p.1"><p>Conditional requests are HTTP requests <a href="#RFC7231" id="rfc.xref.RFC7231.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a> that include one or more header fields indicating a precondition to be tested before applying the method semantics to the target resource. This document defines the HTTP/1.1 conditional request mechanisms in terms of the architecture, syntax notation, and conformance criteria defined in <a href="#RFC7230" id="rfc.xref.RFC7230.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>.<a class="self" href="#rfc.section.1.p.1">&para;</a></p></div><div id="rfc.section.1.p.2"><p>Conditional GET requests are the most efficient mechanism for HTTP cache updates <a href="#RFC7234" id="rfc.xref.RFC7234.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>. Conditionals can also be applied to state-changing methods, such as PUT and DELETE, to prevent the "lost update" problem: one client accidentally overwriting the work of another client that has been acting in parallel.<a class="self" href="#rfc.section.1.p.2">&para;</a></p></div><div id="rfc.section.1.p.3"><p><span id="rfc.iref.s.1"></span> Conditional request preconditions are based on the state of the target resource as a whole (its current value set) or the state as observed in a previously obtained representation (one value in that set). A resource might have multiple current representations, each with its own observable state. The conditional request mechanisms assume that the mapping of requests to a "selected representation" (<a href="rfc7231.html#representations" title="Representations">Section 3</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>) will be consistent over time if the server intends to take advantage of conditionals. Regardless, if the mapping is inconsistent and the server is unable to select the appropriate representation, then no harm will result when the precondition evaluates to false.<a class="self" href="#rfc.section.1.p.3">&para;</a></p></div><div id="rfc.section.1.p.4"><p>The conditional request preconditions defined by this specification (<a href="#preconditions" title="Precondition Header Fields">Section&nbsp;3</a>) are evaluated when applicable to the recipient (<a href="#evaluation" title="Evaluation">Section&nbsp;5</a>) according to their order of precedence (<a href="#precedence" title="Precedence">Section&nbsp;6</a>).<a class="self" href="#rfc.section.1.p.4">&para;</a></p></div><div id="conformance"><h2 id="rfc.section.1.1"><a href="#rfc.section.1.1">1.1</a>&nbsp;<a href="#conformance">Conformance and Error Handling</a></h2><div id="rfc.section.1.1.p.1"><p>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in <a href="#RFC2119" id="rfc.xref.RFC2119.1"><cite title="Key words for use in RFCs to Indicate Requirement Levels">[RFC2119]</cite></a>.<a class="self" href="#rfc.section.1.1.p.1">&para;</a></p></div><div id="rfc.section.1.1.p.2"><p>Conformance criteria and considerations regarding error handling are defined in <a href="rfc7230.html#conformance" title="Conformance and Error Handling">Section 2.5</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>.<a class="self" href="#rfc.section.1.1.p.2">&para;</a></p></div></div><div id="notation"><h2 id="rfc.section.1.2"><a href="#rfc.section.1.2">1.2</a>&nbsp;<a href="#notation">Syntax Notation</a></h2><div id="rfc.section.1.2.p.1"><p>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> with a list extension, defined in <a href="rfc7230.html#abnf.extension" title="ABNF List Extension: #rule">Section 7</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>, that allows for compact definition of comma-separated lists using a '#' operator (similar to how the '*' operator indicates repetition). <a href="#imported.abnf" title="Imported ABNF">Appendix&nbsp;B</a> describes rules imported from other documents. <a href="#collected.abnf" title="Collected ABNF">Appendix&nbsp;C</a> shows the collected grammar with all list operators expanded to standard ABNF notation.<a class="self" href="#rfc.section.1.2.p.1">&para;</a></p></div></div></div><div id="validators"><h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a href="#validators">Validators</a></h1><div id="rfc.section.2.p.1"><p>This specification defines two forms of metadata that are commonly used to observe resource state and test for preconditions: modification dates (<a href="#header.last-modified" id="rfc.xref.header.last-modified.1" title="Last-Modified">Section&nbsp;2.2</a>) and opaque entity tags (<a href="#header.etag" id="rfc.xref.header.etag.1" title="ETag">Section&nbsp;2.3</a>). Additional metadata that reflects resource state has been defined by various extensions of HTTP, such as Web Distributed Authoring and Versioning (WebDAV, <a href="#RFC4918" id="rfc.xref.RFC4918.1"><cite title="HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)">[RFC4918]</cite></a>), that are beyond the scope of this specification. A resource metadata value is referred to as a "<dfn>validator</dfn>" when it is used within a precondition.<a class="self" href="#rfc.section.2.p.1">&para;</a></p></div><div id="weak.and.strong.validators"><h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a>&nbsp;<a href="#weak.and.strong.validators">Weak versus Strong</a></h2><div id="rfc.section.2.1.p.1"><p>Validators come in two flavors: strong or weak. Weak validators are easy to generate but are far less useful for comparisons. Strong validators are ideal for comparisons but can be very difficult (and occasionally impossible) to generate efficiently. Rather than impose that all forms of resource adhere to the same strength of validator, HTTP exposes the type of validator in use and imposes restrictions on when weak validators can be used as preconditions.<a class="self" href="#rfc.section.2.1.p.1">&para;</a></p></div><div id="rfc.section.2.1.p.2"><p>A "strong validator" is representation metadata that changes value whenever a change occurs to the representation data that would be observable in the payload body of a <a href="rfc7231.html#status.200" class="smpl">200 (OK)</a> response to GET.<a class="self" href="#rfc.section.2.1.p.2">&para;</a></p></div><div id="rfc.section.2.1.p.3"><p>A strong validator might change for reasons other than a change to the representation data, such as when a semantically significant part of the representation metadata is changed (e.g., <a href="rfc7231.html#header.content-type" class="smpl">Content-Type</a>), but it is in the best interests of the origin server to only change the value when it is necessary to invalidate the stored responses held by remote caches and authoring tools.<a class="self" href="#rfc.section.2.1.p.3">&para;</a></p></div><div id="rfc.section.2.1.p.4"><p>Cache entries might persist for arbitrarily long periods, regardless of expiration times. Thus, a cache might attempt to validate an entry using a validator that it obtained in the distant past. A strong validator is unique across all versions of all representations associated with a particular resource over time. However, there is no implication of uniqueness across representations of different resources (i.e., the same strong validator might be in use for representations of multiple resources at the same time and does not imply that those representations are equivalent).<a class="self" href="#rfc.section.2.1.p.4">&para;</a></p></div><div id="rfc.section.2.1.p.5"><p>There are a variety of strong validators used in practice. The best are based on strict revision control, wherein each change to a representation always results in a unique node name and revision identifier being assigned before the representation is made accessible to GET. A collision-resistant hash function applied to the representation data is also sufficient if the data is available prior to the response header fields being sent and the digest does not need to be recalculated every time a validation request is received. However, if a resource has distinct representations that differ only in their metadata, such as might occur with content negotiation over media types that happen to share the same data format, then the origin server needs to incorporate additional information in the validator to distinguish those representations.<a class="self" href="#rfc.section.2.1.p.5">&para;</a></p></div><div id="rfc.section.2.1.p.6"><p>In contrast, a "weak validator" is representation metadata that might not change for every change to the representation data. This weakness might be due to limitations in how the value is calculated, such as clock resolution, an inability to ensure uniqueness for all possible representations of the resource, or a desire of the resource owner to group representations by some self-determined set of equivalency rather than unique sequences of data. An origin server <em class="bcp14">SHOULD</em> change a weak entity-tag whenever it considers prior representations to be unacceptable as a substitute for the current representation. In other words, a weak entity-tag ought to change whenever the origin server wants caches to invalidate old responses.<a class="self" href="#rfc.section.2.1.p.6">&para;</a></p></div><div id="rfc.section.2.1.p.7"><p>For example, the representation of a weather report that changes in content every second, based on dynamic measurements, might be grouped into sets of equivalent representations (from the origin server's perspective) with the same weak validator in order to allow cached representations to be valid for a reasonable period of time (perhaps adjusted dynamically based on server load or weather quality). Likewise, a representation's modification time, if defined with only one-second resolution, might be a weak validator if it is possible for the representation to be modified twice during a single second and retrieved between those modifications.<a class="self" href="#rfc.section.2.1.p.7">&para;</a></p></div><div id="rfc.section.2.1.p.8"><p>Likewise, a validator is weak if it is shared by two or more representations of a given resource at the same time, unless those representations have identical representation data. For example, if the origin server sends the same validator for a representation with a gzip content coding applied as it does for a representation with no content coding, then that validator is weak. However, two simultaneous representations might share the same strong validator if they differ only in the representation metadata, such as when two different media types are available for the same representation data.<a class="self" href="#rfc.section.2.1.p.8">&para;</a></p></div><div id="rfc.section.2.1.p.9"><p>Strong validators are usable for all conditional requests, including cache validation, partial content ranges, and "lost update" avoidance. Weak validators are only usable when the client does not require exact equality with previously obtained representation data, such as when validating a cache entry or limiting a web traversal to recent changes.<a class="self" href="#rfc.section.2.1.p.9">&para;</a></p></div></div><div id="header.last-modified"><h2 id="rfc.section.2.2"><a href="#rfc.section.2.2">2.2</a>&nbsp;<a href="#header.last-modified">Last-Modified</a></h2><div id="rfc.section.2.2.p.1"><p>The "Last-Modified" header field in a response provides a timestamp indicating the date and time at which the origin server believes the selected representation was last modified, as determined at the conclusion of handling the request.<a class="self" href="#rfc.section.2.2.p.1">&para;</a></p></div><div id="rfc.figure.u.1"><pre class="inline"><span id="rfc.iref.g.1"></span>  <a href="#header.last-modified" class="smpl">Last-Modified</a> = <a href="#imported.abnf" class="smpl">HTTP-date</a> 
     527</style><link rel="Contents" href="#rfc.toc"><link rel="Author" href="#rfc.authors"><link rel="Copyright" href="#rfc.copyrightnotice"><link rel="Index" href="#rfc.index"><link rel="Chapter" title="1 Introduction" href="#rfc.section.1"><link rel="Chapter" title="2 Validators" href="#rfc.section.2"><link rel="Chapter" title="3 Precondition Header Fields" href="#rfc.section.3"><link rel="Chapter" title="4 Status Code Definitions" href="#rfc.section.4"><link rel="Chapter" title="5 Evaluation" href="#rfc.section.5"><link rel="Chapter" title="6 Precedence" href="#rfc.section.6"><link rel="Chapter" title="7 IANA Considerations" href="#rfc.section.7"><link rel="Chapter" title="8 Security Considerations" href="#rfc.section.8"><link rel="Chapter" title="9 Acknowledgments" href="#rfc.section.9"><link rel="Chapter" href="#rfc.section.10" title="10 References"><link rel="Appendix" title="A Changes from RFC 2616" href="#rfc.section.A"><link rel="Appendix" title="B Imported ABNF" href="#rfc.section.B"><link rel="Appendix" title="C Collected ABNF" href="#rfc.section.C"><link href="rfc7231.html" rel="prev"><link href="rfc7233.ht