#!/usr/bin/perl -t use strict; use warnings; 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"); my $l = length($content); my $md5 = md5_hex($content); #HTTP/1.1 200 OK - das schickt doch der webserver eh print <<"EOM"; Allow: GET, POST Connection: close Content-Encoding: gzip Content-Length: $l Content-MD5: $md5 Content-Type: text/plain; charset=UTF-8 Date: $now Last-Modified: $now Server: Neu1/1.0 EOM print $content;