1
0
Fork 0
mirror of https://gitlab.com/niansa/simpsh-httpd.git synced 2025-03-06 20:53:36 +01:00
simpsh-httpd/readrequest.sh
2020-08-02 22:24:46 +02:00

11 lines
194 B
Bash
Executable file

#! /bin/bash
# Read the request
read header
# Process the request
URL="${header#GET }"
URL="${URL% HTTP/*}"
FILE="$FILES$URL"
DECODED_FILE=$(printf '%b' "${FILE//%/\\x}")
FILE="$DECODED_FILE"