start | find | index | login or register | edit
Sonntag, 7. Mai 2006 link aYago

Maybe you saw the "we'll be back soon!" page yesterday? Well, here's the script that was actually serving the page:

response: rejoin [
"HTTP/1.0 503 Service Unavailable" crlf
"Content-type: text/plain" crlf
crlf
"server down for maintenance, we'll be back soon! "
"[503 service unavailable]" crlf
]

s: open/binary/direct tcp://:80
forever [
attempt [wait s c: first s insert c response close c prin "."]
]

don't you love the simplicity of HTTP, REBOL? over 10k requests served.


gpoul 6535 days ago:
well... doesn't an HTTP server usually wait for a request before sending a response? - If I remember correctly the script yesterday didn't, and just sent a response. :-)

earl 6534 days ago:
yep. as you can see above, the script really doesn't read the request at all ;) and i think that may even be compliant with http 1.0, but it's not that i'd really care :)

Please log in (you may want to register first) to post comments!

powered by vanilla
echo earlZstrainYat|tr ZY @.
earl.strain.at • esa3 • online for 8425 days • c'est un vanilla site