fix(gmail): match message header names case-insensitively - #946
Closed
rootkiller6788 wants to merge 3 commits into
Closed
rootkiller6788 wants to merge 3 commits into
rootkiller6788 wants to merge 3 commits into
Conversation
parse_message_headers matched on the raw header name, so a message from an Exchange/Outlook sender (which emits "CC" and "MESSAGE-ID") had its Cc header dropped. get_part_header in the same file already does a case-insensitive lookup, so this was inconsistent too.
Fails on the previous commit with "Message is missing From header".
🦋 Changeset detectedLatest commit: 0a916d8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
rootkiller6788
marked this pull request as ready for review
September 27, 2026 13:10
Contributor
|
This PR has been inactive for 72 hours. Closing to keep the queue clean. |
Contributor
|
This PR was closed because it has been stalled for 72 hours. Feel free to magically reopen it if you want to continue working on it! |
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 #642.
parse_message_headersmatched on the raw header name, so anything that didn't arrive spelled exactlyFrom/To/Cc/... fell through the match. Exchange/Outlook sendCCandMESSAGE-ID, sogmail +reply-allsilently dropped the CC list andgmail +readhanded backcc: null. If a message also had a non-canonicalFromorMessage-ID, parsing failed outright with "Message is missing From header".Lowercase the name before matching.
get_part_headerin the same file already compares case-insensitively, so this just makes the two agree.I checked the new test fails on the old code ("Message is missing From header") and passes after. Full gmail suite is green, 236 tests.
One note for reviewers: clippy is currently red on this repo for me on 14 pre-existing spots (
assert_eq!(x, true)style lints in test code, mostly executor.rs / sheets.rs / main.rs) — none in gmail/mod.rs, and none from this change.