76c5f5cc8a
In the GN build, libchromiumcontent is no longer a distinct library, but merely a container for a set of scripts and patches. Maintaining those patches in a separate repository is tedious and error-prone, so merge them into the main repo. Once this is merged and GN is the default way to build Electron, the libchromiumcontent repository can be archived.
54 lines
2.6 KiB
Diff
54 lines
2.6 KiB
Diff
From 800aa10d300af0f3fe162ae586b6b1ebe0566ab4 Mon Sep 17 00:00:00 2001
|
|
From: Catalin Fratila <catalinf@microsoft.com>
|
|
Date: Fri, 19 May 2017 09:28:53 +0200
|
|
Subject: [PATCH] Handle everything not in [200, 300) as error. For example
|
|
HockeyApp responds with 202.
|
|
|
|
(cherry picked from commit f7c320766756a8aaa45ccbcff2945053d9f7e109)
|
|
(cherry picked from commit 1875fddc7e671b14d8b54068301d9648d12e9dc2)
|
|
(cherry picked from commit 670fb453b0c3d6ae0a0d5923f68df02464337617)
|
|
---
|
|
third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc | 2 +-
|
|
third_party/crashpad/crashpad/util/net/http_transport_mac.mm | 2 +-
|
|
third_party/crashpad/crashpad/util/net/http_transport_win.cc | 2 +-
|
|
3 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc b/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
|
|
index c16a593..0e262b0 100644
|
|
--- a/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
|
|
+++ b/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
|
|
@@ -338,7 +338,7 @@ bool HTTPTransportLibcurl::ExecuteSynchronously(std::string* response_body) {
|
|
return false;
|
|
}
|
|
|
|
- if (status != 200) {
|
|
+ if (status < 200 || status >= 300) {
|
|
LOG(ERROR) << base::StringPrintf("HTTP status %ld", status);
|
|
return false;
|
|
}
|
|
diff --git a/third_party/crashpad/crashpad/util/net/http_transport_mac.mm b/third_party/crashpad/crashpad/util/net/http_transport_mac.mm
|
|
index 8d5f78c..a6434c2 100644
|
|
--- a/third_party/crashpad/crashpad/util/net/http_transport_mac.mm
|
|
+++ b/third_party/crashpad/crashpad/util/net/http_transport_mac.mm
|
|
@@ -293,7 +293,7 @@ static void Unschedule(CFReadStreamRef stream,
|
|
return false;
|
|
}
|
|
NSInteger http_status = [http_response statusCode];
|
|
- if (http_status != 200) {
|
|
+ if (http_status < 200 || http_status >= 300) {
|
|
LOG(ERROR) << base::StringPrintf("HTTP status %ld",
|
|
implicit_cast<long>(http_status));
|
|
return false;
|
|
diff --git a/third_party/crashpad/crashpad/util/net/http_transport_win.cc b/third_party/crashpad/crashpad/util/net/http_transport_win.cc
|
|
index 18d343c..40c3061 100644
|
|
--- a/third_party/crashpad/crashpad/util/net/http_transport_win.cc
|
|
+++ b/third_party/crashpad/crashpad/util/net/http_transport_win.cc
|
|
@@ -375,7 +375,7 @@ bool HTTPTransportWin::ExecuteSynchronously(std::string* response_body) {
|
|
return false;
|
|
}
|
|
|
|
- if (status_code != 200) {
|
|
+ if (status_code < 200 || status_code >= 300) {
|
|
LOG(ERROR) << base::StringPrintf("HTTP status %lu", status_code);
|
|
return false;
|
|
}
|