Description
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 previous UTF-8
value becomes gzip:UTF-8
when Spring AMQP was used.
Where does this : originates from? Are there any specification documents for that?
Following references advocate a comma ,
For example, messages with JSON payload should use application/json. If the payload is compressed with the LZ77 (GZip) algorithm, its content encoding should be gzip.
Multiple encodings can be specified by separating them with commas.
Content-Encoding: gzip, identity
- (Maybe also interesting https://docs.oasis-open.org/amqp/core/v1.0/amqp-core-messaging-v1.0.html)
Implementations SHOULD NOT specify multiple content-encoding values except as to be compatible with messages originally sent with other protocols, e.g. HTTP or SMTP.
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
or gzip, UTF-8
) are present then current implementation is broken too.
Thanks in advance for your thoughts.
Affected classes
AbstractCompressingPostProcessor
AbstractDecompressingPostProcessor
DelegatingDecompressingPostProcessor