Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 10 additions & 45 deletions draft-ietf-httpbis-no-vary-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,51 +371,16 @@ Due to how the application/x-www-form-urlencoded parser canonicalizes query stri

So, for example, given any non-default value for `No-Vary-Search`, such as `No-Vary-Search: key-order`, we will have the following equivalences:

{: newline="true"}
<dl>
<dt>
<tt>https://example.com</tt><br>
<tt>https://example.com/?</tt>
</dt>
<dd>A null query is parsed the same as an empty string</dd>

<dt>
<tt>https://example.com/?a=x</tt><br>
<tt>https://example.com/?%61=%78</tt>
</dt>
<dd>Parsing performs percent-decoding</dd>

<dt>
<tt>https://example.com/?a=é</tt><br>
<tt>https://example.com/?a=%C3%A9</tt>
</dt>
<dd>Parsing performs percent-decoding</dd>

<dt>
<tt>https://example.com/?a=%f6</tt><br>
<tt>https://example.com/?a=%ef%bf%bd</tt>
</dt>
<dd>Both values are parsed as U+FFFD (�)</dd>

<dt>
<tt>https://example.com/?a=x&&&&</tt><br>
<tt>https://example.com/?a=x</tt>
</dt>
<dd>Parsing splits on <tt>&</tt> and discards empty strings</dd>

<dt>
<tt>https://example.com/?a=</tt><br>
<tt>https://example.com/?a</tt>
</dt>
<dd>Both parse as having an empty string value for <tt>a</tt></dd>

<dt>
<tt>https://example.com/?a=%20</tt><br>
<tt>https://example.com/?a=+</tt><br>
<tt>https://example.com/?a= &</tt>
</dt>
<dd><tt>+</tt> and <tt>%20</tt> are both parsed as U+0020 SPACE</dd>
</dl>
| Query A &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Query B &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Reason for Equivalence |
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think that you need the &nbsp; stuff.

This is what I get with it:

     +===================+==============+============================+
     | Query A           | Query        | Reason for Equivalence     |
     |                   | B            |                            |
     +===================+==============+============================+
     | null              | ?            | A null query is parsed the |
     |                   |              | same as an empty string    |
     +-------------------+--------------+----------------------------+
     | ?a=x              | ?%61=%78     | Parsing performs percent-  |
     |                   |              | decoding                   |
     +-------------------+--------------+----------------------------+
     | ?a=é              | ?a=%C3%A9    | Parsing performs percent-  |
     |                   |              | decoding                   |
     +-------------------+--------------+----------------------------+
     | ?a=%f6            | ?a=%ef%bf%bd | Both values are parsed as  |
     |                   |              | U+FFFD (�)                 |
     +-------------------+--------------+----------------------------+
     | ?a=x&&&&          | ?a=x         | Parsing splits on & and    |
     |                   |              | discards empty strings     |
     +-------------------+--------------+----------------------------+
     | ?a=               | ?a           | Both parse as having an    |
     |                   |              | empty string value for a   |
     +-------------------+--------------+----------------------------+
     | ?a=%20            | ?a= &        | %20 is parsed as U+0020    |
     |                   |              | SPACE                      |
     +-------------------+--------------+----------------------------+
     | ?a=+              | ?a= &        | + is parsed as U+0020      |
     |                   |              | SPACE                      |
     +-------------------+--------------+----------------------------+

And without:

         +==========+==============+============================+
         | Query A  | Query B      | Explanation                |
         +==========+==============+============================+
         | null     | ?            | A null query is parsed the |
         |          |              | same as an empty string    |
         +----------+--------------+----------------------------+
         | ?a=x     | ?%61=%78     | Parsing performs percent-  |
         |          |              | decoding                   |
         +----------+--------------+----------------------------+
         | ?a=é     | ?a=%C3%A9    | Parsing performs percent-  |
         |          |              | decoding                   |
         +----------+--------------+----------------------------+
         | ?a=%f6   | ?a=%ef%bf%bd | Both values are parsed as  |
         |          |              | U+FFFD (�)                 |
         +----------+--------------+----------------------------+
         | ?a=x&&&& | ?a=x         | Parsing splits on & and    |
         |          |              | discards empty strings     |
         +----------+--------------+----------------------------+
         | ?a=      | ?a           | Both parse as having an    |
         |          |              | empty string value for a   |
         +----------+--------------+----------------------------+
         | ?a=%20   | ?a= &        | %20 is parsed as U+0020    |
         |          |              | SPACE                      |
         +----------+--------------+----------------------------+
         | ?a=+     | ?a= &        | + is parsed as U+0020      |
         |          |              | SPACE                      |
         +----------+--------------+----------------------------+

I think that the latter is better.

Suggested change
| Query A &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Query B &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Reason for Equivalence |
| Query A | Query B | Explanation |

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated to remove some of the extra spaces in the first column, so if you look at the generated HTML, this is what it looks like with:
Screenshot 2026-01-06 at 14 57 26
and what it looks like without any &nbsp;:
Screenshot 2026-01-06 at 14 49 02

The first one seemed preferable, and generated .txt version looks okay too:

      +===========+===================+============================+
      | Query A   | Query B           | Explanation                |
      +===========+===================+============================+
      | null      | ?                 | A null query is parsed the |
      |           |                   | same as an empty string    |
      +-----------+-------------------+----------------------------+
      | ?a=x      | ?%61=%78          | Parsing performs percent-  |
      |           |                   | decoding                   |
      +-----------+-------------------+----------------------------+
      | ?a=é      | ?a=%C3%A9         | Parsing performs percent-  |
      |           |                   | decoding                   |
      +-----------+-------------------+----------------------------+
      | ?a=%f6    | ?a=%ef%bf%bd      | Both values are parsed as  |
      |           |                   | U+FFFD (�)                 |
      +-----------+-------------------+----------------------------+
      | ?a=x&&&&  | ?a=x              | Parsing splits on & and    |
      |           |                   | discards empty strings     |
      +-----------+-------------------+----------------------------+
      | ?a=       | ?a                | Both parse as having an    |
      |           |                   | empty string value for a   |
      +-----------+-------------------+----------------------------+
      | ?a=%20    | ?a= &             | %20 is parsed as U+0020    |
      |           |                   | SPACE                      |
      +-----------+-------------------+----------------------------+
      | ?a=+      | ?a= &             | + is parsed as U+0020      |
      |           |                   | SPACE                      |
      +-----------+-------------------+----------------------------+

|-------------+-----------------+-----------------------------------------------------|
| null | `?` | A null query is parsed the same as an empty string |
| `?a=x` | `?%61=%78` | Parsing performs percent-decoding |
| `?a=é` | `?a=%C3%A9` | Parsing performs percent-decoding |
| `?a=%f6` | `?a=%ef%bf%bd` | Both values are parsed as U+FFFD (�) |
| `?a=x&&&&` | `?a=x` | Parsing splits on `&` and discards empty strings |
| `?a=` | `?a` | Both parse as having an empty string value for `a` |
| `?a=%20` | `?a= &` | `%20` is parsed as U+0020 SPACE |
| `?a=+` | `?a= &` | `+` is parsed as U+0020 SPACE |

# Caching {#caching}

Expand Down