]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
plugins: fts-solr: Use a private HTTP client.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Fri, 4 Jan 2019 08:57:37 +0000 (09:57 +0100)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 19 Feb 2021 10:14:26 +0000 (12:14 +0200)
This is a workaround for problems with the http_client_request_send_payload()
API that occur when several shared HTTP clients use this API at the same time
and payload sending gets interleaved.

src/plugins/fts-solr/solr-connection.c

index ae720b5e2870a852c1b6c440939e3c7c0fa72b5c..582fe810437b849591338f551275fcbc634f724f 100644 (file)
@@ -103,7 +103,14 @@ int solr_connection_init(const struct fts_solr_settings *solr_set,
                http_set.ssl = ssl_client_set;
                http_set.debug = solr_set->debug;
                http_set.rawlog_dir = solr_set->rawlog_dir;
-               solr_http_client = http_client_init(&http_set);
+
+               /* FIXME: We should initialize a shared client instead. However,
+                         this is currently not possible due to an obscure bug
+                         in the blocking HTTP payload API, which causes
+                         conflicts with other HTTP applications like FTS Tika.
+                         Using a private client will provide a quick fix for
+                         now. */
+               solr_http_client = http_client_init_private(&http_set);
        }
 
        *conn_r = conn;