hashicorp-copywrite[bot]
36a312ee26
add missing license headers and update copyright file headers to BUS-1.1
2023-08-10 21:53:25 +01:00
Chris Roberts
d83bfc0d40
Perform best effort ssl revocation check on Windows
...
When performing a request via curl on Windows using schannel, ssl
certificate revocation checks does not handle verification failures
gracefully when an error is encountered that is unrelated to the actual
revocation of a certificate.
A new option is available to perform best effort revocation checks on
curl, so this is enabled by default on the Windows platform. A new
config option (`box_download_disable_ssl_revoke_best_effort`) has also
been added which can be optionally enabled to restore previous behavior
which results in a hard error if any error is encountered.
2023-06-20 16:37:00 -07:00
Chris Roberts
c7ef689d86
Prevent trailing space character on user agent
2022-09-28 13:51:54 -07:00
sophia
d6a88f666f
Add some docstrings and logging
2020-09-15 15:01:01 -05:00
sophia
fffc555faf
Add tests for new hook
2020-08-21 10:54:43 -05:00
sophia
b5f6df9ec0
Download a box by setting auth headers
2020-08-18 10:13:39 -05:00
Chris Roberts
5003bb6e15
Updates to address all Ruby deprecations and warnings
...
This includes updates for resolving all warnings provided by Ruby
for deprecations and/or removed methods. It also enables support
for Ruby 2.7 in the specification constraint as all 2.7 related
warnings are resolved with this changeset.
2020-08-10 13:05:41 -07:00
Brian Cain
19d724dcd4
Remove unused require for MapCommandOptions class
2020-05-20 10:46:09 -07:00
sophia
646de433a9
Validate conversion of map to cmd options
2020-04-29 15:10:48 -04:00
sophia
7e125969dd
Add option box_download_options
...
Allow users to specify a map of extra options to pass to the downloader.
These options will be passed to curl, with a `--` appended to the key
2020-04-29 15:10:44 -04:00
Dmitri Vereshchagin
8befc12830
Fix use of -q option in curl invocation
...
curl ignores -q if it's not the first option. Thus, prior to this
change, curl configuration file is used while performing HEAD request.
2020-02-03 00:00:36 +03:00
Chris Roberts
9ee5ce4817
Remove checksum from downloader and replace with FileChecksum
...
Remove checksum implementation within the Util::Downloader and
relocate it into the FileChecksum helper class. Update Downloader
to use FileChecksum.
2019-10-08 11:23:48 -07:00
Chris Roberts
7fb81bcea1
Add support for other checksum types
2019-10-08 11:23:48 -07:00
Brian Cain
9b385df4ec
Fix comment formatting
2018-10-12 09:07:12 -07:00
Brian Cain
83bd592e30
Introduce curl helper and uploader classes
...
This commit introduces a new uploader class for uploading files and
splits up some commonly used functionality between it and the downloader
class into a curl helper library.
2018-10-12 09:07:10 -07:00
Chris Roberts
c660643abb
Prevent matching on other Location headers
...
Prevent matching on custom headers that include the Location name
when checking for host redirection.
2018-07-19 09:18:30 -07:00
Chris Roberts
a490a8c587
Merge pull request #9966 from conspicuousClockwork/#9965
...
Added option to add to User-Agent
2018-07-18 16:43:02 -07:00
Thomas Röggla
2613d620fd
checking whether the field location_uri.host is nil
2018-07-12 15:49:26 +02:00
Caleb Martinez
447e58dac3
Added option to add to User-Agent
2018-06-28 13:21:34 -04:00
Brian Cain
67c3f866dd
( #7886 ) Add tests and simplify code for continuing on 416
2018-04-25 14:03:24 -07:00
Alexey Kamenskiy
f1993dfa19
Fixed minor typo in comment
2018-04-25 09:12:08 -07:00
Alexey Kamenskiy
cd3035e5e9
Issue #7885 Don't raise error if response is 416
...
416 means there is no more bytes to download (which works only with `--continue-at -` of curl)
2018-04-25 09:12:08 -07:00
Josh Soref
1a5ddea9f4
Spelling fixes
...
* account
* addresses
* administrator
* afterwards
* because
* bridgeable
* capabilities
* capability
* checksum
* configuration
* configuration for
* configure
* criteria
* delimited
* delivered
* derivatives
* description
* detect
* directory
* display
* downloading
* during
* electric
* enabling
* encountered
* equivalent
* executable
* executed
* hashicorp
* hypervisor
* hyphens
* implementation
* incorporate
* inheritance
* initialize
* instance
* instead
* interactions
* invocable
* machine
* maximum
* message
* mounting
* overridden
* overwrite
* paramiko
* preparing
* provides
* provisioning
* recursively
* requested
* resetting
* retryable
* running
* satisfied
* searching
* sometimes
* specified
* successfully
* synced folders
* unauthorized
* underlying
* userprofile
* vagrant
* vagrantfile
* variable
* various
* version
* virtual
* windows
2018-03-14 14:41:04 +00:00
Chris Roberts
ffa6d2810d
Remove end of line matcher from progress regexp
2018-02-22 09:46:24 -08:00
Chris Roberts
04e05088ff
Check location first. Grab final progress when multiple entries listed.
2018-02-21 19:46:12 -08:00
Chris Roberts
5e7e56f573
Fix redirect display and chosen location
2018-02-21 17:05:13 -08:00
Chris Roberts
fa2f17c7ae
Notify user when download host changes on redirect
2018-02-21 17:05:13 -08:00
Chris Roberts
06e3185eb1
Use CURL_CA_BUNDLE environment variable inplace of building path at runtime
2017-11-02 12:49:34 -07:00
Chris Roberts
beffa70941
Downloader checksum output information and digester usage
...
Add more output information around type of checksum being validated.
Use builtin Digest#file to read target file for generation of hexdigest.
2016-11-14 10:22:25 -08:00
Chris Roberts
da45ca707c
Add md5 and sha1 checksum support to Downloader.
...
Allows checksum validation on downloaded files via Util::Downloader
using MD5 and/or SHA1 checksums. This also integrates checksum validation
support with the shell provisioner for downloaded remote files.
2016-11-09 16:05:39 -08:00
Mitchell Hashimoto
e0ef592544
core: retry if server doesn't support byte ranges on download [GH-4479]
2015-11-19 16:14:13 -08:00
Seth Vargo
d88d126ad9
Use a properly-formatted custom User-Agent
2015-07-20 23:33:31 -04:00
Mitchell Hashimoto
6c06db776d
core: test for URI escaping
2015-07-06 16:26:06 -06:00
Dmitry Moskalchuk
26e3994319
Add option to enable trusted HTTP redirects
2015-05-31 09:34:02 -07:00
Matthew Rahtz
29c77e5719
Escape/unescape cURL URLs/auth
...
so that we can deal with special characters in usernames and passwords
2015-04-29 14:34:00 +01:00
Mitchell Hashimoto
46b3ea64d1
core: retry download without continue if byte range not supported
...
[GH-4479]
2014-10-23 11:06:29 -07:00
Mitchell Hashimoto
e198652e75
core: don't load curlrc [GH-4328]
2014-08-10 20:49:53 -07:00
Kalman Hazins
bb052366f7
Change symbols inside hashes to 1.9 JSON-like syntax
2014-05-22 12:35:12 -04:00
Rémi Paulmier
00a2670406
added capath option to curl Downloader
2014-05-19 18:08:23 +02:00
Mitchell Hashimoto
513efa6739
core: Downloads with user/pass use curl -u flag [GH-3183]
2014-03-13 08:53:18 -07:00
Mitchell Hashimoto
d4c753c48d
core: download metadata with JSON accept header
2014-02-07 10:30:25 -08:00
Mitchell Hashimoto
b71cde6b99
core: make box add UI much icer
2014-02-05 21:19:44 -08:00
Mitchell Hashimoto
05eeefbe36
core: Fix Downloader tests
2014-02-05 21:19:34 -08:00
Mitchell Hashimoto
09e8666296
core: BoxAdd now works with HTTP URLs
2014-02-05 21:19:31 -08:00
Mitchell Hashimoto
2a08302145
core: BoxAdd can add old boxes (happy path)
2014-02-05 21:19:26 -08:00
Mitchell Hashimoto
961d3607b9
core: add newline to end of download if windows
2014-02-05 21:19:24 -08:00
Mitchell Hashimoto
cd3e19306c
commands/box/add: custom CA cert [GH-2337]
2013-11-26 19:32:56 -08:00
Mitchell Hashimoto
13b52f6b6e
Merge branch 'client-certs' of https://github.com/sthulb/vagrant into sthulb-client-certs
...
Conflicts:
config/default.rb
lib/vagrant/action/builtin/handle_box_url.rb
plugins/commands/box/command/add.rb
2013-11-25 16:50:11 -08:00
Mitchell Hashimoto
5d9c002bdd
core: don't make all downloads continuable
2013-11-23 15:47:42 -08:00
Rick Harris
87a47abee8
Add resumable downloads
...
Since VM images can be fairly large and connections rather flaky, it would be
nice to support resumable downloads whereby, if a download is interrupted for
some reason, on the next attempt, it picks up where it left off.
To implement this, the following changes were made:
* The temporary download filename is now constructed from a SHA1 of the
`box_url` instead of a timestamp. This allows separate invocations of
Vagrant to 'share' the download-path if the URLs exactly match.
* Add `--continue-at -` option to `curl` which tells it to automatically resume
downloading where it left off
* Modify the `recover` method in `box_add` to not remove the temporary
download path if the download was interrupted
Known Issue:
* The progress on a resumed download will look a bit wonky in the sense that,
it starts at 0% each time, instead of where it left off. Since Vagrant is
pulling this directly from `curl`, this is more of an upstream issue.
Fixes #57
2013-11-20 15:15:38 -06:00