netutils/webserver: Fix a few complaints from nutts/tools/nxstyle.
This commit is contained in:
parent
0b352178c1
commit
39ad02f72e
@ -14,7 +14,6 @@ config NETUTILS_WEBSERVER
|
||||
|
||||
if NETUTILS_WEBSERVER
|
||||
|
||||
|
||||
config NETUTILS_HTTPD_SINGLECONNECT
|
||||
bool "Single Connection"
|
||||
default n if !DISABLE_PTHREAD
|
||||
@ -179,5 +178,4 @@ config NETUTILS_HTTPD_DIRLIST
|
||||
depends on NETUTILS_HTTPD_SENDFILE
|
||||
default n
|
||||
|
||||
|
||||
endif # NETUTILS_WEBSERVER
|
||||
|
@ -444,7 +444,10 @@ static int send_headers(struct httpd_state *pstate, int status, int len)
|
||||
{
|
||||
const char *mime;
|
||||
const char *ptr;
|
||||
char contentlen[HTTPD_MAX_CONTENTLEN] = { 0 };
|
||||
char contentlen[HTTPD_MAX_CONTENTLEN] =
|
||||
{
|
||||
0
|
||||
};
|
||||
char header[HTTPD_MAX_HEADERLEN];
|
||||
int hdrlen;
|
||||
int i;
|
||||
@ -456,19 +459,36 @@ static int send_headers(struct httpd_state *pstate, int status, int len)
|
||||
} a[] =
|
||||
{
|
||||
#ifndef CONFIG_NETUTILS_HTTPD_SCRIPT_DISABLE
|
||||
{ "shtml", "text/html" },
|
||||
{
|
||||
"shtml", "text/html"
|
||||
},
|
||||
#endif
|
||||
{ "html", "text/html" },
|
||||
{ "css", "text/css" },
|
||||
{ "txt", "text/plain" },
|
||||
{ "js", "text/javascript" },
|
||||
|
||||
{ "png", "image/png" },
|
||||
{ "gif", "image/gif" },
|
||||
{ "jpeg", "image/jpeg" },
|
||||
{ "jpg", "image/jpeg" },
|
||||
|
||||
{ "mp3", "audio/mpeg" }
|
||||
{
|
||||
"html", "text/html"
|
||||
},
|
||||
{
|
||||
"css", "text/css"
|
||||
},
|
||||
{
|
||||
"txt", "text/plain"
|
||||
},
|
||||
{
|
||||
"js", "text/javascript"
|
||||
},
|
||||
{
|
||||
"png", "image/png"
|
||||
},
|
||||
{
|
||||
"gif", "image/gif"
|
||||
},
|
||||
{
|
||||
"jpeg", "image/jpeg"
|
||||
},
|
||||
{
|
||||
"jpg", "image/jpeg"
|
||||
},
|
||||
{ "mp3", "audio/mpeg"
|
||||
}
|
||||
};
|
||||
|
||||
ptr = strrchr(pstate->ht_filename, ISO_period);
|
||||
|
@ -54,18 +54,6 @@
|
||||
|
||||
#include "httpd.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user