Skip to content

Commit

Permalink
include content-type header
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Feb 14, 2024
1 parent 6a1b938 commit 2e8be96
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/io/cryostat/recordings/Recordings.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import io.cryostat.recordings.RecordingHelper.SnapshotCreationException;
import io.cryostat.targets.Target;
import io.cryostat.targets.TargetConnectionManager;
import io.cryostat.util.HttpMimeType;
import io.cryostat.util.HttpStatusCodeIdentifier;
import io.cryostat.ws.MessagingServer;
import io.cryostat.ws.Notification;
Expand Down Expand Up @@ -984,6 +985,7 @@ public Response handleActiveDownload(@RestPath long id) throws Exception {
.header(
HttpHeaders.CONTENT_DISPOSITION,
String.format("attachment; filename=\"%s.jfr\"", recording.name))
.header(HttpHeaders.CONTENT_TYPE, HttpMimeType.OCTET_STREAM.mime())
.entity(recordingHelper.getActiveInputStream(recording))
.build();
}
Expand Down Expand Up @@ -1023,6 +1025,7 @@ public Response handleStorageDownload(@RestPath String encodedKey, @RestQuery St
.header(
HttpHeaders.CONTENT_DISPOSITION,
String.format("attachment; filename=\"%s\"", pair.getValue()))
.header(HttpHeaders.CONTENT_TYPE, HttpMimeType.OCTET_STREAM.mime())
.entity(recordingHelper.getArchivedRecordingStream(encodedKey))
.build();
}
Expand Down

0 comments on commit 2e8be96

Please sign in to comment.