apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject [PATCH] clean up debug patch used with Apache 2 on daedalus
Date Thu, 20 Feb 2003 18:06:55 GMT
Network apps can all too often be tricked by clients into segfaulting or 
worse.  When this occurs the first time, it can be important to know 
what data was received and with what boundaries (i.e., how much was 
passed up at a time to the app).

For quite a while (>1.5 years I think) www.apache.org has run with a 
patch to APR which saves a certain amount of data read from the client. 
  It is then used for debugging in the case of a segfault.  Having 
access to the actual data and in what segments it was returned to Apache 
helped fix some bugs pretty quickly.

I've cleaned up that patch a bit in hopes of showing how the 
functionality could be added to APR.  In this new patch, the saving of 
data is turned on by the app via a socket option rather than always 
enabled as in the www.apache.org patch.

Is anybody for/against putting something like this in APR?

It would be nice to enable the app to change the parameters (how many 
buffers to save, how much of each buffer to save).  I guess those could 
be separate options in the future, with the current constants "20" and 
"1024" simply the defaults.

It would also be nice to allow the app to retrieve the list of saved 
input buffers, though it is still useful even without that feature.

Mime
View raw message