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/04/12 21:10:08 UTC
mesos git commit: Disable http-parser strict mode to allow flexible
http header fields.
Repository: mesos
Updated Branches:
refs/heads/master 7d84f8c16 -> 378e28ea3
Disable http-parser strict mode to allow flexible http header fields.
Review: https://reviews.apache.org/r/45917/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/378e28ea
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/378e28ea
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/378e28ea
Branch: refs/heads/master
Commit: 378e28ea324d1f8cd8c4d875e6b322e0a10f09fb
Parents: 7d84f8c
Author: Zhiwei Chen <zh...@gmail.com>
Authored: Tue Apr 12 12:09:52 2016 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Tue Apr 12 12:09:52 2016 -0700
----------------------------------------------------------------------
3rdparty/libprocess/3rdparty/CMakeLists.txt | 4 ++--
3rdparty/libprocess/3rdparty/Makefile.am | 4 ++--
3rdparty/libprocess/3rdparty/http-parser/CMakeLists.txt.template | 3 ++-
3rdparty/libprocess/src/decoder.hpp | 3 ---
3rdparty/libprocess/src/tests/ssl_tests.cpp | 4 ++--
5 files changed, 8 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/378e28ea/3rdparty/libprocess/3rdparty/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/CMakeLists.txt b/3rdparty/libprocess/3rdparty/CMakeLists.txt
index 21fc067..7b3621d 100644
--- a/3rdparty/libprocess/3rdparty/CMakeLists.txt
+++ b/3rdparty/libprocess/3rdparty/CMakeLists.txt
@@ -114,7 +114,7 @@ elseif (WIN32)
)
endif (NOT WIN32)
-set(RY_UPDATE_CMD ${CMAKE_COMMAND} -E copy ${PROCESS_3RD_SRC}/http-parser/CMakeLists.txt.template ${HTTP_PARSER_ROOT}/CMakeLists.txt)
+set(HTTP_PARSER_UPDATE_CMD ${CMAKE_COMMAND} -E copy ${PROCESS_3RD_SRC}/http-parser/CMakeLists.txt.template ${HTTP_PARSER_ROOT}/CMakeLists.txt)
if (NOT WIN32)
set(HTTP_PARSER_PATCH_CMD ${CMAKE_NOOP})
@@ -171,7 +171,7 @@ ExternalProject_Add(
ExternalProject_Add(
${HTTP_PARSER_TARGET}
PREFIX ${HTTP_PARSER_CMAKE_ROOT}
- UPDATE_COMMAND ${RY_UPDATE_CMD}
+ UPDATE_COMMAND ${HTTP_PARSER_UPDATE_CMD}
PATCH_COMMAND ${HTTP_PARSER_PATCH_CMD}
INSTALL_COMMAND ${CMAKE_NOOP}
URL ${HTTP_PARSER_URL}
http://git-wip-us.apache.org/repos/asf/mesos/blob/378e28ea/3rdparty/libprocess/3rdparty/Makefile.am
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/Makefile.am b/3rdparty/libprocess/3rdparty/Makefile.am
index 217283c..76f946d 100644
--- a/3rdparty/libprocess/3rdparty/Makefile.am
+++ b/3rdparty/libprocess/3rdparty/Makefile.am
@@ -83,10 +83,10 @@ ALL_LOCAL = # Initialize ALL_LOCAL so we can add to it.
touch $@
if WITH_BUNDLED_HTTP_PARSER
- # Convenience library for Ryan Dahl's HTTP parser.
+ # Convenience library for nodejs/http-parser.
noinst_LTLIBRARIES = libry_http_parser.la
nodist_libry_http_parser_la_SOURCES = $(HTTP_PARSER)/http_parser.c
- libry_http_parser_la_CPPFLAGS = -I$(HTTP_PARSER)
+ libry_http_parser_la_CPPFLAGS = -I$(HTTP_PARSER) -DHTTP_PARSER_STRICT=0
BUILT_SOURCES += $(nodist_libry_http_parser_la_SOURCES)
http://git-wip-us.apache.org/repos/asf/mesos/blob/378e28ea/3rdparty/libprocess/3rdparty/http-parser/CMakeLists.txt.template
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/http-parser/CMakeLists.txt.template b/3rdparty/libprocess/3rdparty/http-parser/CMakeLists.txt.template
index 056a1c1..7f7105f 100644
--- a/3rdparty/libprocess/3rdparty/http-parser/CMakeLists.txt.template
+++ b/3rdparty/libprocess/3rdparty/http-parser/CMakeLists.txt.template
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Builds Ryan Dahl's http-parser project.
+# Builds nodejs/http-parser project.
#########################################
# NOTE: at build time, this file will be copied into the directory of the
# http-parser project. This will allow any CMake-based build system consuming
@@ -31,4 +31,5 @@ set(HTTP_PARSER_SRC
http_parser.h
)
+add_definitions(-D HTTP_PARSER_STRICT=0)
add_library(http_parser STATIC ${HTTP_PARSER_SRC})
http://git-wip-us.apache.org/repos/asf/mesos/blob/378e28ea/3rdparty/libprocess/src/decoder.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/decoder.hpp b/3rdparty/libprocess/src/decoder.hpp
index 51ef6bc..2c41ce9 100644
--- a/3rdparty/libprocess/src/decoder.hpp
+++ b/3rdparty/libprocess/src/decoder.hpp
@@ -30,9 +30,6 @@
#include <stout/try.hpp>
-// TODO(bmahler): Switch to joyent/http-parser now that it is no
-// longer being hosted under ry/http-parser.
-
namespace process {
// TODO(benh): Make DataDecoder abstract and make RequestDecoder a
http://git-wip-us.apache.org/repos/asf/mesos/blob/378e28ea/3rdparty/libprocess/src/tests/ssl_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/tests/ssl_tests.cpp b/3rdparty/libprocess/src/tests/ssl_tests.cpp
index aa6021c..4d23781 100644
--- a/3rdparty/libprocess/src/tests/ssl_tests.cpp
+++ b/3rdparty/libprocess/src/tests/ssl_tests.cpp
@@ -654,7 +654,7 @@ TEST_F(SSLTest, HTTPSGet)
// Construct response and send(server side).
const string buffer =
string("HTTP/1.1 200 OK\r\n") +
- "Content-Length: " +
+ "Content-Length : " +
stringify(data.length()) + "\r\n" +
"\r\n" +
data;
@@ -695,7 +695,7 @@ TEST_F(SSLTest, HTTPSPost)
// Construct response and send(server side).
const string buffer =
string("HTTP/1.1 200 OK\r\n") +
- "Content-Length: " +
+ "Content-Length : " +
stringify(data.length()) + "\r\n" +
"\r\n" +
data;