Skip to content

URLDispatcher: chain function decoders instead of passing the original URL - #369

Open
houcros wants to merge 1 commit into
Hammerspoon:masterfrom
houcros:fix-urldispatcher-function-decoder-chaining
Open

houcros wants to merge 1 commit into
Hammerspoon:masterfrom
houcros:fix-urldispatcher-function-decoder-chaining

Conversation

@houcros

@houcros houcros commented Sep 28, 2026

Copy link
Copy Markdown

dispatchURL passed the original scheme/host/fullUrl to every function-based decoder, instead of the URL as rewritten by earlier decoders in the list. String-pattern decoders already chained correctly (they match/gsub against the accumulated url), so this presumably was an inconsistency between the two decoder types, not an intentional design choice.

In practice this means any decoder after the first one that returns its fullUrl argument unchanged for a "no match" case silently discards every earlier decoder's rewrite, since that argument is always the original URL, not the current one.

…l URL

`dispatchURL` passed the original scheme/host/fullUrl to every
function-based decoder, instead of the URL as rewritten by earlier
decoders in the list. String-pattern decoders already chained correctly
(they match/gsub against the accumulated url), so this presumably was an
inconsistency between the two decoder types, not an intentional design
choice.

In practice this means any decoder after the first one that returns its
fullUrl argument unchanged for a "no match" case silently discards every
earlier decoder's rewrite, since that argument is always the original
URL, not the current one.
@houcros
houcros marked this pull request as ready for review September 28, 2026 13:18

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant