Internet-Draft The Purpose Declined HTTP Status Code September 2026
Nottingham Expires 13 March 2027 [Page]
Workgroup:
Network Working Group
Internet-Draft:
draft-ietf-httpbis-pre-denied-01
Published:
Intended Status:
Standards Track
Expires:
Author:
M. Nottingham
Cloudflare

The Purpose Declined HTTP Status Code

Abstract

This specification defines an HTTP status code to indicate that the server is denying a request based upon its declared purpose.

About This Document

This note is to be removed before publishing as an RFC.

The latest revision of this draft can be found at https://httpwg.org/http-extensions/draft-ietf-httpbis-pre-denied.html. Status information for this document may be found at https://datatracker.ietf.org/doc/draft-ietf-httpbis-pre-denied/.

Discussion of this document takes place on the HTTP Working Group mailing list (mailto:ietf-http-wg@w3.org), which is archived at https://lists.w3.org/Archives/Public/ietf-http-wg/. Working Group information can be found at https://httpwg.org/.

Source for this draft and an issue tracker can be found at https://github.com/httpwg/http-extensions/labels/pre-denied.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 13 March 2027.

Table of Contents

1. Introduction

[FETCH] introduces a mechanism whereby HTTP [HTTP] user agents can speculatively request a representation of a resource, in order to improve perceived performance.

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.

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.

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.

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.

1.1. Notational Conventions

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

2. The 419 (Purpose Declined) Status Code

The 419 (Purpose Declined) status code indicates that the server is refusing a request based upon its declared purpose.

A request's declared purpose is indicted by its Sec-Purpose header field [FETCH].

This indication is only applicable to the associated request; future requests with the same purpose might or might not succeed.

Because responses with this status code are not intended to be displayed to a user, they SHOULD have zero-length content, and any content that is sent SHOULD be discarded.

Both origin servers and gateways acting on their behalf (e.g., Content Delivery Networks and so-called "reverse proxies") MAY generate this status code. Proxies (who are not acting on behalf of the origin server) SHOULD NOT generate it.

This status code is not heuristically cacheable (see Section 15.1 of [HTTP]). To avoid responses with this status code being reused by a cache, they SHOULD NOT be cacheable (see Section 3 of [HTTP-CACHING]).

3. IANA Considerations

The following entry should be registered in the "HTTP Status Codes" registry:

4. Security Considerations

The security considerations of [HTTP] and [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.

5. Normative References

[FETCH]
WHAT Working Group, "Fetch", n.d., <https://fetch.spec.whatwg.org/>.
[HTTP]
Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., "HTTP Semantics", STD 97, RFC 9110, DOI 10.17487/RFC9110, , <https://www.rfc-editor.org/rfc/rfc9110>.
[HTTP-CACHING]
Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., "HTTP Caching", STD 98, RFC 9111, DOI 10.17487/RFC9111, , <https://www.rfc-editor.org/rfc/rfc9111>.
[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/rfc/rfc2119>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/rfc/rfc8174>.

Author's Address

Mark Nottingham
Cloudflare
Melbourne
Australia