Commit Graph

584 Commits

Author SHA1 Message Date
Daniel Stenberg 28b932fb4e - Shmulik Regev fixed so that the final CRLF of HTTP response headers are sent
to the debug callback.

- Shmulik Regev added CURLOPT_HTTP_CONTENT_DECODING and
  CURLOPT_HTTP_TRANSFER_DECODING that if set to zero will disable libcurl's
  internal decoding of content or transfer encoded content. This may be
  preferable in cases where you use libcurl for proxy purposes or similar. The
  command line tool got a --raw option to disable both at once.
2007-02-12 21:13:47 +00:00
Daniel Stenberg 91386937ff - Michael Wallner provided a patch that adds support for CURLOPT_TIMEOUT_MS
and CURLOPT_CONNECTTIMEOUT_MS that, as their names should hint, do the
  timeouts with millisecond resolution instead. The only restriction to that
  is the alarm() (sometimes) used to abort name resolves as that uses full
  seconds. I fixed the FTP response timeout part of the patch.

  Internally we now count and keep the timeouts in milliseconds but it also
  means we multiply set timeouts with 1000. The effect of this is that no
  timeout can be set to more than 2^31 milliseconds (on 32 bit systems), which
  equals 24.86 days.  We probably couldn't before either since the code did
  *1000 on the timeout values on several places already.
2007-02-05 22:51:32 +00:00
Daniel Stenberg 138b4f27b4 - Manfred Schwarb reported that socks5 support was broken and help us pinpoint
the problem. The code now tries harder to use httproxy and proxy where
  apppropriate, as not all proxies are HTTP...
2007-02-03 09:33:54 +00:00
Yang Tse 54db98c220 compiler warning fix 2007-02-01 01:42:13 +00:00
Yang Tse 49c4d9c9cd add debug messages for initialization failures 2007-01-31 19:47:49 +00:00
Daniel Stenberg 1f4c8c4f09 Andreas Rieke added extra infof() for when a connection is not re-used due to
SSL conditions not being the same
2007-01-28 22:45:22 +00:00
Dan Fandrich 44ac2776ae Fixed a dangling pointer problem that prevented the http_proxy environment
variable from being properly used in many cases (and caused test case 63
to fail).
2007-01-25 01:35:43 +00:00
Daniel Stenberg 385e612fa5 - Armel Asselin improved libcurl to behave a lot better when an easy handle
doing an FTP transfer is removed from a multi handle before completion. The
  fix also fixed the "alive counter" to be correct on "premature removal" for
  all protocols.
2007-01-16 22:22:10 +00:00
Daniel Stenberg 0fb5a65a58 - David McCreedy provided libcurl changes for doing HTTP communication on
non-ASCII platforms. It does add some complexity, most notably with more
  #ifdefs, but I want to see this supported added and I can't see how we can
  add it without the extra stuff added.
2007-01-14 14:57:51 +00:00
Daniel Stenberg 4750e6f3c5 - Linus Nielsen Feltzing introduced the --ftp-ssl-ccc command line option to
curl that uses the new CURLOPT_FTP_SSL_CCC option in libcurl. If enabled, it
  will make libcurl shutdown SSL/TLS after the authentication is done on a
  FTP-SSL operation.
2007-01-05 23:11:14 +00:00
Daniel Stenberg bedc61ac45 - Robert Foreman provided a prime example snippet showing how libcurl would
get confused and not acknowledge the 'no_proxy' variable properly once it
  had used the proxy and you re-used the same easy handle. I made sure the
  proxy name is properly stored in the connect struct rather than the
  sessionhandle/easy struct.
2006-12-22 15:04:59 +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 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 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 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 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
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
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 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 69f7d0a0ce compiler warning fix 2006-11-06 18:27:25 +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 2147284cad James Housley brought support for SCP transfers 2006-11-02 21:56:40 +00:00
Yang Tse ba481718a4 Make more human readable and maintainable previous
compiler warning fix since it was Ok and actually
avoids the targeted compiler warning.
2006-10-29 14:58:59 +00:00
Yang Tse a93695a70e Compiler warning fix.
Assigning the const value zero to a pointer to function
results in a null pointer value assignment to the function
pointer.

Assignment of any nonzero value is what should result in a
implementation compiler dependent result.

Since what we want to do here is the first case, this should
not trigger compiler warnings related with conversions from
'pointer to data' to 'pointer to function'.

