mirror of
https://github.com/minio/minio.git
synced 2025-01-12 15:33:22 -05:00
routers: Fix order of PostPolicyHandlers and headers.
This commit is contained in:
parent
600a932acb
commit
76bda0d8f1
@ -518,8 +518,7 @@ func extractHTTPFormValues(reader *multipart.Reader) (io.Reader, map[string]stri
|
|||||||
// signature policy in multipart/form-data
|
// signature policy in multipart/form-data
|
||||||
func (api storageAPI) PostPolicyBucketHandler(w http.ResponseWriter, r *http.Request) {
|
func (api storageAPI) PostPolicyBucketHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
// Here the parameter is the size of the form data that should
|
// Here the parameter is the size of the form data that should
|
||||||
// be loaded in memory, the remaining being put in temporary
|
// be loaded in memory, the remaining being put in temporary files.
|
||||||
// files
|
|
||||||
reader, e := r.MultipartReader()
|
reader, e := r.MultipartReader()
|
||||||
if e != nil {
|
if e != nil {
|
||||||
errorIf(probe.NewError(e), "Unable to initialize multipart reader.", nil)
|
errorIf(probe.NewError(e), "Unable to initialize multipart reader.", nil)
|
||||||
|
@ -149,10 +149,10 @@ func registerAPIHandlers(mux *router.Router, a storageAPI, w *webAPI) {
|
|||||||
bucket.Methods("PUT").HandlerFunc(a.PutBucketHandler)
|
bucket.Methods("PUT").HandlerFunc(a.PutBucketHandler)
|
||||||
// HeadBucket
|
// HeadBucket
|
||||||
bucket.Methods("HEAD").HandlerFunc(a.HeadBucketHandler)
|
bucket.Methods("HEAD").HandlerFunc(a.HeadBucketHandler)
|
||||||
|
// PostPolicy
|
||||||
|
bucket.Methods("POST").HeadersRegexp("Content-Type", "multipart/form-data*").HandlerFunc(a.PostPolicyBucketHandler)
|
||||||
// DeleteMultipleObjects
|
// DeleteMultipleObjects
|
||||||
bucket.Methods("POST").HandlerFunc(a.DeleteMultipleObjectsHandler)
|
bucket.Methods("POST").HandlerFunc(a.DeleteMultipleObjectsHandler)
|
||||||
// PostPolicy
|
|
||||||
bucket.Methods("POST").Headers("Content-Type", "multipart/form-data").HandlerFunc(a.PostPolicyBucketHandler)
|
|
||||||
// DeleteBucketPolicy
|
// DeleteBucketPolicy
|
||||||
bucket.Methods("DELETE").HandlerFunc(a.DeleteBucketPolicyHandler).Queries("policy", "")
|
bucket.Methods("DELETE").HandlerFunc(a.DeleteBucketPolicyHandler).Queries("policy", "")
|
||||||
// DeleteBucket
|
// DeleteBucket
|
||||||
|
Loading…
Reference in New Issue
Block a user