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

Allow custom encoders to validate compression options #3319

Closed
wants to merge 1 commit into from

Conversation

kanongil
Copy link
Contributor

While implementing support for the new route level compression option in a custom encoder registered using server.encoder(), I realized that the current implementation either requires me to validate the compression options on each request, or trust that they are correct.

Since neither option is desirable, I created this PR to extend the API with an optional schema to allow the validation logic to be applied only once, when the route is created.

Let me know what you think?

Note that this only validates at the route level, and not at the connection level, since the connection already exits when adding the encoder.

@hueniverse
Copy link
Contributor

This still fails to validate routes added before the encoder/decoder is added. I need to think about other options.

@hueniverse hueniverse closed this Sep 12, 2017
@hueniverse hueniverse self-assigned this Sep 12, 2017
@hueniverse hueniverse added the feature New functionality or improvement label Sep 12, 2017
@hueniverse
Copy link
Contributor

I like the idea but this is not the right solution.

@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New functionality or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants