Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: Alternative to CGI.pm

by faraco (Acolyte)
on Apr 04, 2017 at 10:32 UTC ( [id://1186976]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Alternative to CGI.pm
in thread Alternative to CGI.pm

That sounds amazing! Any chance the codebase still lurking around somewhere?

Do you know how raccoons can be so slick at surviving?

Replies are listed 'Best First'.
Re^4: Alternative to CGI.pm
by RonW (Parson) on Apr 05, 2017 at 23:06 UTC

    Maybe. The USB "stick" that had the back up copy is long lost, though the PC it ran is still gathering dust. Hasn't been powered for over 10 years, so I have no idea if the hard disk or any of it will function any more.

    The C program was a basic TCP server with a while loop to accept a connection, fork, read the HTTP header line-by-line, slurp the content (Perl equiv: sysread($connection, $buffer, $contentlength)), use strchr(buffer, '\r') to break the content (which was assumed to be "application/x-www-form-urlencoded") into "key=value" pairs and build an array of pointers (the HTTP headers were also included in the array). Then it would execle(awkint, awkint, awkscript, NULL, array).

    The AWK script would then access the HTTP and form fields as environment variables, doing url-decode as needed, process the request and generate the response, including the HTTP headers, streaming it out STDOUT.

    This wasn't hard, just very tedious. My co-workers dubbed me "The Wizard of AWK".

    Then I "discovered" Perl.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1186976]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2024-03-28 12:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found