- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for parsePostPolicyForm (0.13 sec)
-
cmd/postpolicyform_test.go
success: true, }, } for _, testCase := range testCases { testCase := testCase t.Run("", func(t *testing.T) { _, err := parsePostPolicyForm(strings.NewReader(testCase.policy)) if testCase.success && err != nil { t.Errorf("Expected success but failed with %s", err) } if !testCase.success && err == nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Apr 23 18:58:53 UTC 2021 - 8.9K bytes - Viewed (0) -
cmd/postpolicyform.go
} sset.Add(kv.Key) } e.Encode(kvs) } } return &buf, d.Err() } // parsePostPolicyForm - Parse JSON policy string into typed PostPolicyForm structure. func parsePostPolicyForm(r io.Reader) (PostPolicyForm, error) { reader, err := sanitizePolicy(r) if err != nil { return PostPolicyForm{}, err } d := json.NewDecoder(reader)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 12.4K bytes - Viewed (0) -
cmd/bucket-handlers.go
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return } } // Handle policy if it is set. if len(policyBytes) > 0 { postPolicyForm, err := parsePostPolicyForm(bytes.NewReader(policyBytes)) if err != nil { errAPI := errorCodes.ToAPIErr(ErrPostPolicyConditionInvalidFormat) errAPI.Description = fmt.Sprintf("%s '(%s)'", errAPI.Description, err)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 12 12:24:04 UTC 2024 - 63.4K bytes - Viewed (0)