/*! \brief Limit the kinds of files we're willing to serve up */
static struct {
- char *ext;
- char *mtype;
+ const char *ext;
+ const char *mtype;
} mimetypes[] = {
{ "png", "image/png" },
{ "jpg", "image/jpeg" },
{ "wav", "audio/x-wav" },
{ "mp3", "audio/mpeg" },
{ "svg", "image/svg+xml" },
+ { "svgz", "image/svg+xml" },
{ "gif", "image/gif" },
};
static AST_RWLIST_HEAD_STATIC(uri_redirects, http_uri_redirect);
-static char *ftype2mtype(const char *ftype, char *wkspace, int wkspacelen)
+static const char *ftype2mtype(const char *ftype, char *wkspace, int wkspacelen)
{
int x;
if (ftype) {
{
struct ast_str *result;
char *path;
- char *ftype, *mtype;
+ char *ftype;
+ const char *mtype;
char wkspace[80];
struct stat st;
int len;
if ((ftype = strrchr(uri, '.')))
ftype++;
- mtype=ftype2mtype(ftype, wkspace, sizeof(wkspace));
+ mtype = ftype2mtype(ftype, wkspace, sizeof(wkspace));
/* Cap maximum length */
len = strlen(uri) + strlen(ast_config_AST_DATA_DIR) + strlen("/static-http/") + 5;