bucketName: relax bucket names, now allow numbers as starting characters.

This commit is contained in:
Harshavardhana
2015-12-07 13:39:18 -08:00
parent 1413e761cf
commit 4fc161ddb1
6 changed files with 24 additions and 19 deletions

View File

@@ -156,6 +156,7 @@ func (api CloudStorageAPI) PutObjectHandler(w http.ResponseWriter, req *http.Req
var err error
sizeInt64, err = strconv.ParseInt(size, 10, 64)
if err != nil {
errorIf(probe.NewError(err), "Parsing Content-Length failed.", nil)
writeErrorResponse(w, req, InvalidRequest, req.URL.Path)
return
}
@@ -289,6 +290,7 @@ func (api CloudStorageAPI) PutObjectPartHandler(w http.ResponseWriter, req *http
var err error
sizeInt64, err = strconv.ParseInt(size, 10, 64)
if err != nil {
errorIf(probe.NewError(err), "Parsing Content-Length failed.", nil)
writeErrorResponse(w, req, InvalidRequest, req.URL.Path)
return
}