From 984a6cfacda38b5ea586e9c89f2ef1cc0f9df4b4 Mon Sep 17 00:00:00 2001 From: Alexey Date: Fri, 28 Oct 2016 15:10:11 +0200 Subject: [PATCH] Fix https://github.com/jubos/fake-s3/issues/114 --- lib/fakes3/server.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fakes3/server.rb b/lib/fakes3/server.rb index 6265196d..9ef596fb 100644 --- a/lib/fakes3/server.rb +++ b/lib/fakes3/server.rb @@ -460,7 +460,7 @@ def normalize_request(webrick_req) s_req.path = webrick_req.path s_req.is_path_style = true - if !@root_hostnames.include?(host) + if !@root_hostnames.include?(host) && host =~ /^(.+).s3.amazonaws.com$/ s_req.bucket = host.split(".")[0] s_req.is_path_style = false end