@ -139,7 +139,7 @@ func (server *minioAPI) putObjectHandler(w http.ResponseWriter, req *http.Reques
return
return
}
}
// handle PublicRead ACL here
// handle ACL's here at bucket level
if ! server . isValidOp ( w , req , acceptsContentType ) {
if ! server . isValidOp ( w , req , acceptsContentType ) {
return
return
}
}
@ -155,6 +155,19 @@ func (server *minioAPI) putObjectHandler(w http.ResponseWriter, req *http.Reques
writeErrorResponse ( w , req , InvalidDigest , acceptsContentType , req . URL . Path )
writeErrorResponse ( w , req , InvalidDigest , acceptsContentType , req . URL . Path )
return
return
}
}
size := req . Header . Get ( "Content-Length" )
if size == "" {
writeErrorResponse ( w , req , IncompleteBody , acceptsContentType , req . URL . Path )
return
}
if isMaxObjectSize ( size ) {
writeErrorResponse ( w , req , EntityTooLarge , acceptsContentType , req . URL . Path )
return
}
if isMinObjectSize ( size ) {
writeErrorResponse ( w , req , EntityTooSmall , acceptsContentType , req . URL . Path )
return
}
err := server . driver . CreateObject ( bucket , object , "" , md5 , req . Body )
err := server . driver . CreateObject ( bucket , object , "" , md5 , req . Body )
switch err := iodine . ToError ( err ) . ( type ) {
switch err := iodine . ToError ( err ) . ( type ) {
case nil :
case nil :