draft-ietf-httpbis-retrofit-03.txt | draft-ietf-httpbis-retrofit-04.txt | |||
---|---|---|---|---|
Network Working Group M. Nottingham | Network Working Group M. Nottingham | |||
Internet-Draft 24 May 2022 | Internet-Draft 8 June 2022 | |||
Intended status: Standards Track | Intended status: Standards Track | |||
Expires: 25 November 2022 | Expires: 10 December 2022 | |||
Retrofit Structured Fields for HTTP | Retrofit Structured Fields for HTTP | |||
draft-ietf-httpbis-retrofit-03 | draft-ietf-httpbis-retrofit-04 | |||
Abstract | Abstract | |||
This specification nominates a selection of existing HTTP fields as | This specification nominates a selection of existing HTTP fields as | |||
having syntax that is compatible with Structured Fields, so that they | having syntax that is compatible with Structured Fields, so that they | |||
can be handled as such (subject to certain caveats). | can be handled as such (subject to certain caveats). | |||
To accommodate some additional fields whose syntax is not compatible, | To accommodate some additional fields whose syntax is not compatible, | |||
it also defines mappings of their semantics into new Structured | it also defines mappings of their semantics into new Structured | |||
Fields. It does not specify how to negotiate their use. | Fields. It does not specify how to negotiate their use. | |||
skipping to change at page 2, line 4 ¶ | skipping to change at page 2, line 4 ¶ | |||
Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
Drafts is at https://datatracker.ietf.org/drafts/current/. | Drafts is at https://datatracker.ietf.org/drafts/current/. | |||
Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
This Internet-Draft will expire on 25 November 2022. | This Internet-Draft will expire on 10 December 2022. | |||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2022 IETF Trust and the persons identified as the | Copyright (c) 2022 IETF Trust and the persons identified as the | |||
document authors. All rights reserved. | document authors. All rights reserved. | |||
This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
Provisions Relating to IETF Documents (https://trustee.ietf.org/ | Provisions Relating to IETF Documents (https://trustee.ietf.org/ | |||
license-info) in effect on the date of publication of this document. | license-info) in effect on the date of publication of this document. | |||
Please review these documents carefully, as they describe your rights | Please review these documents carefully, as they describe your rights | |||
skipping to change at page 8, line 46 ¶ | skipping to change at page 8, line 46 ¶ | |||
For example, a Location field could be mapped as: | For example, a Location field could be mapped as: | |||
SF-Location: "https://example.com/foo" | SF-Location: "https://example.com/foo" | |||
3.2. Dates | 3.2. Dates | |||
The field names in Table 3 (paired with their mapped field names) | The field names in Table 3 (paired with their mapped field names) | |||
have values that can be mapped into Structured Fields by parsing | have values that can be mapped into Structured Fields by parsing | |||
their payload according to Section 5.6.7 of [HTTP] and representing | their payload according to Section 5.6.7 of [HTTP] and representing | |||
the result as an Integer number of seconds delta from the Unix Epoch | the result as an Integer number of seconds delta from the Unix Epoch | |||
(00:00:00 UTC on 1 January 1970, minus leap seconds). | (00:00:00 UTC on 1 January 1970, excluding leap seconds). | |||
+=====================+===================+ | +=====================+===================+ | |||
| Field Name | Mapped Field Name | | | Field Name | Mapped Field Name | | |||
+=====================+===================+ | +=====================+===================+ | |||
| Date | SF-Date | | | Date | SF-Date | | |||
+---------------------+-------------------+ | +---------------------+-------------------+ | |||
| Expires | SF-Expires | | | Expires | SF-Expires | | |||
+---------------------+-------------------+ | +---------------------+-------------------+ | |||
| If-Modified-Since | SF-IMS | | | If-Modified-Since | SF-IMS | | |||
+---------------------+-------------------+ | +---------------------+-------------------+ | |||
skipping to change at page 10, line 12 ¶ | skipping to change at page 10, line 12 ¶ | |||
SF-Link: "/terms"; rel="copyright"; anchor="#foo" | SF-Link: "/terms"; rel="copyright"; anchor="#foo" | |||
3.5. Cookies | 3.5. Cookies | |||
The field values of the Cookie and Set-Cookie fields [COOKIES] can be | The field values of the Cookie and Set-Cookie fields [COOKIES] can be | |||
mapped into the SF-Cookie Structured Field (a List) and SF-Set-Cookie | mapped into the SF-Cookie Structured Field (a List) and SF-Set-Cookie | |||
Structured Field (a Dictionary), respectively. | Structured Field (a Dictionary), respectively. | |||
In each case, cookie names are Tokens. Their values are Strings, | In each case, cookie names are Tokens. Their values are Strings, | |||
unless they can be represented accurately and unambiguously using the | unless the value can be successfully parsed as the textual | |||
textual representation of another structured types (e.g., an Integer | representation of another, bare Item structured type (e.g., Byte | |||
or Decimal). | Sequence, Decimal, Integer, Token, or Boolean). | |||
Set-Cookie parameters map to Parameters on the appropriate SF-Set- | Set-Cookie parameters map to Parameters on the appropriate SF-Set- | |||
Cookie member, with the parameter name being forced to lowercase. | Cookie member, with the parameter name being forced to lowercase. | |||
Set-Cookie parameter values are Strings unless a specific type is | Set-Cookie parameter values are Strings unless a specific type is | |||
defined for them. This specification defines the parameter types in | defined for them. This specification defines the parameter types in | |||
Table 4. | Table 4. | |||
+================+=================+ | +================+=================+ | |||
| Parameter Name | Structured Type | | | Parameter Name | Structured Type | | |||
+================+=================+ | +================+=================+ | |||
skipping to change at page 10, line 40 ¶ | skipping to change at page 10, line 40 ¶ | |||
+----------------+-----------------+ | +----------------+-----------------+ | |||
| Secure | Boolean | | | Secure | Boolean | | |||
+----------------+-----------------+ | +----------------+-----------------+ | |||
| SameSite | Token | | | SameSite | Token | | |||
+----------------+-----------------+ | +----------------+-----------------+ | |||
Table 4: Set-Cookie Parameter Types | Table 4: Set-Cookie Parameter Types | |||
Expires is mapped to an Integer representation of parsed-cookie-date | Expires is mapped to an Integer representation of parsed-cookie-date | |||
(see Part x.x of [COOKIES]) expressed as a number of seconds delta | (see Part x.x of [COOKIES]) expressed as a number of seconds delta | |||
from the Unix Epoch (00:00:00 UTC on 1 January 1970, minus leap | from the Unix Epoch (00:00:00 UTC on 1 January 1970, excluding leap | |||
seconds). | seconds). | |||
Note that although this mapping is very similar to the syntax of | Note that although this mapping is very similar to the syntax of | |||
Cookie and Set-Cookie headers, cookies in both fields are separated | Cookie and Set-Cookie headers, cookies in both fields are separated | |||
by commas, not semicolons, and multiple cookies can appear in each | by commas, not semicolons, and multiple cookies can appear in each | |||
field. | field. | |||
For example: | For example: | |||
SF-Set-Cookie: lang="en-US"; expires="Wed, 09 Jun 2021 10:18:14 GMT"; | SF-Set-Cookie: lang="en-US"; expires="Wed, 09 Jun 2021 10:18:14 GMT"; | |||
End of changes. 7 change blocks. | ||||
9 lines changed or deleted | 9 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |