mirror of
https://gitlab.com/niansa/simpsh-httpd.git
synced 2025-03-06 20:53:36 +01:00
Set CONTENTTYPE in sendfile.sh just once
This commit is contained in:
parent
3b4e1e6701
commit
cb40468346
1 changed files with 2 additions and 3 deletions
|
@ -1,13 +1,13 @@
|
|||
#! /bin/bash
|
||||
|
||||
# TODO: Create a Plugin system
|
||||
CONTENTTYPE="text/html"
|
||||
|
||||
# Check: Is it a Directory, a PHP script or something else?
|
||||
if [[ "$FILE" == *.php ]] && [ "$(which php)" != "" ] && [ "$ENABLE_PHP" = "true" ]; then
|
||||
CONTENTTYPE="text/html"
|
||||
. ./httpheaders.sh
|
||||
php "$FILE" >> $OUTFILE
|
||||
elif [[ "$FILE" == *.md ]] && [ "$(which pandoc)" != "" ] && [ "$ENABLE_MARKDOWN" = "true" ]; then
|
||||
CONTENTTYPE="text/html"
|
||||
. ./httpheaders.sh
|
||||
pandoc -f markdown_github "$FILE" >> $OUTFILE
|
||||
elif [ -f "${FILE}" ]; then
|
||||
|
@ -15,7 +15,6 @@ elif [ -f "${FILE}" ]; then
|
|||
. ./httpheaders.sh
|
||||
cat "${FILE}" >> ${OUTFILE}
|
||||
else
|
||||
CONTENTTYPE="text/html"
|
||||
. ./httpheaders.sh
|
||||
. ./filelist.sh
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue