File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
test/fixtures/gcs-fixture/src/main/java/fixture/gcs Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,10 @@ public void handle(final HttpExchange exchange) throws IOException {
150150 response = blob .contents ().slice (Math .toIntExact (range .start ()), Math .toIntExact (lastIndex - range .start () + 1 ));
151151 statusCode = RestStatus .PARTIAL_CONTENT .getStatus ();
152152 }
153+ // I think it's enough to use the generation here, at least until
154+ // we implement "metageneration", at that point we must incorporate both
155+ // See: https://cloud.google.com/storage/docs/metadata#etags
156+ exchange .getResponseHeaders ().add ("ETag" , String .valueOf (blob .generation ()));
153157 exchange .getResponseHeaders ().add ("Content-Type" , "application/octet-stream" );
154158 exchange .sendResponseHeaders (statusCode , response .length ());
155159 response .writeTo (exchange .getResponseBody ());
You can’t perform that action at this time.
0 commit comments