proycon / clam

Quickly turn command-line applications into RESTful webservices with a web-application front-end. You provide a specification of your command line application, its input, output and parameters, and CLAM wraps around your application to form a fully fledged RESTful webservice.
https://proycon.github.io/clam
GNU General Public License v3.0
129 stars 17 forks source link

XML Response not terminated with \n #76

Closed Warmduscher closed 5 years ago

Warmduscher commented 5 years ago

I'm calling CLAM by an HTTP-Implementation from Apache NiFi's HTTPInvoke. From time to time, the Invoke Method fails when reading the XML Response from clam. As it turn's out, the length of the Response inside the HTTP-Header given back is one byte longer than the actual content. From my point of view, the XML-Response should be terminated with a \n. If for example i'll force uwsgi to add a \n: route = .* send-crnl: the response is in line with the HTTP-Header.

proycon commented 5 years ago

Interesting issue! I haven't come across such a problem yet (and I wonder the fault is not actually in some middleware here), but I can of course easily make sure that CLAM XML responses always end in a newline if that helps resolve it.

Warmduscher commented 5 years ago

personally. i found a workaround i can live with. I thought that maybe others run into the same issue and might find this information useful. Of course, it would be best if you could implement this directly.

BTW: Thx for making CLAM, will certainly help me preprocess some 2M files

Warmduscher commented 5 years ago

as stated in my other issue, the above workaround is not working as intended. But i could resolve my issue with NiFis HTTPInvoke. So closing this as unneeded