From a0b95cb927638d21db163b86c3f2df669ae30df5 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 29 Aug 2014 11:27:50 -0700 Subject: [PATCH] core: content-type is case insensitive for metadata check [GH-4369] --- CHANGELOG.md | 2 ++ lib/vagrant/action/builtin/box_add.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90b0a86f9..3042efda8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,8 @@ BUG FIXES: as root. [GH-4387] - core: "vagrant provision" will cause "vagrant up" to properly not reprovision. [GH-4393] + - commands/box/add: "Content-Type" header is now case-insensitive when + looking for metadata type. [GH-4369] - commands/package: base package won't crash with exception [GH-4017] - commands/rsync-auto: Destroyed machines won't raise exceptions. [GH-4031] - commands/ssh: Extra args are passed through to Docker container. [GH-4378] diff --git a/lib/vagrant/action/builtin/box_add.rb b/lib/vagrant/action/builtin/box_add.rb index ff201ac79..5e0655662 100644 --- a/lib/vagrant/action/builtin/box_add.rb +++ b/lib/vagrant/action/builtin/box_add.rb @@ -481,7 +481,7 @@ module Vagrant end output = d.head - match = output.scan(/^Content-Type: (.+?)$/).last + match = output.scan(/^Content-Type: (.+?)$/i).last return false if !match match.last.chomp == "application/json" end