SOLR-3530, HttpSolrServer now does a string equivilence check between the "Content-Type" returned by the server, and a getContentTYpe() method declared by the ResponseParser .. but string equivilence is too strict, and can result in errors like this one reported by a user....
I just upgraded my Solr instance and with it I also upgraded the solrj library in our custom application which sends diverse requests and queries to Solr.
I use the "ping" method to determine whether Solr started correctly under the configured address. Since the upgrade the ping response results in an error:
The Solr application itself works fine.
Using an older version of the solrj library than solr-solrj-4.6.0.jar (e.g. solr-solrj-4.5.1.jar) in the custom application does not produce this error.
The Exception is produced in a Code block (HttpSolrServer.java, method request(...), around. line 140) which has been introduced with version 4.6.0.
Code to reproduce the error:
A global search for "charset=UTF-8" on the source code of solrj indicates that other functions besides "ping" might be affected as well, because there are several places where "application/xml; charset=UTF-8" is spelled without a space after the semicolon.