Code Comments
Programming Forum and web based access to our favorite programming groups.I have a TCPListener which listens for traffic on a specific port. When a request is made to the socket from a Web Browser I get the usuall HTTP Headers you would expect, whats the best way to parse out those HTTP Headers so I can get the GET and POST information. Is there a class within C# that helps out with this? Or does someone have some code out there I can use. Thanks a lot.
Post Follow-up to this messageUse split, but first check your line delimiter to figure out what to pass to split. Check CR/LF first for Windows, then Check for LF for Unix then check for CR. I came across a system that uses CR but I forgot which one that was. If a POST then check for a double delimiter cause that's what seperates your HTTP Headers from your POST data. You may want to read up on the HTTP Protocol as well. :) <gingerninja1@gmail.com> wrote in message news:1113411346.103190.269010@l41g2000cwc.googlegroups.com... >I have a TCPListener which listens for traffic on a specific port. When > a request is made to the socket from a Web Browser I get the usuall > HTTP Headers you would expect, whats the best way to parse out those > HTTP Headers so I can get the GET and POST information. Is there a > class within C# that helps out with this? Or does someone have some > code out there I can use. > > Thanks a lot. > >
Post Follow-up to this messageUse split, but first check your line delimiter to figure out what to pass to split. Check CR/LF first for Windows, then Check for LF for Unix then check for CR. I came across a system that uses CR but I forgot which one that was. If a POST then check for a double delimiter cause that's what seperates your HTTP Headers from your POST data. You may want to read up on the HTTP Protocol as well. :) <gingerninja1@gmail.com> wrote in message news:1113411346.103190.269010@l41g2000cwc.googlegroups.com... >I have a TCPListener which listens for traffic on a specific port. When > a request is made to the socket from a Web Browser I get the usuall > HTTP Headers you would expect, whats the best way to parse out those > HTTP Headers so I can get the GET and POST information. Is there a > class within C# that helps out with this? Or does someone have some > code out there I can use. > > Thanks a lot. > >
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.