Our autobuild test suite will judge.
2006-10-27 15:32:18 +00:00
Yang Tse 8a8d5c784c Do an explicit typecast of data pointers to function pointers
to avoid picky compiler warnings, since this is what we want!
2006-10-27 01:04:41 +00:00
Yang Tse 012d7e2878 Fix Curl_open() not reporting failure when allocation of the
buffer used to store headers in the SessionHandle failed.
2006-10-26 11:15:25 +00:00
Daniel Stenberg f44ef427a2 other pipelining fixes by Ravi Pratap, that now makes pipelines get used better 2006-10-24 21:14:40 +00:00
Daniel Stenberg 36a3514225 the check in ConnectionExists() for not re-using a non-resolved connection now
applies for asynch name resolves in general and not only ares
2006-10-23 20:41:50 +00:00
Daniel Stenberg e1edd41e1b Ravi Pratap provided a major update with pipelining fixes. We also no longer
re-use connections (for pipelining) before the name resolving is done.
2006-10-23 20:34:56 +00:00
Daniel Stenberg bd5d21aaf2 When a resolve is made on a pipelined connection we need to detect it properly
(when the resoling isn't completede yet) and not confuse it with a simple
connection re-use (non-pipelined).
2006-10-20 12:25:39 +00:00
Yang Tse 83884180ac Builds using synchronous name resolver dislike marking the connection as async. 2006-10-19 02:30:02 +00:00
Daniel Stenberg 18aae32015 When a connection is re-used, it can be flagged for re-use before the name
resolving is completed so we must make sure to survive it and mark the
connection as async (ie not yet connected completely).
2006-10-18 15:10:49 +00:00
Daniel Stenberg 5b8d5fdf2f cut out matching host names starting with telnet or ftps, since they hardly
ever actually are used
2006-10-18 11:13:39 +00:00
Dan Fandrich 8c38ea4ebc Fixed compile error in HAVE_SIGACTION case. 2006-10-17 21:45:37 +00:00
Daniel Stenberg 44d84ac164 Avoid typecasting a signed char to an int when using is*() functions, as that
could very well cause a negate number get passed in and thus cause reading
outside of the array usually used for this purpose.

We avoid this by using the uppercase macro versions introduced just now that
does some extra crazy typecasts to avoid byte codes > 127 to cause negative
int values.
2006-10-17 21:32:56 +00:00
Yang Tse 44ffe0dc79 Typo 2006-10-17 09:07:38 +00:00
Daniel Stenberg 0bb20cc611 fix the name resolve abort timeout calculation (when signals are used) 2006-10-17 08:05:41 +00:00
Gisle Vanem 2260c8aa11 Replace ";;" with ";". 2006-10-15 20:28:03 +00:00
Yang Tse e150150d9f Remove redundant __CYGWIN__ symbol check 2006-10-11 16:01:16 +00:00
Daniel Stenberg d390039873 minor indent fix 2006-10-09 21:24:50 +00:00
Daniel Stenberg a1de9367ec Bogdan Nicula's second test case (posted Sun, 08 Oct 2006) converted to test
case 535 and it now runs fine. Again a problem with the pipelining code not
taking all possible (error) conditions into account.
2006-10-09 06:58:05 +00:00
Daniel Stenberg 5e0d9aea32 Support for FTP third party transfers is now dropped 2006-09-30 20:31:11 +00:00
Daniel Stenberg ae13c93b7d Reported in #1561470 (http://curl.haxx.se/bug/view.cgi?id=1561470), libcurl
would crash if a bad function sequence was used when shutting down after
using the multi interface (i.e using easy_cleanup after multi_cleanup) so
precautions have been added to make sure it doesn't any more - test case 529
was added to verify.
2006-09-28 21:26:06 +00:00
Yang Tse ba01198e6c Compiler warning fix 2006-09-25 00:05:39 +00:00
Daniel Stenberg 3ea8a4d220 Dmitriy Sergeyev provided a patch that made the SOCKS[45] code work better as
it now will read the full data sent from servers. The SOCKS-related code was
also moved to the new lib/socks.c source file.
2006-09-23 19:07:20 +00:00
Daniel Stenberg ec4a16f2e0 Armel Asselin fixed problems when you gave a proxy URL with user name and
empty password or no password at all. Test case 278 and 279 were added to
verify.
2006-09-20 21:49:41 +00:00
Daniel Stenberg 71920d61e6 Michael Wallner's test program again help me track down a problem. This time
it basically was that we didn't remove the current connection from the pipe
list when following a redirect. Also in this commit: several cases of
additional debug code for debug builds helping to check and track down some
signs of run-time trouble.
2006-09-20 12:03:50 +00:00
Daniel Stenberg 2d5fc39d35 Resize the connection cache upwards when adding more handles than what
currently fits in the cache, to make the cache work better especially for
pipelining cases but also for "mere" (persistent) connection re-use.
2006-09-16 21:50:29 +00:00