CGI harness, anyone?
Randal L. Schwartz (merlyn@stonehenge.com)
02 Jan 2001 09:31:12 -0800
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!