From 0a90b7dc507e7c6f5dbae18764e02f67d64fb65c 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..7d33f318 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://datatracker.ietf.org/doc/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://datatracker.ietf.org/doc/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");