in reply to Client Pull Not Working correctly

Try this
#!/usr/bin/perl -- use CGI qw(:standard); $| = 1; if (my $pid = fork) { #parent does print header(), q~ <HTML> <HEAD> <META HTTP-EQUIV="Refresh" CONTENT="3; URL=/cgi_data/page1.html"> <TITLE>New Site notification</TITLE> </HEAD> <BODY>My homepage has moved to a new location. I am here</BODY></HTML> ~; } elsif (defined $pid) { #child does close STDOUT; #tell apache no more output sleep 30; } else { die "Cannot fork: $!"; } exit 0;

Replies are listed 'Best First'.
Re^2: Client Pull Not Working correctly
by Anonymous Monk on Aug 24, 2007 at 16:32 UTC
    From this example and from the link of the first response above, I guess all I need is to insert the

    close STDOUT;

    in the child process after I print the html page but it does not seem to do the trick. Your example does not work either. The page is still hanging 30 seconds before it gets redirected to page1.html for some reason. I have the example at

    http://129.107.52.101/cgi-bin/testpull.cgi