WebResponse Problem! Please help!
-
I've written a code that creates a receives the request, sent by the web browser(I use FireFox), and then it parses the request and set the headers of a WebRequest object and if it finds any information after the empty line, it writes the information in the WebRequest object, then I get a WebResponse object out of the WebRequest object and creates 2 byte arrays, then it reads the WebResponse stream and puts the data in the first byte array and then puts the Header information of the WebResponse in the second array using the ToByteArray method of the WebResponse's Header propety. Then I have tried to methods for sending data to the web browser: 1)I have sent the Header array first in a separated Send method and then the Data array in a separated Send method after that, that makes the browser report the "Done" status and shows nothing! 2)I have added the data to the end of the header and sent them az a single Send method, that makes the browser show the html and css and jscript information but it leaves the places of the pictures empty! Does anyone know, what should I do to fix this problem? Should I send the header just if the data is in html/text format? Or the Gip/Png/Jpg of Application data formats also need the header? If they need, how to make the browser show the images and flashes? Please help!:(
Sojaner!