Skip to content

Commit

Permalink
Serve SVG files with correct Content-Type
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-muc committed Jul 3, 2018
1 parent 416e127 commit 67319d8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions http.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const char* contentTypeTable[]={
"image/png",
"image/jpeg",
"image/gif",
"image/svg+xml",
"application/x-shockwave-flash",
"audio/mpeg",
"video/mpeg",
Expand Down Expand Up @@ -2079,6 +2080,7 @@ int mwGetContentType(const char *pchExtname)
case FILEEXT_PNG: return HTTPFILETYPE_PNG;
case FILEEXT_JPG: return HTTPFILETYPE_JPEG;
case FILEEXT_GIF: return HTTPFILETYPE_GIF;
case FILEEXT_SVG: return HTTPFILETYPE_SVG;
case FILEEXT_SWF: return HTTPFILETYPE_SWF;
case FILEEXT_MPA: return HTTPFILETYPE_MPA;
case FILEEXT_MPG: return HTTPFILETYPE_MPEG;
Expand Down
1 change: 1 addition & 0 deletions httpapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ typedef enum {
HTTPFILETYPE_PNG,
HTTPFILETYPE_JPEG,
HTTPFILETYPE_GIF,
HTTPFILETYPE_SVG,
HTTPFILETYPE_SWF,
HTTPFILETYPE_MPA,
HTTPFILETYPE_MPEG,
Expand Down
1 change: 1 addition & 0 deletions httpint.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
#define FILEEXT_GIF DEFDWORD('G','I','F',0)
#define FILEEXT_JPG DEFDWORD('J','P','G',0)
#define FILEEXT_PNG DEFDWORD('P','N','G',0)
#define FILEEXT_SVG DEFDWORD('S','V','G',0)
#define FILEEXT_CSS DEFDWORD('C','S','S',0)
#define FILEEXT_JS DEFDWORD('J','S',0,0)
#define FILEEXT_SWF DEFDWORD('S','W','F',0)
Expand Down

0 comments on commit 67319d8

Please sign in to comment.