[ 
https://issues.apache.org/jira/browse/CONNECTORS-1564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16778054#comment-16778054
 ] 

Erlend Garåsen commented on CONNECTORS-1564:
--------------------------------------------

I'm not sure whether the issue will be solved in SolrJ. 
[[email protected]] found out that RequestConfig is being overwritten in a 
method in HttpClientUtil.java. This method is further called in 
HttpSolrClient.java which is again overridden in ModifiedHttpSolrClient.java. 
One way to solve it on the Manifold side is to override the executeMethod in 
HttpSolrClient:
{code:java}
org.apache.http.client.config.RequestConfig.Builer requestConfigBuilder = 
HttpClientUtil.createDefaultRequestConfigBuilder();
[…]

{code}
Another way so solve this problem is to do what [[email protected]] 
previously suggested – just add the header until the issue is fixed in SolrJ:
{code:java}
method.addHeader("Expect", "100-continue");{code}

> Support preemptive authentication to Solr connector
> ---------------------------------------------------
>
>                 Key: CONNECTORS-1564
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-1564
>             Project: ManifoldCF
>          Issue Type: Improvement
>          Components: Lucene/SOLR connector
>            Reporter: Erlend Garåsen
>            Assignee: Karl Wright
>            Priority: Major
>         Attachments: CONNECTORS-1564.patch
>
>
> We should post preemptively in case the Solr server requires basic 
> authentication. This will make the communication between ManifoldCF and Solr 
> much more effective instead of the following:
>  * Send a HTTP POST request to Solr
>  * Solr sends a 401 response
>  * Send the same request, but with a "{{Authorization: Basic}}" header
> With preemptive authentication, we can send the header in the first request.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to