[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl-WebCGI] CGI vs ACGI: One more time up the stairs



Howdy:

   I'd like to revisit the CGI vs ACGI issue one more time.

   I think the problems with ACGI have been amply documented: giving a 
MacPerl CGI the .acgi filename suffix is telling a lie to your web 
server software that can get you into trouble.  Basically, you are 
promising to be able to service a second hit while a first is still 
running, which MacPerl cannot do.

   However, MPPE says:

"Unfortunately, most Mac OS web servers will wait for a CGI to finish 
running before responding to any other rrequest, whether for an HTML 
page, an image, or another CGI."

Using Quid Pro Quo, I find that not to be true.  However, I was just 
corresponding with a user who reported precisely this behavior with 
WebSTAR 4.2.  I'm wondering if this behavior is characteristic of the 
MacHTTP/WebSTAR lineage?  I'm wondering if any of you who are running 
Mac web servers, would be willing to test this behavior and report 
the results back to the group, along with the brand and version of 
web server?  A MacPerl CGI script that I have found useful for such a 
test is:

#!perl
#
# slow.cgi
# Last Modified 04/11/2000
# by David Steffen, steffen@biomedcomp.com
#
# a simple, slowly executing Perl CGI script

print "HTTP/1.0 200 OK\015\012";
print "Server: WebSTAR/1.2\015\012";
print "MIME-Version: 1.0\015\012";
print "Content-type: text/html\015\012\015\012";

print <<HTML;
<html><head><title>slow.cgi</title><head><body>
<h1>Sleeping...</h1>
<p>This thread sleeps for 10 seconds before finishing...
HTML

sleep 10;

print <<HTML;
<p>...all done!</p>
</pre></body></html>
HTML

__END__

-David Steffen-
David Steffen, Ph.D.
President, Biomedical Computing, Inc. <http://www.biomedcomp.com/>
Phone: (713) 610-9770 FAX: (713) 610-9769 E-mail: steffen@biomedcomp.com

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org