curl-library
RE: POP3 not using same connection for multiple requests when using starttls
Date: Thu, 10 Nov 2011 15:46:38 +0000
Hi Daniel,
> > I have two fixes depending on what functionality you want to provide:
> >
> > 1) Remove the pop_to_pop3s(), smtp_to_smtps() and imap_to_imaps()
> > functions thus leaving the original handlers in place for pop3 / smtp
> > / imap TLS upgraded connections.
>
> If we do this, how do we distinguish between pop3:// with TLS on port 110
> and pop3:// without TLS on port 110? The structs will be identical, so I
figure
> we still need to add checks?
You don't want to distinguish between them. The server and libcurl have
automatically upgraded the connection to TLS and as such the application
programmer doesn't need to know (or even cares) if the connection has been
upgraded. In fact, unless I'm mistaken, there is no way of letting the
programmer know that the connection has been upgraded.
If two commands are issued as pop3:// on port 110 and the connection isn't
upgraded then they will both use the same connection (as per the current
implementation). If the same two commands are issued and the server and
libcurl upgrade the connection using TLS then they should use the same
connection (which is the problem I am having).
As for libcurl distinguishing between the two commands after the connection
has been upgraded - I don't believe it needs to as the contents of the
handlers are almost identical... but please correct me if I am wrong as I
know this is a fundamental change to how libcurl works and, as you know,
I've only been modifying libcurl since July so my understanding of the
overall system is still quite limited ;-)
Kind Regards
Steve
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-11-10