mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 21:40:01 +08:00
Loop
This commit is contained in:
parent
13bb1b6b78
commit
945948b85b
@ -14,6 +14,11 @@ done
|
|||||||
|
|
||||||
# Serve the page
|
# Serve the page
|
||||||
HTML="<HTML><BODY><H1><CENTER>$2</CENTER></H1></BODY></HTML>"
|
HTML="<HTML><BODY><H1><CENTER>$2</CENTER></H1></BODY></HTML>"
|
||||||
RESPONSE="HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n$HTML\r\n"
|
LENGTH=$(echo "$HTML" | wc -c);
|
||||||
|
|
||||||
while true; do (echo -en "$RESPONSE") | timeout 1 nc -lp "${1:-8080}"; done
|
RESPONSE="HTTP/1.1 200 OK\nContent-Length: ${LENGTH}\nConnection: close\n\n$HTML"
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
echo -en "$RESPONSE" | timeout 1 nc -lp "${1:-8080}";
|
||||||
|
echo "loop"
|
||||||
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user