utf-8 passwords in url don't work
See original GitHub issueSummary:
curl -s --url http://user1:enganação@127.0.0.1:8080 --data '{"method": "help"}'
works
#!/usr/bin/env python2
import requests
import json
payload = {'method': 'help'}
url = 'http://user1:enganação@127.0.0.1:8080'
requests.post(url, headers={'Content-type': 'text/plain; charset=utf-8'}, data=json.dumps(payload))
also works.
But… use #!/usr/bin/env python3
instead, and it doesn’t work anymore.
requests messes things up.
Expected Result
Work as curl and requests in python2 do.
Actual Result
requests in python3 messes with encoding.
Reproduction Steps
import requests
import json
payload = {'method': 'help'}
url = 'http://user1:enganação@127.0.0.1:8080'
requests.post(url, headers={'Content-type': 'text/plain; charset=utf-8'}, data=json.dumps(payload))
System Information
Python 3.5.2
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Can urls have UTF-8 characters? - Stack Overflow
1 Answer 1 · You probably mean "Unicode" when you write "UTF-8". · Actually they both amount to "no". · +1 @deceze (-:...
Read more >PuTTy Windows SSH doesn't accept UTF-8 password
I'm unable to login through ssh using PuTTy on windows. Everything works fine on linux and mac. Any idea or good alternative?
Read more >Pages with utf-8 name don't work properly under SSR #10084
As a workaround you can use dynamic page [page and switch case on pages names in utf8 pages name.
Read more >UTF8 username/password failing to authenticate with JAAS ...
With UTF8 characters outside the ASCII range the username/password flowed from the login form doesn't seem to reach the JAAS module as UTF8....
Read more >261929 - Consider sending urls in UTF-8 by default (images ...
Unchecking the "Always send URLs as UTF-8" makes it not work in MSIE6. ... Setting network.standard-url.encode-utf8 makes it work in Mozilla.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was asking to work on fixing it. Nevermind, you have closed it.
@rozuur what do you mean?