-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add outBodyCancel
to OutBodyIface
#11
Add outBodyCancel
to OutBodyIface
#11
Conversation
Support stream cancellation by adding an `outBodyCancel` field to the `OutBodyIface` API.
@kazu-yamamoto Could you please add @edsko as a reviewer? Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, modulo a few minor suggestions for improving the docs.
I always get a bit confused about exactly how this code works, the interaction between
Now that I have written this actually I am a bit concerned, about point (4). On the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's consider the race conditioned mentioned in #11 (comment) before we consider this mergeable.
* More documentation on `OutBodyIface` * More documentation on `runStreamingChunk`
Great documentation, I've added it. I think not being able to send empty data frames is okay. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this all looks good to me now. Thanks @FinleyMcIlwaine !
@kazu-yamamoto , this PR, together with kazu-yamamoto/http2#142, adds the ability to cancel a streaming request. This is necessary, because although of course it is possible to simply stop streaming, this will result in http2
putting the connection in half-closed state, and the server will then not be able to distinguish between the client simply being finished and something having gone wrong on the client side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cancel part looks good to me.
Excellent improvement for the documentation!
## 0.3.0 * Breaking change: fillFileBodyGetNext takes Sentinel instead of IO () to close files on time. ## 0.2.1 * Add outBodyCancel to OutBodyIface [#11](kazu-yamamoto/http-semantics#11) * Documentation improvement. [#10](kazu-yamamoto/http-semantics#10) [#11](kazu-yamamoto/http-semantics#11) ## 0.2.0 * Introduce `responseStreamingIface` [#9](kazu-yamamoto/http-semantics#9) ## 0.1.2 * Avoid buffer overflow in fillBufBuilderOne [#4](kazu-yamamoto/http-semantics#4) ## 0.1.1 * Avoid buffer overflow in runStreamingBuilder [#3](kazu-yamamoto/http-semantics#3) ## 0.1.0 * Make it possible to guarantee that final DATA frame is marked end-of-stream. [#2](kazu-yamamoto/http-semantics#2) ## 0.0.1 * Defining getResponseBodyChunk'. [#1](kazu-yamamoto/http-semantics#1)
Support stream cancellation by adding an
outBodyCancel
field to theOutBodyIface
API.