elastic / elastic-transport-js

Transport classes and utilities shared among Node.js Elastic client libraries
Apache License 2.0
5 stars 25 forks source link

Check max response length even when the content-length header is not present #57

Closed delvedor closed 1 year ago

delvedor commented 1 year ago

Usually, the 'transfer-encoding': 'chunked' header is used for streams, and the Client expects the user to enable asStream: true to handle on their own the specific case. This change expands the use of the maxResponseSize and maxCompressedResponseSize to work even if the content-type header is not set.

Fixes: #56

delvedor commented 1 year ago

Tests are passing, but the code coverage upload is broken for some reason 🤷‍♂️