You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@
23
23
-[API](#api)
24
24
- [Endpoints](#endpoints)
25
25
- [Error Codes](#error-codes)
26
+
- [Warnings](#warnings)
26
27
-[Appendix](#appendix)
27
28
28
29
@@ -758,6 +759,26 @@ The `code` field MUST be one of the following:
758
759
| code-13 |`UNSUPPORTED`| the operation is unsupported |
759
760
| code-14 |`TOOMANYREQUESTS`| too many requests |
760
761
762
+
#### Warnings
763
+
764
+
Registry implementations MAY include informational warnings in `Warning` headers, as described in [RFC 7234](https://www.rfc-editor.org/rfc/rfc7234#section-5.5).
765
+
766
+
If included, `Warning` headers MUST specify a `warn-code` of `299` and a `warn-agent` of `-`, and MUST NOT specify a `warn-date` value.
767
+
768
+
A registry MUST NOT send more than 4096 bytes of warning data from all headers combined.
769
+
770
+
Example warning headers:
771
+
772
+
```
773
+
Warning: 299 - "Your auth token will expire in 30 seconds."
774
+
Warning: 299 - "This registry endpoint is deprecated and will be removed soon."
775
+
Warning: 299 - "This image is deprecated and will be removed soon."
776
+
```
777
+
778
+
If a client receives `Warning` response headers, it SHOULD report the warnings to the user in an unobtrusive way.
779
+
Clients SHOULD deduplicate warnings from multiple associated responses.
780
+
In accordance with RFC 7234, clients MUST NOT take any automated action based on the presence or contents of warnings, only report them to the user.
781
+
761
782
### Appendix
762
783
763
784
The following is a list of documents referenced in this spec:
0 commit comments