Skip to content

fix: handle invalid start and end byte positions in range parsing#57

Merged
blakeembrey merged 1 commit intojshttp:masterfrom
bjohansebas:fix-spec
Jan 21, 2026
Merged

fix: handle invalid start and end byte positions in range parsing#57
blakeembrey merged 1 commit intojshttp:masterfrom
bjohansebas:fix-spec

Conversation

@bjohansebas
Copy link
Member

A small bug that’s worth fixing closes #24

Copy link
Member

@blakeembrey blakeembrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I might do a follow up PR to be more complete, currently due to parseInt you can still get by with things like 100x- or 100.5, which should probably also be invalid.

@blakeembrey blakeembrey merged commit 269cb4e into jshttp:master Jan 21, 2026
28 checks passed
@bjohansebas bjohansebas deleted the fix-spec branch January 22, 2026 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

invalid start and end byte ranges should return -2

2 participants