Revision 1489
Added by Jing Tao almost 22 years ago
src/edu/ucsb/nceas/metacat/MetaCatServlet.java | ||
---|---|---|
1194 | 1194 |
if ( f.isDirectory() ) { |
1195 | 1195 |
contentType="text/html"; |
1196 | 1196 |
} else { |
1197 |
// Use the content type set in the metacat.properties file |
|
1198 |
contentType= util.getOption("defaultcontenttype"); |
|
1199 |
System.out.println(" default content type: "+ contentType); |
|
1200 |
if ( contentType == null ) { |
|
1197 | 1201 |
contentType="application/octet-stream"; |
1202 |
} |
|
1198 | 1203 |
} |
1199 | 1204 |
} |
1200 | 1205 |
} |
1206 |
System.out.println("final content type: "+contentType); |
|
1201 | 1207 |
response.setContentType(contentType); |
1202 | 1208 |
// if we decide to use "application/octet-stream" for all data returns |
1203 | 1209 |
// response.setContentType("application/octet-stream"); |
Also available in: Unified diff
Set default content type for data file.