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/03/28 20:49:26 UTC

[1/2] mesos git commit: Upgrade http-parser to 2.6.1 to support PPC LE platform [libprocess].

Repository: mesos
Updated Branches:
  refs/heads/master 5914f571e -> 3b8ddc87e


Upgrade http-parser to 2.6.1 to support PPC LE platform [libprocess].

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


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

Branch: refs/heads/master
Commit: 94df63f72146501872a06c6487e94bdfd0f23025
Parents: 5914f57
Author: Zhiwei Chen <zh...@gmail.com>
Authored: Mon Mar 28 11:41:29 2016 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Mon Mar 28 11:42:16 2016 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/3rdparty/CMakeLists.txt     |   4 +-
 3rdparty/libprocess/3rdparty/Makefile.am        |  12 ++---
 .../3rdparty/http-parser-2.6.1.tar.gz           | Bin 0 -> 48265 bytes
 .../3rdparty/ry-http-parser-1c3624a.patch       |  28 ----------
 .../3rdparty/ry-http-parser-1c3624a.tar.gz      | Bin 24625 -> 0 bytes
 3rdparty/libprocess/3rdparty/versions.am        |   4 +-
 3rdparty/libprocess/Makefile.am                 |   4 +-
 3rdparty/libprocess/src/decoder.hpp             |  54 +++++++++++++++++++
 8 files changed, 66 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/94df63f7/3rdparty/libprocess/3rdparty/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/CMakeLists.txt b/3rdparty/libprocess/3rdparty/CMakeLists.txt
index 6b07aef..04a4cf4 100644
--- a/3rdparty/libprocess/3rdparty/CMakeLists.txt
+++ b/3rdparty/libprocess/3rdparty/CMakeLists.txt
@@ -27,13 +27,13 @@ if (REBUNDLED)
   set(BOOST_URL       ${REBUNDLED_DIR}/boost-${BOOST_VERSION}.tar.gz)
   set(GLOG_URL        ${REBUNDLED_DIR}/glog-${GLOG_VERSION}.tar.gz)
   set(PICOJSON_URL    ${REBUNDLED_DIR}/picojson-${PICOJSON_VERSION}.tar.gz)
-  set(HTTP_PARSER_URL ${REBUNDLED_DIR}/ry-http-parser-${HTTP_PARSER_VERSION}.tar.gz)
+  set(HTTP_PARSER_URL ${REBUNDLED_DIR}/http-parser-${HTTP_PARSER_VERSION}.tar.gz)
   set(LIBEV_URL       ${REBUNDLED_DIR}/libev-${LIBEV_VERSION}.tar.gz)
 else (REBUNDLED)
   set(BOOST_URL       ${UPSTREAM_URL}/boost-${BOOST_VERSION}.tar.gz)
   set(GLOG_URL        ${UPSTREAM_URL}/glog-${GLOG_VERSION}.tar.gz)
   set(PICOJSON_URL    ${UPSTREAM_URL}/picojson-${PICOJSON_VERSION}.tar.gz)
-  set(HTTP_PARSER_URL ${UPSTREAM_URL}/ry-http-parser-${HTTP_PARSER_VERSION}.tar.gz)
+  set(HTTP_PARSER_URL ${UPSTREAM_URL}/http-parser-${HTTP_PARSER_VERSION}.tar.gz)
   set(LIBEV_URL       ${UPSTREAM_URL}/libev-${LIBEV_VERSION}.tar.gz)
 endif (REBUNDLED)
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/94df63f7/3rdparty/libprocess/3rdparty/Makefile.am
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/Makefile.am b/3rdparty/libprocess/3rdparty/Makefile.am
index ddf7e3d..385302a 100644
--- a/3rdparty/libprocess/3rdparty/Makefile.am
+++ b/3rdparty/libprocess/3rdparty/Makefile.am
@@ -34,7 +34,7 @@ GLOG = glog-$(GLOG_VERSION)
 GMOCK = gmock-$(GMOCK_VERSION)
 GPERFTOOLS = gperftools-$(GPERFTOOLS_VERSION)
 GTEST = $(GMOCK)/gtest
-RY_HTTP_PARSER = ry-http-parser-$(RY_HTTP_PARSER_VERSION)
+HTTP_PARSER = http-parser-$(HTTP_PARSER_VERSION)
 LIBEV = libev-$(LIBEV_VERSION)
 PROTOBUF = protobuf-$(PROTOBUF_VERSION)
 PICOJSON = picojson-$(PICOJSON_VERSION)
