Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Space in Range header result in a ParseException #7

Open
lochmueller opened this issue Jun 15, 2023 · 1 comment
Open

Space in Range header result in a ParseException #7

lochmueller opened this issue Jun 15, 2023 · 1 comment
Labels

Comments

@lochmueller
Copy link

Hey Ramsey,

thanks for the great work. I used your range parser as base for a new PSR Handler & Middleware, that I will publish soon. With my tests, a found an issue in your parser.

Best regards,
Tim

Description

I got this ParseException "Unable to parse range: 210-250" if the header is "bytes=0-199, 210-250"

Steps to reproduce

Call your code with a Range header incl. multiple ranges separated by space: bytes=0-199, 210-250

Expected behavior

I would expect the same behavior as with this header bytes=0-199,210-250 (without space). The space is allowed in this context and should be trimmed/skipped in the parsing process.

Same docs:

Environment details

  • version of this package: dev-main
  • PHP version: 8.2.7
  • OS: current macOS
@ramsey
Copy link
Owner

ramsey commented Jun 19, 2023

Thanks for the bug report!

I just realized that I've not updated the GitHub Actions workflows to test this library on PHP 8.1 or 8.2 yet, so I'll handle that while taking a look at this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants