In request/providers/node.ts, the raw request data in dataAsBuffer is being converted to a string with String(dataAsBuffer) before being stored in the response object. Since no explicit encoding is specified, this converts the data to a 'utf8' string. This causes problems when downloading binary data, and is also redundant since Response.text() does the same thing.
Bug
In
request/providers/node.ts
, the raw request data indataAsBuffer
is being converted to a string withString(dataAsBuffer)
before being stored in the response object. Since no explicit encoding is specified, this converts the data to a 'utf8' string. This causes problems when downloading binary data, and is also redundant sinceResponse.text()
does the same thing.Package Version: beta1
Code
Expected behavior:
The data length should be 156603.
Actual behavior:
The data length is 269749, and is not a valid zip file.