You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2016/11/29 21:29:35 UTC

[02/14] mesos git commit: Changes in libprocess to make http::Request::client optional.

Changes in libprocess to make http::Request::client optional.

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


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

Branch: refs/heads/master
Commit: fcf9f2082fc04323a74472eecfadaec325440af3
Parents: b64c9d4
Author: Benjamin Hindman <be...@gmail.com>
Authored: Sat Nov 5 00:08:22 2016 -0700
Committer: Benjamin Hindman <be...@gmail.com>
Committed: Tue Nov 29 12:06:29 2016 -0800

----------------------------------------------------------------------
 3rdparty/libprocess/include/process/http.hpp | 2 +-
 3rdparty/libprocess/src/tests/http_tests.cpp | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/fcf9f208/3rdparty/libprocess/include/process/http.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/http.hpp b/3rdparty/libprocess/include/process/http.hpp
index d464b9f..08a8390 100644
--- a/3rdparty/libprocess/include/process/http.hpp
+++ b/3rdparty/libprocess/include/process/http.hpp
@@ -447,7 +447,7 @@ struct Request
 
   // For server requests, this contains the address of the client.
   // Note that this may correspond to a proxy or load balancer address.
-  network::inet::Address client;
+  Option<network::Address> client;
 
   // Clients can choose to provide the entire body at once
   // via BODY or can choose to stream the body over to the

http://git-wip-us.apache.org/repos/asf/mesos/blob/fcf9f208/3rdparty/libprocess/src/tests/http_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/tests/http_tests.cpp b/3rdparty/libprocess/src/tests/http_tests.cpp
index 22ec432..de22d20 100644
--- a/3rdparty/libprocess/src/tests/http_tests.cpp
+++ b/3rdparty/libprocess/src/tests/http_tests.cpp
@@ -549,7 +549,7 @@ TEST(HTTPTest, PathParse)
 
 http::Response validateGetWithoutQuery(const http::Request& request)
 {
-  EXPECT_NE(process::address(), request.client);
+  EXPECT_SOME_NE(process::address(), request.client);
   EXPECT_EQ("GET", request.method);
   EXPECT_THAT(request.url.path, EndsWith("get"));
   EXPECT_EQ("", request.body);
@@ -562,7 +562,7 @@ http::Response validateGetWithoutQuery(const http::Request& request)
 
 http::Response validateGetWithQuery(const http::Request& request)
 {
-  EXPECT_NE(process::address(), request.client);
+  EXPECT_SOME_NE(process::address(), request.client);
   EXPECT_EQ("GET", request.method);
   EXPECT_THAT(request.url.path, EndsWith("get"));
   EXPECT_EQ("", request.body);