Open monrax opened 6 months ago
The header is set properly, when passing skip_compression: true
as a field to the HttpLogger
constructor.
However, then the skip_compression
field for the object instance is not set.
const { HttpLogger } = require('resurfaceio-logger');
let logger = new HttpLogger({url: 'http://localhost:7701/message', rules: 'include debug', skip_compression: true});
assert.equal(logger._url_options.headers['Content-Encoding'], 'identity'); // pass!
assert.equal(logger.skip_compression, true); // fail
Content-Encoding
header is set todeflated
instead ofidentity
whenskip_compression
rule is present as part ofoptions.rules
but notoptions
itself. This is not the expected result according to the logger API.Expected behavior
Current behavior
How to reproduce?
The header can also be inspected with a packet capture tool like wireshark, or an HTTP proxy.