[
https://issues.apache.org/jira/browse/SOLR-10973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16068077#comment-16068077
]
Karl Wright commented on SOLR-10973:
------------------------------------
[~erickerickson], I am blocked on committing this to the 6.x branch because of
a compilation error due to a commit of yours:
{code}
acf30220 solr/core/src/java/org/apache/solr/core/SolrCore.java (Erick Erickson
2017-04-12 21:55:52 -0700 2835) if (coreContainer != null) {
acf30220 solr/core/src/java/org/apache/solr/core/SolrCore.java (Erick Erickson
2017-04-12 21:55:52 -0700 2836) lst.add("aliases",
coreContainer.getCoreNames(this));
c971f792 solr/core/src/java/org/apache/solr/core/SolrCore.java (Mark Robert
Miller 2012-07-05 20:36:05 +0000 2837) }
{code}
> SolrJ: ContentType is not parsed properly in HttpSolrClient
> -----------------------------------------------------------
>
> Key: SOLR-10973
> URL: https://issues.apache.org/jira/browse/SOLR-10973
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: SolrJ
> Affects Versions: 6.6
> Reporter: Karl Wright
> Assignee: Karl Wright
>
> When multipart posting is used, the content type is passed to the constructor
> for InputStreamBody as a simple string:
> {code}
> parts.add(new FormBodyPart(name,
> new InputStreamBody(
> content.getStream(),
> contentType,
> content.getName())));
> {code}
> This is incorrect; HttpClient does not parse that contentType as anything
> other than a mime type and thus blows up when you pass in something like
> "text/plain; charset=utf-8". The correct code is:
> {code}
> parts.add(new FormBodyPart(name,
> new InputStreamBody(
> content.getStream(),
> ContentType.parse(contentType),
> content.getName())));
> {code}
> This was discovered by a ManifoldCF user.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]