Skip to content

Commit

Permalink
Merge pull request #2871 from jyasskin/references-for-deep-links
Browse files Browse the repository at this point in the history
[compression-dictionary] Use <xref section> to avoid needing a new reference for each deep link.
  • Loading branch information
pmeenan authored Aug 27, 2024
2 parents ac7bedf + df3756e commit d3225bc
Showing 1 changed file with 13 additions and 37 deletions.
50 changes: 13 additions & 37 deletions draft-ietf-httpbis-compression-dictionary.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,10 @@ author:
email: [email protected]

normative:
CORS-CHECK:
FETCH:
title: Fetch - Living Standard
date: false
target: https://fetch.spec.whatwg.org/#cors-check
author:
-
org: WHATWG
REQUEST-DESTINATION:
title: Fetch - Living Standard
date: false
target: https://fetch.spec.whatwg.org/#requestdestination
target: https://fetch.spec.whatwg.org/
author:
-
org: WHATWG
Expand All @@ -73,27 +66,6 @@ normative:
author:
-
org: WHATWG
URLPATTERN-CLASS:
title: URL Pattern - Living Standard
date: false
target: https://urlpattern.spec.whatwg.org/#urlpattern-class
author:
-
org: WHATWG
URLPATTERN-REGEXP:
title: URL Pattern - Living Standard
date: false
target: https://urlpattern.spec.whatwg.org/#dom-urlpattern-hasregexpgroups
author:
-
org: WHATWG
URLPATTERN-TEST:
title: URL Pattern - Living Standard
date: false
target: https://urlpattern.spec.whatwg.org/#dom-urlpattern-test
author:
-
org: WHATWG
WEB-LINKING: RFC8288

informative:
Expand Down Expand Up @@ -257,9 +229,11 @@ used:
1. Let MATCH be the value of "match" for the given dictionary.
1. Let URL be the URL of the dictionary request.
1. Let PATTERN be an instance of the URLPattern class constructed by setting
input=MATCH, and baseURL=URL (see {{URLPATTERN-CLASS}}).
input=MATCH, and baseURL=URL (see {{URLPATTERN}}{:section="The URLPattern
class" relative="#urlpattern-class"}).
1. If the hasRegExpGroups attribute of PATTERN is TRUE then return FALSE
(see {{URLPATTERN-REGEXP}}).
(see {{URLPATTERN}}{:section="hasRegExpGroups"
relative="#dom-urlpattern-hasregexpgroups"}).
1. Return TRUE.

The "match" value is required and MUST be included in the
Expand All @@ -279,7 +253,8 @@ Use-As-Dictionary: match="/d%C3%BCsseldorf"

The "match-dest" value of the Use-As-Dictionary header is an Inner List of
String values that provides a list of Fetch request destinations for the
dictionary to match (see {{REQUEST-DESTINATION}}).
dictionary to match (see {{FETCH}}{:section="RequestDestination"
relative="#requestdestination"}).

An empty list for "match-dest" MUST match all destinations.

Expand Down Expand Up @@ -393,10 +368,12 @@ string was provided with the dictionary:
FALSE (see {{Section 4.3.1 of HTTP}}).
1. Let MATCH be the value of "match" for the given dictionary.
1. Let PATTERN be an instance of the URLPattern class constructed by setting
input=MATCH, and baseURL=BASEURL (see {{URLPATTERN-CLASS}}).
input=MATCH, and baseURL=BASEURL (see {{URLPATTERN}}{:section="The URLPattern
class" relative="#urlpattern-class"}).
1. Return the result of running the "test" method of PATTERN with input=URL
which will check for a match between the request URL and the supplied "match"
URL Pattern (see {{URLPATTERN-TEST}}).
URL Pattern (see {{URLPATTERN}}{:section="test(input, baseURL) method"
relative="#dom-urlpattern-test"}).

### Multiple matching dictionaries

Expand Down Expand Up @@ -699,7 +676,7 @@ dictionary and the compressed response are fully readable by the client.

In browser terms, that means that both are either same-origin to the context
they are being fetched from or that the response is cross-origin and passes
the CORS check (see {{CORS-CHECK}}).
the CORS check (see {{FETCH}}{:section="CORS check" relative="#cors-check"}).

### Server Responsibility

Expand Down Expand Up @@ -749,4 +726,3 @@ the storage as cookies are partitioned as well as clearing the dictionaries
whenever cookies are cleared.

--- back

1 comment on commit d3225bc

@reschke
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, but currently it procudes output such as:

   input=URL which will check for a match between the request URL
   and the supplied "match" URL Pattern (see Section test(input,
   baseURL) method of [URLPATTERN]).

I believe the section name would need to be quoted to make this work well.

Please sign in to comment.