Error processing url in static directory
turone opened this issue · 4 comments
turone commented
I created a directory "img" in the static directory, added pictures there. But the file index.html did not create. When i navigate to the \img\ url, the browser waits for the page indefinitely. On the node server it gives an error:
07:52:22 W1 error unhandledRejection: RangeError [ERR_OUT_OF_RANGE]:
The value of "end" is out of range. It must be >= 0 && <= 9007199254740991. Received -1
new ReadStream (node:internal/fs/streams:201:5)
Object.createReadStream (node:fs:3060:10)
Static.serve (\node_modules\impress\lib\static.js:76:32)
in line 69 there is a constant "size" it is equal to 0 in this case. Accordingly, the constant "end" in line 71 is equal to -1
tshemsedinov commented
Can reproduce only on empty folder
tshemsedinov commented
Fixed in #1897
turone commented
Can reproduce only on empty folder
maybe node.fsp.stat for Windows returns a different size for a non-empty folder, unlike Linux. I tested for Windows.
tshemsedinov commented