Skip to content

Fix configurable content type charset handling - #1730

Open
Thapasvini wants to merge 1 commit into
aws:mainfrom
Thapasvini:fix/content-type-charset
Open

Thapasvini wants to merge 1 commit into
aws:mainfrom
Thapasvini:fix/content-type-charset

Conversation

@Thapasvini

Copy link
Copy Markdown

Currently, the request reader automatically appends the default charset (ISO-8859-1) to the Content-Type header when the incoming request doesn't specify one.

In some cases, applications need the original Content-Type header to remain unchanged, especially when validating request signatures or HMACs where the exact header value matters.

This change adds a new configuration option, appendDefaultContentCharset, to ContainerConfig.

Defaults to true to preserve the existing behavior.

Can be set to false to prevent the default charset from being appended and preserve the original Content-Type header.

Added a test to verify that the original Content-Type header is preserved when the option is disabled.

@Thapasvini
Thapasvini force-pushed the fix/content-type-charset branch from 326475b to 1992f21 Compare November 18, 2026 04:28
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