#!/usr/bin/perl -wt use Compress::Zlib; use Digest::MD5 qw(md5_hex); my $now = "Tue, 15 Jul 2008 12:06:38 GMT"; my $content = 'testtesttesttesttesttesttesttesttesttest'; $content = &Compress::Zlib::memGzip("$content"); print("HTTP/1.1 200 OK\n"); print("Allow", ": ", "GET, POST", "\n"); print("Connection", ": ", "close", "\n"); print("Content-Encoding", ": ", "gzip", "\n"); print("Content-Length", ": ", length($content), "\n"); print("Content-MD5", ": ", &md5_hex($content), "\n"); print("Content-Type", ": ", "text/plain", "; ", "charset=UTF-8", "\n"); print("Date", ": ", "$now", "\n"); print("Last-Modified", ": ", "$now", "\n"); print("Server", ": ", "Neu1/1.0", "\n"); print("\n"); print("$content");