summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* pop3.c: fix compiler warningYang Tse2011-11-291-1/+1
|
* POP3: detect when LIST returns no mailsDaniel Stenberg2011-11-292-7/+37
| | | | | By making sure the function can detect an "end of body" sequence immediately on the first line, test 811 is now enabled.
* POP3: fix end of body detectionDaniel Stenberg2011-11-291-19/+53
| | | | | | | | | | Curl_pop3_write() now has a state machine that scans for the end of a POP3 body so that the CR LF '.' CR LF sequence can come in everything from one up to five subsequent packets. Test case 810 is modified to use SLOWDOWN which makes the server pause between each single byte and thus makes the POP3 body get sent to curl basically one byte at a time.
* CyaSSL 2.0+ library initialization adjustmentYang Tse2011-11-251-0/+5
|
* rectify commentJonas Schnelli2011-11-251-1/+2
|
* SSLSESSION_SHARED: new macro to check if session is sharedDaniel Stenberg2011-11-251-16/+13
| | | | | | Added convenience macro to use to check if a handle is using a shared SSL session, and fixed so that Curl_ssl_close_all() doesn't lock when the session isn't shared.
* telnet.c: fix MSVC compiler warningYang Tse2011-11-251-2/+2
|
* tvdiff_secs(): sub-zero time difference adjustmentYang Tse2011-11-251-2/+5
| | | | | | Skip a floating point addition operation when integral part of time difference is zero. This avoids potential floating point addition rounding problems while preserving decimal part value.
* telnet: fix macros to allow proper semicolon useDaniel Stenberg2011-11-251-22/+27
| | | | | | Macros that look like function calls need to be made so that we can use semicolons properly for indentation and for reducing the risk for mistakes when using them.
* TELNET: improved treatment of optionsLaurent Rabret2011-11-252-26/+172
| | | | | | | | 1) enables the Window Size option 2) allows the server to enable the echo mode 3) allows an app using libcurl to disable the default binary mode Signed-off-by: Laurent Rabret
* query-part: ignore the URI part for given protocolsJonas Schnelli2011-11-2411-14/+42
| | | | | | | | | By setting PROTOPT_NOURLQUERY in the protocol handler struct, the protocol will get the "query part" of the URL cut off before the data is handled by the protocol-specific code. This makes libcurl adhere to RFC3986 section 2.2. Test 1220 is added to verify a file:// URL with query-part.
* getinfo.c: reset app connect time when clearing session-info time variablesYang Tse2011-11-241-0/+1
|
* Fix unreleased regression when using windows gnutls versions older than 2.8Yang Tse2011-11-241-9/+9
|
* gnutls: only translate winsock errors for old versionsMark Brand2011-11-231-6/+9
| | | | | | | | | | | | Bugfix: https handshake fails using gnutls 3 on windows http://sourceforge.net/tracker/index.php?func=detail&aid=3441084&group_id=976&atid=100976 New gnutls versions have an error handler that knows about Winsock errors, which is why gnutls_transport_set_global_errno() was deprecated and then removed. This is a correction of commit f5bb370 (blame me) which meant to reimplement gnutls_transport_set_global_errno(), which is not necessary.
* protocol_connect: show verbose connect and set connect timeDaniel Stenberg2011-11-211-5/+2
| | | | | | | | | Regression: commit b998d95b (shipped first in release 7.22.0) made the condition always equal false that should reset the TIMER_CONNECT timer and call the Curl_verboseconnect() function. Reported by: "Captain Basil" Bug: http://curl.haxx.se/mail/archive-2011-11/0035.html
* Add support for using nettle instead of gcrypt as gnutls backendMartin Storsjo2011-11-194-1/+79
|
* SFTP: support '*' prefix for quote operationsJonas Schnelli2011-11-182-25/+56
| | | | | prefixing a command with '*' means it is allowed to fail without aborting the chain actions
* getsessionid: don't ever return while lockedDaniel Stenberg2011-11-171-9/+13
| | | | Also, check for the session sharing bit instead of comparing pointers
* Curl_ssl_getsessionid: increase the value, not the pointerDaniel Stenberg2011-11-171-1/+1
|
* SSL session share: move the age counter to the share objectAlejandro Alvarez Ayllon2011-11-173-5/+18
| | | | | Previously the age counter would be counted individually in each easy handle that shared SSL sessions!
* CURLOPT_DNS_SERVERS: set name servers if possibleJason Glasgow2011-11-175-0/+55
|
* Fix to skip untrusted certs.Guenter Knauf2011-11-081-31/+46
|
* ftp PORT: don't hang if bind() failsDaniel Stenberg2011-11-061-3/+6
| | | | | | | | | | When the user requests PORT with a specific port or port range, the code could lock up in an endless loop. There's now an extra conditional that makes sure to special treat the error and try the local address only once so a second failure will abort the loop correctly. Bug: http://curl.haxx.se/bug/view.cgi?id=3433968 Reported by: Gokhan Sengun
* pingpong: change two comments wrongly referring "FTP"Daniel Stenberg2011-11-061-5/+4
| | | | | Just a sign of where the code originally was ripped out from. Now it is generic "pingpong".
* HTTP auth: fix proxy Negotiate bugRene Bernhardt2011-11-061-17/+18
| | | | | | | | | | | | | | | | | | | | | | | | If a proxy offers several Authentication schemes where NTLM and Negotiate are offered by the proxy and you tell libcurl not to use the Negotiate scheme then the request never returns when the proxy answers with its HTTP 407 reply. It is reproducible by the following steps: - Use a proxy that offers NTLM and Negotiate ( CURLOPT_PROXY and CURLOPT_PROXYPORT ) - Tell libcurl NOT to use Negotiate CURL_EASY_SETOPT(CURLOPT_PROXYAUTH, CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_NTLM ) - Start the request The call to CURL_EASY_PERFORM never returns. If you switch on debug logging you can see that libcurl issues a new request As soon as it received the 407 reply. Instead it should return and set the response code to 407. Bug: http://curl.haxx.se/mail/lib-2011-10/0323.html
* ssluse.c: fix calling of OpenSSL's ERR_remove_state(0)Yang Tse2011-11-041-17/+17
| | | | | | | | | | | | | | | Move calling of ERR_remove_state(0) a.k.a ERR_remove_thread_state(NULL) from Curl_ossl_close_all() to Curl_ossl_cleanup(). In this way ERR_remove_state(0) is now only called in libcurl by curl_global_cleanup(). Previously it would get called by functions curl_easy_cleanup(), curl_multi_cleanup and potentially each time a connection was removed from a connection cache leading to premature destruction of OpenSSL's thread local state hash. Multi-threaded apps using OpenSSL enabled libcurl should still call function ERR_remove_state(0) or ERR_remove_thread_state(NULL) at the very end end of threads that do not call curl_global_cleanup().
* url.c and file.c: fix OOM triggered segfaultYang Tse2011-11-032-5/+6
|
* rename ftp_ssl: the struct field is used for many protocolsDaniel Stenberg2011-11-036-12/+12
| | | | | | Now called 'use_ssl' instead, which better matches the current CURLOPT name and since the option is used for all pingpong protocols (at least) it makes sense to not use 'ftp' in the name.
* gtls_connect_step1: remove use of deprecated functionsDaniel Stenberg2011-11-021-1/+12
| | | | | | | | | Use gnutls_priority_set_direct() instead of gnutls_protocol_set_priority(). Remove the gnutls_certificate_type_set_priority() use since x509 is the default certificate type anyway. Reported by: Vincent Torri
* url.c and transfer.c: nullify connection pointer when free()'edYang Tse2011-11-022-3/+10
|
* multi.c: OOM handling fixYang Tse2011-11-011-2/+8
|
* setup.h: fix compiler warningYang Tse2011-10-311-0/+2
|
* gtls.c: gnutls_transport_set_global_errno() deprecated in version 2.12.3Yang Tse2011-10-291-2/+11
|
* multi.c: OOM handling fixYang Tse2011-10-271-4/+6
| | | | Fix curl_multi_cleanup() segfault when using weird cleanup sequence.
* multi: start ftp state machine when switching to DO_MOREDaniel Stenberg2011-10-271-12/+5
| | | | | | | | | | | | This extends the fix from commit d7934b8bd491 When the multi state is changed within the multi_runsingle from DOING to DO_MORE, we didn't immediately start the FTP state machine again. That then left the FTP state in FTP_STOP. When curl_multi_fdset() was subsequently called, the ftp_domore_getsock() function would return the wrong fd info. Reported by: Gokhan Sengun
* ftp.c: some OOM handling fixesYang Tse2011-10-241-10/+30
|
* curl_multi_fdset: correct fdset with FTP PORT useDaniel Stenberg2011-10-2118-14/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | After a PORT has been issued, and the multi handle would switch to the CURLM_STATE_DO_MORE state (which is unique for FTP), libcurl would return the wrong fdset to wait for when curl_multi_fdset() is called. The code would blindly assume that it was waiting for a connect of the second connection, while that isn't true immediately after the PORT command. Also, the function multi.c:domore_getsock() was highly FTP-centric and therefore ugly to keep in protocol-agnostic code. I solved this problem by introducing a new function pointer in the Curl_handler struct called domore_getsock() which is only called during the DOMORE state for protocols that set that pointer. The new ftp.c:ftp_domore_getsock() function now returns fdset info about the control connection's command/response handling while such a state is in use, and goes over to waiting for a writable second connection first once the commands are done. The original problem could be seen by running test 525 and checking the time stamps in the FTP server log. I can verify that this fix at least fixes this problem. Bug: http://curl.haxx.se/mail/lib-2011-10/0250.html Reported by: Gokhan Sengun
* file.c: OOM handling fixYang Tse2011-10-211-6/+29
| | | | file_disconnect() free's resources for multi API
* multi.c: fix segfaultYang Tse2011-10-211-2/+2
|
* Fixed compilation when HTTP or cookies are disabledDan Fandrich2011-10-202-0/+4
|
* Curl_http_input_auth: handle multiple auths in WWW-AuthenticateDaniel Stenberg2011-10-201-88/+98
| | | | | | | | The fix is pretty much the one Nick Zitzmann provided, just edited to do the right indent levels and with test case 1204 added to verify the fix. Bug: http://curl.haxx.se/mail/lib-2011-10/0190.html Reported by: Nick Zitzmann
* Curl_smtp_escape_eob: first byte is index 0...Daniel Stenberg2011-10-201-2/+2
| | | | | | Fix a bug with with commit 2621dd42a4d that happened due to my last second pre-commit cleanup of the change without proper testing afterwards!
* gtls: only call gnutls_transport_set_lowat with <gnutls-2.12.0Tim Harder2011-10-201-0/+2
| | | | | | | | | The default lowat level for gnutls-2.12* is set to zero to avoid unnecessary system calls and the gnutls_transport_set_lowat function has been totally removed in >=gnutls-3 which causes build failures. Therefore, the function shouldn't be used except for versions that require it, <gnutls-2.12.0.
* Curl_smtp_escape_eob: fix EOB escapingDaniel Stenberg2011-10-201-26/+27
| | | | | | | As the EOB string can come byte by byte over a series of writes we must match byte-wise. Bug: http://curl.haxx.se/mail/lib-2011-10/0172.html
* singleipconnect: unstick the ipv6-connection booleanDaniel Stenberg2011-10-171-5/+4
| | | | | | | | | Previously the bit was set before the connection was found working so if it would first fail to an ipv6 address and then connect fine to a IPv4 address the variable would still be TRUE. Reported by: Thomas L. Shinnick Bug: http://curl.haxx.se/bug/view.cgi?id=3421912
* nss: avoid a SIGSEGV with immature version of NSSKamil Dudka2011-10-171-1/+23
| | | | Bug: https://bugzilla.redhat.com/733685
* nss: big cleanup in nss_load_cert() and cert_stuff()Kamil Dudka2011-10-171-93/+58
|
* nss: refactor fmt_nickname() -> dup_nickname()Kamil Dudka2011-10-171-28/+14
| | | | Do not use artificial nicknames for certificates from files.
* nss: select client certificates by DERKamil Dudka2011-10-172-16/+30
| | | | ... instead of nicknames, which are not unique.
* formdata: ack read callback abortDaniel Stenberg2011-10-161-8/+11
| | | | | | | | | | | | | When doing a multipart formpost with a read callback, and that callback returns CURL_READFUNC_ABORT, that return code must be properly propagated back and handled accordingly. Previously it would be handled as a zero byte read which would cause a hang! Added test case 587 to verify. It uses the lib554.c source code with a small ifdef. Reported by: Anton Bychkov Bug: http://curl.haxx.se/mail/lib-2011-10/0097.html