Eric S. Johansson
Fri, 30 Dec 2005 17:39:38 -0800
Alvaro Lopez Ortega wrote:
Eric S. Johansson wrote: > need to find another option for python cgi. I still think an > compile time optional sniffer function would be a solution What do you want to sniff? Maybe a couple of TRACE() entries inside the handler_cgi.c file would be enough.. :-)
a very primitive (i.e. still banging rocks together) version is this shell script.
#!/bin/bash python ak404.py 2>/tmp/cgierror 1>/tmp/cgiout cat /tmp/cgioutwhat I think I would like is something where I can tell the CGI handler how to direct the standard error, standard out responses from a CGI program to a log file (syslog is nice) with some additional information such as a unique invocation identifier and environment at the start of every invocation.
the unique invocation identifier is really important because that will let you untangle the output from multiple invocations.
now this is something that could go into the standard CGI handler because, quite frankly doing a conditional statement around the syslog call is orders of magnitude faster than an exec.
I would try to put this in myself but I haven't quite figured out how the handlers work with regards to command parsing and internal data structures.
as I've said before, it is no crime to not optimize a failure path. or maybe I should say it's a crime to optimize a failure :-).
---ericPS, I was looking at the output of the debugging what I was reminded that CGI programs do emit content-type and I can do my own files before rendered pages handling albeit somewhat inefficiently. Too bad there wasn't a special mime type like
x-return-for-me: /var/www/html/xyzzy.ico and have the server invoke the appropriate delivery mechanism for that file. someday. _______________________________________________ Cherokee mailing list Cherokee@lists.alobbs.com http://www.alobbs.com/cgi-bin/mailman/listinfo/cherokee