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
2018-07-03 16:25:42 +00:00

11 lines
194 B
Bash

#! /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"