Joshua Slive wrote:
On 10/3/07, Eric S. Johansson <esj@xxxxxxxxxx> wrote:are there any tools/techniques for snooping on the data sent to and from a cgi program? I'm thinking something like wireshark for webservers.I think you should be more specific about what you are trying to accomplish. You can try the ScriptLog directive, but really the info sent to and from CGI scripts is almost identical to the info sent to and from the http server itself. There is only a little header manipulation and some environment variables set.
What I'm specifically trying to accomplish is what I said. I want to be able to snoop on the data stream to and from a CGI program. What's driving me in this direction is that I occasionally get errors in the output of the CGI in which causes the Web server to throw up a 500 message and put totally useless debug information into the error log. If I can look at the stream, I can usually determine the source of the problem and a fix much more quickly than I can with any other technique. For example, right now I have an errant print statement somewhere in my code. I'm having to go through all the print statements listed and tried to determine which one is the message getting in the way. If I can look at the Stream, I would be able to find the text Apache strips out before dumping to the error log and home in on the message location.
So, unless you have a different suggestion, I believe some method of looking at the data streams to and from the CGI would be what I need.
---eric --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx