From 8322cd658663eb7030c1d46a9ef4d1571a824c27 Mon Sep 17 00:00:00 2001 From: "kmixter@chromium.org" Date: Wed, 8 Dec 2010 22:24:29 +0000 Subject: 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 --- src/common/linux/http_upload.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/common/linux') 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(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); -- cgit v1.2.1