bszabo97 commented on code in PR #1182:
URL: https://github.com/apache/solr/pull/1182#discussion_r1126325809


##########
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:
   Without the correct encoding specified here I got an exception when 
requesting the manifest.json file, since the SHA did not match the expected. 
   I tried to set the content type for the response to contain the encoding but 
when I dug deeper it turned out the we get if from the BinaryResponseParser and 
I was more afraid to change it there since it would affect much more then just 
the manifest.json so I added this if here.
   The other reason behind this was the we make use of this `FALLBACK_CHARSET` 
in many places in this class if we do not have an encoding specified, so I 
figured it would not mess up things if I add it here as well.



-- 
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: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to