-
Notifications
You must be signed in to change notification settings - Fork 25
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
renderHeaders assumes rawPathInfo is an absolute path #32
Comments
How can |
One can set it to anything
…On Sun, Mar 31, 2019 at 9:30 AM Michael Snoyman ***@***.***> wrote:
How can rawPathInfo *not* be an absolute path? It's taken from the HTTP
request header.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#32 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKSO-FueBq1J1-XabqnDQKv_-7KVYM4ks5vcOK-gaJpZM4cS4Yg>
.
|
Right, I get that, I'm just not sure what the case is where that will actually happen. Anyway, if you'd like to PR a fix, I'll be happy to review. |
The use case for use is a proxy that rewrites the path. The issue is no where did we see that the path must be absolute and it works fine if it regular HTTP and not websockets. I could see changing the Wai doc to say it must be absolute as an alternative. 🤷♂️ |
I can also one day add a PR assuming inspiration hits me :p |
When
renderHeaders
creates a request it assumesrawPathInfo
is a absolute path. If it is a relative path theRequest-Uri
part of the HTTP request will be invalid.I don't think
wai
makes any guarantees about therawPathInfo
so I don't thinkhttp-reverse-proxy
should either.I think
renderHeaders
should use the logic inhttp-client
http://hackage.haskell.org/package/http-client-0.5.14/docs/src/Network.HTTP.Client.Request.html#local-6989586621679091539Here is the logic I am referring to:
The text was updated successfully, but these errors were encountered: