expressjs / serve-static

Serve static files
MIT License
1.39k stars 228 forks source link

Files with a line > 1MB throws "net::ERR_INCOMPLETE_CHUNKED_ENCODING" and this line is not served #170

Closed marmor closed 1 month ago

marmor commented 1 month ago

serve-static release 1.15.0 "1MB" = 1048576 (i.e. 2^20) After breaking the line before, let's say after 1048500 characters, everything works perfectly!

Anybody that faced such behavior, please tell here, even if you don't have any solution, so I can know that I'm not the only crazy one. If you fail to reproduce it, please let me know, and we will compare the releases of the other possible causes (mainly releases of modules that serve-static depends on, maybe also NodeJS).

Thanks!

P.S. same behavior with express.static()

marmor commented 1 month ago

Resolved: NodeJS ran behind Apache reverse proxy, with an enabled SUBSTITUTE filter, but without defining SubstituteMaxLineLength (which is defined to 1m by default). Nothing to do with serve-static nor with Express.