@@ -46,7 +46,7 @@ EXTRA_DIST =			\
   $(GPERFTOOLS).tar.gz		\
   $(LIBEV).tar.gz		\
   $(PROTOBUF).tar.gz		\
-  $(RY_HTTP_PARSER).tar.gz	\
+  $(HTTP_PARSER).tar.gz		\
   $(PICOJSON).tar.gz
 
 # We need to patch glog in order to deal with a compilation issue when
@@ -65,7 +65,7 @@ CLEAN_EXTRACTED =	\
   $(GPERFTOOLS)		\
   $(LIBEV)		\
   $(PROTOBUF)		\
-  $(RY_HTTP_PARSER)	\
+  $(HTTP_PARSER)	\
   $(PICOJSON)
 
 ALL_LOCAL = # Initialize ALL_LOCAL so we can add to it.
@@ -81,12 +81,12 @@ ALL_LOCAL = # Initialize ALL_LOCAL so we can add to it.
 if WITH_BUNDLED_HTTP_PARSER
   # Convenience library for Ryan Dahl's HTTP parser.
   noinst_LTLIBRARIES = libry_http_parser.la
-  nodist_libry_http_parser_la_SOURCES = $(RY_HTTP_PARSER)/http_parser.c
-  libry_http_parser_la_CPPFLAGS = -I$(RY_HTTP_PARSER)
+  nodist_libry_http_parser_la_SOURCES = $(HTTP_PARSER)/http_parser.c
+  libry_http_parser_la_CPPFLAGS = -I$(HTTP_PARSER)
 
   BUILT_SOURCES += $(nodist_libry_http_parser_la_SOURCES)
 
-  $(RY_HTTP_PARSER)/http_parser.c: $(RY_HTTP_PARSER)-stamp
+  $(HTTP_PARSER)/http_parser.c: $(HTTP_PARSER)-stamp
 endif
 
 if WITH_BUNDLED_PROTOBUF

http://git-wip-us.apache.org/repos/asf/mesos/blob/94df63f7/3rdparty/libprocess/3rdparty/http-parser-2.6.1.tar.gz
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/http-parser-2.6.1.tar.gz b/3rdparty/libprocess/3rdparty/http-parser-2.6.1.tar.gz
new file mode 100644
index 0000000..06528d5
Binary files /dev/null and b/3rdparty/libprocess/3rdparty/http-parser-2.6.1.tar.gz differ

