- or download this
#!/usr/local/bin/perl
# this is the code for sever.pl, my mini-server
...
$msg_txt = "$msg_num $msgs{$msg_num}";
print "HTTP/1.0 $msg_txt\n";
}
- or download this
> more badreq.txt
GET /index.html HTTP/1.1
- or download this
> ./server.pl badreq2.txt
HTTP/1.0 400
HTTP/1.0 400 Bad Request