swift-nio-extras
swift-nio-extras copied to clipboard
Add HTTPResponseCompressor intent for cases where requested compression algorithm is not supported
Adds a new HTTPResponseCompressor intent that should be used to signal when compression is not supported.
Motivation:
Vapor currently does not return a 415 status code when compression is not supported. This change will help to make the code less ambiguous when we start supporting that use case.
Modifications:
I added a new case to the raw type for the compression intent doNotCompressWithUnsupportedAlgorithm
and updated the docs.
Result:
Behaviourally nothing changes except for the fact that clients can express their intent more clearly.