- nhttpd: enable mod_sendfile.sendAll by default

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2017-09-05 00:04:15 +02:00
committed by Thilo Graf
parent c06e5e114a
commit d996147dbd
2 changed files with 2 additions and 2 deletions

View File

@@ -100,7 +100,7 @@
#define CACHE_DIR "/tmp/.cache" #define CACHE_DIR "/tmp/.cache"
#define HTTPD_ERRORPAGE "/Y_ErrorPage.yhtm" #define HTTPD_ERRORPAGE "/Y_ErrorPage.yhtm"
#define HTTPD_SENDFILE_EXT "htm:text/html,html:text/html,xml:text/xml,txt:text/plain,jpg:image/jpeg,jpeg:image/jpeg,gif:image/gif,png:image/png,bmp:image/bmp,css:text/css,js:text/plain,yjs:text/plain,img:application/octet-stream,ico:image/x-icon,m3u:application/octet-stream,tar:application/octet-stream,gz:text/x-gzip,ts:video/MP2T,mkv:video/x-matroska,avi:video/avi,mp3:audio/mpeg,ogg:audio/ogg" #define HTTPD_SENDFILE_EXT "htm:text/html,html:text/html,xml:text/xml,txt:text/plain,jpg:image/jpeg,jpeg:image/jpeg,gif:image/gif,png:image/png,bmp:image/bmp,css:text/css,js:text/plain,yjs:text/plain,img:application/octet-stream,ico:image/x-icon,m3u:application/octet-stream,tar:application/octet-stream,gz:text/x-gzip,ts:video/MP2T,mkv:video/x-matroska,avi:video/avi,mp3:audio/mpeg,ogg:audio/ogg"
#define HTTPD_SENDFILE_ALL "false" #define HTTPD_SENDFILE_ALL "true"
#define HTTPD_LANGUAGEDIR "languages" #define HTTPD_LANGUAGEDIR "languages"
#define HTTPD_DEFAULT_LANGUAGE "English" #define HTTPD_DEFAULT_LANGUAGE "English"
#define AUTHUSER "root" #define AUTHUSER "root"

View File

@@ -503,7 +503,7 @@ void Cyhttpd::ReadConfig(void) {
if (Config->getInt32("configfile.version") < 2) { if (Config->getInt32("configfile.version") < 2) {
Config->setString("mod_sendfile.mime_types", HTTPD_SENDFILE_EXT); Config->setString("mod_sendfile.mime_types", HTTPD_SENDFILE_EXT);
Config->setInt32("configfile.version", CONF_VERSION); Config->setInt32("configfile.version", CONF_VERSION);
Config->setString("mod_sendfile.sendAll", "false"); Config->setString("mod_sendfile.sendAll", HTTPD_SENDFILE_ALL);
Config->saveConfig(HTTPD_CONFIGFILE); Config->saveConfig(HTTPD_CONFIGFILE);
} }
// Add Defaults for Version 4 // Add Defaults for Version 4