Skip to content

Commit 09bd6a2

Browse files
fix(SparkUtils): Remove conflicting content encoding header data.
1 parent eb51131 commit 09bd6a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/conveyal/datatools/common/utils/SparkUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ public static HttpServletResponse downloadFile(File file, String filename, Reque
5353
if (file == null) logMessageAndHalt(req, 404, "File is null");
5454
HttpServletResponse raw = res.raw();
5555
raw.setContentType("application/octet-stream");
56-
raw.setHeader("Content-Disposition", "attachment; filename=" + filename);
5756
// Override the gzip content encoding applied to standard API responses.
58-
res.header("Content-Encoding", "identity");
57+
raw.setHeader("Content-Encoding", "identity");
58+
raw.setHeader("Content-Disposition", "attachment; filename=" + filename);
5959
try (
6060
FileInputStream fileInputStream = new FileInputStream(file);
6161
ServletOutputStream outputStream = raw.getOutputStream()

0 commit comments

Comments
 (0)