httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] Re: snooping on cgi data
Date Thu, 04 Oct 2007 15:17:47 GMT
On 10/4/07, Eric S. Johansson <esj@harvee.org> wrote:
> Joshua Slive wrote:
> > On 10/3/07, Eric S. Johansson <esj@harvee.org> 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.

As I said, there is the ScriptLog.

But if you're getting usage stuff in the error log with 500 messages,
it's because your cgi script is writing useless debugging info to
stderr.

Also, what "data stream" is going to and from the CGI depends on the
specifics of how you are using the interface. In the basic case of
GET, most data is passed in environment variables, so there is no
"stream" as such.

Joshua.

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message