-
Notifications
You must be signed in to change notification settings - Fork 239
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
Update check_query_length(), Unicode support #230
Conversation
Codecov Report
@@ Coverage Diff @@
## master #230 +/- ##
=======================================
Coverage 95.67% 95.67%
=======================================
Files 3 3
Lines 555 555
Branches 118 118
=======================================
Hits 531 531
Misses 15 15
Partials 9 9
Continue to review full report at Codecov.
|
"~" is no longer URL-encoded in Python 3.7
DHUS expects non-ASCII characters to be encoded in latin-1. Added proper Unicode support by explicitly setting our encoding to UTF-8 in the request header. Added a unit test for this as well, but VCR.py does not properly support Unicode characters in request bodies, so I disabled this for now.
a8cc642
to
5c6c127
Compare
I also added Unicode support for search queries. The server parses query strings as Latin-1 by default, but can be made to accept UTF-8 by setting a specific header. |
The unit test for Unicode support is currently disabled due to a VCR.py bug. The test can be enabled again once kevin1024/vcrpy#386 gets pulled and included in a release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
The server-side query string handling has changed a bit so we need to update the calculation logic in
check_query_length()
. Related to #228.