diff options
author | fdeweerdt <fdeweerdt@cloudmark.com> | 2015-08-18 09:27:39 -0700 |
---|---|---|
committer | Aliaksey Kandratsenka <alk@tut.by> | 2015-09-19 09:46:34 -0700 |
commit | 5078abdb331e63d7a216994f186eb736861f8df7 (patch) | |
tree | a9ecc017bf9874c968b9ca9d2cca59f19a23e7d1 /src/pprof | |
parent | 54505f1d50c2d1f4676f5e87090b64a117fd980e (diff) | |
download | gperftools-5078abdb331e63d7a216994f186eb736861f8df7.tar.gz |
Don't discard curl options if timeout is not defined.
Editing the options passed to curl via 'my @URL_FETCHER = ("curl",
"-s");' (in particular to add a -k to ignore self signed certs) fails
for some invocations of curl. In FetchDynamicProfile, 'my @fetcher =
AddFetchTimeout($fetch_timeout, @URL_FETCHER);' ends up being just
'curl' if timeout is not defined.
This happens because AddFetchTimeout doesn't retrieve all the arguments
from the caller.
[alk@tut.by: updated commit message]
Signed-off-by: Aliaksey Kandratsenka <alk@tut.by>
Diffstat (limited to 'src/pprof')
-rwxr-xr-x | src/pprof | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3410,7 +3410,7 @@ sub ResolveRedirectionForCurl { # Add a timeout flat to URL_FETCHER. Returns a new list. sub AddFetchTimeout { my $timeout = shift; - my @fetcher = shift; + my @fetcher = @_; if (defined($timeout)) { if (join(" ", @fetcher) =~ m/\bcurl -s/) { push(@fetcher, "--max-time", sprintf("%d", $timeout)); |