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
|
||||
func (api storageAPI) PostPolicyBucketHandler(w http.ResponseWriter, r *http.Request) {
|
||||
// Here the parameter is the size of the form data that should
|
||||
// be loaded in memory, the remaining being put in temporary
|
||||
// files
|
||||
// be loaded in memory, the remaining being put in temporary files.
|
||||
reader, e := r.MultipartReader()
|
||||
if e != 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)
|
||||
// HeadBucket
|
||||
bucket.Methods("HEAD").HandlerFunc(a.HeadBucketHandler)
|
||||
// PostPolicy
|
||||
bucket.Methods("POST").HeadersRegexp("Content-Type", "multipart/form-data*").HandlerFunc(a.PostPolicyBucketHandler)
|
||||
// DeleteMultipleObjects
|
||||
bucket.Methods("POST").HandlerFunc(a.DeleteMultipleObjectsHandler)
|
||||
// PostPolicy
|
||||
bucket.Methods("POST").Headers("Content-Type", "multipart/form-data").HandlerFunc(a.PostPolicyBucketHandler)
|
||||
// DeleteBucketPolicy
|
||||
bucket.Methods("DELETE").HandlerFunc(a.DeleteBucketPolicyHandler).Queries("policy", "")
|
||||
// DeleteBucket
|
||||
|
Loading…
Reference in New Issue
Block a user