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

Make readpartial limit chunk to appropriate size #45

Merged
merged 2 commits into from
Jul 15, 2020

Conversation

wishdev
Copy link
Contributor

@wishdev wishdev commented May 30, 2020

Fixes #43 by unshifting portion of chunk that exceeds requested length.

@headius
Copy link
Contributor

headius commented May 30, 2020

Thank you for trying to fix this, I will give your change a try with JRuby.

@headius
Copy link
Contributor

headius commented Jun 1, 2020

Well if this is any indication the change seems good: JRuby is now down to only one failure on the WEBrick tests, provided that the locale-sensitive CGI test skipped on Windows is also skipped on JRuby (the JVM does not make it possible to get raw bytes from env vars, as is needed in that test).

@jeremyevans
Copy link
Contributor

It makes sense to have readpartial not return more bytes than requested, so I'm going to merge this.

@jeremyevans jeremyevans merged commit e693f50 into ruby:master Jul 15, 2020
@wishdev wishdev deleted the readpartial branch July 28, 2020 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

readpartial must not return more data than requested
3 participants