<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.43 (Ruby 3.4.9) -->
<?rfc tocindent="yes"?>
<?rfc strict="yes"?>
<?rfc compact="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-httpbis-pre-denied-01" category="std" consensus="true" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.34.0 -->
  <front>
    <title>The Purpose Declined HTTP Status Code</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-pre-denied-01"/>
    <author initials="M." surname="Nottingham" fullname="Mark Nottingham">
      <organization>Cloudflare</organization>
      <address>
        <postal>
          <postalLine>Melbourne</postalLine>
          <postalLine>Australia</postalLine>
        </postal>
        <email>mnot@mnot.net</email>
        <uri>https://mnot.net/</uri>
      </address>
    </author>
    <date/>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <?line 52?>

<t>This specification defines an HTTP status code to indicate that the server
is denying a request based upon its declared purpose.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://httpwg.org/http-extensions/draft-ietf-httpbis-pre-denied.html"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-ietf-httpbis-pre-denied/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        HTTP Working Group mailing list (<eref target="mailto:ietf-http-wg@w3.org"/>),
        which is archived at <eref target="https://lists.w3.org/Archives/Public/ietf-http-wg/"/>.
        Working Group information can be found at <eref target="https://httpwg.org/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/httpwg/http-extensions/labels/pre-denied"/>.</t>
    </note>
  </front>
  <middle>
    <?line 57?>

<section anchor="introduction">
      <name>Introduction</name>
      <t><xref target="FETCH"/> introduces a mechanism whereby HTTP <xref target="HTTP"/> user agents can speculatively request a representation of a resource, in order to improve perceived performance.</t>
      <t>In some circumstances, a server might have information that leads it to believe that sending a full
response will not improve performance, and could have negative impacts.</t>
      <t>When this happens, it is common practice to use a 503 (Service Unavailable) status code. However, this has been observed to cause confusion: a server operator who sees a spike in that status code being sent tends to draw the conclusion that there is a server-side operational issue.</t>
      <t>While other status codes (e.g., 403 (Forbidden)) could be used, they can also suffer (to varying degrees) from the same problem: being confused with an error, operational problem, or other condition.</t>
      <t>This specification defines a new status code to specifically address this situation, making servers' behavior more legible to their operators. It does not introduce any new capability.</t>
      <section anchor="notational-conventions">
        <name>Notational Conventions</name>
        <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
        <?line -18?>

