http-extensions icon indicating copy to clipboard operation
http-extensions copied to clipboard

Compression Dictionaries match length isn't defined

Open jesup opened this issue 7 months ago • 1 comments

For Compression Dictionaries:

2.2.3 Multiple Matching dictionaries

...

2. Given equivalent destination precedence, the dictionary with the  longest "match" takes precedence.

What is 'longest'? the longest match= string in characters? Longest before a *? Something else? 'longest' isn't defined, and the only presumption would be the longest string in characters. This might mean that some fancy regexp string might be longer than one that matches exactly:

match="/books/:id(\d+)"

match="/books/4

For url https://example.com/books/4, they both match, but the first is 'longer'

jesup avatar Mar 03 '25 18:03 jesup