[linux] Report error message if failed to send http request

If symupload client failed to connect the backend, we need this error
message to be exposed. This could help the failure we are facing in
official staging builders.

BUG=chromium:1401761
TEST=NA

Change-Id: Ic720aff9cb523c38553d6c02bf72aa5b95e862a7
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4240299
Reviewed-by: Nelson Billing <nbilling@google.com>
This commit is contained in:
Xinan Lin 2023-02-11 18:26:02 +09:00 committed by Nelson Billing
parent 5687ac51ca
commit 5f72a811c1

View file

@ -303,12 +303,10 @@ bool LibcurlWrapper::SendRequestInner(const string& url,
(*easy_getinfo_)(curl_, CURLINFO_RESPONSE_CODE, http_status_code); (*easy_getinfo_)(curl_, CURLINFO_RESPONSE_CODE, http_status_code);
} }
#ifndef NDEBUG
if (err_code != CURLE_OK) if (err_code != CURLE_OK)
fprintf(stderr, "Failed to send http request to %s, error: %s\n", fprintf(stderr, "Failed to send http request to %s, error: %s\n",
url.c_str(), url.c_str(),
(*easy_strerror_)(err_code)); (*easy_strerror_)(err_code));
#endif
Reset(); Reset();