Re: [ADVANCED-DOTNET] Web Proxy and Images C#

2008-08-21 Thread John Warner
ADVANCED-DOTNET@DISCUSS.DEVELOP.COM > Subject: Re: [ADVANCED-DOTNET] Web Proxy and Images C# > Importance: Low > > > Hmm this could be the start of a replacement for a .NET > replacement for IE > > John Warner > > > > > > -Original Message- > &g

Re: [ADVANCED-DOTNET] Web Proxy and Images C#

2008-08-21 Thread John Warner
o: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM > Subject: Re: [ADVANCED-DOTNET] Web Proxy and Images C# > > > Just a slight update. I got rid of the code that I produced > earlier and trying another route. I realize what I posted was > pretty basic. It worked fine for getting the html code, but > f

Re: [ADVANCED-DOTNET] Web Proxy and Images C#

2008-08-21 Thread Steve Welborn
Just a slight update. I got rid of the code that I produced earlier and trying another route. I realize what I posted was pretty basic. It worked fine for getting the html code, but figuring out that this is not the proper way of doing it, or at least not the best way of doing it. So disregard m

Re: [ADVANCED-DOTNET] Web Proxy and Images C#

2008-08-21 Thread Steve Welborn
To give you a better understanding, this is my method I am using in the webService to return the raw data. It's really basic WebRequest Functionality. Mind you it might not be formatted nicely since I am using yahoo, but im sure it will still be readable. private string GetPage(string strURL)

Re: [ADVANCED-DOTNET] Web Proxy and Images C#

2008-08-21 Thread Peter Ritchie
The data can be in any format. "String format" is vague. Is that ASCII, Unicode, etc? HTTP, I believe, specifies that the header text must use ASCII codepoints. The "content" can be anything--specified by the Content- type header. === This list is hosted by Deve

Re: [ADVANCED-DOTNET] Web Proxy and Images C#

2008-08-21 Thread Steve Welborn
Not a problem John, I will definitely post what I find out. Might be later this afternoon, so stay tuned. Steve Steve when you get done kinda post back about this if you don't mind. I'd sort of like to see what you have when done. Thi

Re: [ADVANCED-DOTNET] Web Proxy and Images C#

2008-08-21 Thread John Warner
sion of advanced .NET topics. > [mailto:[EMAIL PROTECTED] On Behalf Of > Steve Welborn > Sent: Thursday, August 21, 2008 12:11 PM > To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM > Subject: Re: [ADVANCED-DOTNET] Web Proxy and Images C# > > > Ok, I just seen your last post. I will c

Re: [ADVANCED-DOTNET] Web Proxy and Images C#

2008-08-21 Thread Steve Welborn
Ok, I just seen your last post. I will create my header then with the raw text returned by my ws. thanks for all the help Peter, shear genius. Steve === This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) a

Re: [ADVANCED-DOTNET] Web Proxy and Images C#

2008-08-21 Thread Steve Welborn
Ok, I understand what you're saying. So one more question and I'll get to coding..when you say the server just send it back as raw data wrapped with an http response header - is that raw data in string format..hmm, could of just answered my own question. thanks for the wireshark idea, i just in

Re: [ADVANCED-DOTNET] Web Proxy and Images C#

2008-08-21 Thread Peter Ritchie
The Content-type header in the response tells you what type of data is after the header. For an image it should be MIME type "image/gif". === This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://disc

Re: [ADVANCED-DOTNET] Web Proxy and Images C#

2008-08-21 Thread Peter Ritchie
By the way, you can watch the raw data going back and forth with free tools like WireShark. === This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com

Re: [ADVANCED-DOTNET] Web Proxy and Images C#

2008-08-21 Thread Peter Ritchie
The browser itself just requests a specific resource (an image file, in this case). The server just sends it back as raw data wrapped with an HTTP response header. You *could* do that sort of thing with a custom browser and server (i.e. encode image data in a specific way, like uuencode; but, I k

Re: [ADVANCED-DOTNET] Web Proxy and Images C#

2008-08-21 Thread John Warner
to:[EMAIL PROTECTED] On Behalf Of > Peter Ritchie > Sent: Thursday, August 21, 2008 11:40 AM > To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM > Subject: Re: [ADVANCED-DOTNET] Web Proxy and Images C# > > > The browser may be caching the image... > > I would expect that a proxy wou

Re: [ADVANCED-DOTNET] Web Proxy and Images C#

2008-08-21 Thread Steve Welborn
This application is just a proof of concept and just passing time while I wait for my project to begin. So no real purpose, at least for now but could come in handy in the near future. The proxy that the web browser is going through is an app that I made, basically a tcp listener on port 8889.

Re: [ADVANCED-DOTNET] Web Proxy and Images C#

2008-08-21 Thread Peter Ritchie
The browser may be caching the image... I would expect that a proxy would simply send back byte[]. Unless it's some sort of smart proxy, it should only know that data is going through it, not what type the data is. It could detect the type of the request and send data back in a specific way...

Re: [ADVANCED-DOTNET] Web Proxy and Images C#

2008-08-21 Thread Steve Welborn
Peter, I have an additional question. I see that it did make several calls but none of them were for the image, just style sheets and such. What I was wondering, and what I noticed, is that I only return a string which would be the raw html page. Would my webservice have to look for an image re

Re: [ADVANCED-DOTNET] Web Proxy and Images C#

2008-08-21 Thread Steve Welborn
Ok, thanks for the quick reply Peter, I'll do some more testing today and see what gives. Steve --- The image is a separate request. The browser requests a specific URL. If it's HTML, then it parses it and displays it. As it encounters

Re: [ADVANCED-DOTNET] Web Proxy and Images C#

2008-08-21 Thread Peter Ritchie
The image is a separate request. The browser requests a specific URL. If it's HTML, then it parses it and displays it. As it encounters referenced URLs, like http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com

Re: [ADVANCED-DOTNET] Web Proxy and Images C#

2008-08-21 Thread Steve Welborn
No I'm not getting a seperate request, I'll try it again today and see if it does, I just got in office. Im wondering if I have to parse the HTML and set any link to actually go to my proxy instead of the normal address. Thing is here at work they have their own proxy, so my local proxy has to g

Re: [ADVANCED-DOTNET] Web Proxy and Images C#

2008-08-21 Thread Peter Ritchie
Unless I've misunderstood your use of "proxy", your proxy should be getting the request to download the image after the request to download the HTML. It's not getting that? === This list is hosted by DevelopMentor® http://www.develop.com View archives and manage

[ADVANCED-DOTNET] Web Proxy and Images C#

2008-08-21 Thread Steve Welborn
I created a proxy application that sits locally, and a web service that communicates with my local proxy. I pass in a website and it passes back the raw data, pretty basic. What I can't figure out how to do is get the images back as well for the page. Take google for example, the page comes bac