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
Milestone

Comments

@dominykas
Copy link
Contributor

@dominykas dominykas commented Apr 23, 2018

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
Copy link
Contributor

@hueniverse hueniverse commented Aug 2, 2018

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 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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants