You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We see that before that req.Header.SetRequestURIBytes() the uri.username and uri.password are
user1 and pass1
After that line (and before we setup the auth header) the uri.username and uri.password are
this/ and ests1
I'm not sure why the Header.SetRequestURIBytes() is changing the URI to be just the request path. And why setting the header value will cause the username and password to parse again incorrectly.
Right now basic auth is completely broken if the URI has any path elements.
Thanks for the report. I have just pushed a fix and a test to make sure it doesn't break in the future. I'll release this today in v1.13.1 so you can update the dependency.
We have been using fasthttp in CloudFoundry
closed issue #614 indicated that username/password should work.
We found that if the URL has a path the username/password are not correct in the header.
We write a very simple client app and used the following URL:
https://user1:pass1@sub.domain.com/test/path
Putting some debug prints around this line https://github.com/valyala/fasthttp/blob/master/http.go#L1185
We see that before that req.Header.SetRequestURIBytes() the uri.username and uri.password are
user1
andpass1
After that line (and before we setup the auth header) the uri.username and uri.password are
this/
andests1
I'm not sure why the Header.SetRequestURIBytes() is changing the URI to be just the request path. And why setting the header value will cause the username and password to parse again incorrectly.
Right now basic auth is completely broken if the URI has any path elements.
This is related to cloudfoundry/loggregator-agent-release#29 in CloudFoundry.
The text was updated successfully, but these errors were encountered: