Help on extracting http header

This is a discussion on Help on extracting http header within the Linux Networking forums, part of the Linux Forums category; Hi I hope this is the right group for this, or would you point me to the proper group for ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-17-2007
Sonny
 
Posts: n/a
Default Help on extracting http header

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
  #2 (permalink)  
Old 09-17-2007
Robert Harris
 
Posts: n/a
Default Re: Help on extracting http header

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 Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:39 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0