Hi folks,
I�ve got some problems here with an example taken from my personal
Perl-Bible (by M. Schilli) and I dont know what the problem is:
package ServerPush;
use CGI qw/:standard/;
use Postgres;
sub new {
my ($class, $sep) = shift;
my $self = {};
$sep = "TeilTrenner";
$self->{seperator} = $sep;
$self->{header_sent} = 0; # Erster Header gesendet?
$| = 1; # Ausgabe entpuffern
bless($self, $class);
}
sub server_push {
my ($self, $content, $terminate) = @_;
if(!$self->{header_sent}) {
print header('-nph' => 1, '-type' =>
"multipart/x-mixed-replace;boundary=$self->{seperator}");
print "\n--$self->{seperator}\n";
$self->{header_sent} = 1;
}
print header(), "$content\n";
print "\n--$self->{seperator}", defined $terminate ? "--" : "",
"\n";
}
The only thing that happens correctly is the repost of this page;
somehow there is a problem with the headers, because the
multipart-header is displayed. I tried to solve this by starting the
pager with a $cgi->header(); and it worked, but only for the main
header; the other multipart headers are displayed again....
thanks for any kind of help
regards
-Sebastian-
--
--- Achtung, die Tel.-Nr. haben sich ge�ndert ---
Sebastian Ahrens
Ruhr-Universitaet Bochum
Dez. 2 - BIF
D-44780 Bochum
Tel.: 0234/322-6182
Mobil: 0170/2865291
Fax : 0234/3214-684
EMail: [EMAIL PROTECTED]
WWW: http://www.ruhr-uni-bochum.de/rub-bif