Re: Http proxy in nsISocketTransportService
Christian Biesinger <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.netlib |
|---|---|
| Message-ID | <[email protected]> |
On 1/3/2012 2:36, Piotr Kuśka wrote: > W dniu 2011-12-28 18:47, Christian Biesinger pisze: >> On Wed, Dec 28, 2011 at 4:43 PM, Piotr Kuśka<[email protected]> wrote: >>> I've tried this approach already, but it wouldn't work with proxy >>> authentication (I would have to rewrite the proxy authentication code). >>> Also, I wouldn't be able to make a connection to an unsecureproxy and >>> then >>> upgrade it to ssl. >>> I tried to modify nsHttpChannel, nsHttpTransaction and >>> nsHttpConnection o >>> achieve the desired goal, but with no success. >> >> True, authentication is a problem. You may want to look at the >> websocket code, which has solved that problem too. Upgrading to SSL >> would actually work, if you use the "starttls" socket type and then >> call nsISSLSocketControl::StartTLS once you want to initiate SSL. You >> can get the socket control object from >> nsISocketTransport::GetSecurityInfo. >> >> -christian > > I tried to do that as well, but the problem is that the server I connect > to sends data over the socket once the connection is established. The > data is then interpreted as content of the HTTP OK reply from proxy in > nsHttpTransaction and it is too late to call StartTLS. You misunderstood me - I meant not using HTTP channel at all, instead directly using nsISocketTransport and sending a CONNECT request by hand. -christian _______________________________________________ dev-tech-network mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-network