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

Trailing slash is not being removed before request is forwarded to backend #4247

Closed
martinklepsch opened this issue Nov 28, 2018 · 3 comments
Labels
area/rules kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. resolution/declined status/5-frozen-due-to-age

Comments

@martinklepsch
Copy link

Do you want to request a feature or report a bug?

Bug

What did you do?

  • I used this traefik.toml and started Traefik using traefik --configFile=traefik.toml.

    curl https://git.io/fp2aJ -o traefik.toml; traefik --configFile=traefik.toml
    
  • I started the referenced backend using:

    cd $(mktemp -d); echo "ping http1" > ping; python3 -m http.server 8003
    
  • I used curl to retrieve the ping file via Traefik, intentionally adding a trailing slash:

    curl http://localhost:80/ping/
    

What did you expect to see?

As I understand keepTrailingSlash with it's default value of false requests with a trailing slash should be stripped of trailing slashes before being forward to the backend.

If this is working as intended then the bug might be in the documentation :)

What did you see instead?

The request arrived at the backend containing the trailing slash. Causing a 404 response.

~ curl -si http://localhost:80/ping/ | head -n1
HTTP/1.1 404 Not Found
~ curl -si http://localhost:80/ping | head -n1
HTTP/1.1 200 OK

Traefik Version

Version:      dev
Codename:     cheddar
Go version:   go1.11.2
Built:        I don't remember exactly
OS/Arch:      darwin/amd64

Reported as 1.7.4 in /dashboard. Installed via brew install traefik. Wanted to use a Docker image but couldn't get host networking set up.

Environment

see above

Debug Logs

http://sprunge.us/qPdLm4

@ldez ldez added priority/P2 need to be fixed in the future kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. area/rules and removed status/0-needs-triage labels Nov 28, 2018
@martinklepsch
Copy link
Author

Started looking into this, complete beginner with regards to Go but will try to at least create a failing test case here: https://github.com/martinklepsch/traefik/tree/fix-4247.

If you want to help me contribute/get this done, I'm also @martinklepsch in the Traefik Slack.

martinklepsch added a commit to cljdoc/cljdoc that referenced this issue Nov 28, 2018
Workaround for traefik/traefik#4247
Usually Traefik and other reverse proxies handle this.
martinklepsch added a commit to cljdoc/cljdoc that referenced this issue Nov 28, 2018
Workaround for traefik/traefik#4247
Usually Traefik and other reverse proxies handle this.
martinklepsch added a commit to cljdoc/cljdoc that referenced this issue Nov 28, 2018
Workaround for traefik/traefik#4247
Usually Traefik and other reverse proxies handle this.
martinklepsch added a commit to cljdoc/cljdoc that referenced this issue Nov 29, 2018
Workaround for traefik/traefik#4247
Usually Traefik and other reverse proxies handle this.
martinklepsch added a commit to cljdoc/cljdoc that referenced this issue Dec 3, 2018
Workaround for traefik/traefik#4247
Usually Traefik and other reverse proxies handle this.
martinklepsch added a commit to cljdoc/cljdoc that referenced this issue Dec 6, 2018
Workaround for traefik/traefik#4247
Usually Traefik and other reverse proxies handle this.
martinklepsch added a commit to cljdoc/cljdoc that referenced this issue Dec 10, 2018
Workaround for traefik/traefik#4247
Usually Traefik and other reverse proxies handle this.
@pascalandy
Copy link
Contributor

I understand that "keepTrailingSlash"" is not relevant anymore in Traefik V2 right?

@rtribotte
Copy link
Member

Hello,

This issue was for the v1, but as described in our deprecation notices the v1 is not supported anymore.
Accordingly, we are closing this issue.

@rtribotte rtribotte added resolution/declined and removed priority/P2 need to be fixed in the future labels Nov 22, 2022
@traefik traefik locked and limited conversation to collaborators Dec 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/rules kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. resolution/declined status/5-frozen-due-to-age
Projects
None yet
Development

No branches or pull requests

5 participants