]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
fts: fts_parser_tika replace empty path with "/"
authorSergey Kitov <sergey.kitov@open-xchange.com>
Mon, 9 Oct 2017 10:57:12 +0000 (13:57 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 11 Dec 2017 08:51:49 +0000 (10:51 +0200)
indexing doesn't crash if fts_tika = http://host:port setting is
missing trailing '/'

src/plugins/fts/fts-parser-tika.c

index 7759fdaf3dd7b7548567ece81d2553c0bb1fac2b..1e75121f82b1d834981ee529043bdc10177932a7 100644 (file)
@@ -139,6 +139,8 @@ fts_parser_tika_try_init(struct fts_parser_context *parser_context)
 
        if (tika_get_http_client_url(parser_context->user, &http_url) < 0)
                return NULL;
+       if (http_url->path == NULL)
+               http_url->path = "/";
 
        parser = i_new(struct tika_fts_parser, 1);
        parser->parser.v = fts_parser_tika;