Skip to content

Multipart response #60

@cristovao-trevisan

Description

@cristovao-trevisan

Hello,

I'm receiving a multipart-data response with an invalid Content-Lenght header, and thus using this package.
The problem I have is that the body_bytes is being set to NaN, which prevents the response from being read.

My current solution is to change this line:

  var length = Math.min(this.end - this.offset, this.body_bytes);

To this:

  var length = Math.min(this.end - this.offset, this.body_bytes || Infinity);

Don't know if that's the correct answer though, but tests are still passing.

I have a fork for this, and the time to create a PR :)

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