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

Content type on empty string payloads #3782

Closed
dominykas opened this issue Apr 23, 2018 · 2 comments
Closed

Content type on empty string payloads #3782

dominykas opened this issue Apr 23, 2018 · 2 comments
Assignees
Labels
breaking changes Change that can breaking existing code bug Bug or defect
Milestone

Comments

@dominykas
Copy link
Contributor

Background: hapijs/nes#234 (comment) and hapijs/nes#106 (tl;dr: Nes treats null and '' payloads differently, even though in HTTP both are in effect the same; this can be disambiguated in HTTP by setting a content-type).

When a non-empty string payload is set as a response, hapi will automatically set text/html.

The same should apply to empty string payloads.

@hueniverse hueniverse added bug Bug or defect breaking changes Change that can breaking existing code labels Aug 1, 2018
@hueniverse hueniverse self-assigned this Aug 1, 2018
@hueniverse hueniverse added this to the 17.5.3 milestone Aug 1, 2018
@hueniverse
Copy link
Contributor

I marked this as breaking change just to draw attention and help anyone who might be affected. There should be no issue with this except the additional response header.

@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
breaking changes Change that can breaking existing code bug Bug or defect
Projects
None yet
Development

No branches or pull requests

2 participants