| Module | PhusionPassenger::Utils::Download |
| In: |
src/ruby_supportlib/phusion_passenger/utils/download.rb
|
Downloads a file from the given URL and saves it to the given filename. Returns whether the download succeeded.
Options:
show_progress: whether to show download progress. Default: false.
logger: the logger to use. If not given, this function will log to STDERR.
cacert: a CA certificate file to use for verifying SSL websites.
The default is to use the download tool's down CA database.
use_cache: Whether to copy the file from the download cache, if available.
Default: false.
connect_timeout: The maximum amount of time to spend on DNS lookup
and establishing the TCP connection. Set to nil to
disable this timeout. Default: 4.
idle_timeout: The maximum idle read time. Set to nil to set this timeout
to the default wget value, 900. Set to nil to disable this
timeout. Default: 5.
total_timeout: The maximum amount of time spent on the whole download
operation, including connection time. Only has effect on curl.
Set to nil to disable this timeout. Default: nil.