Cli: content encoding error serving react site

Created on 7 May 2019  路  3Comments  路  Source: netlify/cli

- Do you want to request a feature or report a bug?
bug

- What is the current behavior?

# randomly picked react project as an example
git clone https://github.com/ahfarmer/calculator 
cd calculator
npm install
netlify dev --live

Expecting properly served react site and instead getting Content Encoding Error.

- If the current behavior is a bug, please provide the steps to reproduce.
See the attached files what shows a difference in output between curl localhost:3000 and the dev.live site.
localhost.txt
devlive.txt

- What is the expected behavior?
properly served html

- Please mention your node.js, and operating system version.

  • node v11.6.0
  • macos 10.14
  • netlify netlify-cli/2.11.16 darwin-x64 node-v11.6.0
area dev dev-live bug

Most helpful comment

Noticed this bug as well. It looks like an issue that live-tunnel-client has with compression.

I could get the pages to load properly on the browser by making it send the following header: Accept-Encoding: gzip;q=0,deflate;q=0 with an extension that can override request headers (such as ModHeaders)

All 3 comments

FWIW, I also tried a react-static project. Maybe there's a quirk in live-tunnel-client that explains the content encoding error.

Noticed this bug as well. It looks like an issue that live-tunnel-client has with compression.

I could get the pages to load properly on the browser by making it send the following header: Accept-Encoding: gzip;q=0,deflate;q=0 with an extension that can override request headers (such as ModHeaders)

thank you both! cc @calavera if you have bandwidth

Was this page helpful?
0 / 5 - 0 ratings