This project is read-only.

Some fields of HTTP Header

Feb 24, 2012 at 1:43 PM

Hi everyone, I'm new here and I want to thank you for your work, I just found pcap.NETI'm working on a project that handles HTTP connections. And I want to write the fields "Host", "Referer" and "User agent" of an HTTP request to a file. How can I do,  I got stuck with that  for a while. I have not figured out how to gain access to these fields. Need some  help please.

Feb 25, 2012 at 11:31 AM

Hi Tenin,

 

Try:

HttpField hostField = packet.Ethernet.IpV4.Tcp.Http.Header["Host"];

 

I hope this helps,

 

Boaz.

Feb 27, 2012 at 8:09 AM

Morning,

Thanks for your help, it's working due to this http://pcapdotnet.codeplex.com/discussions/252497 and some C# strings manipulation.