Closed vovchisko closed 3 years ago
You should probably rather check why the client is doing this wrong instead of muting the error.
node-static doesn't support this range-header, it should look like: bytes=0-22
.
This range you see in the error message isn't standard.
See https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests
Also note that static only implements single-part ranges :)
If you really want to mute the error, change this line: https://github.com/cloudhead/node-static/blob/master/lib/node-static.js#L297
@tchakabam I agree. But I can't do anything about it. This range requested by SeaMonkey or/and mobile FF. I don't know for sure. I think ns can emit error event (or any other error), not just throw it. And if no listener for error event - thne okay, throw it. :3
I think ns can emit error event (or any other error), not just throw it.
It doesn't throw an error, it just uses console.error
to log it
In my server logs I've got a lots of such errors:
I think this one was made by the same client:
My guess is most of cleint browsers is mobile. As node-static serve whole file in such situation anyway - can I mute this errors somehow?