ethanent / phin

Node HTTP client
MIT License
576 stars 33 forks source link

Support for brotli compression #84

Open crystalfp opened 2 years ago

crystalfp commented 2 years ago

The package is used inside Pactum and do not access brotli compressed files.

I know it is an indirect issue (the culprit is phin or pactum?), but I'm trying to collect more evidence on the problem.

Environment details

Steps to reproduce

  1. Access http://localhost/ where the root page is compressed with brotli, that is, the file to access is index.html.br
  2. The server respond with 404
  3. Now access http://localhost/index.html.br
  4. The server find the file but return the compressed binary content.
  5. Use an external brotli decompressor and the returned data is indeed the index.html content