Re: CGI help
- Posted by GeorgeWalters Jul 28, 2009
- 1955 views
[http://jeremy.cowgar.com/svn/webclay/trunk/webclay/cgi.e contains a function that takes either a QUERY_STRING or POST_DATA read from std in and returns a map of the values, automatically converting any escaped characters to their real (programmer usable) values. That function "process_data", the last function in the file. You can use it directly or just take bits and parts from it you need.
Jeremy
[/quote]
Jeremy, I ran across a small bug in your "process_data". If the 1st time it's called and 'data' is an atom, your routine will crash since 'the_map' has no value.
function processData(object data) atom i, char object tmp sequence charbuf, fieldbuf, fname,the_map fname="" if atom(data) then return the_map end if
George
BTW thanks for the routine. It works nicely.