
rumble at cord
Apr 5, 2012, 7:19 AM
Post #2 of 2
(105 views)
Permalink
|
On 05-04-2012 12:01, Evgeny Shvidky wrote: > > Hello, > > I am implementing on "C" a new module in Apache HTTP server. > > I succeeded to receive an appropriate HTTP request by my module handler. > > How can I read a full HTTP header (not only the first line) and a body > (if exists) of received HTTP request? > > Thanks, > > Evgeny > Assuming you just want to flip through the various headers and read the request body, and not literally save the exact image of a request, you can do so with a few "simple" functions. If you, however, want an exact duplicate of the request, you're better off looking at modules like mod_logio (or dumpio), that use filters to get the exact request and body. Now, as I was saying, I have some snippets of code for an ongoing project (an introduction to developing modules for Apache 2.4), that you may find useful. The direct link is http://www.humbedooh.com/apache/modguide.html.en#snippets and you should just forget everything else in that document, as it's purely a work in progress (you should probably burn this email after reading as well..!) With regards, Daniel.
|