From eb84b653981d7832b631292de87a03427b0f04f1 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 5 Dec 2024 15:32:25 +0100 Subject: [PATCH] query: switch Accept-Query to SF (closes #2934) --- draft-ietf-httpbis-safe-method-w-body.xml | 61 +++++++++++++++++++---- 1 file changed, 51 insertions(+), 10 deletions(-) diff --git a/draft-ietf-httpbis-safe-method-w-body.xml b/draft-ietf-httpbis-safe-method-w-body.xml index 7669c2c86..2cce05fc6 100644 --- a/draft-ietf-httpbis-safe-method-w-body.xml +++ b/draft-ietf-httpbis-safe-method-w-body.xml @@ -321,26 +321,53 @@ q=foo&limit=10&sort=-published
- The "Accept-Query" response header field &MAY; be used by a resource to + The "Accept-Query" response header field can be used by a resource to directly signal support for the QUERY method while identifying the specific query format media type(s) that may be used. - -Accept-Query = 1#media-type - - The Accept-Query header field specifies a comma-separated listing of media - types (with optional parameters) as defined by - . field syntax currently discussed in + "Accept-Query" contains a list of media ranges () + using "Structured Fields" syntax (). + Media ranges are represented by a List Structured Header Field of either Tokens or + Strings, containing the media range value without parameters. Parameters, + if any, are mapped to Parameters of type String. - The order of types listed by the Accept-Query header field is not significant. + The choice of Token vs. String is semantically insignificant. That is, + recipients &MAY; convert Tokens to Strings, but &MUST-NOT; process them + differently based on the received type. + + + Media types do not exactly map to Tokens, for instance they + allow a leading digit. In cases like these, the String format needs to + be used. + + + The only supported uses of wildcards are "*/*", which matches any type, + or "xxxx/*", which matches any subtype of the indicated type. + + + The order of types listed in the field value is not significant. + + + The only allowed format for parameters is String. Accept-Query's value applies to every URI on the server that shares the same path; in other words, the query component is ignored. If requests to the same resource return - different Accept-Query values, the most recently received fresh (per - ) value is used. + different Accept-Query values, the most recently received fresh value (per + ) is used. + + + Example: + + +Accept-Query: "application/jsonpath", application/sql;charset="UTF-8" + + Although the syntax for this field appears to be similar to other + fields, such as "Accept" (), + it is a Structured Field and thus &MUST; be processed as specified in + .
@@ -458,6 +485,19 @@ Accept-Query = 1#media-type + + + Structured Field Values for HTTP + + Cloudflare + + + The Varnish Cache Project + + + + + @@ -688,6 +728,7 @@ Dubois, Camille, camille.dubois@example.net
  • Editorial changes to Introduction (ack Will Hawkins, )
  • Added Security Consideration with respect to Normalization ()
  • Added CORS considerations ()
  • +
  • Make Accept-Query a Structured Field ()
  • SQL media type is application/sql (RFC6922) ()
  • Added overview table to introduction ()
  • Moved BCP14 related text into subsection ()