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

DRAFT: contrib/dimfeld/httptreemux.v5: fix resource name for 301 redirects #14

Closed
wants to merge 1 commit into from

Commits on Apr 18, 2024

  1. 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
    devillecodes committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    d5ec356 View commit details
    Browse the repository at this point in the history