0

I am writing a small server on libwebsockets. The server uses mountpoint to serve static files. All files load fine from it except .js. In chrome it shows the following error:

GET http://127.0.0.1:8000/display.js net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK)

What can you advise me?

Thanks.

  • If you're running your server on Windows, this can happen due to the OS not reporting the correct file length (Windows, by default, translates `"\r\n"` to `"\n"` when opening files, causing a file length mismatch)... I encountered this issue writing the [facil.io](https://facil.io) library. – Myst Apr 07 '23 at 17:40

0 Answers0