shotgunefx has asked for the wisdom of the Perl Monks concerning the following question:
The result is that the calling server will get the message "GO AWAY"#!/usr/bin/perl # @@@ THIS DOESN'T WORK @@@ require 5.001; $|=1; my $query = new CGI; open (OLDOUT, ">&STDOUT") or die "Couldn't dupe STDOUT!\n"; print $query->header(-status=>'200 OK'),"\n"; close(STDOUT); open (STDOUT,">&OLDOUT") or die "Couldn't restore STDOUT!\n"; close(OLDOUT); sleep(20); print "GO AWAY!;
The calling server will terminate immediatelly after the 200 OK.#!/usr/bin/perl # @@@ THIS DOES @@@ require 5.001; $|=1; my $query = new CGI; print $query->header(-status=>'200 OK'),"\n"; close(STDOUT); sleep(20); print "GO AWAY!;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: RE: CGI Forcing client disconnect
by cLive ;-) (Prior) on May 15, 2001 at 03:48 UTC | |
by shotgunefx (Parson) on May 15, 2001 at 04:07 UTC | |
by cLive ;-) (Prior) on May 15, 2001 at 04:14 UTC | |
by shotgunefx (Parson) on May 15, 2001 at 04:32 UTC |