progress-stream icon indicating copy to clipboard operation
progress-stream copied to clipboard

why length can't be a number?

Open shoyuf opened this issue 7 years ago • 1 comments

https://github.com/freeall/progress-stream/blob/1beb155de00a5ee77feb7f422e56e3bec0bcd167/index.js#L67

shoyuf avatar Feb 05 '18 01:02 shoyuf

Yeah this is a bug, but I might be able to explain it. I removed this line and suddenly the progress started tracking properly based on Content Length.

I think the length was expected to be a string due to it coming from Content-Length as a response header. Later in the code I spot a lot of parseInt's that are useless with the progress being a number (maybe only now after NodeJS revisions?).

davidzwa avatar Nov 30 '22 09:11 davidzwa