![]() |
HTTP Requests, Responses - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: HTTP Requests, Responses (/showthread.php?tid=28285) |
HTTP Requests, Responses - El Forum - 03-07-2010 [eluser]Unknown[/eluser] Hi Im Working on an application that can preview packets be sent and received between a server and client but im having problems getting http request working in it. Because obviously this is made by simply creating a application that creates a Socket Server and Client and then just redirects packets between them how would i make it read the whole HTTP Response because you need to set how much data to read E.G: Code: stream.Read(bu, 0, 65000); I had an idea you could read the first so many characters then read the Content-Length data from that then re-read with the retrieved Content-Length, Is this the best way to do it or is there something im missing? I am only guessing this is the problem i need to fix what happens is some images from websites only gets 3/4 loaded and some websites are broken and HTML Tags become visible. So i think this is the problem because the original website content that is being loaded is bigging then 65000 characters which is to much to read with the above code. Thanks HTTP Requests, Responses - El Forum - 03-08-2010 [eluser]Unknown[/eluser] bump |