manifoldcf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erlend Garåsen (JIRA) <>
Subject [jira] [Commented] (CONNECTORS-1564) Support preemptive authentication to Solr connector
Date Wed, 27 Feb 2019 09:47:00 GMT


Erlend Garåsen commented on CONNECTORS-1564:

I have taken a second look. The ModifiedHttpSolrClient class needs to be rewritten I'm afraid.
I started to do so this morning, but found out that I need several instance variables, e.g.
httpClient, which are set in other unimplemented methods (not the one described below).

This is the "missing" unimplemented method where expect continue may be enabled. This is my
own code  since I started to add this method, but stopped when I figured out that I need
access to several instance variables.

protected NamedList<Object> executeMethod(final HttpRequestBase method, final ResponseParser
final boolean isV2Api) throws SolrServerException {
  RequestConfig.Builder requestConfigBuilder = HttpClientUtil.createDefaultRequestConfigBuilder();
  // Configure expect continue, see CONNECTORS-1564:
  HttpEntity entity = null;
  InputStream respBody = null;
  boolean shouldClose = true;
  try {
    // Execute the method.
    HttpClientContext httpClientRequestContext = HttpClientUtil.createNewHttpClientRequestContext();
    final HttpResponse response = httpClient.execute(method, httpClientRequestContext);

I can proceed, but since we need access to the httpClient vaiable (and maybe other instance
variables as well), some other methods need to be overridden as well. Just FYI.

> Support preemptive authentication to Solr connector
> ---------------------------------------------------
>                 Key: CONNECTORS-1564
>                 URL:
>             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
>  * 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

View raw message