Skip to content

Commit

Permalink
fts-tika: Don't crash on 500 errors (caused by 146f6f8)
Browse files Browse the repository at this point in the history
http_req=NULL here set by http_client_request_send_payload(). Even if it
wasn't, the payload wouldn't be there.
  • Loading branch information
sirainen committed Apr 5, 2016
1 parent 76537b1 commit dca6152
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/plugins/fts/fts-parser-tika.c
Expand Up @@ -107,11 +107,13 @@ fts_tika_parser_response(const struct http_response *response,
/* Server Error - the problem could be anything (in Tika or
HTTP server or proxy) and might be retriable, but Tika has
trouble processing some documents and throws up this error
every time for those documents. So we try retrying this a
couple of times, but if that doesn't work we'll just ignore
it. */
if (http_client_request_try_retry(parser->http_req))
return;
every time for those documents.
Unfortunately we can't easily re-send the request here,
because we would have to re-send the entire payload, which
isn't available anymore here. So we'd need to indicate
in fts_parser_deinit() that we want to retry.
FIXME: do this in v2.3. For now we'll just ignore it. */
i_info("fts_tika: PUT %s failed: %u %s - ignoring",
mail_user_plugin_getenv(parser->user, "fts_tika"),
response->status, response->reason);
Expand Down

0 comments on commit dca6152

Please sign in to comment.