You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2016/08/24 04:36:29 UTC

mesos git commit: Printed out the received stream ID in scheduler API.

Repository: mesos
Updated Branches:
  refs/heads/master cb0f4a659 -> ba0e582b2


Printed out the received stream ID in scheduler API.

This patch prints out the received stream ID in error output
caused by Mesos-Stream-Id mismatch in calls to scheduler HTTP API.
Expected stream ID is not printed in error output as it may cause
security leak.

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


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

Branch: refs/heads/master
Commit: ba0e582b2bd1a5149b7178e15f652ea33fae90bb
Parents: cb0f4a6
Author: Abhishek Dasgupta <a1...@linux.vnet.ibm.com>
Authored: Tue Aug 23 21:35:47 2016 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Tue Aug 23 21:35:47 2016 -0700

----------------------------------------------------------------------
 src/master/http.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/ba0e582b/src/master/http.cpp
----------------------------------------------------------------------
diff --git a/src/master/http.cpp b/src/master/http.cpp
index 52dd80b..c6bdad6 100644
--- a/src/master/http.cpp
+++ b/src/master/http.cpp
@@ -839,11 +839,11 @@ Future<Response> Master::Http::scheduler(
         "All non-subscribe calls should include the 'Mesos-Stream-Id' header");
   }
 
-  if (request.headers.at("Mesos-Stream-Id") !=
-      framework->http.get().streamId.toString()) {
+  const string& streamId = request.headers.at("Mesos-Stream-Id");
+  if (streamId != framework->http.get().streamId.toString()) {
     return BadRequest(
-        "The stream ID included in this request didn't match the stream ID "
-        "currently associated with framework ID "
+        "The stream ID '" + streamId + "' included in this request "
+        "didn't match the stream ID currently associated with framework ID "
         + framework->id().value());
   }