You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by an...@apache.org on 2017/01/29 22:18:03 UTC
[4/8] mesos git commit: Introduced `RequestMediaTypes`.
Introduced `RequestMediaTypes`.
This structure stores the "Content-*", "Message-*", "Accept-*"
prefixed request headers in our internal representation.
Review: https://reviews.apache.org/r/55939/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/7f8cbdf5
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/7f8cbdf5
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/7f8cbdf5
Branch: refs/heads/master
Commit: 7f8cbdf58bc9766461a1bdb84701747137e263e8
Parents: a50b2f0
Author: Anand Mazumdar <an...@apache.org>
Authored: Sun Jan 29 12:49:13 2017 -0800
Committer: Anand Mazumdar <an...@apache.org>
Committed: Sun Jan 29 12:49:13 2017 -0800
----------------------------------------------------------------------
src/common/http.hpp | 13 +++++++++++++
1 file changed, 13 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/7f8cbdf5/src/common/http.hpp
----------------------------------------------------------------------
diff --git a/src/common/http.hpp b/src/common/http.hpp
index 8319425..3d5ab59 100644
--- a/src/common/http.hpp
+++ b/src/common/http.hpp
@@ -48,6 +48,19 @@ constexpr char DEFAULT_HTTP_AUTHENTICATOR[] = "basic";
extern hashset<std::string> AUTHORIZABLE_ENDPOINTS;
+
+// Contains the media types corresponding to some of the "Content-*",
+// "Accept-*" and "Message-*" prefixed request headers in our internal
+// representation.
+struct RequestMediaTypes
+{
+ ContentType content; // 'Content-Type' header.
+ ContentType accept; // 'Accept' header.
+ Option<ContentType> messageContent; // 'Message-Content-Type' header.
+ Option<ContentType> messageAccept; // 'Message-Accept' header.
+};
+
+
// Serializes a protobuf message for transmission
// based on the HTTP content type.
// NOTE: For streaming `contentType`, `message` would not