Skip to content

Encoded slash in URL #1582

Closed
Closed
@Cinerar

Description

1. What version of Caddy are you running (caddy -version)?

Caddy 0.9.5 (+7d15435 Sun Apr 16 00:21:33 UTC 2017)

2. What are you trying to do?

Proxy request

3. What is your entire Caddyfile?

localhost:8888 {
  # proxy to "nc -l localhost 9999"
  proxy /test http://localhost:9999
}

4. How did you run Caddy (give the full command and describe the execution environment)?

Just run caddy with this caddyfile

5. Please paste any relevant HTTP request(s) here.

 curl localhost:8888/test/%2F/foo

6. What did you expect to see?

nc -l localhost 9999
GET /test/%2F/foo HTTP/1.1
Host: localhost:9999
User-Agent: curl/7.47.0
Accept: */*
X-Forwarded-For: 127.0.0.1
Accept-Encoding: gzip

7. What did you see instead (give full error messages and/or log)?

nc -l localhost 9999
GET /test/foo HTTP/1.1
Host: localhost:9999
User-Agent: curl/7.47.0
Accept: */*
X-Forwarded-For: 127.0.0.1
Accept-Encoding: gzip

8. How can someone who is starting from scratch reproduce the bug as minimally as possible?

  1. Caddyfile:
localhost:8888 {
  #proxy to "nc -l localhost 9999"
  proxy /test http://localhost:9999
}
  1. Run
nc -l localhost 9999
  1. Run
curl localhost:8888/test/%2F/foo
  1. See
GET /test/foo HTTP/1.1
Host: localhost:9999
User-Agent: curl/7.47.0
Accept: */*
X-Forwarded-For: 127.0.0.1
Accept-Encoding: gzip

I believe this issue is #643 reintroduced with c37481c
and there are no slashes becouse of 04bee0f #1298

@tw4452852 please check it out.

Metadata

Assignees

Labels

bug 🐞Something isn't workinghelp wanted 🆘Extra attention is needed

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions