cloudflare / vinext

fix: decode request pathname once at entry point for consistent routing (#148)
Ensures the pathname is decoded exactly once (via decodeURIComponent + normalizePath) at the request entry point, and all downstream consumers (middleware, config matchers, route matching) receive the same canonical path. Previously, some code paths decoded the pathname a second time, which could cause inconsistent matching between middleware and routing. Also removes redundant decodeURIComponent calls from matchRoute and matchConfigPattern catch-all branches that are no longer needed since the caller now guarantees a pre-decoded pathname.
Steve Faulkner Steve Faulkner committed on Feb 27, 2026, 02:04 AM
Showing 6 changed files +224 additions -42 deletions
Browse files at this commit โ†’