http://git-wip-us.apache.org/repos/asf/mesos/blob/94df63f7/3rdparty/libprocess/3rdparty/ry-http-parser-1c3624a.patch
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/ry-http-parser-1c3624a.patch b/3rdparty/libprocess/3rdparty/ry-http-parser-1c3624a.patch
deleted file mode 100644
index f9fac12..0000000
--- a/3rdparty/libprocess/3rdparty/ry-http-parser-1c3624a.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/http_parser.h b/http_parser.h
-index c03ec05..747f47b 100644
---- a/http_parser.h
-+++ b/http_parser.h
-@@ -24,23 +24,8 @@
- extern "C" {
- #endif
-
--
- #include <sys/types.h>
--#if defined(_WIN32) && !defined(__MINGW32__)
--typedef __int8 int8_t;
--typedef unsigned __int8 uint8_t;
--typedef __int16 int16_t;
--typedef unsigned __int16 uint16_t;
--typedef __int32 int32_t;
--typedef unsigned __int32 uint32_t;
--typedef __int64 int64_t;
--typedef unsigned __int64 uint64_t;
--
--typedef unsigned int size_t;
--typedef int ssize_t;
--#else
- #include <stdint.h>
--#endif
-
- /* Compile with -DHTTP_PARSER_STRICT=0 to make less checks, but run
-  * faster

http://git-wip-us.apache.org/repos/asf/mesos/blob/94df63f7/3rdparty/libprocess/3rdparty/ry-http-parser-1c3624a.tar.gz
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/ry-http-parser-1c3624a.tar.gz b/3rdparty/libprocess/3rdparty/ry-http-parser-1c3624a.tar.gz
deleted file mode 100644
index b811b63..0000000
Binary files a/3rdparty/libprocess/3rdparty/ry-http-parser-1c3624a.tar.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/mesos/blob/94df63f7/3rdparty/libprocess/3rdparty/versions.am
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/versions.am b/3rdparty/libprocess/3rdparty/versions.am
index 98195b8..462a867 100644
--- a/3rdparty/libprocess/3rdparty/versions.am
+++ b/3rdparty/libprocess/3rdparty/versions.am
@@ -8,5 +8,5 @@ GMOCK_VERSION = 1.7.0
 GPERFTOOLS_VERSION = 2.0
 LIBEV_VERSION = 4.15
 PROTOBUF_VERSION = 2.5.0
-RY_HTTP_PARSER_VERSION = 1c3624a
-PICOJSON_VERSION = 1.3.0
\ No newline at end of file
+HTTP_PARSER_VERSION = 2.6.1
+PICOJSON_VERSION = 1.3.0

http://git-wip-us.apache.org/repos/asf/mesos/blob/94df63f7/3rdparty/libprocess/Makefile.am
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/Makefile.am b/3rdparty/libprocess/Makefile.am
index ac8cc8d..c51c31e 100644
--- a/3rdparty/libprocess/Makefile.am
+++ b/3rdparty/libprocess/Makefile.am
@@ -124,8 +124,8 @@ else
 endif
 
 if WITH_BUNDLED_HTTP_PARSER
-  RY_HTTP_PARSER = 3rdparty/ry-http-parser-$(RY_HTTP_PARSER_VERSION)
-  libprocess_la_CPPFLAGS += -I$(RY_HTTP_PARSER)
+  HTTP_PARSER = 3rdparty/http-parser-$(HTTP_PARSER_VERSION)
+  libprocess_la_CPPFLAGS += -I$(HTTP_PARSER)
 
   HTTP_PARSER_LIB = 3rdparty/libry_http_parser.la
 else

http://git-wip-us.apache.org/repos/asf/mesos/blob/94df63f7/3rdparty/libprocess/src/decoder.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/decoder.hpp b/3rdparty/libprocess/src/decoder.hpp
index a20b5ba..51ef6bc 100644
--- a/3rdparty/libprocess/src/decoder.hpp
+++ b/3rdparty/libprocess/src/decoder.hpp
@@ -57,6 +57,8 @@ public:
     settings.on_headers_complete = &DataDecoder::on_headers_complete;
     settings.on_body = &DataDecoder::on_body;
     settings.on_message_complete = &DataDecoder::on_message_complete;
+    settings.on_chunk_complete = &DataDecoder::on_chunk_complete;
+    settings.on_chunk_header = &DataDecoder::on_chunk_header;
 
     http_parser_init(&parser, HTTP_REQUEST);
 
@@ -110,6 +112,16 @@ private:
     return 0;
   }
 
+  static int on_chunk_complete(http_parser* p)
+  {
+    return 0;
+  }
+
+  static int on_chunk_header(http_parser* p)
+  {
+    return 0;
+  }
+
 #if !(HTTP_PARSER_VERSION_MAJOR >= 2)
   static int on_path(http_parser* p, const char* data, size_t length)
   {
@@ -160,6 +172,9 @@ private:
       }
 
       if (url.field_set & (1 << UF_FRAGMENT)) {
+        if (decoder->request->url.fragment.isNone()) {
+          decoder->request->url.fragment = "";
+        }
         decoder->request->url.fragment->append(
             data + url.field_data[UF_FRAGMENT].off,
             url.field_data[UF_FRAGMENT].len);
@@ -306,6 +321,9 @@ public:
     settings.on_headers_complete = &ResponseDecoder::on_headers_complete;
     settings.on_body = &ResponseDecoder::on_body;
     settings.on_message_complete = &ResponseDecoder::on_message_complete;
+    settings.on_status = &ResponseDecoder::on_status;
+    settings.on_chunk_complete = &ResponseDecoder::on_chunk_complete;
+    settings.on_chunk_header = &ResponseDecoder::on_chunk_header;
 
     http_parser_init(&parser, HTTP_RESPONSE);
 
@@ -358,6 +376,16 @@ private:
     return 0;
   }
 
+  static int on_chunk_complete(http_parser* p)
+  {
+    return 0;
+  }
+
+  static int on_chunk_header(http_parser* p)
+  {
+    return 0;
+  }
+
 #if !(HTTP_PARSER_VERSION_MAJOR >= 2)
   static int on_path(http_parser* p, const char* data, size_t length)
   {
@@ -464,6 +492,11 @@ private:
     return 0;
   }
 
+  static int on_status(http_parser* p, const char* data, size_t length)
+  {
+    return 0;
+  }
+
   bool failure;
 
   http_parser parser;
@@ -521,6 +554,12 @@ public:
       &StreamingResponseDecoder::on_body;
     settings.on_message_complete =
       &StreamingResponseDecoder::on_message_complete;
+    settings.on_status =
+      &StreamingResponseDecoder::on_status;
+    settings.on_chunk_complete =
+      &StreamingResponseDecoder::on_chunk_complete;
+    settings.on_chunk_header =
+      &StreamingResponseDecoder::on_chunk_header;
 
     http_parser_init(&parser, HTTP_RESPONSE);
 
@@ -585,6 +624,16 @@ private:
     return 0;
   }
 
+  static int on_chunk_complete(http_parser* p)
+  {
+    return 0;
+  }
+
+  static int on_chunk_header(http_parser* p)
+  {
+    return 0;
+  }
+
 #if !(HTTP_PARSER_VERSION_MAJOR >= 2)
   static int on_path(http_parser* p, const char* data, size_t length)
   {
@@ -602,6 +651,11 @@ private:
   }
 #endif // !(HTTP_PARSER_VERSION_MAJOR >= 2)
 
+  static int on_status(http_parser* p, const char* data, size_t length)
+  {
+    return 0;
+  }
+
   static int on_url(http_parser* p, const char* data, size_t length)
   {
     return 0;


[2/2] mesos git commit: Upgrade http-parser to 2.6.1 to support PowerPC LE platform [mesos].

Posted by vi...@apache.org.
Upgrade http-parser to 2.6.1 to support PowerPC LE platform [mesos].

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


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

Branch: refs/heads/master
Commit: 3b8ddc87e6fb7fe3c02147f30d9bacbc9d17bb14
Parents: 94df63f
Author: Zhiwei Chen <zh...@gmail.com>
Authored: Mon Mar 28 11:41:35 2016 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Mon Mar 28 11:49:08 2016 -0700

----------------------------------------------------------------------
 3rdparty/cmake/Versions.cmake | 2 +-
 CHANGELOG                     | 3 +++
 LICENSE                       | 8 ++++++--
 3 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/3b8ddc87/3rdparty/cmake/Versions.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/cmake/Versions.cmake b/3rdparty/cmake/Versions.cmake
index 24490d3..6530fcc 100644
--- a/3rdparty/cmake/Versions.cmake
+++ b/3rdparty/cmake/Versions.cmake
@@ -2,7 +2,7 @@ set(BOOST_VERSION       "1.53.0")
 set(CURL_VERSION        "7.43.0")
 set(GLOG_VERSION        "0.3.3")
 set(GMOCK_VERSION       "1.7.0")
-set(HTTP_PARSER_VERSION "1c3624a")
+set(HTTP_PARSER_VERSION "2.6.1")
 set(LEVELDB_VERSION     "1.4")
 set(LIBAPR_VERSION      "1.5.2")
 set(LIBEV_VERSION       "4.15")

http://git-wip-us.apache.org/repos/asf/mesos/blob/3b8ddc87/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 4c73a26..d57657b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -38,6 +38,9 @@ Additional API Changes:
   * [MESOS-5015] - Changes Call and Event Type enums in executor.proto
     from required to optional for the purpose of backwards compatibility.
 
+3rd Party Upgrades:
+  * [MESOS-4805] - Upgraded ry-http-parser-1c3624a to nodejs/http-parser 2.6.1.
+
 
 Release Notes - Mesos - Version 0.28.0
 --------------------------------------------

http://git-wip-us.apache.org/repos/asf/mesos/blob/3b8ddc87/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index 66a99b8..4cc7f5b 100644
--- a/LICENSE
+++ b/LICENSE
@@ -516,10 +516,14 @@ file under either the BSD or the GPL.
 
 ======================================================================
 For http-parser
-(3rdparty/libprocess/3rdparty/ry-http-parser-1c3624a.tar.gz):
+(3rdparty/libprocess/3rdparty/http-parser-2.6.1.tar.gz):
 ======================================================================
 
-Copyright 2009,2010 Ryan Dahl <ry...@tinyclouds.org>
+http_parser.c is based on src/http/ngx_http_parse.c from NGINX copyright
+Igor Sysoev.
+
+Additional changes are licensed under the same terms as NGINX and
+copyright Joyent, Inc. and other Node contributors. All rights reserved.
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to