File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
src/ObjectStore/v1/Models Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,18 @@ public function populateFromResponse(ResponseInterface $response): self
51
51
{
52
52
parent ::populateFromResponse ($ response );
53
53
54
+ $ this ->populateHeaders ($ response );
55
+
56
+ return $ this ;
57
+ }
58
+
59
+ /**
60
+ * @param ResponseInterface $response
61
+ *
62
+ * @return $this
63
+ */
64
+ private function populateHeaders (ResponseInterface $ response ): self
65
+ {
54
66
$ this ->hash = $ response ->getHeaderLine ('ETag ' );
55
67
$ this ->contentLength = $ response ->getHeaderLine ('Content-Length ' );
56
68
$ this ->lastModified = $ response ->getHeaderLine ('Last-Modified ' );
@@ -100,8 +112,9 @@ public function retrieve()
100
112
*/
101
113
public function download (): StreamInterface
102
114
{
115
+ /** @var ResponseInterface $response */
103
116
$ response = $ this ->executeWithState ($ this ->api ->getObject ());
104
- $ this ->populateFromResponse ($ response );
117
+ $ this ->populateHeaders ($ response );
105
118
return $ response ->getBody ();
106
119
}
107
120
You can’t perform that action at this time.
0 commit comments