Skip to content

why length can't be a number? #25

Open

Description

@shoyuf

if (typeof length === 'number') return;

Activity

  1. davidzwa commented on Nov 30, 2022

    @davidzwa

    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?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions