Skip to content

Commit

Permalink
fix headobject
Browse files Browse the repository at this point in the history
  • Loading branch information
lewzylu committed May 15, 2018
1 parent f813fab commit 2958099
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion object.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func (s *ObjectService) Head(ctx context.Context, name string, opt *ObjectHeadOp
optHeader: opt,
}
resp, err := s.client.send(ctx, &sendOpt)
if resp.Header["X-Cos-Object-Type"][0] == "appendable" {
if (resp.Header["X-Cos-Object-Type"] != nil && resp.Header["X-Cos-Object-Type"][0] == "appendable") {
resp.Header.Add("x-cos-next-append-position",resp.Header["Content-Length"][0])
}

Expand Down

0 comments on commit 2958099

Please sign in to comment.