dsmiley commented on code in PR #1182:
URL: https://github.com/apache/solr/pull/1182#discussion_r1126525931
##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java:
##########
@@ -505,6 +505,9 @@ private NamedList<Object> processErrorsAndResponse(
if (contentType != null) {
mimeType = MimeTypes.getContentTypeWithoutCharset(contentType);
encoding = MimeTypes.getCharsetFromContentType(contentType);
+ if (parser.getWriterType().equals("json") && encoding == null) {
+ encoding = FALLBACK_CHARSET.name();
+ }
Review Comment:
This is very much a hack (a needless special case) so I'm trying to avoid
this so that Http level code needn't have assumptions on formats when we
already have abstractions for those (the ResponseParser hierarchy) where such
logic might go. Since it seems your special case is JSON specific, how is it
that BinaryResponseParser (JAVABIN) is relevant?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]