WebResponse problem!ٌ
-
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!
-
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!
-
Thats the help you supply? I'm sure you helped him very much.
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
-
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!
The response that you send back to the browser already has a header. If you want the header from the request that you got, you have to replace the current header, or extract the information from your header and add to the current header. When the browser displays the page, all the addresses of the images are wrong, as the address of the page is not the same as the address where you fetched the page. If you want the browser to find the images, you have to parse the page to find the image tags, and put adjusted or absolute URLs in them. Any other external files that the page might use also has to be corrected, like CSS, Javascript, Flash files, et.c.
--- b { font-weight: normal; }
-
The response that you send back to the browser already has a header. If you want the header from the request that you got, you have to replace the current header, or extract the information from your header and add to the current header. When the browser displays the page, all the addresses of the images are wrong, as the address of the page is not the same as the address where you fetched the page. If you want the browser to find the images, you have to parse the page to find the image tags, and put adjusted or absolute URLs in them. Any other external files that the page might use also has to be corrected, like CSS, Javascript, Flash files, et.c.
--- b { font-weight: normal; }
But the page shows the tables and other elements using the styles from the css files, I have even saved the page after loading it, and found out that the css files and even the small images are loaded, the only problem is with the bigger files. In fact I want to write 2 programs the are client and server, the server is on my website host and the client on is on my pc and I want these 2 to do the "Tunneling Job" for me! I want the server to fetch the response of the web resources and send them to my PC hidden from my ISP! If you know how to write a set of client and server programs can do the Tunneling task, please guide my through this! I really need to do this!:(
Sojaner!