aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2012-01-12hostip: avoid getaddrinfo when c-ares is usedDaniel Stenberg
Some functions using getaddrinfo and gethostbyname were still mistakingly being used/linked even if c-ares was selected as resolver backend. Reported by: Arthur Murray Bug: http://curl.haxx.se/mail/lib-2012-01/0160.html
2012-01-09FTP: CURLE_PARTIAL_FILE should not cause control connection to be closedgsengun
Test 161 updated accordingly
2012-01-08lib/setup.h: portable symbolic names for Winsock shutdown() mode flagsYang Tse
2012-01-04win32-threaded-resolver: stop using a dummy socketDaniel Stenberg
Previously the code would create a dummy socket while resolving just to have curl_multi_fdset() return something but the non-win32 version doesn't do it this way and the creation and use of a socket that isn't made with the common create-socket callback can be confusing to apps using the multi_socket API etc. This change removes the dummy socket and thus will cause curl_multi_fdset() to return with maxfd == -1 more often.
2012-01-04OpenSSL: remove reference to openssl internal structPeter Sylvester
With this change, curl compiles with the new OPENSSL_NO_SSL_INTERN cflag. This flag might become the default in some distant future.
2012-01-04krb5.c: fix compiler warning: variable set but not usedYang Tse
2012-01-04Fixed use of CURLUSESSL_TRY for POP3 and IMAP based connections.Steve Holme
Fixed a problem in POP3 and IMAP where a connection would fail when CURLUSESSL_TRY was specified for a server that didn't support SSL/TLS connections rather than continuing.
2012-01-04Fixed incorrect error code being returned in STARTTLSSteve Holme
The STARTTLS response code in SMTP, POP3 and IMAP would return CURLE_LOGIN_DENIED rather than CURLE_USE_SSL_FAILED when SSL/TLS was not available on the server. Reported by: Gokhan Sengun Bug: http://curl.haxx.se/mail/lib-2012-01/0018.html
2012-01-02hostip.c: fix potential write past the end of string bufferYang Tse
2012-01-02hostip.c: fix Curl_loadhostpairs() OOM handlingYang Tse
2012-01-01Curl_input_negotiate: use the correct buffer for inputDaniel Stenberg
Unfortunately we have no test cases for this and I have no SSPI build or server to verify this with. The change seems simple enough though. Bug: http://curl.haxx.se/bug/view.cgi?id=3466497 Reported by: Patrice Guerin
2011-12-31just a stupid typoDaniel Stenberg
2011-12-31SFTP dir: increase buffer size counterDaniel Stenberg
When the buffer gets realloced to hold the file name in the SSH_SFTP_READDIR_LINK state, the counter was not bumped accordingly. Reported by: Armel Asselin Patch by: Armel Asselin Bug: http://curl.haxx.se/mail/lib-2011-12/0249.html
2011-12-31create_hostcache_id: use the key lower casedDaniel Stenberg
... to make sure the DNS cache is properly case insensitive
2011-12-31changed case: use new host name for subsequent HTTP requestsDaniel Stenberg
When a HTTP connection is re-used for a subsequent request without proxy, it would always re-use the Host: header of the first request. As host names are case insensitive it would make curl send another host name case that what the particular request used. Now it will instead always use the most recent host name to always use the desired casing. Added test case 1318 to verify. Bug: http://curl.haxx.se/mail/lib-2011-12/0314.html Reported by: Alex Vinnik
2011-12-31CURLOPT_RESOLVE: avoid adding already present host namesDaniel Stenberg
The load host names to DNS cache function was moved to hostip.c and it now makes sure to not add host names that already are present in the cache. It would previously lead to memory leaks when for example using the --resolve and multiple URLs on the command line.
2011-12-30removed trailing whitespaceYang Tse
2011-12-25transfer: avoid unnecessary timeout event when waiting for 100-continueKamil Dudka
The commit 9dd85bc unintentionally changed the way we compute the time spent waiting for 100-continue. In particular, when using a SSL client certificate, the time spent by SSL handshake was included and could cause the CURL_TIMEOUT_EXPECT_100 timeout to be mistakenly fired up. Bug: https://bugzilla.redhat.com/767490 Reported by: Mamoru Tasaka
2011-12-25transfer.c: move a logging statement placementYang Tse
2011-12-25hash.c: fix OOM triggered segfaultYang Tse
2011-12-24ftp_do_more: don't return success until all is doneDaniel Stenberg
ftp_do_more() returns after accepting the server connect however it needs to fall through and set "*complete" to TRUE before exit from the function. Bug: http://curl.haxx.se/mail/lib-2011-12/0250.html Reported by: Gokhan Sengun
2011-12-24Curl_do_more: fix typo logicDaniel Stenberg
In the recent do_more fix the new logic was mistakenly checking the pointer instead of what it points to. Reported by: Gokhan Sengun Bug: http://curl.haxx.se/mail/lib-2011-12/0250.html
2011-12-24SFTP mkdir: use correct permissionDaniel Stenberg
When sending quote command to a SFTP server and 'mkdir' was used, it would send fixed permissions and not use the CURLOPT_NEW_DIRECTORY_PERMS as it should. Reported by: Armel Patch by: Armel Bug: http://curl.haxx.se/mail/lib-2011-12/0249.html
2011-12-23resolve: don't leak pre-populated dns entriesDaniel Stenberg
CURLOPT_RESOLVE populates the DNS cache with entries that are marked as eternally in use. Those entries need to be taken care of when the cache is killed off. Bug: http://curl.haxx.se/bug/view.cgi?id=3463121 Reported by: "tw84452852"
2011-12-21formdata.c: OOM handling fixesYang Tse
2011-12-20Curl_socket_check: enlarge poll struct array to 3Daniel Stenberg
This function was introduced in commit 5527417afae0 and as pointed out by Gokhan Sengun, the array with poll structs must large enough to hold 3 sockets since that is what the function can accept. It could be noted that he had this fixed in his patch as posted in http://curl.haxx.se/mail/lib-2011-12/0179.html Bug: http://curl.haxx.se/mail/lib-2011-12/0228.html Reported by: Gokhan Sengun
2011-12-20timeleft_accept: ack global timeout, moved to ftp.cDaniel Stenberg
First off the timeout for accepting a server connect back must of course respect a global timeout. Then the timeleft function is only used by ftp code so it was moved to ftp.c and made static.
2011-12-20FTP: move FTP-specific struct field to ftpc_connDaniel Stenberg
"wait_data_conn" was added to the connectionbits in commit c834213ad5 for handling active FTP connections but as it is purely FTP specific and now only ever accessed by ftp.c I moved it into the FTP connection struct.
2011-12-20non-blocking active FTP: cleanup multi state usageDaniel Stenberg
Backpedaled out the funny double-change of state in the multi state machine by adding a new argument to the do_more() function to signal completion. This way it can remain in the DO_MORE state properly until done. Long term, the entire DO_MORE logic should be moved into the FTP code and be hidden from the multi code as the logic is only used for FTP.
2011-12-20FTP: perform active connections non-blockingGokhan Sengun
1- Two new error codes are introduced. CURLE_FTP_ACCEPT_FAILED to be set whenever ACCEPTing fails because of FTP server connected. CURLE_FTP_ACCEPT_TIMEOUT to be set whenever ACCEPTing timeouts. Neither of these errors are considered fatal and control connection remains OK because it could just be a firewall blocking server to connect to the client. 2- One new setopt option was introduced. CURLOPT_ACCEPTTIMEOUT_MS It sets the maximum amount of time FTP client is going to wait for a server to connect. Internal default accept timeout is 60 seconds.
2011-12-20sockets: new Curl_socket_check() can wait for 3 socketsDaniel Stenberg
This offers an alternative to the existing Curl_socket_ready() API which only checks one socket for read and one for write.
2011-12-20Curl_pgrsTime: store now in an auto variableDaniel Stenberg
It makes it easier to introduce debug outputs in this function, and everything in the function is using the value anyway so it might even be more efficient.
2011-12-20timer: restore PRETRANSFER timingDaniel Stenberg
Regression introduced in 7.23.0 with commit 9dd85bce. The function in which the PRETRANSFER time stamp was recorded was moved in time causing it be stored very quickly after the start timestamp. On most systems shorter than 1 millisecond and thus it wouldn't even show with -w "%{time_pretransfer}" using the command line tool. Bug: http://curl.haxx.se/mail/archive-2011-12/0022.html Reported by: Toni Moreno
2011-12-20gitignore: ignore the symbol versioning fileDaniel Stenberg
2011-12-19configure: add symbols versioning optionAlessandro Ghedini
Allow, at configure time, the production of versioned symbols. The symbols will look like "CURL_<FLAVOUR>_<VERSION> <SYMBOL>", where <FLAVOUR> represents the SSL flavour (e.g. OPENSSL, GNUTLS, NSS, ...), <VERSION> is the major SONAME version and <SYMBOL> is the actual symbol name. If no SSL library is enabled the symbols will be just "CURL_<VERSION> <SYMBOL>".
2011-12-19Use Curl_ssl_connect for non-blocking connect fallbackSven Wegener
This gets the appconnect time right for ssl backends, which don't support non-blocking connects. Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
2011-12-19Curl_proxyCONNECT: use newlines in debug outputDaniel Stenberg
2011-12-13if2ip.[ch]: fix compilation with MinGWYang Tse
Avoid 'interface' literal that some MinGW versions define as a macro
2011-12-13connect.c: fix compiler warning 'enumerated type is mixed with another type'Yang Tse
2011-12-13if2ip.c: fix compiler warning 'unused parameter'Yang Tse
2011-12-13pop3.c: fix compiler warning variable may be used uninitializedYang Tse
2011-12-13if2ip.c: fix compiler warning 'enumerated type is mixed with another type'Yang Tse
2011-12-12CURLOPT_INTERFACE: avoid resolving interfaces namesJason Glasgow
Do not try to resolve interfaces names via DNS by recognizing interface names in a few ways. If the interface option argument has a prefix of "if!" then treat the argument as only an interface. Similarly, if the interface argument is the name of an interface (even if it does not have an IP address assigned), treat it as an interface name. Finally, if the interface argument is prefixed by "host!" treat it as a hostname that must be resolved by /etc/hosts or DNS. These changes allow a client using the multi interfaces to avoid blocking on name resolution if the interface loses its IP address or disappears.
2011-12-12ConnectionExists: Fix reuse for TLS upgraded connectionsSteve Holme
Fixed the connection reuse detection in ConnectionExists() when comparing a new connection that is non-SSL based against that of a SSL based connection that has become so by being upgraded via TLS.
2011-12-09create_conn: don't switch to HTTP protocol if tunneling is enabledDaniel Stenberg
This is a regression since who knows when. When spotting that a HTTP proxy is used we must not uncondititionally enable the HTTP protocol since if we do tunneling through the proxy we're still using the target protocol. Reported by: Naveen Chandran
2011-12-07Curl_closesocket: clear sock_accepted on closeGokhan Sengun
As a follow-up from commit d5b5f64bce3a8, clear the sock_accepted status when such a socket is closed to avoid a re-used connection to retain the state wrongly. Bug: http://curl.haxx.se/mail/lib-2011-12/0079.html
2011-12-07multi interface: fix block when CONNECT_ONLY option is usedGokhan Sengun
2011-12-06OpenSSL: check for the SSLv2 function in configureDaniel Stenberg
If no SSLv2 was detected in OpenSSL by configure, then we enforce the OPENSSL_NO_SSL2 define as it seems some people report it not being defined properly in the OpenSSL headers.
2011-12-05SSH: fix CURLOPT_SSH_HOST_PUBLIC_KEY_MD5Daniel Stenberg
When a 32 digit hex key is given as a hostkey md5 checksum, the code would still run it against the knownhost check and not properly acknowledge that the md5 should then be the sole guide for. The verbose output now includes the evaluated MD5 hostkey checksum. Some related source code comments were also updated. Bug: http://curl.haxx.se/bug/view.cgi?id=3451592 Reported by: Reza Arbab
2011-12-05Curl_resolver_is_resolved: differentiate between host/proxy errorsDaniel Stenberg
As there are different return codes for host vs proxy errors, this function now properly returns the code properly depending on what was attempted to get resolved. Bug: http://curl.haxx.se/mail/archive-2011-12/0010.html Reported by: Jason Liu