Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: fastify/middie
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v9.3.0
Choose a base ref
...
head repository: fastify/middie
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v9.3.1
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Mar 5, 2026

  1. fix: preserve percent-encoding in prefix stripping (#255)

    When a middleware is registered with a path prefix (e.g. app.use('/prefix', fn)),
    the prefix is stripped from req.url before invoking the middleware. The previous
    implementation used normalizePathForMatching() which calls sanitizeUrlPath(),
    decoding percent-encoded characters (%20, %2F, etc.) before building the new
    req.url. This caused encoded characters to appear decoded in req.url.
    
    Fix by trying the regexp against the original sanitized URL first (preserving
    percent-encoding). When that matches, slice the original URL and apply only
    structural normalizations (duplicate slashes, trailing slash). Fall back to
    the fully normalized URL only when normalization was necessary for matching
    (e.g. duplicate leading slashes, semicolon delimiters).
    panva authored Mar 5, 2026
    Configuration menu
    Copy the full SHA
    24aa8d3 View commit details
    Browse the repository at this point in the history
  2. Bumped v9.3.1

    Signed-off-by: Matteo Collina <hello@matteocollina.com>
    mcollina committed Mar 5, 2026
    Configuration menu
    Copy the full SHA
    fb12937 View commit details
    Browse the repository at this point in the history
Loading