api: MakeBucket should set proper bucket location. (#1948)

Fixes #1942
This commit is contained in:
Harshavardhana
2016-06-20 23:25:18 -07:00
committed by GitHub
parent ad779a8ba4
commit 409b4ddecb
2 changed files with 15 additions and 1 deletions
+2 -1
View File
@@ -19,6 +19,7 @@ package main
import (
"encoding/xml"
"net/http"
"path"
"time"
)
@@ -255,7 +256,7 @@ type DeleteObjectsResponse struct {
// getLocation get URL location.
func getLocation(r *http.Request) string {
return r.URL.Path
return path.Clean(r.URL.Path) // Clean any trailing slashes.
}
// getObjectLocation gets the relative URL for an object