diff --git a/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.md b/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.md index dfdda91efd..80dabd7027 100644 --- a/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.md +++ b/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.md @@ -51,6 +51,15 @@ option. Using this option multiple times makes the last set string override the previous ones. Set it to NULL to disable its use again. +CURLOPT_LOGIN_OPTIONS(3) is a *login property*, it does not change the +security context. This means that this option changes how the login happens +when a connection is created, but it does not affect which connections libcurl +can reuse. libcurl may reuse a connection that was set up with a different +options string; a different options string does not by itself prevent reuse. +Connection reuse still depends on other connection properties matching, such +as the protocol, hostname, port number, credentials and other settings that +affect the connection. + # DEFAULT NULL diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index 0256d0b6fc..1a41afc956 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -241,7 +241,7 @@ test1941 test1942 test1943 test1944 test1945 test1946 test1947 test1948 \ test1955 test1956 test1957 test1958 test1959 test1960 test1964 test1965 \ \ test1970 test1971 test1972 test1973 test1974 test1975 test1976 test1977 \ -test1978 test1979 test1980 test1981 \ +test1978 test1979 test1980 test1981 test1982 \ \ test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \ test2008 \ diff --git a/tests/data/test1982 b/tests/data/test1982 new file mode 100644 index 0000000000..8b6e38bf60 --- /dev/null +++ b/tests/data/test1982 @@ -0,0 +1,53 @@ + + + + +IMAP +Clear Text +FETCH +connection reuse +options + + + +# Server-side + + +REPLY "LOGIN user.one secret" A002 OK LOGIN completed + + +From: me@somewhere +To: fake@nowhere + +body + +-- + yours sincerely + + + +# Client-side + + +imap + + +IMAP two requests, change options for the second + + +'imap://user.one:secret@%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' 'imap://user.one:secret;AUTH=XOAUTH2@%HOSTIP:%IMAPPORT/%TESTNUMBER/;UID=2' + + + +# Verify data after the test has been "shot" + + +A001 CAPABILITY +A002 LOGIN user.one secret +A003 SELECT %TESTNUMBER +A004 FETCH 1 BODY[] +A005 UID FETCH 2 BODY[] +A006 LOGOUT + + +