</section>
    </section>
    <section anchor="the-code-purpose-declined-status-code">
      <name>The 419 (Purpose Declined) Status Code</name>
      <t>The 419 (Purpose Declined) status code indicates that the server is refusing a request based upon its declared purpose.</t>
      <t>A request's declared purpose is indicted by its Sec-Purpose header field <xref target="FETCH"/>.</t>
      <t>This indication is only applicable to the associated request; future requests with the same purpose might or might not succeed.</t>
      <t>Because responses with this status code are not intended to be displayed to a user, they <bcp14>SHOULD</bcp14> have zero-length content, and any content that is sent <bcp14>SHOULD</bcp14> be discarded.</t>
      <t>Both origin servers and gateways acting on their behalf (e.g., Content Delivery Networks and so-called "reverse proxies") <bcp14>MAY</bcp14> generate this status code. Proxies (who are not acting on behalf of the origin server) <bcp14>SHOULD NOT</bcp14> generate it.</t>
      <t>This status code is not heuristically cacheable (see <xref section="15.1" sectionFormat="of" target="HTTP"/>). To avoid responses with this status code being reused by a cache, they <bcp14>SHOULD NOT</bcp14> be cacheable (see <xref section="3" sectionFormat="of" target="HTTP-CACHING"/>).</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>The following entry should be registered in the "HTTP Status Codes" registry:</t>
      <ul spacing="normal">
        <li>
          <t>Code: 419</t>
        </li>
        <li>
          <t>Description: Purpose Declined</t>
        </li>
        <li>
          <t>Specification: RFC nnnn (this document)</t>
        </li>
      </ul>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>The security considerations of <xref target="HTTP"/> and <xref target="FETCH"/> apply. Conceivably, the use of this status code could leak information about the internal state of the server; caution should be exercised to assure that it does not.</t>
    </section>
  </middle>
  <back>
    <references anchor="sec-normative-references">
      <name>Normative References</name>
      <reference anchor="HTTP">
        <front>
          <title>HTTP Semantics</title>
          <author fullname="R. Fielding" initials="R." role="editor" surname="Fielding"/>
          <author fullname="M. Nottingham" initials="M." role="editor" surname="Nottingham"/>
          <author fullname="J. Reschke" initials="J." role="editor" surname="Reschke"/>
          <date month="June" year="2022"/>
          <abstract>
            <t>The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document describes the overall architecture of HTTP, establishes common terminology, and defines aspects of the protocol that are shared by all versions. In this definition are core protocol elements, extensibility mechanisms, and the "http" and "https" Uniform Resource Identifier (URI) schemes.</t>
            <t>This document updates RFC 3864 and obsoletes RFCs 2818, 7231, 7232, 7233, 7235, 7538, 7615, 7694, and portions of 7230.</t>
          </abstract>
        </front>
        <seriesInfo name="STD" value="97"/>
        <seriesInfo name="RFC" value="9110"/>
        <seriesInfo name="DOI" value="10.17487/RFC9110"/>
      </reference>
      <reference anchor="HTTP-CACHING">
        <front>
          <title>HTTP Caching</title>
          <author fullname="R. Fielding" initials="R." role="editor" surname="Fielding"/>
          <author fullname="M. Nottingham" initials="M." role="editor" surname="Nottingham"/>
          <author fullname="J. Reschke" initials="J." role="editor" surname="Reschke"/>
          <date month="June" year="2022"/>
          <abstract>
            <t>The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines HTTP caches and the associated header fields that control cache behavior or indicate cacheable response messages.</t>
            <t>This document obsoletes RFC 7234.</t>
          </abstract>
        </front>
        <seriesInfo name="STD" value="98"/>
        <seriesInfo name="RFC" value="9111"/>
        <seriesInfo name="DOI" value="10.17487/RFC9111"/>
      </reference>
      <reference anchor="FETCH" target="https://fetch.spec.whatwg.org/">
        <front>
          <title>Fetch</title>
          <author>
            <organization>WHAT Working Group</organization>
          </author>
          <date>n.d.</date>
        </front>
      </reference>
      <reference anchor="RFC2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author fullname="S. Bradner" initials="S." surname="Bradner"/>
          <date month="March" year="1997"/>
          <abstract>
            <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <seriesInfo name="DOI" value="10.17487/RFC2119"/>
      </reference>
      <reference anchor="RFC8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author fullname="B. Leiba" initials="B." surname="Leiba"/>
          <date month="May" year="2017"/>
          <abstract>
            <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
        <seriesInfo name="DOI" value="10.17487/RFC8174"/>
      </reference>
    </references>
    <?line 121?>



  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA5VX627jNhb+r6fgeoBtvIjseCbFdtSirWsnTYDcduLBoCiK
gqZoiwglqiRljxvMu+yz7JPtd0jJt0xbND9iiZdz/c53jtI0TbzyWmZsVkj2
0NjaOMmmUmhVyZxdzWYP7NFz3zg2MblMciMqXuJ4bvnCp0r6RVp4X8+VS2sr
01xWSubp2SjJucex5+l4dvEpEXhZGrvJmPN5kqjaZszbxvnXZ2dvz14nT3Kz
NjbP2HXlpa2kT6ckP0mc51X+K9emgrCNdIkrufW//tYYL13GKpPUKmM/eyNO
Gf6pCgb4U+aM9VYuHJ42ZfvgrRLYEqaseftQ4jC2VEXe/pIkK1k1MksYW1rT
1FlwH29+U0P7B2OfVLVkP9IeVgtDcSDnXTYc0u96OTB2OcReyZXO2DY66Xr5
/foNbWKPW1Hs7mnlvBvEzeEYW2ol3fChmWslhvsCSKyVtdldXSpfNPMB/Gi1
h59UfvSycspUbqj5XGo33CUGMjRS4XzGep+x/Pj+nyZ5UPhS95IkmpEq5xqZ
Bo0Z29OYIMbKbyiqjxc3l1D87nLCKvz1sDS5n15g6Xz0FpJ44wtjcTLFDkNa
kOHbAbsz3iPwBS/DcsTfLbdPxztwgVfqd+5hfMYm2jT5QnMrwyaA7bnOwjNj
KbuVem4aYC2sCNNUnvA5Bigt14qHZRkTWVbGf0//BoBm2Gis2iWi2xkmSWVs
Cf2rgCKCT8bg7tvR6Kx9TyfjydX13Y/d+gjrlxezyVW0zHO7lH4neiG9KAau
lmKwLrjfIQxHY91e0omwsA1f9LD9PQ7Lh6vx7AWWGQvlmiRJmqaMzykGAuU3
K5RjpF0tlAgCWC4XKBbHeBXZwUV2EGAHVCCSltNJPMNc/JPMSbuSNoEgIGJD
WjmA/FsDFLI5d2CZpoZc5emAoHzlrI5ENIj2lCrPtYRxr4gfrMkbQaYkyfNz
CN2nT1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