node-libcurl icon indicating copy to clipboard operation
node-libcurl copied to clipboard

HTTP_CONTENT_DECODING = false but still decodes the server's responses

Open schamen opened this issue 2 years ago • 0 comments

Hello Even when I use the following code curl.setOpt('HTTP_CONTENT_DECODING', false);, curl still decodes the server's responses.

The problem is that when I try to receive content-type: application/pdf, node-libcurl decodes the request incorrectly, resulting in a broken PDF file. However, when I manually download the data in base64 and decode it, the PDF file is normal. There seems to be an issue with encodings, and there is no support for UTF-16BE.

Alternatively, please suggest how to obtain a raw response from the server, encoded in base64, using the latest version 3.0.0. Thank you.

schamen avatar Sep 15 '23 21:09 schamen