Return 400 Invalid Request for non-ASCII URLs
See original GitHub issueRecently launched our product internationally and around the same time started to receive the following UnicodeDecodeError from daphne:
Traceback (most recent call last):
File "/daphne/http_protocol.py", line 265, in serverResponse
"path": self.uri.decode("ascii"),
UnicodeDecodeError: ‘ascii’ codec can't decode byte 0xd0 in position 10: ordinal not in range(128)
I’m currently running:
channels==1.1.8 daphne==1.3.0 asgi-redis==1.4.3 asgiref==1.1.2 Django==1.11.8
Any idea what might be causing this?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
What is HTTP error 400 and how do you fix it? - IT PRO
1. Recheck the URL ... Since a malformed URL is the most common cause of the 400 Bad Request error, make sure there...
Read more >How to Fix a 400 Bad Request Error: 8 Easy Methods
The 400 bad request error is an HTTP status code that describes an error ... A wrongly encoded URL can also contain wrongly...
Read more >How To Fix A 400 Bad Request Error [Causes And Solutions]
A 400 bad request error indicates that the client's request was inaccurate or corrupted, and the server was unable to interpret it.
Read more >Cookies with non-ASCII causing all endpoints to give status ...
The result being: Cookie is set incorrectly on one site and when the user "unknowingly" goes to our website, our website gives an...
Read more >What is a Bad Request Error 400 and How Do You Fix It?
Malformed URL syntax; Outdated/corrupted DNS cache; Outdated browser cookies and cache; Large file size. 6 Methods to Fix the Error 400. Here's ...
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 Free
Top 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
I’m not sure if the browser will correctly urlencode it for you without trying it out (it should do, but I bet one or two of them don’t).
Afraid not, the two codebases are substantially different.