From: Stephan Bosch Date: Fri, 4 Jan 2019 08:55:20 +0000 (+0100) Subject: plugins: fts: tika: Use a private HTTP client. X-Git-Tag: 2.3.14~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1ff9c5aff4a07e52f830fd005a9713b92f0719c8;p=thirdparty%2Fdovecot%2Fcore.git plugins: fts: tika: Use a private HTTP client. 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. --- diff --git a/src/plugins/fts/fts-parser-tika.c b/src/plugins/fts/fts-parser-tika.c index a4b8b5c303..6355a2fc30 100644 --- a/src/plugins/fts/fts-parser-tika.c +++ b/src/plugins/fts/fts-parser-tika.c @@ -77,7 +77,14 @@ tika_get_http_client_url(struct mail_user *user, struct http_url **http_url_r) http_set.request_timeout_msecs = 60*1000; http_set.ssl = &ssl_set; http_set.debug = user->mail_debug; - tika_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 Solr. + Using a private client will provide a quick fix for + now. */ + tika_http_client = http_client_init_private(&http_set); } *http_url_r = tuser->http_url; return 0;