swift-nio-extras icon indicating copy to clipboard operation
swift-nio-extras copied to clipboard

Add HTTPResponseCompressor intent for cases where requested compression algorithm is not supported

Open adincebic opened this issue 5 months ago • 0 comments

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.

adincebic avatar Sep 09 '24 14:09 adincebic