This working using curl as the clientcurl -X PUT -T aa.pdf http://localhost:9998/tika
java.lang.IllegalArgumentException: object is not an instance of declaring class
and (from Tika):
INFO: tika (autodetecting type)
Looks like there's already going something wrong on BaseX level. I still get a response from Tika, but not the one I expected. If I change the media-type to 'application/pdf' I no longer get the BaseX error, but a document processing error (500) from Tika. 'application/pdf' is also the media type that 'fetch:content-type()' returns..
So if it's not further specified, Tika tries to guess the content type but cannot find one. If it's specified it returns a processing error. Like you said maybe a problem with the content (as the content-length headers differ).
Sorry for not being of much help but maybe someone else has an idea?
Cheers,
Lukas