Github user pauldraper commented on the issue:
https://github.com/apache/httpcore/pull/30
> This code makes no distinction between BE and LE encodings described in
rfc4627.
> rfc7159 explicitly forbids byte order marks, while this patch depends on
BOMs.
RFC 7159 disallows UTF-16BE, UTF-16LE, UTF-32BE and UTF-32LE.
> JSON text SHALL be encoded in UTF-8, UTF-16, or UTF-32.
This code works for these three encodings.
I agree, however, that this code should work for RFC 4627 which permitted
the BE/LE encodings.
> IMHO, workarounds for improper servers should not be injected in core
functionality.
I don't see how this is a "workaround" for improper servers. This project
follows RFC 2616 when decoding entities. I suggest that it also follow RFC
4627/7159.
> Probably, separate function like EntityUtils.safeJsonToString(...) should
be introduced, so anybody using this function will be informed than slight
performance penalty will apply.
To be clear, the performance penalty you're thinking of is a string
comparison of the MIME type?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]