> Can all this be done in an Apache module? Yes, just about anything can be done in an Apache module. Based on your other questions, it sounds like you need a thorough exposition of the Apache API and probably the HTTP protocol, so I'd suggets your next step is to study some good documentation, such as the Apache Modules book.
> 1) What is the "recommended" way to carry the > GET/POST request identifier (inserted by the > developer of the web page) from the client > to Apache? You're not going to get the browser to send a custom header by any changes you make to the page, except possibly using Ajax. Javascript isn't enabled on all browsers, so that's out for a public web site. Cookies also are often turned off, so that's out, if it's a public site. That leaves the QUERY_STRING, mainly. (What you're calling GET variables). We have another way that's better for many sites, but there are patent issues with that method. (My company is seeking a patent.) Using the query string means rewriting the content of each page, so one could do what PHP does and use cookies if they are available, then failover to query string if cookies are not sent by the browser. -- Ray B. Morris [EMAIL PROTECTED] Strongbox - The next generation in site security: http://www.bettercgi.com/strongbox/ Throttlebox - Intelligent Bandwidth Control http://www.bettercgi.com/throttlebox/ Strongbox / Throttlebox affiliate program: http://www.bettercgi.com/affiliates/user/register.php On 09/04/2008 10:11:39 PM, Andrej van der Zee wrote: > Hi, > > I am about to modify Apache with some custom logging for GET/POST > requests (and more). It is for the purpose of research. If possible, > I > would like to get some guidance in how to implement my ideas. I will > explain... > > Every GET/POST request to Apache will carry a request identifier. > Adding the identifier to the request is the responsibility of the > developer of the web page. In Apache (NOT the CGI application) I > would like to extract the identifier from the request and write it to > a log together with timestamp, request serve time and some specific > information about the thread/process that handles the request. The > CGI > application serving the request should be untouched! I have two > issues > I would like to get some comments about, if possible: > > 1) What is the "recommended" way to carry the GET/POST request > identifier (inserted by the developer of the web page) from the > client > to Apache? Add a custom HTTP header? Or should I do it in GET/POST > variables? Any other alternatives? > 2) I do need to "attach" to the thread/process handling the request > to > extract information just after starting and just before ending. Can I > do this in an Apache module? I found the ap_hook_child_init() > function > but no similar exit()-function. Moreover, I need to access the > request > identifier and log to a file. Can all this be done in an Apache > module? > > Hope you can help! > > Cheers, > Andrej > > -- > Andrej van der Zee > 2-40-19 Koenji-minami > Suginami-ku, Tokyo > 166-0003 JAPAN > Mobile: 0031-(0)80-65251092 > Phone/Fax: 0031-(0)3-3318-3155 >
