danwrong / restler

REST client library for node.js
MIT License
1.99k stars 391 forks source link

gzip compression lost on gets #267

Open squarewave24 opened 2 years ago

squarewave24 commented 2 years ago

when i simply do a GET / SEND all gzip compression gets lost..

restler.get(queryUrl).on("complete", (data, response: any) => {
    res.status(successStatus).send(data)

comparing headers in browser going direct or via Restler, the compression gets lost :(

is there a setting to propagate the compressed content?

direct:

content-encoding: gzip
content-length: 38587
content-type: text/html; charset=utf-8
server: gunicorn/19.9.0

restler:

Cache-Control: no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0
Connection: keep-alive
Content-Length: 870366
Content-Type: application/json; charset=utf-8