Repository navigation
Conversation
Honor the supplied event format before checking ce- headers, as required by the HTTP binding sections 3 and 3.2.3. Assisted-by: ChatGPT (Codex) Signed-off-by: Sonam <120879799+BiNKss7@users.noreply.github.com>
Cover redundant metadata headers, Content-Type casing and parameters, explicit and inferred factories, partial metadata, and custom formats. All eight regression cases fail without the source fix. Assisted-by: ChatGPT (Codex) Signed-off-by: Sonam <120879799+BiNKss7@users.noreply.github.com>
Document the corrected precedence of structured Content-Type over redundant metadata headers. Assisted-by: ChatGPT (Codex) Signed-off-by: Sonam <120879799+BiNKss7@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #314. Supersedes #315 with corrected author/sign-off names; the file tree is identical. GitHub would not reopen the original PR after its branch was recreated.
Type of change: Bug fix
Description:
The core HTTP decoder selects binary mode whenever it sees a
ce-*header. A structured request with redundant metadata headers therefore uses the header attributes and treats its envelope as data. A lonece-subjectheader can instead make a valid structured event fail validation.Check Content-Type against the supplied event format before inspecting metadata headers. Match media types case-insensitively and without parameters, including custom formats. Preserve existing fallback behavior. This follows HTTP binding section 3 and section 3.2.3, which permits metadata headers on structured messages.
Correct the mixed-headers test that asserted binary precedence, and cover explicit/auto-detected factories, casing, parameters, partial metadata, and a custom format. Include a changelog entry. No dependencies or public APIs change.
Validation (Linux, CPython 3.12.14):
socksioand localhost proxy exclusions in the test environment; project dependencies were not changed.Checklist: