(ctx context.Context, req *s3.HeadObjectInput)
| 3981 | } |
| 3982 | |
| 3983 | func (f *Fs) headObject(ctx context.Context, req *s3.HeadObjectInput) (resp *s3.HeadObjectOutput, err error) { |
| 3984 | if f.opt.RequesterPays { |
| 3985 | req.RequestPayer = types.RequestPayerRequester |
| 3986 | } |
| 3987 | if f.opt.SSECustomerAlgorithm != "" { |
| 3988 | req.SSECustomerAlgorithm = &f.opt.SSECustomerAlgorithm |
| 3989 | } |
| 3990 | if f.opt.SSECustomerKeyBase64 != "" { |
| 3991 | req.SSECustomerKey = &f.opt.SSECustomerKeyBase64 |
| 3992 | } |
| 3993 | if f.opt.SSECustomerKeyMD5 != "" { |
| 3994 | req.SSECustomerKeyMD5 = &f.opt.SSECustomerKeyMD5 |
| 3995 | } |
| 3996 | err = f.pacer.Call(func() (bool, error) { |
| 3997 | var err error |
| 3998 | resp, err = f.c.HeadObject(ctx, req) |
| 3999 | return f.shouldRetry(ctx, err) |
| 4000 | }) |
| 4001 | if err != nil { |
| 4002 | if statusCode := getHTTPStatusCode(err); statusCode == http.StatusNotFound || statusCode == http.StatusMethodNotAllowed { |
| 4003 | return nil, fs.ErrorObjectNotFound |
| 4004 | } |
| 4005 | return nil, err |
| 4006 | } |
| 4007 | if req.Bucket != nil { |
| 4008 | f.cache.MarkOK(*req.Bucket) |
| 4009 | } |
| 4010 | return resp, nil |
| 4011 | } |
| 4012 | |
| 4013 | // readMetaData gets the metadata if it hasn't already been fetched |
| 4014 | // |
no test coverage detected