Skip to content

fix(middleware): preserve escaped paths in slash middleware in v4 - #3225

Merged
vishr merged 1 commit into
v4from
fix/v4-slash-redirect-escaping
Nov 12, 2026
Merged

vishr merged 1 commit into
v4from
fix/v4-slash-redirect-escaping

Conversation

@vishr

@vishr vishr commented Nov 12, 2026

Copy link
Copy Markdown
Member

Backport of #3221 to v4. Closes #3206 for v4.

AddTrailingSlash and RemoveTrailingSlash now build redirect and forward targets from URL.EscapedPath(). Forward mode also updates URL.RawPath, so encoded separators such as %2F keep their route.

Tests are adapted to the v4 TrailingSlashConfig and echo.Context.

@vishr
vishr merged commit db7bebd into v4 Nov 12, 2026
8 checks passed
@vishr
vishr deleted the fix/v4-slash-redirect-escaping branch November 12, 2026 08:41
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