aboutsummaryrefslogtreecommitdiff
path: root/src/common/linux
diff options
context:
space:
mode:
authorkmixter@chromium.org <kmixter@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-12-08 22:24:29 +0000
committerkmixter@chromium.org <kmixter@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-12-08 22:24:29 +0000
commit8322cd658663eb7030c1d46a9ef4d1571a824c27 (patch)
treeb8fe95f6f81c202dc5d811d96472884b1feb0e2a /src/common/linux
parentEnable dumping of the Linux extension streams. (diff)
downloadbreakpad-8322cd658663eb7030c1d46a9ef4d1571a824c27.tar.xz
Propagate failure if http uploads fail with http error codes.
R=ted.mielczarek BUG=413 Review URL: http://breakpad.appspot.com/236001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@739 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/linux')
-rw-r--r--src/common/linux/http_upload.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/linux/http_upload.cc b/src/common/linux/http_upload.cc
index f971651e..d552d00b 100644
--- a/src/common/linux/http_upload.cc
+++ b/src/common/linux/http_upload.cc
@@ -145,6 +145,9 @@ bool HTTPUpload::SendRequest(const string &url,
reinterpret_cast<void *>(response_body));
}
+ // Fail if 400+ is returned from the web server.
+ (*curl_easy_setopt)(curl, CURLOPT_FAILONERROR, 1);
+
CURLcode (*curl_easy_perform)(CURL *);
*(void**) (&curl_easy_perform) = dlsym(curl_lib, "curl_easy_perform");
err_code = (*curl_easy_perform)(curl);