Skip to content

Prefer user added encoding over built-in#3717

Merged
hueniverse merged 2 commits intohapijs:masterfrom
benib:prefer-user-encoder
Dec 21, 2017
Merged

Prefer user added encoding over built-in#3717
hueniverse merged 2 commits intohapijs:masterfrom
benib:prefer-user-encoder

Conversation

@benib
Copy link
Copy Markdown
Contributor

@benib benib commented Dec 20, 2017

This implements #3701 and resolves outmoded/discuss#589

Please let me know if I missed anything. And thanks a lot for the great framework ❤️

@benib benib changed the title Prefer user added encoding over builtin Prefer user added encoding over built-in Dec 20, 2017
@kanongil
Copy link
Copy Markdown
Contributor

Thanks, can you add a test as well?

@benib
Copy link
Copy Markdown
Contributor Author

benib commented Dec 20, 2017

@kanongil i changed the existing test to test if the added encoder is preferred over built in ones by sending accept-encoding: gzip, deflate, test instead of accept-encoding: test.

Would you prefer to have a separate test instead?

@kanongil
Copy link
Copy Markdown
Contributor

Should be fine. The important part is that it would fail with the old code.

@hueniverse hueniverse added bug Bug or defect breaking changes Change that can breaking existing code labels Dec 21, 2017
@hueniverse hueniverse self-assigned this Dec 21, 2017
@hueniverse hueniverse added this to the 17.2.1 milestone Dec 21, 2017
@hueniverse
Copy link
Copy Markdown
Contributor

I consider this a bug fix since the only reason to add a custom encoder is to give it higher priority. But also marked it as breaking as it does change existing behavior.

@lock
Copy link
Copy Markdown

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

breaking changes Change that can breaking existing code bug Bug or defect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Possibility to prefer one encoding over the other if both are acceptable

3 participants