[ https://issues.apache.org/jira/browse/CONNECTORS-1564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16779064#comment-16779064 ]
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. {code:java} @Override protected NamedList<Object> executeMethod(final HttpRequestBase method, final ResponseParser parser, final boolean isV2Api) throws SolrServerException { RequestConfig.Builder requestConfigBuilder = HttpClientUtil.createDefaultRequestConfigBuilder(); // Configure expect continue, see CONNECTORS-1564: requestConfigBuilder.setExpectContinueEnabled(true); method.setConfig(requestConfigBuilder.build()); HttpEntity entity = null; InputStream respBody = null; boolean shouldClose = true; try { // Execute the method. HttpClientContext httpClientRequestContext = HttpClientUtil.createNewHttpClientRequestContext(); final HttpResponse response = httpClient.execute(method, httpClientRequestContext); {code} 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: 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)