You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2016/07/22 22:37:27 UTC

[1/2] mesos git commit: Removed a redundant CLOEXEC from linux/ns.hpp.

Repository: mesos
Updated Branches:
  refs/heads/master b9c01fc36 -> 105eca66a


Removed a redundant CLOEXEC from linux/ns.hpp.

The call to `os::open` that creates the FD includes O_CLOEXEC.
This will set CLOEXEC on the FD before `os::open` returns.

Review: https://reviews.apache.org/r/50357/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/7c0234ce
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/7c0234ce
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/7c0234ce

Branch: refs/heads/master
Commit: 7c0234ced35f465de4631f7d19158a05c5628ba9
Parents: b9c01fc
Author: Joseph Wu <jo...@mesosphere.io>
Authored: Fri Jul 22 15:35:49 2016 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Fri Jul 22 15:35:49 2016 -0700

----------------------------------------------------------------------
 src/linux/ns.hpp | 8 --------
 1 file changed, 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/7c0234ce/src/linux/ns.hpp
----------------------------------------------------------------------
diff --git a/src/linux/ns.hpp b/src/linux/ns.hpp
index 4e843b7..e905aef 100644
--- a/src/linux/ns.hpp
+++ b/src/linux/ns.hpp
@@ -150,14 +150,6 @@ inline Try<Nothing> setns(const std::string& path, const std::string& ns)
     return Error("Failed to open '" + path + "': " + fd.error());
   }
 
-#ifndef O_CLOEXEC
-  Try<Nothing> cloexec = os::cloexec(fd.get());
-  if (cloexec.isError()) {
-    os::close(fd.get());
-    return Error("Failed to cloexec: " + cloexec.error());
-  }
-#endif
-
   Try<int> nstype = ns::nstype(ns);
   if (nstype.isError()) {
     return Error(nstype.error());


[2/2] mesos git commit: Added an appropriate content type for the /help endpoints.

Posted by jo...@apache.org.
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/105eca66
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/105eca66
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/105eca66

Branch: refs/heads/master
Commit: 105eca66a63457ee509c58f8415a1a4d626b352a
Parents: 7c0234c
Author: Joseph Wu <jo...@apache.org>
Authored: Fri Jul 22 15:11:36 2016 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Fri Jul 22 15:36:09 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/105eca66/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 {