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
This issue causes cookies to be saved incorrectly. I tried to write a test to reproduce the issue but CookieCutter.IsValid calls Url.IsValid which calls Url.ToString() implicitly.
Yep, this is legit. And I learned something new. The root of the problem is in FlurlResponse.LoadCookies. It needs the URL of the original request in order to process the Set-Cookie headers and gets it via HttpResponseMessage.RequestMessage.RequestUri.ToString(). But apparently Uri.ToString() un-encodes query params, effectively giving you an invalid URI in this case because there's a space in it, even though it was property encoded when the request was sent! Switched from ToString() to AbsoluteUri and it works as expected. Thanks for reporting.
This issue causes cookies to be saved incorrectly. I tried to write a test to reproduce the issue but
CookieCutter.IsValid
callsUrl.IsValid
which callsUrl.ToString()
implicitly.Here is a test which reproduces this issue.
It fails inside CookieCutter.IsValid where
Url.IsValid
is called. Passes this url intoUrl.IsValid
.Funny thing is, if you open the
OriginUrl
beforeUrl.IsValid
debug view before the method is called like soThen the correct url is passed into
Url.IsValid
.I think this is because it loads all the properties and calls
EnsureParsed
in the background.The text was updated successfully, but these errors were encountered: