From d996147dbd3f72b3dcac57778b4de96ae5a106af Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Tue, 5 Sep 2017 00:04:15 +0200 Subject: [PATCH] - nhttpd: enable mod_sendfile.sendAll by default Signed-off-by: Thilo Graf --- src/nhttpd/yconfig.h | 2 +- src/nhttpd/yhttpd.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nhttpd/yconfig.h b/src/nhttpd/yconfig.h index b06d6e385..cfdfdb36c 100644 --- a/src/nhttpd/yconfig.h +++ b/src/nhttpd/yconfig.h @@ -100,7 +100,7 @@ #define CACHE_DIR "/tmp/.cache" #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_ALL "false" +#define HTTPD_SENDFILE_ALL "true" #define HTTPD_LANGUAGEDIR "languages" #define HTTPD_DEFAULT_LANGUAGE "English" #define AUTHUSER "root" diff --git a/src/nhttpd/yhttpd.cpp b/src/nhttpd/yhttpd.cpp index 72698d9ed..df6dce944 100644 --- a/src/nhttpd/yhttpd.cpp +++ b/src/nhttpd/yhttpd.cpp @@ -503,7 +503,7 @@ void Cyhttpd::ReadConfig(void) { if (Config->getInt32("configfile.version") < 2) { Config->setString("mod_sendfile.mime_types", HTTPD_SENDFILE_EXT); Config->setInt32("configfile.version", CONF_VERSION); - Config->setString("mod_sendfile.sendAll", "false"); + Config->setString("mod_sendfile.sendAll", HTTPD_SENDFILE_ALL); Config->saveConfig(HTTPD_CONFIGFILE); } // Add Defaults for Version 4