Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Homework

Name: Anonymous 2010-02-09 16:16

Write a small HTTP server that upon receiving a GET request, responds with Sussman. Other /prog/ related responses may be added at your discretion.

Name: Anonymous 2010-02-09 20:07

#!/usr/bin/perl
use IO::Socket;
$s = IO::Socket::INET->new(LocalAddr => 'localhost:7764', Listen => 1);
while ($c = $s->accept()) {
    print $c "HTTP/1.0 200 OK\r\n";
    print $c "Content-type: text/html\r\n\r\n";
    print $c '<html><head></head><body><b>Sussman</b></body></html>';
    close($c);
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List