Skip to content

When browser omits last-byte-pos, 'last' is undefined #3

@ultimate-tester

Description

@ultimate-tester

I am using express-range to return a range of bytes instead of items.
It works perfectly except for one thing, if the browser omits the last-byte-pos (i.e. Range:bytes=0-) the req.range.last member will be "undefined" and it shows this also in the header that gets sent back to the browser. (i.e. Content-Range:bytes 0-undefined/5074944). This is confusing at least Firefox. Chrome just steps over it.

Please make it so that when the last-byte-pos is omitted, the "last" member will be (limit-1).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions