benzino77 / clamav-rest-api

ClamAV REST API. Scan files using simple POST request.
MIT License
127 stars 44 forks source link

Replaced scanStream with passthrough for stability. #50

Closed Evil2000 closed 1 year ago

Evil2000 commented 1 year ago

As described in issue #49 and https://github.com/kylefarris/clamscan/issues/101 it is more reliable to use clamscan.passthrough() rather than scanStream. This PR implements this. In addition it takes care if the input file is of zero size which otherwise results in a hang.

benzino77 commented 1 year ago

Thanks! Will have a look at that when I come back from vacation.

benzino77 commented 1 year ago

Thanks - it is merged. I need to change few things and update tests.