develooper Front page | perl.libwww | Postings from January 2001

CGI harness, anyone?

From:
merlyn
Date:
January 2, 2001 09:31
Subject:
CGI harness, anyone?
Message ID:
m1pui5x3mn.fsf@halfdome.holdit.com

Has anyone done a CGI protocol module?  No, not CGI.pm.  The *server*
side of the protocol!

I can see three immediate uses for that:

1. adding it to HTTP::Daemon to make a real mini-CGI server
2. testing CGI programs without a webserver
3. calling one CGI program from another (a frequent misunderstood request)

and perhaps

4. one or two more columns!  (yes!)

The API should have lots of defaults... at a bare minimum, specifying
the form data, but also allowing to say whether we're simulating
GET/POST, how to deal with non-zero exits and STDERR, how to deal with
Location: headers, provide hooks for file uploads, etc etc.  Maybe it
should take a HTTP::Request as an input value, and return an
HTTP::Response (or would that be overkill?).  In fact, maybe it can be
a special subclass of LWP::UserAgent which recognizes a particular
server as being local, or a scheme type of "cgi:".

So, has anyone thought about this?  Tackled this?  Completed this?
Documented this?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About