Archived

This topic is now archived and is closed to further replies.

Draigan

Sending Files

Recommended Posts

I''m trying to make a simple proxy server that can shuffle data back and forth from a site to internet explorer. Currently when I get a request from IE, I simply send back a default html file. The file seems to come up in IE okay but the IE Icon in the upper right (the world/ms logo) keeps spinning indicating that it''s still waiting for more data. How do I let IE know that I''m finished sending stuff to it? Do I simply close the connection and when it requests more, create another socket for it? I think there must be some way to tell it that I''m finished sending it data without closing the connection. Anyone have any ideas?

Share this post


Link to post
Share on other sites
Yes, you close the connection. That''s how HTTP works. There''s also a field in the HTTP header which specifies the size of the data you''re sending, but you still need to close the connection at the end.

If I had my way, I''d have all of you shot!


codeka.com - Just click it.

Share this post


Link to post
Share on other sites
Yeah, that''s what I figured. What had me baffled is the fact that when I configure IE to use my proxy server and it sends me a connection header (GET blahblah....), it says that the proxy connection should be left open. Any idea why or what that means?

Here''s a sample connection notice to show what I mean:

GET http://www.pbs.org/jazz/ HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
Host: www.pbs.org
Proxy-Connection: Keep-Alive

That last line is what I mean. Any ideas what that refers to?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I believe the last line is meant to say something along the lines of "Don''t close the connection on me straight away, leave it open for a few seconds because i''ll probably GET some more stuff from you, an i don''t want to have to make a new connection".

Share this post


Link to post
Share on other sites