> I'll re-explain how my downstream (that is - HTTP > download) connection works. The client requests a document from my web > server. It does this going through the proxy. The server response (200 > OK), does NOT send an Content-length header and starts sending the > document very very slowly, but it keeps sending for ever. It looks just > like a large file download over a very slow link. Since there's no > Content-length header the proxy is unable to determine if the document > has finished downloading or not, it will keep receiving the given > document for as long as the server sends. I noticed the proxy does one > other nice thing: it immediately relays all received data to the client, > and it really makes sense.
Immedaite relay is NOT mandatory. The proxy could as well grab the complete document, process it's content and then forward it. In that case your software would not work. > Real-life example that should force the proxy to behave in this very > same manner: The client is downloading a 4Gb ISO image through the > proxy. The proxy can't possibly wait for the WHOLE download to finish > before starting to relay data to the client, it just doesn't make sense. > It must start sending data to the client as soon as data is available. This is proxy implementation dependent. The proxy could buffer the document up to some point and then give up and forward everything. It could also handle document differently according to the content-type. If you consider this would not happend, then it's OK for me. I'm just giving you the ideas I have :-) > I might try implementing this as well. Trying an CONNECT first and, if > that doesn't work, fall-back to alternative, slower methods. > Can the THttpCli component be used for proxy CONNECT only, bypassing > everything else? THttpCli, SSL enabled use CONNECT method (This is mandatory for HTTPS !). If you have ICS-SSL, you may have a look at how it is implemented. At first glance it is not too difficult to implement also for non-ssl part of the component. You are welcome to do it of course. > Or should I start with a vanilla TWSocket and work my way from that? There is someone having implemented HTTP proxy traversal into TWSocket. I'm in touch with him to make his code available in the official release. There is still some work to do so it will not be available before some time (maybe months !). Contact me privately if you want his email. Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] Author of ICS (Internet Component Suite, freeware) Author of MidWare (Multi-tier framework, freeware) http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be