davsclaus commented on code in PR #27594: URL: https://github.com/apache/camel/pull/27594#discussion_r4227330461
########## docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc: ########## @@ -959,6 +959,15 @@ gzip-encoded responses (`Content-Encoding: gzip`) are written as before. A clien and read such a response as UTF-8 must now use the declared charset, and characters that the declared charset cannot represent are written as `?`. +==== A response that is not chunked and has a text Content-Type + +A `String` response body that is not chunked (`chunked=false` or the `CamelHttpChunked` header) and has a text +`Content-Type` (one that contains `text` or `html`) was written in the charset of the exchange, which also replaced the +charset that the `Content-Type` declared (`text/plain; charset=ISO-8859-1` was sent as `text/plain;charset=UTF-8`). +Such a body is now written in the charset that the `Content-Type` declares, and the response keeps that charset. Review Comment: Optional: "the charset of the exchange" is the `CamelCharsetName` header/property, which the consumer sets from the request charset. A route that set `CamelCharsetName` to choose the encoding of such a response, while its `Content-Type` declared another charset, now gets the declared one. Naming it gives upgraders the knob to look for. ```suggestion A `String` response body that is not chunked (`chunked=false` or the `CamelHttpChunked` header) and has a text `Content-Type` (one that contains `text` or `html`) was written in the charset of the exchange (`CamelCharsetName`, which the consumer sets from the request charset, else UTF-8), which also replaced the charset that the `Content-Type` declared (`text/plain; charset=ISO-8859-1` was sent as `text/plain;charset=UTF-8`). Such a body is now written in the charset that the `Content-Type` declares, and the response keeps that charset: `CamelCharsetName` no longer overrides a charset declared in the `Content-Type` here. ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
