Networking Forums

Networking Forums > Computer Networking > Linux Networking > Help on extracting http header

Reply
Thread Tools Display Modes

Help on extracting http header

 
 
Sonny
Guest
Posts: n/a

 
      09-17-2007, 01:53 AM
Hi
I hope this is the right group for this, or would you point me to the
proper group for this. We are developing an application for allowing/
denying packets and billing. We are using libnetfilter_queue for the
allowing/denying part since we are altering the packets. The billing
depends on what page that was accessed (different sites/different
cost). Basically we already extracted the tcp, ip headers and http
packets using libnetfilter_queue. We need to parse the http headers
and put it in a struct for better analysis. However it is not that
simple as this page points out http://www.and.org/texts/server-http.
There are extra characters. Does someone know how to extract the http
headers, ie. host, accept, range, etc, efficiently. I mean, for
example, to extract the host, first get the keyword "Host: " and read/
save the characters after that. The question is until when will you
read, and what the valid characters should be there since there are
special characters. Thanks in advance!

 
Reply With Quote
 
 
 
 
Robert Harris
Guest
Posts: n/a

 
      09-17-2007, 07:07 AM
Sonny wrote:
> Hi
> I hope this is the right group for this, or would you point me to the
> proper group for this. We are developing an application for allowing/
> denying packets and billing. We are using libnetfilter_queue for the
> allowing/denying part since we are altering the packets. The billing
> depends on what page that was accessed (different sites/different
> cost). Basically we already extracted the tcp, ip headers and http
> packets using libnetfilter_queue. We need to parse the http headers
> and put it in a struct for better analysis. However it is not that
> simple as this page points out http://www.and.org/texts/server-http.
> There are extra characters. Does someone know how to extract the http
> headers, ie. host, accept, range, etc, efficiently. I mean, for
> example, to extract the host, first get the keyword "Host: " and read/
> save the characters after that. The question is until when will you
> read, and what the valid characters should be there since there are
> special characters. Thanks in advance!
>

The HTTP spec is

<http://www.ietf.org/rfc/rfc2616.txt>

Robert
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is a HTTP header a clear text? Sonny Linux Networking 17 10-25-2007 10:16 AM
CMAK extracting engine failed LoneWolf Windows Networking 0 01-28-2006 09:50 PM
linux cooked header to ethernet header conversion makwak Linux Networking 0 05-10-2005 12:36 PM
Looking for a specific HTTP Header fritz-bayer@web.de Linux Networking 5 01-07-2005 02:26 PM
extracting XID from RPX requests Jochen Witte Linux Networking 0 07-07-2004 10:25 AM



1 2 3 4 5 6 7 8 9 10 11