From a3f34f7aef84f11ab254db8da59f03aed26435d0 Mon Sep 17 00:00:00 2001 From: Pi-Cla Date: Wed, 20 Mar 2024 03:32:33 +0000 Subject: [PATCH] Add StatusCode EARLY_HINTS and TOO_EARLY See https://www.rfc-editor.org/rfc/rfc8297#section-2 and https://www.rfc-editor.org/rfc/rfc8470#section-5.2 --- src/status.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/status.rs b/src/status.rs index 1f619ee1..e56b13b8 100644 --- a/src/status.rs +++ b/src/status.rs @@ -335,6 +335,10 @@ status_codes! { /// [[RFC2518](https://tools.ietf.org/html/rfc2518)] (102, PROCESSING, "Processing"); + /// 103 Early Hints + /// [[RFC8297, Section 2](https://tools.ietf.org/html/rfc8297#section-2)] + (103, EARLY_HINTS, "Early Hints"); + /// 200 OK /// [[RFC7231, Section 6.3.1](https://tools.ietf.org/html/rfc7231#section-6.3.1)] (200, OK, "OK"); @@ -462,7 +466,9 @@ status_codes! { /// 424 Failed Dependency /// [[RFC4918](https://tools.ietf.org/html/rfc4918)] (424, FAILED_DEPENDENCY, "Failed Dependency"); - + /// 425 Too Early + /// [[RFC8470, Section 5.2](https://tools.ietf.org/html/rfc8470#section-5.2)] + (425, TOO_EARLY, "Too Early"); /// 426 Upgrade Required /// [[RFC7231, Section 6.5.15](https://tools.ietf.org/html/rfc7231#section-6.5.15)] (426, UPGRADE_REQUIRED, "Upgrade Required");