4teamwork / ftw.tika

This product integrates Apache Tika for full text indexing with Plone.
4 stars 1 forks source link

Detect if we're running an old version of ftw.tika (< 2.0) against new server #22

Closed lukasgraf closed 10 years ago

lukasgraf commented 10 years ago

Detect if we're running an old version of ftw.tika` (< 2.0) against the new JAXRS HTTP server and log a helpful error message.

This PR is against the 1.1.x branch, which contains the old client implementation that expects a dumb TCP socket server. If for some reason we get a response that looks like HTTP (a 400 Bad Request, because we sent some random garbage to a server expecting a HTTP request), this is a strong indication that the server is the new JAXRS HTTP server, and we're running an old version of ftw.tika against the new server.

We therefore log a message with level ERROR, which should end up in Errbit and allow us to upgrade ftw.tika accordingly.

@phgross @maethu

/cc @jone

phgross commented 10 years ago

:+1: :sparkles:

Is there any reason why you locked the PR?

lukasgraf commented 10 years ago

@phgross forgot to unlock after I fixed failing tests yesterday ;)