Skip to content

Respect immediate error response codes for Expect: 100-continue  #256

@clue

Description

@clue

As of #109/#144, we automatically send a HTTP/1.1 100 Continue response if the request contains a Expect: 100-continue header. This makes perfect sense for most normal requests (see also linked discussion).

However, if the request handler rejects the incoming message right away (say because it's too large), we should respect this immediate error response and not send a 100 (Continue) status to encourage the client to send a potentially large request body.

Note that most HTTP clients do not actually send this header (no known browser support). However, this is used by tools such as curl etc. and would be a perfect fit to resolve #254: This would allow clients to actually "check" if the request can even get through.

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expect

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions