diff --git a/config.sh b/config.sh index f148e8a..f6665fd 100755 --- a/config.sh +++ b/config.sh @@ -9,9 +9,6 @@ FILES="/var/www/html/" # The finished Document will saved here. ${OUTFILEID} must be included! OUTFILE="/tmp/simpsh-html.${OUTFILEID}.html" -# This Content-Type send the Server, if the requested File isn't a folder or phpfile -DEFAULTCONTENTTYPE="text/html" - # This port will used for listening PORT=8888 diff --git a/cport/config.c b/cport/config.c index b26fe6b..2fae7dd 100644 --- a/cport/config.c +++ b/cport/config.c @@ -2,9 +2,7 @@ struct databuffer SUUSER; struct databuffer FILES; struct databuffer HTMLTITLE; struct databuffer OUTFILE; -struct databuffer DEFAULTCONTENTTYPE; uint PORT; -struct databuffer WEBSITE; bool ENABLE_PHP; bool ENABLE_MARKDOWN; struct databuffer ERROR404; @@ -19,9 +17,6 @@ void config() { // Here is the webroot (homefolder for the website) FILES = auto_db("/var/www/html/"); - // This Content-Type send the Server, if the requested File isn't a folder or phpfile - DEFAULTCONTENTTYPE = auto_db("text/html"); - // This port will used for listening PORT = 8888; diff --git a/cport/urlcheck.c b/cport/urlcheck.c index 4c7a280..ab383a8 100644 --- a/cport/urlcheck.c +++ b/cport/urlcheck.c @@ -19,7 +19,8 @@ void urlcheck() { //db_append(&status, &WEBSITE); db_append(&status, &url); db_append(&status, &thisdb); - db_set(&contenttype, &DEFAULTCONTENTTYPE); + thisdb = auto_db("text/html"); + db_set(&contenttype, &thisdb); httpheaders(); done = true; } diff --git a/urlcheck.sh b/urlcheck.sh index fd3812d..750e301 100755 --- a/urlcheck.sh +++ b/urlcheck.sh @@ -11,7 +11,7 @@ if [ -d "$FILE" ]; then if [[ "$URL" != */ ]]; then STATUS='HTTP/1.0 302 Moved permanently Location: '"$URL"'/' - CONTENTTYPE="$DEFAULTCONTENTTYPE" + CONTENTTYPE="text/html" . ./httpheaders.sh DONE=true fi