Prevent trailing space character on user agent
This commit is contained in:
parent
e0646e773f
commit
c7ef689d86
@ -21,7 +21,7 @@ module Vagrant
|
||||
# are properly tracked.
|
||||
#
|
||||
# Vagrant/1.7.4 (+https://www.vagrantup.com; ruby2.1.0)
|
||||
USER_AGENT = "Vagrant/#{VERSION} (+https://www.vagrantup.com; #{RUBY_ENGINE}#{RUBY_VERSION}) #{ENV['VAGRANT_USER_AGENT_PROVISIONAL_STRING']}".freeze
|
||||
USER_AGENT = "Vagrant/#{VERSION} (+https://www.vagrantup.com; #{RUBY_ENGINE}#{RUBY_VERSION}) #{ENV['VAGRANT_USER_AGENT_PROVISIONAL_STRING']}".strip.freeze
|
||||
|
||||
# Hosts that do not require notification on redirect
|
||||
SILENCED_HOSTS = [
|
||||
|
||||
@ -22,6 +22,12 @@ describe Vagrant::Util::Downloader do
|
||||
allow(Vagrant).to receive(:in_installer?).and_return(false)
|
||||
end
|
||||
|
||||
describe "USER_AGENT" do
|
||||
it "should not include a trailing space" do
|
||||
expect(described_class.const_get(:USER_AGENT)).not_to end_with(" ")
|
||||
end
|
||||
end
|
||||
|
||||
describe "#download!" do
|
||||
let(:curl_options) {
|
||||
["-q", "--fail", "--location", "--max-redirs", "10",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user