draft-reschke-http-jfv-06.txt   draft-reschke-http-jfv-latest.txt 
Network Working Group J. Reschke Network Working Group J. Reschke
Internet-Draft greenbytes Internet-Draft greenbytes
Intended status: Standards Track June 25, 2017 Intended status: Standards Track September 22, 2017
Expires: December 27, 2017 Expires: March 26, 2018
A JSON Encoding for HTTP Header Field Values A JSON Encoding for HTTP Header Field Values
draft-reschke-http-jfv-06 draft-reschke-http-jfv-latest
Abstract Abstract
This document establishes a convention for use of JSON-encoded field This document establishes a convention for use of JSON-encoded field
values in HTTP header fields. values in HTTP header fields.
Editorial Note (To be removed by RFC Editor before publication) Editorial Note (To be removed by RFC Editor before publication)
Distribution of this document is unlimited. Although this is not a Distribution of this document is unlimited. Although this is not a
work item of the HTTPbis Working Group, comments should be sent to work item of the HTTPbis Working Group, comments should be sent to
the Hypertext Transfer Protocol (HTTP) mailing list at ietf-http- the Hypertext Transfer Protocol (HTTP) mailing list at ietf-http-
wg@w3.org [1], which may be joined by sending a message with subject wg@w3.org [1], which may be joined by sending a message with subject
"subscribe" to ietf-http-wg-request@w3.org [2]. "subscribe" to ietf-http-wg-request@w3.org [2].
Discussions of the HTTPbis Working Group are archived at Discussions of the HTTPbis Working Group are archived at
<http://lists.w3.org/Archives/Public/ietf-http-wg/>. <http://lists.w3.org/Archives/Public/ietf-http-wg/>.
XML versions and latest edits for this document are available from XML versions and latest edits for this document are available from
<http://greenbytes.de/tech/webdav/#draft-reschke-http-jfv>. <http://greenbytes.de/tech/webdav/#draft-reschke-http-jfv>.
The changes in this draft are summarized in Appendix E.9. The changes in this draft are summarized in Appendix E.10.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
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 http://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 December 27, 2017. This Internet-Draft will expire on March 26, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2017 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 Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
skipping to change at page 2, line 50 skipping to change at page 2, line 50
A.2. Content-Disposition . . . . . . . . . . . . . . . . . . . 10 A.2. Content-Disposition . . . . . . . . . . . . . . . . . . . 10
A.3. WWW-Authenticate . . . . . . . . . . . . . . . . . . . . 11 A.3. WWW-Authenticate . . . . . . . . . . . . . . . . . . . . 11
A.4. Accept-Encoding . . . . . . . . . . . . . . . . . . . . . 12 A.4. Accept-Encoding . . . . . . . . . . . . . . . . . . . . . 12
Appendix B. Use of JSON Field Value Encoding in the Wild . . . . 13 Appendix B. Use of JSON Field Value Encoding in the Wild . . . . 13
B.1. W3C Reporting API Specification . . . . . . . . . . . . . 14 B.1. W3C Reporting API Specification . . . . . . . . . . . . . 14
B.2. W3C Clear Site Data Specification . . . . . . . . . . . . 14 B.2. W3C Clear Site Data Specification . . . . . . . . . . . . 14
B.3. W3C Feature Policy Specification . . . . . . . . . . . . 14 B.3. W3C Feature Policy Specification . . . . . . . . . . . . 14
Appendix C. Relation to HTTP 'Key' Header Field . . . . . . . . 14 Appendix C. Relation to HTTP 'Key' Header Field . . . . . . . . 14
Appendix D. Discussion . . . . . . . . . . . . . . . . . . . . . 14 Appendix D. Discussion . . . . . . . . . . . . . . . . . . . . . 14
Appendix E. Change Log (to be removed by RFC Editor before Appendix E. Change Log (to be removed by RFC Editor before
publication) . . . . . . . . . . . . . . . . . . . . 14 publication) . . . . . . . . . . . . . . . . . . . . 15
E.1. Since draft-reschke-http-jfv-00 . . . . . . . . . . . . . 15 E.1. Since draft-reschke-http-jfv-00 . . . . . . . . . . . . . 15
E.2. Since draft-reschke-http-jfv-01 . . . . . . . . . . . . . 15 E.2. Since draft-reschke-http-jfv-01 . . . . . . . . . . . . . 15
E.3. Since draft-reschke-http-jfv-02 . . . . . . . . . . . . . 15 E.3. Since draft-reschke-http-jfv-02 . . . . . . . . . . . . . 15
E.4. Since draft-reschke-http-jfv-03 . . . . . . . . . . . . . 15 E.4. Since draft-reschke-http-jfv-03 . . . . . . . . . . . . . 15
E.5. Since draft-reschke-http-jfv-04 . . . . . . . . . . . . . 15 E.5. Since draft-reschke-http-jfv-04 . . . . . . . . . . . . . 15
E.6. Since draft-ietf-httpbis-jfv-00 . . . . . . . . . . . . . 15 E.6. Since draft-ietf-httpbis-jfv-00 . . . . . . . . . . . . . 15
E.7. Since draft-ietf-httpbis-jfv-01 . . . . . . . . . . . . . 15 E.7. Since draft-ietf-httpbis-jfv-01 . . . . . . . . . . . . . 15
E.8. Since draft-ietf-httpbis-jfv-02 . . . . . . . . . . . . . 15 E.8. Since draft-ietf-httpbis-jfv-02 . . . . . . . . . . . . . 16
E.9. Since draft-reschke-http-jfv-05 . . . . . . . . . . . . . 16 E.9. Since draft-reschke-http-jfv-05 . . . . . . . . . . . . . 16
E.10. Since draft-reschke-http-jfv-06 . . . . . . . . . . . . . 16
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 16 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 16
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 16 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 16
1. Introduction 1. Introduction
Defining syntax for new HTTP header fields ([RFC7230], Section 3.2) Defining syntax for new HTTP header fields ([RFC7230], Section 3.2)
is non-trivial. Among the commonly encountered problems are: is non-trivial. Among the commonly encountered problems are:
o There is no common syntax for complex field values. Several well- o There is no common syntax for complex field values. Several well-
known header fields do use a similarly looking syntax, but it is known header fields do use a similarly looking syntax, but it is
skipping to change at page 7, line 51 skipping to change at page 7, line 51
smuggle information through field values; however, this concern is smuggle information through field values; however, this concern is
shared with other widely used formats, such as those using parameters shared with other widely used formats, such as those using parameters
in the form of name/value pairs. in the form of name/value pairs.
10. References 10. References
10.1. Normative References 10.1. Normative References
[RFC0020] Cerf, V., "ASCII format for network interchange", STD 80, [RFC0020] Cerf, V., "ASCII format for network interchange", STD 80,
RFC 20, DOI 10.17487/RFC0020, October 1969, RFC 20, DOI 10.17487/RFC0020, October 1969,
<http://www.rfc-editor.org/info/rfc20>. <https://www.rfc-editor.org/info/rfc20>.
[RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, RFC 5234, Specifications: ABNF", STD 68, RFC 5234,
DOI 10.17487/RFC5234, January 2008, DOI 10.17487/RFC5234, January 2008,
<http://www.rfc-editor.org/info/rfc5234>. <https://www.rfc-editor.org/info/rfc5234>.
[RFC7159] Bray, T., "The JavaScript Object Notation (JSON) Data [RFC7159] Bray, T., "The JavaScript Object Notation (JSON) Data
Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March
2014, <http://www.rfc-editor.org/info/rfc7159>. 2014, <https://www.rfc-editor.org/info/rfc7159>.
[RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Message Syntax and Routing", Protocol (HTTP/1.1): Message Syntax and Routing",
RFC 7230, DOI 10.17487/RFC7230, June 2014, RFC 7230, DOI 10.17487/RFC7230, June 2014,
<http://www.rfc-editor.org/info/rfc7230>. <https://www.rfc-editor.org/info/rfc7230>.
[RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Semantics and Content", RFC 7231, Protocol (HTTP/1.1): Semantics and Content", RFC 7231,
DOI 10.17487/RFC7231, June 2014, DOI 10.17487/RFC7231, June 2014,
<http://www.rfc-editor.org/info/rfc7231>. <https://www.rfc-editor.org/info/rfc7231>.
[RFC7493] Bray, T., Ed., "The I-JSON Message Format", RFC 7493, [RFC7493] Bray, T., Ed., "The I-JSON Message Format", RFC 7493,
DOI 10.17487/RFC7493, March 2015, DOI 10.17487/RFC7493, March 2015,
<http://www.rfc-editor.org/info/rfc7493>. <https://www.rfc-editor.org/info/rfc7493>.
10.2. Informative References 10.2. Informative References
[CLEARSITE] [CLEARSITE]
West, M., "Clear Site Data", W3C Working Draft WD-clear- West, M., "Clear Site Data", W3C Working Draft WD-clear-
site-data-20160720, July 2016, site-data-20160720, July 2016,
<http://www.w3.org/TR/2016/WD-clear-site-data-20160720/>. <http://www.w3.org/TR/2016/WD-clear-site-data-20160720/>.
Latest version available at <http://www.w3.org/TR/clear- Latest version available at <http://www.w3.org/TR/clear-
site-data/>. site-data/>.
skipping to change at page 9, line 23 skipping to change at page 9, line 23
progress), March 2016. progress), March 2016.
[REPORTING] [REPORTING]
Grigorik, I. and M. West, "Reporting API 1", W3C Group Grigorik, I. and M. West, "Reporting API 1", W3C Group
Note NOTE-reporting-1-20160607, June 2016, Note NOTE-reporting-1-20160607, June 2016,
<http://www.w3.org/TR/2016/NOTE-reporting-1-20160607/>. <http://www.w3.org/TR/2016/NOTE-reporting-1-20160607/>.
Latest version available at <http://www.w3.org/TR/ Latest version available at <http://www.w3.org/TR/
reporting-1/>. reporting-1/>.
[RFC5987] Reschke, J., "Character Set and Language Encoding for
Hypertext Transfer Protocol (HTTP) Header Field
Parameters", RFC 5987, DOI 10.17487/RFC5987, August 2010,
<http://www.rfc-editor.org/info/rfc5987>.
[RFC6266] Reschke, J., "Use of the Content-Disposition Header Field [RFC6266] Reschke, J., "Use of the Content-Disposition Header Field
in the Hypertext Transfer Protocol (HTTP)", RFC 6266, in the Hypertext Transfer Protocol (HTTP)", RFC 6266,
DOI 10.17487/RFC6266, June 2011, DOI 10.17487/RFC6266, June 2011,
<http://www.rfc-editor.org/info/rfc6266>. <https://www.rfc-editor.org/info/rfc6266>.
[RFC6365] Hoffman, P. and J. Klensin, "Terminology Used in [RFC6365] Hoffman, P. and J. Klensin, "Terminology Used in
Internationalization in the IETF", BCP 166, RFC 6365, Internationalization in the IETF", BCP 166, RFC 6365,
DOI 10.17487/RFC6365, September 2011, DOI 10.17487/RFC6365, September 2011,
<http://www.rfc-editor.org/info/rfc6365>. <https://www.rfc-editor.org/info/rfc6365>.
[RFC7235] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer [RFC7235] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Authentication", RFC 7235, Protocol (HTTP/1.1): Authentication", RFC 7235,
DOI 10.17487/RFC7235, June 2014, DOI 10.17487/RFC7235, June 2014,
<http://www.rfc-editor.org/info/rfc7235>. <https://www.rfc-editor.org/info/rfc7235>.
[RFC8187] Reschke, J., "Indicating Character Encoding and Language
for HTTP Header Field Parameters", RFC 8187,
DOI 10.17487/RFC8187, September 2017,
<https://www.rfc-editor.org/info/rfc8187>.
[XMLHttpRequest] [XMLHttpRequest]
WhatWG, "XMLHttpRequest", <https://xhr.spec.whatwg.org/>. WhatWG, "XMLHttpRequest", <https://xhr.spec.whatwg.org/>.
10.3. URIs 10.3. URIs
[1] mailto:ietf-http-wg@w3.org [1] mailto:ietf-http-wg@w3.org
[2] mailto:ietf-http-wg-request@w3.org?subject=subscribe [2] mailto:ietf-http-wg-request@w3.org?subject=subscribe
skipping to change at page 11, line 21 skipping to change at page 11, line 21
which would translate to a header field value of: which would translate to a header field value of:
{ "Attachment": { "filename" : "example.html" } } { "Attachment": { "filename" : "example.html" } }
The third example in Section 5 of [RFC6266] uses a filename parameter The third example in Section 5 of [RFC6266] uses a filename parameter
containing non-US-ASCII characters: containing non-US-ASCII characters:
attachment; filename*=UTF-8''%e2%82%ac%20rates attachment; filename*=UTF-8''%e2%82%ac%20rates
Note that in this case, the "filename*" parameter uses the encoding Note that in this case, the "filename*" parameter uses the encoding
defined in [RFC5987], representing a filename starting with the defined in [RFC8187], representing a filename starting with the
Unicode character U+20AC (EURO SIGN), followed by " rates". If the Unicode character U+20AC (EURO SIGN), followed by " rates". If the
definition of Content-Disposition would have used the format proposed definition of Content-Disposition would have used the format proposed
here, the workaround involving the "parameter*" syntax would not have here, the workaround involving the "parameter*" syntax would not have
been needed at all. been needed at all.
The JSON representation of this value could then be: The JSON representation of this value could then be:
{ "attachment": { "filename" : "\u20AC rates" } } { "attachment": { "filename" : "\u20AC rates" } }
A.3. WWW-Authenticate A.3. WWW-Authenticate
skipping to change at page 14, line 13 skipping to change at page 14, line 13
The sections below summarize the current usage of this format. The sections below summarize the current usage of this format.
B.1. W3C Reporting API Specification B.1. W3C Reporting API Specification
Defined in W3C Note "Reporting API 1" (Section 3.1 of [REPORTING]). Defined in W3C Note "Reporting API 1" (Section 3.1 of [REPORTING]).
Still in use in latest editor copy as of June 2017. Still in use in latest editor copy as of June 2017.
B.2. W3C Clear Site Data Specification B.2. W3C Clear Site Data Specification
Defined in W3C Working Draft "Clear Site Data" (Section 2.1 of Defined in W3C Working Draft "Clear Site Data" (Section 2.1 of
[CLEARSITE]). Latest Editor's Draft replaces the use of JSON with a [CLEARSITE]). Latest Editor's Draft at <https://w3c.github.io/
custom syntax (see <https://lists.w3.org/Archives/Public/ietf-http- webappsec-clear-site-data/#header> replaces the use of JSON with a
custom syntax that happens to be somewhat compatible with an array of
JSON strings (see <https://lists.w3.org/Archives/Public/ietf-http-
wg/2017AprJun/0214.html> for feedback). wg/2017AprJun/0214.html> for feedback).
B.3. W3C Feature Policy Specification B.3. W3C Feature Policy Specification
Defined in W3C Draft Community Group Report "Feature Policy" Defined in W3C Draft Community Group Report "Feature Policy"
(Section 6.1 of [FEATUREPOL]). Previously relied on this document, (Section 6.1 of [FEATUREPOL]). Previously relied on this document,
now replicates the syntax into a custom ABNF defined in a separate now replicates the syntax into a custom ABNF defined in a separate
section (Section 5.1 of [FEATUREPOL]). section (Section 5.1 of [FEATUREPOL]).
Appendix C. Relation to HTTP 'Key' Header Field Appendix C. Relation to HTTP 'Key' Header Field
skipping to change at page 16, line 13 skipping to change at page 16, line 19
Updated XHR reference. Updated XHR reference.
E.9. Since draft-reschke-http-jfv-05 E.9. Since draft-reschke-http-jfv-05
Add meat to "Using this Format in Header Field Definitions". Add meat to "Using this Format in Header Field Definitions".
Add a few lines on the relation to "Key". Add a few lines on the relation to "Key".
Summarize current use of the format. Summarize current use of the format.
E.10. Since draft-reschke-http-jfv-06
RFC 5987 is obsoleted by RFC 8187.
Upcate CLEARSITE comment.
Acknowledgements Acknowledgements
Thanks go to the Hypertext Transfer Protocol Working Group Thanks go to the Hypertext Transfer Protocol Working Group
participants. participants.
Author's Address Author's Address
Julian F. Reschke Julian F. Reschke
greenbytes GmbH greenbytes GmbH
Hafenweg 16 Hafenweg 16
 End of changes. 22 change blocks. 
26 lines changed or deleted 35 lines changed or added

This html diff was produced by rfcdiff 1.44jr. The latest version is available from http://tools.ietf.org/tools/rfcdiff/