trafficserver icon indicating copy to clipboard operation
trafficserver copied to clipboard

Forward Proxy not working with HTTP2

Open bbassingthwaite opened this issue 3 years ago • 1 comments

Hello, I am running ATS 9.1.2 as an HTTP forward proxy with both HTTPS and HTTP2. If I run the curl command curl -x https://127.0.0.1:8080 -v http://127.0.0.1/ everything works as expected. But if I try the same curl and force it to use HTTP2 with the curl opt --http2-prior-knowledge, the origin server receives the request GET /http://127.0.0.1/ HTTP/1.1\r\n. ATS seems to recognize that it should be a forward proxy since it forwards the request onto the correct origin but the path of the request is wrong as I would expect it to be /.

Thanks!

bbassingthwaite avatar Sep 13 '22 15:09 bbassingthwaite

I couldn't check that because my curl, which is pretty new, doesn't support HTTP/2 prior knowledge for proxy.

$ curl --http2-prior-knowledge -v -x http://localhost:8888/ http://foo.example
*   Trying 127.0.0.1:8888...
* Connected to localhost (127.0.0.1) port 8888 (#0)
* Ignoring HTTP/2 prior knowledge due to proxy
> GET http://foo.example/ HTTP/1.1
> Host: foo.example
> User-Agent: curl/7.84.0-DEV
> Accept: */*
> Proxy-Connection: Keep-Alive
> 

And I don't think forward proxying on HTTP/2 is supported, even on HTTPS connections. I'm not going to say we never support it, but I'd say it probably won't be supported. Pull Request is welcome.

maskit avatar Sep 16 '22 00:09 maskit

This issue has been automatically marked as stale because it has not had recent activity. Marking it stale to flag it for further consideration by the community.

github-actions[bot] avatar Sep 16 '23 01:09 github-actions[bot]