Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-16.03 30 lines 988 B view raw
1commit 983634ea6b81910529596c262644eacfa2c2c4f9 2Author: Shea Levy <shea@shealevy.com> 3Date: Wed Sep 4 16:16:12 2013 -0400 4 5 Fix LS_BUCKET 6 7 GET foo.s3.amazonaws.com/ and GET s3.amazonaws.com/foo should result in 8 an LS_BUCKET request, but under the previous logic it would result in a 9 LIST_BUCKETS request. GET s3.amazonaws.com/ still results in a 10 LIST_BUCKETS request due to the 'if path == "/" and s_req.is_path_style' 11 conditional. 12 13 Signed-off-by: Shea Levy <shea@shealevy.com> 14 15diff --git a/lib/fakes3/server.rb b/lib/fakes3/server.rb 16index 6958151..36d9cad 100644 17--- a/lib/fakes3/server.rb 18+++ b/lib/fakes3/server.rb 19@@ -213,10 +213,7 @@ module FakeS3 20 elems = path.split("/") 21 end 22 23- if elems.size == 0 24- # List buckets 25- s_req.type = Request::LIST_BUCKETS 26- elsif elems.size == 1 27+ if elems.size < 2 28 s_req.type = Request::LS_BUCKET 29 s_req.query = query 30 else