Welcome Guest, Not a member yet? Register   Sign In
HTTP Requests, Responses
#1

[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
#2

[eluser]Unknown[/eluser]
bump




Theme © iAndrew 2016 - Forum software by © MyBB