forked from DataDog/dd-trace-go
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
contrib/dimfeld/httptreemux.v5: fix resource name for 301 redirects
The httptreemux router has a set of redirect behaviours that is invoked when a request URL and matched route only differs in a trailing slash. The default behaviour is to respond with a 301 (moved permanently) to redirect the client to the exact path of the matched handler. We previously patched one of the two scenarios where this occurs in DataDog#2332. The changes in this commit addresses the other scenario. We also standardize the resource name in the event that there is a trailing slash missmatch between request URL and matched handler. We always truncate the trailing slash in the resource name. Fixes DataDog#2663
- Loading branch information
1 parent
af0486a
commit d5ec356
Showing
2 changed files
with
1,198 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.