Changeset 20756
Legend:
- Unmodified
- Added
- Removed
-
trunk/bio/webapp/src/org/intermine/bio/web/export/SequenceHttpExporter.java
r20462 r20756 58 58 ResponseUtil.setGzippedHeader(response, fileName + ".gz"); 59 59 } else { 60 ResponseUtil.set PlainTextHeader(response, fileName);60 ResponseUtil.setCustomTypeHeader(response, fileName, "chemical/x-fasta"); 61 61 } 62 62 } -
trunk/intermine/web/main/src/org/intermine/web/logic/export/ResponseUtil.java
r20462 r20756 93 93 94 94 /** 95 * Sets response header and content type for a custom content type. 96 * @param response response 97 * @param fileName file name of downloaded file 98 * @param the content type to use 99 */ 100 public static void setCustomTypeHeader(HttpServletResponse response, String fileName, 101 String contentType) { 102 setNoCache(response); 103 setCustomContentType(response, contentType); 104 setFileName(response, fileName); 105 } 106 107 /** 95 108 * Sets that the result must not be cached. Old implementation was set 96 109 * Cache-Control to no-cache,no-store,max-age=0. But this caused problems … … 175 188 176 189 /** 190 * Sets content type to the parameter specified 191 * @param response response 192 * @param custom MIME type to set as content type specified 193 */ 194 public static void setCustomContentType(HttpServletResponse response, String contentType) { 195 response.setContentType(contentType); 196 } 197 /** 177 198 * Sets the content disposition filename. 178 199 *
Note: See TracChangeset
for help on using the changeset viewer.
