From 895a4daa4d21fbcdb1049ee2c0b599be2966481a Mon Sep 17 00:00:00 2001 From: Kongqun Yang Date: Mon, 24 Mar 2014 10:40:37 -0700 Subject: [PATCH] Update happyhttp to latest revision Latest rev of happyhttp fixes the bugs so patches are no longer needed. Also removes http_fetcher_unittest from the build as it performs real http requests to an external server. --- DEPS | 22 +---------------- media/base/media_base.gyp | 14 ----------- third_party/happyhttp/README.packager | 4 +-- third_party/happyhttp/git_reset.py | 24 ------------------ third_party/happyhttp/happyhttp.gyp | 8 +++--- third_party/happyhttp/patches/_stricmp | 13 ---------- third_party/happyhttp/patches/server_url | 31 ------------------------ 7 files changed, 7 insertions(+), 109 deletions(-) delete mode 100755 third_party/happyhttp/git_reset.py delete mode 100644 third_party/happyhttp/patches/_stricmp delete mode 100644 third_party/happyhttp/patches/server_url diff --git a/DEPS b/DEPS index 9c2430dba8..890e38632d 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { "webrtc_rev": "5718", # For gflags. "happyhttp_url": "https://github.com/Zintinio/HappyHTTP.git", - "happyhttp_rev": "7306b1606a09063ac38c264afe59f0ad0b441750", + "happyhttp_rev": "6b11b3b02cb3c8b649de9fffe8e08ae68c42bfd0", } deps = { @@ -107,27 +107,7 @@ deps_os = { }, } -pre_deps_hooks = [ - { - # Reset happyhttp so the sync could proceed. - # We cannot use "git apply --reverse" here as the source may not have been pulled. - # "git reset" does not work here either as we cannot change working directory. - "pattern": "third_party/happyhttp/src", - "action": ["python", "src/third_party/happyhttp/git_reset.py"], - }, -] - hooks = [ - { - # Patch happyhttp source. - "pattern": "third_party/happyhttp/src", - "action": ["git", "apply", "src/third_party/happyhttp/patches/_stricmp"], - }, - { - # Patch happyhttp source. - "pattern": "third_party/happyhttp/src", - "action": ["git", "apply", "src/third_party/happyhttp/patches/server_url"], - }, { # A change to a .gyp, .gypi, or to GYP itself should run the generator. "pattern": ".", diff --git a/media/base/media_base.gyp b/media/base/media_base.gyp index 8384ba6823..946b77d986 100644 --- a/media/base/media_base.gyp +++ b/media/base/media_base.gyp @@ -43,20 +43,6 @@ 'status', ], }, - { - # Note that this test performs real http requests to a http server. - 'target_name': 'http_fetcher_unittest', - 'type': '<(gtest_target_type)', - 'sources': [ - 'http_fetcher_unittest.cc', - ], - 'dependencies': [ - '../../base/base.gyp:base', - '../../testing/gtest.gyp:gtest', - '../../testing/gtest.gyp:gtest_main', - 'http_fetcher', - ], - }, { 'target_name': 'base', 'type': '<(component)', diff --git a/third_party/happyhttp/README.packager b/third_party/happyhttp/README.packager index 9344d44a88..8bc1dc66e3 100644 --- a/third_party/happyhttp/README.packager +++ b/third_party/happyhttp/README.packager @@ -8,6 +8,4 @@ Description: HappyHTTP is a simple C++ library for issuing HTTP requests and processing responses. -Modifications: -- Fix _stricmp undefined problem in linux. Use strcasecmp instead. -- "www.scumways.com" should be "scumways.com" in test.cpp. +Local Modifications: None diff --git a/third_party/happyhttp/git_reset.py b/third_party/happyhttp/git_reset.py deleted file mode 100755 index 05e30f5c91..0000000000 --- a/third_party/happyhttp/git_reset.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2014 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd -# -# Perform 'git reset --hard HEAD' on src directory. - -import os -import subprocess -import sys - -if __name__ == '__main__': - script_dir = os.path.dirname(os.path.realpath(__file__)) - src_dir = os.path.join(script_dir, 'src') - - # No need to perform a reset if the source hasn't been pulled yet. - if not os.path.exists(src_dir): - sys.exit(0) - - sys.exit(subprocess.call(['git', 'reset', '--hard', 'HEAD'], cwd=src_dir)) - diff --git a/third_party/happyhttp/happyhttp.gyp b/third_party/happyhttp/happyhttp.gyp index 0cc903abc2..d9491acd5a 100644 --- a/third_party/happyhttp/happyhttp.gyp +++ b/third_party/happyhttp/happyhttp.gyp @@ -1,6 +1,8 @@ -# Copyright (c) 2013 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. +# Copyright 2014 Google Inc. All rights reserved. +# +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file or at +# https://developers.google.com/open-source/licenses/bsd { 'targets': [ diff --git a/third_party/happyhttp/patches/_stricmp b/third_party/happyhttp/patches/_stricmp deleted file mode 100644 index 7251a6a967..0000000000 --- a/third_party/happyhttp/patches/_stricmp +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/third_party/happyhttp/src/happyhttp.cpp b/src/third_party/happyhttp/src/happyhttp.cpp -index 9e56673..8c8548f 100644 ---- a/src/third_party/happyhttp/src/happyhttp.cpp -+++ b/src/third_party/happyhttp/src/happyhttp.cpp -@@ -49,7 +49,7 @@ - #include - #include - --#ifdef __APPLE__ -+#ifndef _WIN32 - #define _stricmp strcasecmp - #endif - diff --git a/third_party/happyhttp/patches/server_url b/third_party/happyhttp/patches/server_url deleted file mode 100644 index bbb505de02..0000000000 --- a/third_party/happyhttp/patches/server_url +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/src/third_party/happyhttp/src/test.cpp b/src/third_party/happyhttp/src/test.cpp -index f3d39d1..3ce74b4 100644 ---- a/src/third_party/happyhttp/src/test.cpp -+++ b/src/third_party/happyhttp/src/test.cpp -@@ -31,7 +31,7 @@ void Test1() - { - puts("-----------------Test1------------------------" ); - // simple simple GET -- happyhttp::Connection conn( "www.scumways.com", 80 ); -+ happyhttp::Connection conn( "scumways.com", 80 ); - conn.setcallbacks( OnBegin, OnData, OnComplete, 0 ); - - conn.request( "GET", "/happyhttp/test.php", 0, 0,0 ); -@@ -57,7 +57,7 @@ void Test2() - - const char* body = "answer=42&name=Bubba"; - -- happyhttp::Connection conn( "www.scumways.com", 80 ); -+ happyhttp::Connection conn( "scumways.com", 80 ); - conn.setcallbacks( OnBegin, OnData, OnComplete, 0 ); - conn.request( "POST", - "/happyhttp/test.php", -@@ -77,7 +77,7 @@ void Test3() - const char* params = "answer=42&foo=bar"; - int l = strlen(params); - -- happyhttp::Connection conn( "www.scumways.com", 80 ); -+ happyhttp::Connection conn( "scumways.com", 80 ); - conn.setcallbacks( OnBegin, OnData, OnComplete, 0 ); - - conn.putrequest( "POST", "/happyhttp/test.php" );