Browse Source

Merge pull request #42 from toranger/master

Fix the outindex of the resp addr in head object
tags/v0.7.8
toranger 6 years ago
committed by GitHub
parent
commit
c5c1f9751e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      object.go

2
object.go

@ -283,7 +283,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"] != nil && resp.Header["X-Cos-Object-Type"][0] == "appendable" {
if resp != nil && 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])
}

Loading…
Cancel
Save