1
0
Fork 0
mirror of https://gitlab.com/niansa/simpsh-httpd.git synced 2025-03-06 20:53:36 +01:00

Add files via upload

This commit is contained in:
niansa 2017-03-09 12:48:01 +01:00 committed by GitHub
parent 8d915494f4
commit b9228a0105
2 changed files with 3 additions and 4 deletions

View file

@ -1,10 +1,9 @@
#! /bin/bash
# Lese den request
read $header
read header
# Verarbeite den request
URL="${header#GET }"
URL="${URL% HTTP/*}"
export FILE="$FILES$URL"
echo $URL

View file

@ -1,13 +1,13 @@
#! /bin/bash
# Blockiere Versuche, das restliche Dateisystem zu lesen
if [ "$URL" = "*..*" ]; then
if [[ "$URL" == *..* ]]; then
export URL='/'
export FILE="$FILES"
fi
# Verhindere "/"-bug
if [ -d "$FILE" -a "$FILE" != "*/" ]; then
if [ -d "$FILE" ]; then
newURL="$URL"'/'
export URL="$newURL"
newFILE="$FILE"'/'