* Fixes non UTF-8 surrogateescapes
Surrogate escapes in Unicode (non UTF-8 encoding) will be properly escaped with backslashes when encountered, versus breaking the transport layer.
* Removes erroneous bytes decode and reraises
Fixes to re-raise exceptions with different reasons
Removes erroneous bytes decode where bytes are desired
* Adds test for surrogate escapes in body
Tests that a surrogate escape sequence is properly escaped
with backslashes to produce valid UTF-8.
* Use proper byte sequence for surrogate
* Use if/else versus pass
* Proper Unicode surrogate escape
Use a Unicode Surrogate that properly escapes in both Python2 and Python3
* Passing test once surrogatepass is used
Updating test to pass once surrogatepass is used
* Use surrogatepass instead of backslashreplace
This replicates behavior between Python 2 and Python 3
* Fixes whitespace
* Simplifies with no exception block
Since `surrogatepass` will only ever explicitly occur when there are surrogate bytes encountered, there is no need to let the error throw and catch it, also uses single-quotes for consistency.
* Fixes Unicode Surrogate Escapes in request logging
This is the same fix as accepted for ElasticSearch requests, except applied to the request logging mechanisms.
* Fix scheme for HTTPS URLs
For URLs like https://example.org scheme is currently set to 'http'.
* Revert "Fix scheme for HTTPS URLs"
This reverts commit 5dcee5bd2a8ce4453b495e637b283e7558718262.
* Fix HTTPS URL support
AFAIK the only exception which can occur here is one that the json.loads(..) could raise. So (TypeError or) ValueError.
So except on that. and also log a warning in such case.
bare excepts are 99.99% of the time simply bad/wrong. It's the case here.
unconfigured.
In the aforementioned commit, the existing behavior was changed,
I believe in advertantly, to set propagate to False if the
trace logger already has been configured. This seems to be the
opposite of the internet, and this change restores what appears
to have been the intent, and silences the tracer unless
it has been configured, in which case it will propagate.
The simplejson parser drop-in compatible with the builtin python JSON
parser, but much faster. In particular, this makes operations like
reindexing quicker.