Skip to content

Cloudflare adapter should preserve oversized metadata for bodiless responses #980

Description

@ChristianPavilonis

Summary

The Cloudflare HTTP adapter applies its buffered response Content-Length cap before it evaluates HTTP response body semantics. As a result, a HEAD, informational (1xx), 204, 205, or 304 response may be rejected solely because metadata describes a representation larger than the buffering cap, even though no body needs to be copied.

Scope

  • Evaluate request method and response status before the pre-flight and post-buffer size checks.
  • Preserve valid metadata for bodiless responses, especially Content-Length on HEAD and 304.
  • Add native-testable coverage for the shared decision logic where possible.

Context

Follow-up to #951; intentionally kept out of that Fastly-focused PR.

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