aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
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
2011-12-05c-ares: return proxy failure for all proxy typesDaniel Stenberg
When making a distinction which return code to return, the code previously only regarded HTTP proxies to be proxies and thus return host-related errors for failures on other proxy types than HTTP. Now all proxy types will be considered proxies...
2011-12-05FTP: close callback fixDaniel Stenberg
Keep track of which sockets that are the result of accept() calls and refuse to call the closesocket callback for those sockets. Test case 596 now verifies that the open socket callback is called the same number of times as the closed socket callback for active FTP connections. Bug: http://curl.haxx.se/mail/lib-2011-12/0018.html Reported by: Gokhan Sengun
2011-12-05FTP: call opensocket callback properlyDaniel Stenberg
When the new socket is created for an active connection, it is now done using the open socket callback. Test case 596 was modified to run fine, although it hides the fact that the close callback is still called too many times, as it also gets called for closing sockets that were created with accept().
2011-12-05Curl_socket: internal replacement for socket()Daniel Stenberg
Moved out into a separate function to work as a "generic" socket() replacement.
2011-12-02CURLOPT_DNS_SERVERS: set name servers if possible (fix)Jason Glasgow
Ensure that CURLE_OK is returned if setting the name servers is successfull.
2011-12-02multi interface: only use non-NULL function pointer!Daniel Stenberg
If the socket callback function pointer hasn't been set, we must not attempt to use it. Commit adc88ca20 made it more likely to occur.
2011-12-02multi: handle timeouts on DNS servers by checking for new socketsJason Glasgow
If the first name server is not available, the multi interface does not invoke the socket_cb when the DNS request to the first name server timesout. Ensure that the list of sockets are always updated after calling Curl_resolver_is_resolved. This bug can be reproduced if Curl is complied with --enable_ares and your code uses the multi socket interfaces and the CURLMOPT_SOCKETFUNCTION option. To test try: iptables -I INPUT \ -s $(sed -n -e '/name/{s/.* //p;q}' /etc/resolv.conf)/32 \ -j REJECT and then run a program which uses the multi-interface.
2011-12-01POP3: fixed escaped dot not being striped outSteve Holme
Changed the eob detection to work across the whole of the buffer so that lines that begin with a dot (which the server will have escaped) are passed to the client application correctly.
2011-11-29pop3.c: fix compiler warningYang Tse
2011-11-29POP3: detect when LIST returns no mailsDaniel Stenberg
By making sure the function can detect an "end of body" sequence immediately on the first line, test 811 is now enabled.
2011-11-29POP3: fix end of body detectionDaniel Stenberg
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.
2011-11-25CyaSSL 2.0+ library initialization adjustmentYang Tse
2011-11-25rectify commentJonas Schnelli
2011-11-25SSLSESSION_SHARED: new macro to check if session is sharedDaniel Stenberg
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.
2011-11-25telnet.c: fix MSVC compiler warningYang Tse