Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid stripping trailing slash when RedirectTrailingSlash=false #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

devin-ai-integration[bot]
Copy link

fix: avoid stripping trailing slash when RedirectTrailingSlash=false

Fixes gin-gonic#4141

When RedirectTrailingSlash is set to false, trailing slashes should not be stripped from URLs. This PR modifies the handleHTTPRequest method to only clean paths when both RemoveExtraSlash and RedirectTrailingSlash are true.

Changes:

  • Make cleanPath conditional on RedirectTrailingSlash setting
  • Test the changes

Link to Devin run: https://app.devin.ai/sessions/eeb970fcd7d54006913d334904322f42

This PR was written by Devin 👼

Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add "(aside)" to your comment to have me ignore it.
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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.

Trailing slash stripped even with r.RedirectTrailingSlash = false
0 participants