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.
This commit is contained in:
parent
56c203c214
commit
895a4daa4d
22
DEPS
22
DEPS
|
@ -18,7 +18,7 @@ vars = {
|
||||||
"webrtc_rev": "5718", # For gflags.
|
"webrtc_rev": "5718", # For gflags.
|
||||||
|
|
||||||
"happyhttp_url": "https://github.com/Zintinio/HappyHTTP.git",
|
"happyhttp_url": "https://github.com/Zintinio/HappyHTTP.git",
|
||||||
"happyhttp_rev": "7306b1606a09063ac38c264afe59f0ad0b441750",
|
"happyhttp_rev": "6b11b3b02cb3c8b649de9fffe8e08ae68c42bfd0",
|
||||||
}
|
}
|
||||||
|
|
||||||
deps = {
|
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 = [
|
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.
|
# A change to a .gyp, .gypi, or to GYP itself should run the generator.
|
||||||
"pattern": ".",
|
"pattern": ".",
|
||||||
|
|
|
@ -43,20 +43,6 @@
|
||||||
'status',
|
'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',
|
'target_name': 'base',
|
||||||
'type': '<(component)',
|
'type': '<(component)',
|
||||||
|
|
|
@ -8,6 +8,4 @@ Description:
|
||||||
HappyHTTP is a simple C++ library for issuing HTTP requests and processing
|
HappyHTTP is a simple C++ library for issuing HTTP requests and processing
|
||||||
responses.
|
responses.
|
||||||
|
|
||||||
Modifications:
|
Local Modifications: None
|
||||||
- Fix _stricmp undefined problem in linux. Use strcasecmp instead.
|
|
||||||
- "www.scumways.com" should be "scumways.com" in test.cpp.
|
|
||||||
|
|
|
@ -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))
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
# Copyright (c) 2013 Google Inc. All rights reserved.
|
# 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.
|
# 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': [
|
'targets': [
|
||||||
|
|
|
@ -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 <string>
|
|
||||||
#include <algorithm>
|
|
||||||
|
|
||||||
-#ifdef __APPLE__
|
|
||||||
+#ifndef _WIN32
|
|
||||||
#define _stricmp strcasecmp
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -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" );
|
|
Loading…
Reference in New Issue