diff --git a/storage/integration_test.go b/storage/integration_test.go index 149ac2fc3bc..efa43dbcf3a 100644 --- a/storage/integration_test.go +++ b/storage/integration_test.go @@ -3389,7 +3389,7 @@ func TestIntegration_PostPolicyV4(t *testing.T) { } if g, w := res.StatusCode, statusCodeToRespond; g != w { blob, _ := httputil.DumpResponse(res, true) - t.Errorf("Status code in response mismatch: got %d want %d\nBody: %s", g, w, blob) + t.Fatalf("Status code in response mismatch: got %d want %d\nBody: %s", g, w, blob) } io.Copy(ioutil.Discard, res.Body) diff --git a/storage/post_policy_v4.go b/storage/post_policy_v4.go index 5abba9fc6dd..db9d1383849 100644 --- a/storage/post_policy_v4.go +++ b/storage/post_policy_v4.go @@ -267,8 +267,12 @@ func GenerateSignedPostPolicyV4(bucket, object string, opts *PostPolicyV4Options "x-goog-date": now.Format(iso8601), "x-goog-credential": opts.GoogleAccessID + "/" + YYYYMMDD + "/auto/storage/goog4_request", "x-goog-algorithm": "GOOG4-RSA-SHA256", - "success_action_redirect": descFields.RedirectToURLOnSuccess, "acl": descFields.ACL, + "cache-control": descFields.CacheControl, + "content-disposition": descFields.ContentDisposition, + "content-encoding": descFields.ContentEncoding, + "content-type": descFields.ContentType, + "success_action_redirect": descFields.RedirectToURLOnSuccess, } for key, value := range descFields.Metadata { conds = append(conds, &singleValueCondition{key, value})