Skip to content
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

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adincebic
Copy link

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.

…on algorithm is not supported

Signed-off-by: Adin Cebic <[email protected]>
Copy link
Member

@FranzBusch FranzBusch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add tests showing how this is used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants