Skip to content

Conversation

@Atennop1
Copy link

Now setting RedirectTrailingSlash to false will result in treating /foo and /foo/ as the same endpoints and won't cause redirection, they will share common handlers instead.

The current implementation is inefficient because I trigger second search if first failed, but I didn't figure out how to pass this information to findCaseInsensitivePathRec without breaking everything (and didn't know would it be right, how do you think?). Also, I would like to replace RedirectTrailingSlash with some TrailingSlashBehaviour enum, but it will break backward compatibility.

This pull request is meant to solve #4411

Would like to receive critics :)

@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.99%. Comparing base (3dc1cd6) to head (18d33bd).
⚠️ Report is 230 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4499      +/-   ##
==========================================
- Coverage   99.21%   98.99%   -0.22%     
==========================================
  Files          42       44       +2     
  Lines        3182     2999     -183     
==========================================
- Hits         3157     2969     -188     
- Misses         17       21       +4     
- Partials        8        9       +1     
Flag Coverage Δ
?
--ldflags="-checklinkname=0" -tags sonic 98.99% <100.00%> (?)
-tags go_json 98.92% <100.00%> (?)
-tags nomsgpack 98.98% <100.00%> (?)
go-1.18 ?
go-1.19 ?
go-1.20 ?
go-1.21 ?
go-1.24 98.99% <100.00%> (?)
go-1.25 98.99% <100.00%> (?)
macos-latest 98.99% <100.00%> (-0.22%) ⬇️
ubuntu-latest 98.99% <100.00%> (-0.22%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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