-
Notifications
You must be signed in to change notification settings - Fork 628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarification of content encoding with multiple values #1251
Comments
It's a bug, but we'll have to make it a property to avoid a breaking change. We can make comma the default in 2.3. |
Thank you for your fast response. One thing what was also observed. Some applications leave contentEncoding empty for "raw" data and only fill contentEncoding property if e.g. compression was applied. Media types can contain used charset. Uncompressed
vs.
Compressed with gzip
vs.
|
Resolves spring-projects#1251 Delimiter should be a comma and whitespace trimmeed. Handle both delimiters in decompressors and add property for backwards compatibility. **I will backport to 2.2.x with default `:`**
Are you saying |
I meant contentEncoding is null. |
We already handled that case, but I have added code to treat an empty String as null as well. |
Resolves #1251 Delimiter should be a comma and whitespace trimmeed. Handle both delimiters in decompressors and add property for backwards compatibility. **I will backport to 2.2.x with default `:`** * Do not add a delimiter if the original encoding is an empty String.
Resolves #1251 Delimiter should be a comma and whitespace trimmeed. Handle both delimiters in decompressors and add property for backwards compatibility. **I will backport to 2.2.x with default `:`** * Do not add a delimiter if the original encoding is an empty String.
I wanted to suggest another handling of In case of "plain" data like JSON or XML don't set Line 387 in 4f76b2b
And let message post processors like GZipPostProcessor use field Maybe it is better to open another issue for that? |
There is no guarantee that the consumer uses Jackson to decode the content. We can consider moving the charset to the contentType; please open a new issue for that. |
Resolves spring-projects#1420 - detect and use `charset` in `contentType` when preseny - allow configuration of the `MimeType` to use, which can include a `charset` parameter **cherry-pick to main - will require what's new fix**
Resolves spring-projects#1420 - detect and use `charset` in `contentType` when present - allow Jackson to determine the decode `charset` via `ByteSourceJsonBootstrapper.detectEncoding()` - allow configuration of the `MimeType` to use, which can include a `charset` parameter **cherry-pick to main - will require what's new fix**
Resolves spring-projects#1420 - detect and use `charset` in `contentType` when present - allow Jackson to determine the decode `charset` via `ByteSourceJsonBootstrapper.detectEncoding()` - allow configuration of the `MimeType` to use, which can include a `charset` parameter **cherry-pick to main - will require what's new fix**
Resolves #1420 - detect and use `charset` in `contentType` when present - allow Jackson to determine the decode `charset` via `ByteSourceJsonBootstrapper.detectEncoding()` - allow configuration of the `MimeType` to use, which can include a `charset` parameter **cherry-pick to main - will require what's new fix** * Fix typo in doc.
Resolves #1420 - detect and use `charset` in `contentType` when present - allow Jackson to determine the decode `charset` via `ByteSourceJsonBootstrapper.detectEncoding()` - allow configuration of the `MimeType` to use, which can include a `charset` parameter **cherry-pick to main - will require what's new fix** * Fix typo in doc. # Conflicts: # src/reference/asciidoc/whats-new.adoc
Affects Version(s): 2.2.5.RELEASE
Can you please clarify why a colon : was used as separator if multiple content-encoding values are processed.
This happens if e.g. a message body is compressed with
GZipPostProcessor
. A previousUTF-8
value becomesgzip:UTF-8
when Spring AMQP was used.Where does this : originates from? Are there any specification documents for that?
Following references advocate a comma ,
Our existing AMQP implementation uses comma , as separator and this breaks interoperability with newly adopted spring applications that uses Spring AMQP in conjunction with compressed message bodies. What would the right fix for that?
It would be really useful if Spring PostProcessors could be configured with right separator.
Additionally if whitespaces (
gzip : UTF-8
orgzip, UTF-8
) are present then current implementation is broken too.Thanks in advance for your thoughts.
Affected classes
AbstractCompressingPostProcessor
AbstractDecompressingPostProcessor
DelegatingDecompressingPostProcessor
The text was updated successfully, but these errors were encountered: