1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00
Commit Graph

3228 Commits

Author SHA1 Message Date
Daniel Stenberg
ebee2e323d - David McCreedy fixed a bad call to getsockname() that wrongly used a size_t
variable to point to when it should be a socklen_t.
2006-12-22 13:30:54 +00:00
Daniel Stenberg
b2f8de571f When setting a proxy with environment variables and (for example) running
'curl [URL]' with a URL without a protocol prefix, curl would not send a
correct request as it failed to add the protocol prefix.
2006-12-22 07:30:21 +00:00
Daniel Stenberg
cb4a5f5a2b minor indent fix 2006-12-21 15:47:19 +00:00
Daniel Stenberg
1beb7de7e0 removed unused variables 2006-12-21 10:18:15 +00:00
Daniel Stenberg
89ab5f4380 Robson Braga Araujo reported bug #1618359
(http://curl.haxx.se/bug/view.cgi?id=1618359) and subsequently provided a
patch for it: when downloading 2 zero byte files in a row, curl 7.16.0
enters an infinite loop, while curl 7.16.1-20061218 does one additional
unnecessary request.

Fix: During the "Major overhaul introducing http pipelining support and
shared connection cache within the multi handle." change, headerbytecount
was moved to live in the Curl_transfer_keeper structure. But that structure
is reset in the Transfer method, losing the information that we had about
the header size. This patch moves it back to the connectdata struct.
2006-12-21 10:15:38 +00:00
Daniel Stenberg
8d11767048 recv() doesn't take MSG_NOSIGNAL in its forth argument so let's not pass it.
Brendan Jurd pointed out.
2006-12-16 22:28:08 +00:00
Daniel Stenberg
fcccf9aa0d Brendan Jurd provided a fix that now prevents libcurl from getting a SIGPIPE
during certain conditions when GnuTLS is used.
2006-12-16 21:33:51 +00:00
Daniel Stenberg
72bd027537 Brendan Jurd pointed out these typos 2006-12-16 21:05:33 +00:00
Gisle Vanem
33831759b5 Fix typo. 2006-12-15 16:49:40 +00:00
Daniel Stenberg
88c8d72a21 Alexey Simak found out that when doing FTP with the multi interface and
something went wrong like it got a bad response code back from the server,
libcurl would leak memory. Added test case 538 to verify the fix.

I also noted that the connection would get cached in that case, which
doesn't make sense since it cannot be re-use when the authentication has
failed. I fixed that issue too at the same time, and also that the path
would be "remembered" in vain for cases where the connection was about to
get closed.
2006-12-11 09:32:58 +00:00
Daniel Stenberg
cf99fed17a PROT_CLOSEACTION doesn't have to be its own bit but can just as well just
include the protocol bits of such actions, which currently only means FTP
2006-12-11 09:31:08 +00:00
Daniel Stenberg
ca48b6bf35 fixed the printf formatting after I changed the type of 'excess' 2006-12-07 15:33:06 +00:00
Daniel Stenberg
840e796aa9 Sebastien Willemijns reported bug #1603712
(http://curl.haxx.se/bug/view.cgi?id=1603712) which is about connections
getting cut off prematurely when --limit-rate is used. While I found no such
problems in my tests nor in my reading of the code, I found that the
--limit-rate code was severly flawed (since it was moved into the lib, since
7.15.5) when used with the easy interface and it didn't work as documented so
I reworked it somewhat and now it works for my tests.
2006-12-06 09:37:40 +00:00
Daniel Stenberg
5fd096da8d Stefan Krause pointed out a compiler warning with a picky MSCV compiler when
passing a curl_off_t argument to the Curl_read_rewind() function which takes
an size_t argument. Curl_read_rewind() also had debug code left in it and it
was put in a different source file with no good reason when only used from
one single spot.
2006-12-05 21:40:14 +00:00
Daniel Stenberg
eb29c5c285 removed the final traces of the closepolicy option 2006-12-05 21:39:24 +00:00
Daniel Stenberg
e4505aefd9 Jared Lundell filed bug report #1604956
(http://curl.haxx.se/bug/view.cgi?id=1604956) which identified setting
CURLOPT_MAXCONNECTS to zero caused libcurl to SIGSEGV. Starting now, libcurl
will always internally use no less than 1 entry in the connection cache.
2006-12-05 15:36:26 +00:00
Daniel Stenberg
d6b0612882 better preprocessor check for recent MSVC versions 2006-12-05 15:24:18 +00:00
Daniel Stenberg
4c65eb0af8 CURLOPT_FORBID_REUSE works again with a cleaned up order of doing things in
Curl_done()
2006-12-05 15:17:32 +00:00
Daniel Stenberg
318a8258fd oops, fix belonging to the previous curl_getdate() fix since it makes MSVC
use gmtime_r
2006-12-05 15:00:14 +00:00
Daniel Stenberg
17ae28e0fe Martin Skinner brought back bug report #1230118 to haunt us once again.
(http://curl.haxx.se/bug/view.cgi?id=1230118) curl_getdate() did not work
properly for all input dates on Windows. It was mostly seen on some TZ time
zones using DST. Luckily, Martin also provided a fix.
2006-12-05 14:57:43 +00:00
Daniel Stenberg
3c4f622479 Alexey Simak filed bug report #1600447
(http://curl.haxx.se/bug/view.cgi?id=1600447) in which he noted that active
FTP connections don't work with the multi interface. The problem is here that
the multi interface state machine has a state during which it can wait for the
data connection to connect, but the active connection is not done in the same
step in the sequence as the passive one is so it doesn't quite work for
active. The active FTP code still use a blocking function to allow the remote
server to connect.

The fix (work-around is a better word) for this problem is to set the
boolean prematurely that the data connection is completed, so that the "wait
for connect" phase ends at once.
2006-12-05 13:49:29 +00:00
Daniel Stenberg
3ce43764be Matt Witherspoon fixed a problem case when the CPU load went to 100% when a
HTTP upload was disconnected:

"What appears to be happening is that my system (Linux 2.6.17 and 2.6.13) is
setting *only* POLLHUP on poll() when the conditions in my previous mail
occur. As you can see, select.c:Curl_select() does not check for POLLHUP. So
basically what was happening, is poll() was returning immediately (with
POLLHUP set), but when Curl_select() looked at the bits, neither POLLERR or
POLLOUT was set. This still caused Curl_readwrite() to be called, which
quickly returned. Then the transfer() loop kept continuing at full speed
forever."
2006-12-05 13:37:05 +00:00
Daniel Stenberg
d8c61d459e Toon Verwaest reported that there are servers that send the Content-Range:
header in a third, not suppported by libcurl, format and we agreed that we
could make the parser more forgiving to accept all the three found
variations.
2006-12-01 07:49:22 +00:00
Daniel Stenberg
688699a046 no need to access it with conn->data since data is already a local variable
holding the conn->data value
2006-11-27 13:38:32 +00:00
Daniel Stenberg
da58d03ff7 Venkat Akella found out that libcurl did not like HTTP responses that simply
responded with a single status line and no headers nor body. Starting now, a
HTTP response on a persistent connection (i.e not set to be closed after the
response has been taken care of) must have Content-Length or chunked
encoding set, or libcurl will simply assume that there is no body.

To my horror I learned that we had no less than 57(!) test cases that did bad
HTTP responses like this, and even the test http server (sws) responded badly
when queried by the test system if it is the test system. So although the
actual fix for the problem was tiny, going through all the newly failing test
cases got really painful and boring.
2006-11-25 13:32:04 +00:00
Daniel Stenberg
9ea3831c08 James Housley fixed SCP downloading by setting the maxdownload. 2006-11-25 09:49:29 +00:00
Yang Tse
a46f55b9de Make sure RETSIGTYPE is properly defined 2006-11-25 01:02:52 +00:00
Daniel Stenberg
a634f64400 James Housley did lots of work and introduced SFTP downloads. 2006-11-24 22:14:39 +00:00
Yang Tse
bcd8a3b240 Define HAVE_SIGNAL_H, HAVE_SIG_ATOMIC_T and HAVE_SIG_ATOMIC_T_VOLATILE
as appropriate for platforms that don't have autotools support
2006-11-24 16:38:58 +00:00
Yang Tse
73226415fc Added a check in configure that verifies if <signal.h> is available,
defining HAVE_SIGNAL_H if the header is available.

Added a check in configure that tests if the sig_atomic_t type is
available, defining HAVE_SIG_ATOMIC_T if it is available. Providing
a suitable default in setup_once.h if not available.

Added a check in configure that tests if the sig_atomic_t type is
already defined as volatile, defining HAVE_SIG_ATOMIC_T_VOLATILE
if it is available and already defined as volatile.
2006-11-22 18:41:34 +00:00
Gisle Vanem
b8039a821b Call libssh2_session_free() to release memory allocated during
libssh2 startup.
2006-11-15 05:35:35 +00:00
Gisle Vanem
438312f00e Free 'scp->path' in case of libssh2 setup failure. 2006-11-14 20:26:13 +00:00
Daniel Stenberg
3204494883 bug #1595348 by Ron pointed out this flaw and fix 2006-11-13 17:26:43 +00:00
Daniel Stenberg
e1ac99af1f fix header to match actual proto 2006-11-11 22:05:33 +00:00
Daniel Stenberg
be0d17e812 cleaned up Curl_write() and the sub functions it uses for various protocols.
They all now return ssize_t to Curl_write().

Unfortunately, Curl_read() is in a sorrier state but it too would benefit from
a similar cleanup.
2006-11-11 21:34:43 +00:00
Daniel Stenberg
4eb35406f4 Nir Soffer updated libcurl.framework.make: fix symlinks, should link to
Versions, not to ./Versions and indentation improvments
2006-11-09 21:58:28 +00:00
Daniel Stenberg
624745ab20 Dmitriy Sergeyev found a SIGSEGV with his test04.c example posted on 7 Nov
2006. It turned out we wrongly assumed that the connection cache was present
when tearing down a connection.
2006-11-09 21:54:33 +00:00
Daniel Stenberg
9354822e09 Ciprian Badescu found a SIGSEGV when doing multiple TFTP transfers using the
multi interface, but I could also repeat it doing multiple sequential ones
with the easy interface. Using Ciprian's test case, I could fix it.
2006-11-09 21:36:18 +00:00
Daniel Stenberg
f830d77307 Bradford Bruce reported that when setting CURLOPT_DEBUGFUNCTION without
CURLOPT_VERBOSE set to non-zero, you still got a few debug messages from the
SSL handshake. This is now stopped.
2006-11-08 21:49:14 +00:00
Daniel Stenberg
b5b3d9e5c7 Olaf fixed a leftover problem with the CONNECT fix of his that would leave a
wrong error message in the error message buffer.
2006-11-07 14:07:02 +00:00
Yang Tse
01926d66d7 add TODO note 2006-11-06 18:28:34 +00:00
Yang Tse
69f7d0a0ce compiler warning fix 2006-11-06 18:27:25 +00:00
Yang Tse
d1c84705ec remove redundant check for Win32 2006-11-06 18:26:36 +00:00
Yang Tse
1bcbe89802 Prevent multiple initialization of memdebug configuration variables.
This was possible on debug c-ares enabled builds when both CURL_MEMDEBUG
and CARES_MEMDEBUG environment variables were set. Leading to a file handle
leak even when both variables had the same value, and wierd test suite
results when different.
2006-11-05 12:42:50 +00:00
Gisle Vanem
bf57e9bb12 Ifdef around S_IRGRP and S_IROTH (meaningless on Win32). 2006-11-03 15:52:21 +00:00
Daniel Stenberg
a777eb3d81 Olaf Stueben provided a patch that I edited slightly. It fixes the notorious
KNOWN_BUGS #25, which happens when a proxy closes the connection when
libcurl has sent CONNECT, as part of an authentication negotiation. Starting
now, libcurl will re-connect accordingly and continue the authentication as
it should.
2006-11-03 12:43:55 +00:00
Daniel Stenberg
db680edc26 Update the information about what c-ares version that's required. 1.3.1 had
a fatal bug so we must require 1.3.2 to get flawless functionality with c-ares.
2006-11-03 10:56:37 +00:00
Daniel Stenberg
2147284cad James Housley brought support for SCP transfers 2006-11-02 21:56:40 +00:00
Yang Tse
0ed285e84d prototype for gethostname is in unistd.h 2006-11-02 00:33:43 +00:00
Daniel Stenberg
b1db9dbb16 corrected how tests/memanalyze.pl is used 2006-10-29 23:00:52 +00:00