-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds default Content-Type header: text/html (#949)
* [Response] Adds Content-Type headers when missing Issue: #947 > Amber don't return any Content-Type (for the default example while using amber new myapp). Currently when rendering a view the Content-Type header is not set. - Ensures a content type is set based on the requested format or defaults to `text/html`. Alls responses should contain a content type based on the format requested, if no format is requested it will default to `text/html` Alternate Solution: A more long term solution is to have `render` implicitly parse the the content-type for the response. `render("some_view.html.slang") == Content-Type: text/html` `render("some_view.txt.slang") == Content-Type: text/plain` `render("some_view.json.slang") == Content-Type: application/plain` * fixup! [Response] Adds Content-Type headers when missing
- Loading branch information
Showing
5 changed files
with
21 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters