You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Content-Type charset parameters are parsed incorrectly #3652
SimpleHttpResponse.getBodyAsString() splits Content-Type on spaces rather than media-type parameters. A non-default response charset is ignored for text/plain;charset=ISO-8859-1, while quoted values or trailing parameters can cause charset lookup to fail. This corrupts non-ASCII heartbeat-response text or prevents it from being decoded.
Describe what you expected to happen
Honor a charset parameter regardless of whitespace after the semicolon, balanced double quotes, parameter-name case or later parameters. An absent charset should use the configured default; an unsupported charset should still fail explicitly.
How to reproduce it (as minimally and precisely as possible)
With the default UTF-8 configuration, this assertion fails on the current branch. Also try text/plain; charset="ISO-8859-1" and text/plain; charset=ISO-8859-1; boundary=xyz.
Tell us your environment
Sentinel 1.8 branch at a3f40ba; macOS ARM64; Java 17.0.18. The regression suite also passes on Java 1.8.0_492 with the patch.
Anything else we need to know?
The closed, unmerged PR #1590 addresses null checking, rather than parameter parsing. The current issue is scoped to charset parameter decoding. I can submit a fix with deterministic tests.
AI assistance: DeepSeek and Codex assisted reproduction, implementation and this description.
Activity