Skip to content

Possibly h11 in client mode should raise an exception if it receives data before sending a Request #24

@njsmith

Description

@njsmith

This is related to: https://github.com/njsmith/h11/issues/23

Right now, there are two reasons this doesn't happen:

  • h11 doesn't look at the next request/response cycle at all until the current one finishes and someone calls start_next_cycle

  • the state machine actually allows a server to send a spontaneous Response. This is because when acting as a server, we want to be able to send back a 400 response to malformed requests, which from the state machine's point of view is like having no request at all. When acting as a client, though, then this doesn't make much sense.

CC @Lukasa

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions