Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: crash_sender

Issue 6802003: crash-reporter: Make use of list_proxies to send crashes via a proxy when appropriate (Closed) Base URL: ssh://gitrw.chromium.org:9222/crash-reporter.git@master
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crash_sender
diff --git a/crash_sender b/crash_sender
index 10fdf37bfc8fea40db166f1ac8e90894a74fd741..19fb4591831d476b8b82898a5d6d16b738ee69e5 100644
--- a/crash_sender
+++ b/crash_sender
@@ -68,6 +68,9 @@ RESTRICTED_CERTIFICATES_PATH="/usr/share/chromeos-ca-certificates"
# Temp directory for this process.
TMP_DIR=""
+# Path to get_proxies.
+GET_PROXIES="/sbin/get_proxies"
kmixter1 2011/04/06 04:16:54 Shouldn't this be installed in bin or usr/bin? It
Michael Krebs 2011/04/12 00:03:30 Done.
+
lecho() {
logger -t "${TAG}" "$@"
}
@@ -258,11 +261,15 @@ send_crash() {
return 1
fi
+ # read in the first proxy, if any, for a given URL.
+ local proxy=`${GET_PROXIES} -quiet "${url}" | (read REPLY; echo $REPLY)`
kmixter1 2011/04/06 04:16:54 head -1?
Michael Krebs 2011/04/12 00:03:30 Done.
+ # if a direct connection should be used, unset the proxy variable.
+ [ "${proxy}" = "direct://" ] && proxy=
local report_id="${TMP_DIR}/report_id"
local curl_stderr="${TMP_DIR}/curl_stderr"
set +e
- curl "${url}" \
+ curl "${url}" ${proxy:+--proxy "$proxy"} \
--capath "${RESTRICTED_CERTIFICATES_PATH}" --ciphers HIGH \
-F "prod=${CHROMEOS_PRODUCT}" \
-F "ver=${chromeos_version}" \
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698