mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 19:52:48 +00:00
Merged revisions 61407 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r61407 | russell | 2007-04-11 09:48:01 -0500 (Wed, 11 Apr 2007) | 4 lines Add "svgz" to the mimetypes table. (issue #9510, bkruse) In passing, constify the elements of the mimetypes table. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
10
main/http.c
10
main/http.c
@@ -111,8 +111,8 @@ static int enablestatic;
|
|||||||
|
|
||||||
/*! \brief Limit the kinds of files we're willing to serve up */
|
/*! \brief Limit the kinds of files we're willing to serve up */
|
||||||
static struct {
|
static struct {
|
||||||
char *ext;
|
const char *ext;
|
||||||
char *mtype;
|
const char *mtype;
|
||||||
} mimetypes[] = {
|
} mimetypes[] = {
|
||||||
{ "png", "image/png" },
|
{ "png", "image/png" },
|
||||||
{ "jpg", "image/jpeg" },
|
{ "jpg", "image/jpeg" },
|
||||||
@@ -120,6 +120,7 @@ static struct {
|
|||||||
{ "wav", "audio/x-wav" },
|
{ "wav", "audio/x-wav" },
|
||||||
{ "mp3", "audio/mpeg" },
|
{ "mp3", "audio/mpeg" },
|
||||||
{ "svg", "image/svg+xml" },
|
{ "svg", "image/svg+xml" },
|
||||||
|
{ "svgz", "image/svg+xml" },
|
||||||
{ "gif", "image/gif" },
|
{ "gif", "image/gif" },
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -131,7 +132,7 @@ struct http_uri_redirect {
|
|||||||
|
|
||||||
static AST_RWLIST_HEAD_STATIC(uri_redirects, http_uri_redirect);
|
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;
|
int x;
|
||||||
if (ftype) {
|
if (ftype) {
|
||||||
@@ -160,7 +161,8 @@ static struct ast_str *static_callback(struct sockaddr_in *req, const char *uri,
|
|||||||
{
|
{
|
||||||
struct ast_str *result;
|
struct ast_str *result;
|
||||||
char *path;
|
char *path;
|
||||||
char *ftype, *mtype;
|
char *ftype;
|
||||||
|
const char *mtype;
|
||||||
char wkspace[80];
|
char wkspace[80];
|
||||||
struct stat st;
|
struct stat st;
|
||||||
int len;
|
int len;
|
||||||
|
Reference in New Issue
Block a user