File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed
Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -531,6 +531,7 @@ def streamer():
531531 headers ["Content-Type" ] = "application/octet-stream"
532532
533533 headers ["x-goog-stored-content-length" ] = self .metadata .size
534+ headers ["Content-Length" ] = self .metadata .size
534535
535536 if self .metadata .content_encoding :
536537 headers ["x-goog-stored-content-encoding" ] = self .metadata .content_encoding
Original file line number Diff line number Diff line change @@ -667,6 +667,8 @@ def test_rest_media(self):
667667 self .assertIn ("x-goog-generation" , response .headers )
668668 self .assertIn ("x-goog-metageneration" , response .headers )
669669 self .assertIn ("x-goog-storage-class" , response .headers )
670+ self .assertIn ("Content-Length" , response .headers )
671+ self .assertEqual (response .headers ["Content-Length" ], str (len (blob .media )))
670672
671673 cases = {
672674 "bytes=4-9" : (b"vexing" , "4-9" ),
You can’t perform that action at this time.
0 commit comments