Mercurial Hosting > luan
comparison src/goodjava/webserver/handlers/ContentTypeHandler.java @ 1744:db52c29605e2
support svg
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 13 Nov 2022 19:26:41 -0700 |
parents | a02a75e3daa8 |
children | f7b90d9a4639 |
comparison
equal
deleted
inserted
replaced
1743:792268dce5ec | 1744:db52c29605e2 |
---|---|
33 map.put( "gif", "image/gif" ); | 33 map.put( "gif", "image/gif" ); |
34 map.put( "pdf", "application/pdf" ); | 34 map.put( "pdf", "application/pdf" ); |
35 map.put( "woff", "font/woff" ); | 35 map.put( "woff", "font/woff" ); |
36 map.put( "doc", "application/msword" ); | 36 map.put( "doc", "application/msword" ); |
37 map.put( "docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ); | 37 map.put( "docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ); |
38 map.put( "svg", "image/svg+xml" ); | |
38 // add more as need | 39 // add more as need |
39 } | 40 } |
40 | 41 |
41 public static String getExtension(String path) { | 42 public static String getExtension(String path) { |
42 int iSlash = path.lastIndexOf('/'); | 43 int iSlash = path.lastIndexOf('/'); |