This repository was archived by the owner on Jan 13, 2021. It is now read-only.
Fix: stream end when length of last chunk equal to MAX_CHUNK#356
Merged
Lukasa merged 1 commit intopython-hyper:developmentfrom Nov 8, 2017
PrimozGodec:last-chunk-fix
Merged
Fix: stream end when length of last chunk equal to MAX_CHUNK#356Lukasa merged 1 commit intopython-hyper:developmentfrom PrimozGodec:last-chunk-fix
Lukasa merged 1 commit intopython-hyper:developmentfrom
PrimozGodec:last-chunk-fix
Conversation
Lukasa
suggested changes
Oct 26, 2017
Member
Lukasa
left a comment
There was a problem hiding this comment.
Yup, this looks like it’ll work. Mind adding an entry to the change log and also a test for me?
Contributor
Author
|
@Lukasa I changed the code and made unit test pass on my machine. I also added a test to test specific change. |
Contributor
|
@PrimozGodec, CI is fixed now, can you rebase please? Also, change log is in HISTORY.rst and CONTRIBUTORS.rst. |
Contributor
Author
Lukasa
suggested changes
Nov 4, 2017
hyper/http20/stream.py
Outdated
| self._send_chunk(chunk, final) | ||
| # since we need to know when we have a last package we need to know | ||
| # if there is another package in advance | ||
| cur_chunk = next(chunks) |
Member
There was a problem hiding this comment.
This will explode if there are no chunks to send: I think you need to write a test case for that and refactor.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request is fixing bug #355
I changed the approach of taking chunks form the generator, such that we know when we reach the last chunk with memorising the next chunk.