Skip to content

Classify header parse errors as bad requests. - #113

Open
samuel-williams-shopify wants to merge 1 commit into
mainfrom
classify-request-header-parse-errors
Open

Classify header parse errors as bad requests.#113
samuel-williams-shopify wants to merge 1 commit into
mainfrom
classify-request-header-parse-errors

Conversation

@samuel-williams-shopify

@samuel-williams-shopify samuel-williams-shopify commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Mark parse errors from Accept, Accept-Charset, Accept-Encoding, Accept-Language, Digest, Range, Server-Timing, and TE as Protocol::HTTP::BadRequest.
  • Give async-http a consistent response-capable error for malformed lazily parsed header values.
  • Add explicit classification tests and an unreleased release note.

This PR is stacked on #112 so the Range parser remains independent of this classification decision.

Tests

  • bundle exec bake test (768 tests, 1,545 assertions, 100% coverage).
  • bundle exec bake decode:index:coverage lib (438/438 definitions).
  • Focused RuboCop passes.

Contribution

  • I added tests for my changes.
  • I tested my changes locally.
  • I agree to the Developer Certificate of Origin 1.1.

@samuel-williams-shopify
samuel-williams-shopify force-pushed the classify-request-header-parse-errors branch from ca811d3 to 2e54089 Compare August 2, 2026 11:13
@samuel-williams-shopify samuel-williams-shopify changed the title Classify request header parse errors as bad requests. Classify header parse errors as bad requests. Aug 2, 2026
@samuel-williams-shopify
samuel-williams-shopify force-pushed the classify-request-header-parse-errors branch from 2e54089 to 2595522 Compare August 2, 2026 11:40
@samuel-williams-shopify
samuel-williams-shopify changed the base branch from main to add-range-header August 2, 2026 11:40
@samuel-williams-shopify
samuel-williams-shopify force-pushed the classify-request-header-parse-errors branch from 2595522 to b9b17eb Compare August 2, 2026 11:48
@samuel-williams-shopify
samuel-williams-shopify force-pushed the classify-request-header-parse-errors branch from b9b17eb to a1259db Compare August 2, 2026 11:51
Base automatically changed from add-range-header to main August 2, 2026 11:57
@samuel-williams-shopify
samuel-williams-shopify force-pushed the classify-request-header-parse-errors branch from a1259db to 9f11e14 Compare August 2, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant