Skip to content

Commit a70916e

Browse files
authored
fix: Content-Length measures the response body, not the object being read (#742)
1 parent 44d285b commit a70916e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gcs/object.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ def streamer():
535535
headers["Content-Type"] = "application/octet-stream"
536536

537537
headers["x-goog-stored-content-length"] = self.metadata.size
538-
headers["Content-Length"] = self.metadata.size
538+
headers["Content-Length"] = len(response_payload)
539539

540540
if self.metadata.content_encoding:
541541
headers["x-goog-stored-content-encoding"] = self.metadata.content_encoding

0 commit comments

Comments
 (0)