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

CGI harness, anyone?

January 2, 2001 09:31
CGI harness, anyone?
Message ID:

Has anyone done a CGI protocol module?  No, not  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
<> <URL:>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See for onsite and open-enrollment Perl training! Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About