Repository: mesos Updated Branches: refs/heads/1.0.x ea4cc1467 -> 7ba7b1ab7
Added an appropriate content type for the /help endpoints. The `Content-Type` header was set to "text/plain" by default in all responses here: https://reviews.apache.org/r/46725/ This had the adverse consequence of changing the `/help` endpoints into plain text. Previously, the browser would see some `<html>` tags and assume the content was HTML. Review: https://reviews.apache.org/r/50362 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/3e851e14 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/3e851e14 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/3e851e14 Branch: refs/heads/1.0.x Commit: 3e851e14a499a0a04e37058d241885d3c80d7645 Parents: ea4cc14 Author: Joseph Wu <josep...@apache.org> Authored: Fri Jul 22 15:11:36 2016 -0700 Committer: Joseph Wu <josep...@apache.org> Committed: Fri Jul 22 15:54:44 2016 -0700 ---------------------------------------------------------------------- 3rdparty/libprocess/src/help.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/3e851e14/3rdparty/libprocess/src/help.cpp ---------------------------------------------------------------------- diff --git a/3rdparty/libprocess/src/help.cpp b/3rdparty/libprocess/src/help.cpp index 5bb1ddd..d3c98a7 100644 --- a/3rdparty/libprocess/src/help.cpp +++ b/3rdparty/libprocess/src/help.cpp @@ -274,7 +274,7 @@ Future<http::Response> Help::help(const http::Request& request) // Provide some JavaScript to render the Markdown into some aesthetically // pleasing HTML. ;) - return http::OK( + http::Response response = http::OK( "<html>" "<head>" "<title>Help</title>" @@ -316,6 +316,9 @@ Future<http::Response> Help::help(const http::Request& request) "<body onload=\"loaded()\">" "</body>" "</html>"); + + response.headers["Content-Type"] = "text/html"; + return response; } } // namespace process {