idnits 2.17.1
draft-reschke-http-jfv-06.txt:
Checking boilerplate required by RFC 5378 and the IETF Trust (see
https://trustee.ietf.org/license-info):
----------------------------------------------------------------------------
No issues found here.
Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt:
----------------------------------------------------------------------------
No issues found here.
Checking nits according to https://www.ietf.org/id-info/checklist :
----------------------------------------------------------------------------
** The document seems to lack an IANA Considerations section. (See Section
2.2 of https://www.ietf.org/id-info/checklist for how to handle the case
when there are no actions for IANA.)
** The abstract seems to contain references ([2], [1]), which it shouldn't.
Please replace those with straight textual mentions of the documents in
question.
** The document seems to lack a both a reference to RFC 2119 and the
recommended RFC 2119 boilerplate, even if it appears to use RFC 2119
keywords.
RFC 2119 keyword, line 287: '... MUST NOT use duplicate object names...'
Miscellaneous warnings:
----------------------------------------------------------------------------
== The copyright year in the IETF Trust and authors Copyright Line does not
match the current year
-- The document date (June 25, 2017) is 2495 days in the past. Is this
intentional?
Checking references for intended status: Proposed Standard
----------------------------------------------------------------------------
(See RFCs 3967 and 4897 for information about using normative references
to lower-maturity documents in RFCs)
-- Looks like a reference, but probably isn't: '1' on line 20
-- Looks like a reference, but probably isn't: '2' on line 21
** Obsolete normative reference: RFC 7159 (Obsoleted by RFC 8259)
** Obsolete normative reference: RFC 7230 (Obsoleted by RFC 9110, RFC 9112)
** Obsolete normative reference: RFC 7231 (Obsoleted by RFC 9110)
== Outdated reference: A later version (-19) exists of
draft-ietf-httpbis-header-structure-01
-- Obsolete informational reference (is this intentional?): RFC 5987
(Obsoleted by RFC 8187)
-- Obsolete informational reference (is this intentional?): RFC 7235
(Obsoleted by RFC 9110)
Summary: 6 errors (**), 0 flaws (~~), 2 warnings (==), 5 comments (--).
Run idnits with the --verbose option for more detailed information about
the items above.
--------------------------------------------------------------------------------
2 Network Working Group J. Reschke
3 Internet-Draft greenbytes
4 Intended status: Standards Track June 25, 2017
5 Expires: December 27, 2017
7 A JSON Encoding for HTTP Header Field Values
8 draft-reschke-http-jfv-06
10 Abstract
12 This document establishes a convention for use of JSON-encoded field
13 values in HTTP header fields.
15 Editorial Note (To be removed by RFC Editor before publication)
17 Distribution of this document is unlimited. Although this is not a
18 work item of the HTTPbis Working Group, comments should be sent to
19 the Hypertext Transfer Protocol (HTTP) mailing list at ietf-http-
20 wg@w3.org [1], which may be joined by sending a message with subject
21 "subscribe" to ietf-http-wg-request@w3.org [2].
23 Discussions of the HTTPbis Working Group are archived at
24 .
26 XML versions and latest edits for this document are available from
27 .
29 The changes in this draft are summarized in Appendix E.9.
31 Status of This Memo
33 This Internet-Draft is submitted in full conformance with the
34 provisions of BCP 78 and BCP 79.
36 Internet-Drafts are working documents of the Internet Engineering
37 Task Force (IETF). Note that other groups may also distribute
38 working documents as Internet-Drafts. The list of current Internet-
39 Drafts is at http://datatracker.ietf.org/drafts/current/.
41 Internet-Drafts are draft documents valid for a maximum of six months
42 and may be updated, replaced, or obsoleted by other documents at any
43 time. It is inappropriate to use Internet-Drafts as reference
44 material or to cite them other than as "work in progress."
46 This Internet-Draft will expire on December 27, 2017.
48 Copyright Notice
50 Copyright (c) 2017 IETF Trust and the persons identified as the
51 document authors. All rights reserved.
53 This document is subject to BCP 78 and the IETF Trust's Legal
54 Provisions Relating to IETF Documents
55 (http://trustee.ietf.org/license-info) in effect on the date of
56 publication of this document. Please review these documents
57 carefully, as they describe your rights and restrictions with respect
58 to this document. Code Components extracted from this document must
59 include Simplified BSD License text as described in Section 4.e of
60 the Trust Legal Provisions and are provided without warranty as
61 described in the Simplified BSD License.
63 Table of Contents
65 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
66 2. Data Model and Format . . . . . . . . . . . . . . . . . . . . 4
67 3. Sender Requirements . . . . . . . . . . . . . . . . . . . . . 5
68 4. Recipient Requirements . . . . . . . . . . . . . . . . . . . 5
69 5. Using this Format in Header Field Definitions . . . . . . . . 5
70 6. Deployment Considerations . . . . . . . . . . . . . . . . . . 6
71 7. Interoperability Considerations . . . . . . . . . . . . . . . 6
72 7.1. Encoding and Characters . . . . . . . . . . . . . . . . . 6
73 7.2. Numbers . . . . . . . . . . . . . . . . . . . . . . . . . 6
74 7.3. Object Constraints . . . . . . . . . . . . . . . . . . . 7
75 8. Internationalization Considerations . . . . . . . . . . . . . 7
76 9. Security Considerations . . . . . . . . . . . . . . . . . . . 7
77 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 7
78 10.1. Normative References . . . . . . . . . . . . . . . . . . 7
79 10.2. Informative References . . . . . . . . . . . . . . . . . 8
80 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 10
81 A.1. Content-Length . . . . . . . . . . . . . . . . . . . . . 10
82 A.2. Content-Disposition . . . . . . . . . . . . . . . . . . . 10
83 A.3. WWW-Authenticate . . . . . . . . . . . . . . . . . . . . 11
84 A.4. Accept-Encoding . . . . . . . . . . . . . . . . . . . . . 12
85 Appendix B. Use of JSON Field Value Encoding in the Wild . . . . 13
86 B.1. W3C Reporting API Specification . . . . . . . . . . . . . 14
87 B.2. W3C Clear Site Data Specification . . . . . . . . . . . . 14
88 B.3. W3C Feature Policy Specification . . . . . . . . . . . . 14
89 Appendix C. Relation to HTTP 'Key' Header Field . . . . . . . . 14
90 Appendix D. Discussion . . . . . . . . . . . . . . . . . . . . . 14
91 Appendix E. Change Log (to be removed by RFC Editor before
92 publication) . . . . . . . . . . . . . . . . . . . . 14
93 E.1. Since draft-reschke-http-jfv-00 . . . . . . . . . . . . . 15
94 E.2. Since draft-reschke-http-jfv-01 . . . . . . . . . . . . . 15
95 E.3. Since draft-reschke-http-jfv-02 . . . . . . . . . . . . . 15
96 E.4. Since draft-reschke-http-jfv-03 . . . . . . . . . . . . . 15
97 E.5. Since draft-reschke-http-jfv-04 . . . . . . . . . . . . . 15
98 E.6. Since draft-ietf-httpbis-jfv-00 . . . . . . . . . . . . . 15
99 E.7. Since draft-ietf-httpbis-jfv-01 . . . . . . . . . . . . . 15
100 E.8. Since draft-ietf-httpbis-jfv-02 . . . . . . . . . . . . . 15
101 E.9. Since draft-reschke-http-jfv-05 . . . . . . . . . . . . . 16
102 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 16
103 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 16
105 1. Introduction
107 Defining syntax for new HTTP header fields ([RFC7230], Section 3.2)
108 is non-trivial. Among the commonly encountered problems are:
110 o There is no common syntax for complex field values. Several well-
111 known header fields do use a similarly looking syntax, but it is
112 hard to write generic parsing code that will both correctly handle
113 valid field values but also reject invalid ones.
115 o The HTTP message format allows header fields to repeat, so field
116 syntax needs to be designed in a way that these cases are either
117 meaningful, or can be unambiguously detected and rejected.
119 o HTTP/1.1 does not define a character encoding scheme ([RFC6365],
120 Section 2), so header fields are either stuck with US-ASCII
121 ([RFC0020]), or need out-of-band information to decide what
122 encoding scheme is used. Furthermore, APIs usually assume a
123 default encoding scheme in order to map from octet sequences to
124 strings (for instance, [XMLHttpRequest] uses the IDL type
125 "ByteString", effectively resulting in the ISO-8859-1 character
126 encoding scheme [ISO-8859-1] being used).
128 (See Section 8.3.1 of [RFC7231] for a summary of considerations for
129 new header fields.)
131 This specification addresses the issues listed above by defining both
132 a generic JSON-based ([RFC7159]) data model and a concrete wire
133 format that can be used in definitions of new header fields, where
134 the goals were:
136 o to be compatible with header field recombination when fields occur
137 multiple times in a single message (Section 3.2.2 of [RFC7230]),
138 and
140 o not to use any problematic characters in the field value (non-
141 ASCII characters and certain whitespace characters).
143 Note: [HSTRUCT], a work item of the IETF HTTP Working Group, is a
144 different attempt to address this set of problems -- it tries to
145 identify and formalize common field structures in existing header
146 fields; the syntax defined over there would usually lead to a more
147 compact notation.
149 2. Data Model and Format
151 In HTTP, header fields with the same field name can occur multiple
152 times within a single message (Section 3.2.2 of [RFC7230]). When
153 this happens, recipients are allowed to combine the field values
154 using commas as delimiter. This rule matches nicely JSON's array
155 format (Section 5 of [RFC7159]). Thus, the basic data model used
156 here is the JSON array.
158 Header field definitions that need only a single value can restrict
159 themselves to arrays of length 1, and are encouraged to define error
160 handling in case more values are received (such as "first wins",
161 "last wins", or "abort with fatal error message").
163 JSON arrays are mapped to field values by creating a sequence of
164 serialized member elements, separated by commas and optionally
165 whitespace. This is equivalent to using the full JSON array format,
166 while leaving out the "begin-array" ('[') and "end-array" (']')
167 delimiters.
169 The ABNF character names and classes below are used (copied from
170 [RFC5234], Appendix B.1):
172 CR = %x0D ; carriage return
173 HTAB = %x09 ; horizontal tab
174 LF = %x0A ; line feed
175 SP = %x20 ; space
176 VCHAR = %x21-7E ; visible (printing) characters
178 Characters in JSON strings that are not allowed or discouraged in
179 HTTP header field values -- that is, not in the "VCHAR" definition --
180 need to be represented using JSON's "backslash" escaping mechanism
181 ([RFC7159], Section 7).
183 The control characters CR, LF, and HTAB do not appear inside JSON
184 strings, but can be used outside (line breaks, indentation etc.).
185 These characters need to be either stripped or replaced by space
186 characters (ABNF "SP").
188 Formally, using the HTTP specification's ABNF extensions defined in
189 Section 7 of [RFC7230]:
191 json-field-value = #json-field-item
192 json-field-item = JSON-Text
193 ; see [RFC7159], Section 2,
194 ; post-processed so that only VCHAR characters
195 ; are used
197 3. Sender Requirements
199 To map a JSON array to an HTTP header field value, process each array
200 element separately by:
202 1. generating the JSON representation,
204 2. stripping all JSON control characters (CR, HTAB, LF), or
205 replacing them by space ("SP") characters,
207 3. replacing all remaining non-VSPACE characters by the equivalent
208 backslash-escape sequence ([RFC7159], Section 7).
210 The resulting list of strings is transformed into an HTTP field value
211 by combining them using comma (%x2C) plus optional SP as delimiter,
212 and encoding the resulting string into an octet sequence using the
213 US-ASCII character encoding scheme ([RFC0020]).
215 4. Recipient Requirements
217 To map a set of HTTP header field instances to a JSON array:
219 1. combine all header field instances into a single field as per
220 Section 3.2.2 of [RFC7230],
222 2. add a leading begin-array ("[") octet and a trailing end-array
223 ("]") octet, then
225 3. run the resulting octet sequence through a JSON parser.
227 The result of the parsing operation is either an error (in which case
228 the header field values needs to be considered invalid), or a JSON
229 array.
231 5. Using this Format in Header Field Definitions
233 Specifications defining new HTTP header fields need to take the
234 considerations listed in Section 8.3.1 of [RFC7231] into account.
235 Many of these will already be accounted for by using the format
236 defined in this specification.
238 Readers of HTTP-related specifications frequently expect an ABNF
239 definition of the field value syntax. This is not really needed
240 here, as the actual syntax is JSON text, as defined in Section 2 of
241 [RFC7159].
243 A very simple way to use this JSON encoding thus is just to cite this
244 specification -- specifically the "json-field-value" ABNF production
245 defined in Section 2 -- and otherwise not to talk about the details
246 of the field syntax at all.
248 An alternative approach is just to repeat the ABNF-related parts from
249 Section 2.
251 This frees the specification from defining the concrete on-the-wire
252 syntax. What's left is defining the field value in terms of a JSON
253 array. An important aspect is the question of extensibility, e.g.
254 how recipients ought to treat unknown field names. In general, a
255 "must ignore" approach will allow protocols to evolve without
256 versioning or even using entire new field names.
258 6. Deployment Considerations
260 This JSON-based syntax will only apply to newly introduced header
261 fields, thus backwards compatibility is not a problem. That being
262 said, it is conceivable that there is existing code that might trip
263 over double quotes not being used for HTTP's quoted-string syntax
264 (Section 3.2.6 of [RFC7230]).
266 7. Interoperability Considerations
268 The "I-JSON Message Format" specification ([RFC7493]) addresses known
269 JSON interoperability pain points. This specification borrows from
270 the requirements made over there:
272 7.1. Encoding and Characters
274 This specification requires that field values use only US-ASCII
275 characters, and thus by definition use a subset of UTF-8 (Section 2.1
276 of [RFC7493]).
278 7.2. Numbers
280 Be aware of the issues around number precision, as discussed in
281 Section 2.2 of [RFC7493].
283 7.3. Object Constraints
285 As described in Section 4 of [RFC7159], JSON parser implementations
286 differ in the handling of duplicate object names. Therefore, senders
287 MUST NOT use duplicate object names, and recipients SHOULD either
288 treat field values with duplicate names as invalid (consistent with
289 [RFC7493], Section 2.3) or use the lexically last value (consistent
290 with [ECMA-262], Section 24.3.1.1).
292 Furthermore, ordering of object members is not significant and can
293 not be relied upon.
295 8. Internationalization Considerations
297 In HTTP/1.1, header field values are represented by octet sequences,
298 usually used to transmit ASCII characters, with restrictions on the
299 use of certain control characters, and no associated default
300 character encoding, nor a way to describe it ([RFC7230],
301 Section 3.2). HTTP/2 does not change this.
303 This specification maps all characters which can cause problems to
304 JSON escape sequences, thereby solving the HTTP header field
305 internationalization problem.
307 Future specifications of HTTP might change to allow non-ASCII
308 characters natively. In that case, header fields using the syntax
309 defined by this specification would have a simple migration path (by
310 just stopping to require escaping of non-ASCII characters).
312 9. Security Considerations
314 Using JSON-shaped field values is believed to not introduce any new
315 threads beyond those described in Section 12 of [RFC7159], namely the
316 risk of recipients using the wrong tools to parse them.
318 Other than that, any syntax that makes extensions easy can be used to
319 smuggle information through field values; however, this concern is
320 shared with other widely used formats, such as those using parameters
321 in the form of name/value pairs.
323 10. References
325 10.1. Normative References
327 [RFC0020] Cerf, V., "ASCII format for network interchange", STD 80,
328 RFC 20, DOI 10.17487/RFC0020, October 1969,
329 .
331 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
332 Specifications: ABNF", STD 68, RFC 5234,
333 DOI 10.17487/RFC5234, January 2008,
334 .
336 [RFC7159] Bray, T., "The JavaScript Object Notation (JSON) Data
337 Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March
338 2014, .
340 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
341 Protocol (HTTP/1.1): Message Syntax and Routing",
342 RFC 7230, DOI 10.17487/RFC7230, June 2014,
343 .
345 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
346 Protocol (HTTP/1.1): Semantics and Content", RFC 7231,
347 DOI 10.17487/RFC7231, June 2014,
348 .
350 [RFC7493] Bray, T., Ed., "The I-JSON Message Format", RFC 7493,
351 DOI 10.17487/RFC7493, March 2015,
352 .
354 10.2. Informative References
356 [CLEARSITE]
357 West, M., "Clear Site Data", W3C Working Draft WD-clear-
358 site-data-20160720, July 2016,
359 .
361 Latest version available at .
364 [ECMA-262]
365 Ecma International, "ECMA-262 6th Edition, The ECMAScript
366 2015 Language Specification", Standard ECMA-262, June
367 2015, .
369 [FEATUREPOL]
370 Clelland, I., "Clear Site Data", W3C Draft Community Group
371 Report , June 2017, .
374 [HSTRUCT] Kamp, P-H., "HTTP Header Common Structure", draft-ietf-
375 httpbis-header-structure-01 (work in progress), April
376 2017.
378 [ISO-8859-1]
379 International Organization for Standardization,
380 "Information technology -- 8-bit single-byte coded graphic
381 character sets -- Part 1: Latin alphabet No. 1", ISO/
382 IEC 8859-1:1998, 1998.
384 [KEY] Fielding, R. and M. Nottingham, "The Key HTTP Response
385 Header Field", draft-ietf-httpbis-key-01 (work in
386 progress), March 2016.
388 [REPORTING]
389 Grigorik, I. and M. West, "Reporting API 1", W3C Group
390 Note NOTE-reporting-1-20160607, June 2016,
391 .
393 Latest version available at .
396 [RFC5987] Reschke, J., "Character Set and Language Encoding for
397 Hypertext Transfer Protocol (HTTP) Header Field
398 Parameters", RFC 5987, DOI 10.17487/RFC5987, August 2010,
399 .
401 [RFC6266] Reschke, J., "Use of the Content-Disposition Header Field
402 in the Hypertext Transfer Protocol (HTTP)", RFC 6266,
403 DOI 10.17487/RFC6266, June 2011,
404 .
406 [RFC6365] Hoffman, P. and J. Klensin, "Terminology Used in
407 Internationalization in the IETF", BCP 166, RFC 6365,
408 DOI 10.17487/RFC6365, September 2011,
409 .
411 [RFC7235] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
412 Protocol (HTTP/1.1): Authentication", RFC 7235,
413 DOI 10.17487/RFC7235, June 2014,
414 .
416 [XMLHttpRequest]
417 WhatWG, "XMLHttpRequest", .
419 Appendix A. Examples
421 This section shows how some of the existing HTTP header fields would
422 look like if they would use the format defined by this specification.
424 A.1. Content-Length
426 "Content-Length" is defined in Section 3.3.2 of [RFC7230], with the
427 field value's ABNF being:
429 Content-Length = 1*DIGIT
431 So the field value is similar to a JSON number ([RFC7159],
432 Section 6).
434 Content-Length is restricted to a single field instance, as it
435 doesn't use the list production (as per Section 3.2.2 of [RFC7230]).
436 However, in practice multiple instances do occur, and the definition
437 of the header field does indeed discuss how to handle these cases.
439 If Content-Length was defined using the JSON format discussed here,
440 the ABNF would be something like:
442 Content-Length = #number
443 ; number: [RFC7159], Section 6
445 ...and the prose definition would:
447 o restrict all numbers to be non-negative integers without
448 fractions, and
450 o require that the array of values is of length 1 (but allow the
451 case where the array is longer, but all members represent the same
452 value)
454 A.2. Content-Disposition
456 Content-Disposition field values, defined in [RFC6266], consist of a
457 "disposition type" (a string), plus multiple parameters, of which at
458 least one ("filename") sometime needs to carry non-ASCII characters.
460 For instance, the first example in Section 5 of [RFC6266]:
462 Attachment; filename=example.html
464 has a disposition type of "Attachment", with filename parameter value
465 "example.html". A JSON representation of this information might be:
467 {
468 "Attachment": {
469 "filename" : "example.html"
470 }
471 }
473 which would translate to a header field value of:
475 { "Attachment": { "filename" : "example.html" } }
477 The third example in Section 5 of [RFC6266] uses a filename parameter
478 containing non-US-ASCII characters:
480 attachment; filename*=UTF-8''%e2%82%ac%20rates
482 Note that in this case, the "filename*" parameter uses the encoding
483 defined in [RFC5987], representing a filename starting with the
484 Unicode character U+20AC (EURO SIGN), followed by " rates". If the
485 definition of Content-Disposition would have used the format proposed
486 here, the workaround involving the "parameter*" syntax would not have
487 been needed at all.
489 The JSON representation of this value could then be:
491 { "attachment": { "filename" : "\u20AC rates" } }
493 A.3. WWW-Authenticate
495 The WWW-Authenticate header field value is defined in Section 4.1 of
496 [RFC7235] as a list of "challenges":
498 WWW-Authenticate = 1#challenge
500 ...where a challenge consists of a scheme with optional parameters:
502 challenge = auth-scheme [ 1*SP ( token68 / #auth-param ) ]
504 An example for a complex header field value given in the definition
505 of the header field is:
507 Newauth realm="apps", type=1, title="Login to \"apps\"",
508 Basic realm="simple"
510 (line break added for readability)
512 A possible JSON representation of this field value would be the array
513 below:
515 [
516 {
517 "Newauth" : {
518 "realm": "apps",
519 "type" : 1,
520 "title" : "Login to \"apps\""
521 }
522 },
523 {
524 "Basic" : {
525 "realm": "simple"
526 }
527 }
528 ]
530 ...which would translate to a header field value of:
532 { "Newauth" : { "realm": "apps", "type" : 1,
533 "title": "Login to \"apps\"" }},
534 { "Basic" : { "realm": "simple"}}
536 A.4. Accept-Encoding
538 The Accept-Encoding header field value is defined in Section 5.3.4 of
539 [RFC7231] as a list of codings, each of which allowing a weight
540 parameter 'q':
542 Accept-Encoding = #( codings [ weight ] )
543 codings = content-coding / "identity" / "*"
544 weight = OWS ";" OWS "q=" qvalue
545 qvalue = ( "0" [ "." 0*3DIGIT ] )
546 / ( "1" [ "." 0*3("0") ] )
548 An example for a complex header field value given in the definition
549 of the header field is:
551 gzip;q=1.0, identity; q=0.5, *;q=0
553 Due to the defaulting rules for the quality value ([RFC7231],
554 Section 5.3.1), this could also be written as:
556 gzip, identity; q=0.5, *; q=0
558 A JSON representation could be:
560 [
561 {
562 "gzip" : {
563 }
564 },
565 {
566 "identity" : {
567 "q": 0.5
568 }
569 },
570 {
571 "*" : {
572 "q": 0
573 }
574 }
575 ]
577 ...which would translate to a header field value of:
579 {"gzip": {}}, {"identity": {"q": 0.5}}, {"*": {"q": 0}}
581 In this example, the part about "gzip" appears unnecessarily verbose,
582 as the value is just an empty object. A simpler notation would
583 collapse members like these to string literals:
585 "gzip", {"identity": {"q": 0.5}}, {"*": {"q": 0}}
587 If this is desirable, the header field definition could allow both
588 string literals and objects, and define that a mere string literal
589 would be mapped to a member whose name is given by the string
590 literal, and the value is an empty object.
592 For what it's worth, one of the most common cases for 'Accept-
593 Encoding' would become:
595 "gzip", "deflate"
597 which would be only a small overhead over the original format.
599 Appendix B. Use of JSON Field Value Encoding in the Wild
601 Since work started on this document, various specifications have
602 adopted this format. At least one of these moved away after the HTTP
603 Working Group decided to focus on [HSTRUCT] (see thread starting at
604 ).
607 The sections below summarize the current usage of this format.
609 B.1. W3C Reporting API Specification
611 Defined in W3C Note "Reporting API 1" (Section 3.1 of [REPORTING]).
612 Still in use in latest editor copy as of June 2017.
614 B.2. W3C Clear Site Data Specification
616 Defined in W3C Working Draft "Clear Site Data" (Section 2.1 of
617 [CLEARSITE]). Latest Editor's Draft replaces the use of JSON with a
618 custom syntax (see for feedback).
621 B.3. W3C Feature Policy Specification
623 Defined in W3C Draft Community Group Report "Feature Policy"
624 (Section 6.1 of [FEATUREPOL]). Previously relied on this document,
625 now replicates the syntax into a custom ABNF defined in a separate
626 section (Section 5.1 of [FEATUREPOL]).
628 Appendix C. Relation to HTTP 'Key' Header Field
630 [KEY] aims to improve the cacheability of responses that vary based
631 on certain request header fields, addressing lack of granularity in
632 the existing "Vary" response header field ([RFC7231], Section 7.1.4).
633 If the JSON-based format described by this document gains popularity,
634 it might be useful to add a JSON-aware "Key Parameter" (see
635 Section 2.3 of [KEY]).
637 Appendix D. Discussion
639 This approach uses a default of "JSON array", using implicit array
640 markers. An alternative would be a default of "JSON object". This
641 would simplify the syntax for non-list-typed header fields, but all
642 the benefits of having the same data model for both types of header
643 fields would be gone. A hybrid approach might make sense, as long as
644 it doesn't require any heuristics on the recipient's side.
646 Note: a concrete proposal was made by Kazuho Oku in
647 .
650 [[CREF1: Use of generic libs vs compactness of field values..]]
652 Appendix E. Change Log (to be removed by RFC Editor before publication)
653 E.1. Since draft-reschke-http-jfv-00
655 Editorial fixes + working on the TODOs.
657 E.2. Since draft-reschke-http-jfv-01
659 Mention slightly increased risk of smuggling information in header
660 field values.
662 E.3. Since draft-reschke-http-jfv-02
664 Mention Kazuho Oku's proposal for abbreviated forms.
666 Added a bit of text about the motivation for a concrete JSON subset
667 (ack Cory Benfield).
669 Expand I18N section.
671 E.4. Since draft-reschke-http-jfv-03
673 Mention relation to KEY header field.
675 E.5. Since draft-reschke-http-jfv-04
677 Between June and December 2016, this was a work item of the HTTP
678 working group (see ). Work (if any) continues now on
680 .
682 Changes made while this was a work item of the HTTP Working Group:
684 E.6. Since draft-ietf-httpbis-jfv-00
686 Added example for "Accept-Encoding" (inspired by Kazuho's feedback),
687 showing a potential way to optimize the format when default values
688 apply.
690 E.7. Since draft-ietf-httpbis-jfv-01
692 Add interop discussion, building on I-JSON and ECMA-262 (see
693 ).
695 E.8. Since draft-ietf-httpbis-jfv-02
697 Move non-essential parts into appendix.
699 Updated XHR reference.
701 E.9. Since draft-reschke-http-jfv-05
703 Add meat to "Using this Format in Header Field Definitions".
705 Add a few lines on the relation to "Key".
707 Summarize current use of the format.
709 Acknowledgements
711 Thanks go to the Hypertext Transfer Protocol Working Group
712 participants.
714 Author's Address
716 Julian F. Reschke
717 greenbytes GmbH
718 Hafenweg 16
719 Muenster, NW 48155
720 Germany
722 EMail: julian.reschke@greenbytes.de
723 URI: http://greenbytes.de/tech/webdav/