This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
средства_программирования_shell [2022/06/30 14:25] val [Web сервер на shell] |
средства_программирования_shell [2022/06/30 15:11] val [Web сервер на shell] |
||
---|---|---|---|
Line 402: | Line 402: | ||
if [ -e "$filename" ] | if [ -e "$filename" ] | ||
then | then | ||
- | echo `date` OK $filename >> $log | + | echo `date` OK $url >> $log |
echo -e "HTTP/1.1 200 OK\r" | echo -e "HTTP/1.1 200 OK\r" | ||
echo -e "Content-Type: `/usr/bin/file -bi \"$filename\"`\r" | echo -e "Content-Type: `/usr/bin/file -bi \"$filename\"`\r" | ||
Line 408: | Line 408: | ||
/bin/cat "$filename" | /bin/cat "$filename" | ||
else | else | ||
- | echo `date` ERR $filename >> $log | + | echo `date` ERR $url >> $log |
echo -e "HTTP/1.1 404 Not Found\r" | echo -e "HTTP/1.1 404 Not Found\r" | ||
echo -e "Content-Type: text/html;\r" | echo -e "Content-Type: text/html;\r" |