Request Header Handling and Validation Failures
Authorization headers ignored, correlation IDs mangled, conditional headers misinterpreted, or headers overwritten by an intermediary.
Failure explanation
The API or an intermediary mishandles request headers that affect authentication, representation, caching, concurrency, tracing, or routing. Headers may be dropped, duplicated, normalized incorrectly, parsed ambiguously, or accepted despite invalid values. Since proxies and gateways can modify headers, testing only the application server may not reveal the defect.
Example
A client sends If-Match: "v7" to protect an update, but a gateway removes If-Match before forwarding the request. The backend accepts the stale update and overwrites newer data.
How to test
- Test required, optional, malformed, duplicate, and oversized headers.
- Verify case-insensitive field-name handling and correct value parsing.
- Check propagation of Authorization, Content-Type, Accept, If-Match, trace context, and correlation headers.
- Run through intermediary infrastructure.
Expected behavior
Headers are validated and forwarded according to HTTP semantics and the API contract. Invalid or conflicting values produce clear, documented errors; security-sensitive headers cannot be spoofed through untrusted forwarding.
Runnable examples
Each example includes a broken server, a fixed server, an OpenAPI spec, and a clrsig scenario that detects the failure.
In the field
- STORY-035 primary The Proxy That Removed the Header the API Needed
- STORY-011 related The Payment Gateway Certification Failure
- STORY-018 related The Idempotency Key That Arrived Too Late
- STORY-026 related The API Ignored the Format the Client Asked For
- STORY-031 related The API Worked in the Backend but Failed in Every Browser
- STORY-033 related The Same API Behaved Differently Behind Different Gateways