Skip to content

Commit

Permalink
storage: fix response header check in reader.
Browse files Browse the repository at this point in the history
Fix a small bug where the wrong header was being checked for.

Change-Id: I8c20fc38c6e8f7859a9f34564cd8c2dce3a3e437
Reviewed-on: https://code-review.googlesource.com/c/gocloud/+/53570
Reviewed-by: Frank Natividad <[email protected]>
Reviewed-by: kokoro <[email protected]>
  • Loading branch information
tritone committed Mar 19, 2020
1 parent b5fd20c commit b580ccd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func (o *ObjectHandle) NewRangeReader(ctx context.Context, offset, length int64)
body = emptyBody
}
var metaGen int64
if res.Header.Get("X-Goog-Generation") != "" {
if res.Header.Get("X-Goog-Metageneration") != "" {
metaGen, err = strconv.ParseInt(res.Header.Get("X-Goog-Metageneration"), 10, 64)
if err != nil {
return nil, err
Expand Down

0 comments on commit b580ccd

Please sign in to comment.