tweet
So, in short, it was not curl's defect that I, in my web app, receive 2k less bytes; it is the weird behavior of ByteBuffer combined with InputStream received from HttpServletRequest, combined with my own home-grown marijuana ByteArray class; will investigate. Not ready to blame my own code yet, will check.