Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users

Read HTTP header and body

 

 

Apache users RSS feed   Index | Next | Previous | View Threaded


evgeny at inovvia

Apr 5, 2012, 3:01 AM

Post #1 of 2 (180 views)
Permalink
Read HTTP header and body

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


rumble at cord

Apr 5, 2012, 7:19 AM

Post #2 of 2 (172 views)
Permalink
Re: Read HTTP header and body [In reply to]

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.

Apache users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.