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

Fix chunk header to be case-insensitive and allow leading zeros for end chunk #77

Merged
merged 2 commits into from
Mar 20, 2017

Conversation

mdrost
Copy link
Contributor

@mdrost mdrost commented Mar 19, 2017

No description provided.

@mdrost mdrost changed the title Issue 76 Improve ChunkedStreamDecoder Mar 19, 2017
@clue clue added the bug label Mar 19, 2017
@clue
Copy link
Member

clue commented Mar 19, 2017

@mdrost Thanks for filing this PR! It looks like your PR fixes a real bug (uppercase chunk header), but it also changes quite a bit of code that appears to be unrelated to this, so I wonder if you can give us some background here or update this to only change related code. Thanks!

@clue
Copy link
Member

clue commented Mar 19, 2017

Also ping @legionth, is this also relevant for react/http?

@mdrost
Copy link
Contributor Author

mdrost commented Mar 19, 2017

After fixing uppercase chunk header Wizzair site from #76 still throws exception. Wizzair terminating chunk contains 8 zeros but ChunkedStreamDecoder only looks for 1 zero.

@WyriHaximus
Copy link
Member

Also ping @legionth, is this also relevant for react/http?

I think it is, will file a PR later today 👍 .

@legionth
Copy link

legionth commented Mar 19, 2017

@clue @WyriHaximus I'm currently not on my development system. I think this line: https://github.com/reactphp/http/blob/master/src/ChunkedDecoder.php#L103
Should take care of this.
At least there are missing tests in react/http for this behavior.

@mdrost
Copy link
Contributor Author

mdrost commented Mar 19, 2017

Shouldn't it be better to have only one chunked decoder? 🤕

@WyriHaximus
Copy link
Member

@mdrost We have plans for that

@clue clue added this to the v0.4.17 milestone Mar 19, 2017
@WyriHaximus
Copy link
Member

@mdrost for reference #78

@clue clue changed the title Improve ChunkedStreamDecoder Fix chunk header to be case-insensitive and allow leading zeros for end chunk Mar 19, 2017
Copy link
Member

@clue clue left a comment

Choose a reason for hiding this comment

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

Thanks for this PR and your quick response, the changes LGTM 👍

For the reference: This builds on top of #73, #71, #68, #67 and #58.

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

Successfully merging this pull request may close these issues.

5 participants