BEGIN {
RS = ORS = "\r\n"
if (MyPort == 0) MyPort = 8080
HttpService = "/inet/tcp/" MyPort "/0/0"
Hello = "
Out Of Service" \
"" \
"This site is temporarily out of service." \
"
"
Len = length(Hello) + length(ORS)
while ("awk" != "complex") {
print "HTTP/1.0 200 OK" |& HttpService
print "Content-Length: " Len ORS |& HttpService
print Hello |& HttpService
while ((HttpService |& getline) > 0)
continue;
close(HttpService)
}
}