Skip to content

Add 100 Continue support #28

@JoshCap20

Description

@JoshCap20

Category: HTTP/HTTPS Proxy RFC Compliance

Problem

RFC 7231 §5.1.1 defines the Expect: 100-continue mechanism. When a client sends this header, it expects a 100 Continue interim response before sending the request body. The proxy currently ignores this header, which can cause:

  • Clients waiting indefinitely for a 100 Continue that never comes
  • Timeouts on large uploads

Current State

The Expect header is passed through to upstream without any proxy-level handling. The proxy reads the body immediately regardless of Expect: 100-continue.

Proposed Solution

  1. Detect Expect: 100-continue header
  2. Before reading the body, send HTTP/1.1 100 Continue\r\n\r\n to the client
  3. Then proceed with reading the body
  4. If upstream rejects (e.g., 417 Expectation Failed), forward that response instead

Priority

Low — Most HTTP clients handle the absence of 100 Continue gracefully (they send the body after a timeout). Important for correctness with large uploads.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions