Skip to content

Document cancel safety #4054

@jorendorff

Description

@jorendorff

Would you accept a documentation patch describing Hyper's cancellation behavior?

I think Hyper is largely cancel safe:

  • dropping an HTTP/1 request causes the connection to be closed
  • dropping an HTTP/2 request leaves the shared connection in a good state and cancels the unwanted response (using RST_STREAM).
  • otherwise Hyper doesn't really have a bunch of hidden state to screw up
  • well, except the legacy Client support, but actually that's also carefully implemented to do the right thing on cancellation

I don't know about the server side, but that's OK, I can read code. If you're interested.

It doesn't seem like guide material. I was thinking a single # Cancel safety section at the crate level.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: documentation.E-easyEffort: easy. A task that would be a great starting point for a new contributor.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions