-
-
Notifications
You must be signed in to change notification settings - Fork 220
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
Fixed SendHttpClientRequest to accept '&' in both username and password #527
base: master
Are you sure you want to change the base?
Conversation
Added flag to allow loading a stream from URL's.
There are a couple of standard methods that will handle this without requiring a custom method: https://docs.microsoft.com/en-us/dotnet/api/system.web.httputility.urlencode while you spotted a problem with ampersands, there may be other characters that also cause trouble. Spaces, slashes, greater-than and less-than spring to mind as possible candidates. I recently ran into a similar problem on a completely unrelated project. In that same project, I also had a problem with Unicode characters messing with the ContentLength, because the size returned by |
Thanks! I should use UrlEncode() then. |
I found a bug when using JWT authentication. If the username or password has an ampersand (&) character the request body params get messed up.
Converting all ampersands characters to their UTF-8 hex representation fixed the problem.
The original data is never altered.
PS: I also closed the data stream after writing to it and added the ContentLength header to the request.