Skip to content

fix(gmail): normalize MIME types in multipart bodies#52

Merged
steipete merged 2 commits intoopenclaw:mainfrom
antons:fix/normalize-mime
Jan 9, 2026
Merged

fix(gmail): normalize MIME types in multipart bodies#52
steipete merged 2 commits intoopenclaw:mainfrom
antons:fix/normalize-mime

Conversation

@antons
Copy link
Copy Markdown
Contributor

@antons antons commented Jan 8, 2026

Clawdbot had a problem reading some email.

Body extraction compared exact MIME types; parts often include params like "text/plain; charset=utf-8", so multipart/alternative returned empty body (null in JSON). Normalize MIME types (lowercase/trim/strip params) so plain/html parts are found, preferring plain text. Also accept padded base64url defensively.

Made with Codex.

@antons antons force-pushed the fix/normalize-mime branch from 0178d8c to 8bb8317 Compare January 8, 2026 22:24
antons and others added 2 commits January 9, 2026 01:11
Body extraction compared exact MIME types; parts often include params like
"text/plain; charset=utf-8", so multipart/alternative returned empty body
(null in JSON). Normalize MIME types (lowercase/trim/strip params) so
plain/html parts are found, preferring plain text. Also accept padded
base64url defensively.
@steipete steipete force-pushed the fix/normalize-mime branch from 8bb8317 to e3ffd72 Compare January 9, 2026 00:14
@steipete steipete merged commit 7fe4ff4 into openclaw:main Jan 9, 2026
4 checks passed
@steipete
Copy link
Copy Markdown
Collaborator

steipete commented Jan 9, 2026

Merged via 7fe4ff4.

  • Rebased on main.
  • Added CHANGELOG.md entry + hardened httptest handlers (avoid t.Fatalf from handler goroutines).
  • Verified: pnpm -C internal/tracking/worker lint, pnpm -C internal/tracking/worker build, pnpm -C internal/tracking/worker test, go test ./....

Commits:

Thanks @antons!

manascb1344 pushed a commit to manascb1344/gogcli that referenced this pull request Jan 15, 2026
manascb1344 pushed a commit to manascb1344/gogcli that referenced this pull request Jan 15, 2026
fix(gmail): normalize MIME types in multipart bodies
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.

2 participants