Commit Graph

1634 Commits

Author SHA1 Message Date
Yang Tse 886bba55ac update with my last changes 2008-11-17 04:11:29 +00:00
Daniel Stenberg c76d939563 Christian Krause fixed a build failure when building with gss support
enabled and FTP disabled.
2008-11-16 12:42:53 +00:00
Daniel Stenberg dbc6fe3e84 my recent changes 2008-11-15 23:47:01 +00:00
Dan Fandrich ea8fbb5233 Added some #ifdefs around header files and change the EAGAIN test to
fix compilation on Cell (reported by Jeff Curley).
2008-11-14 23:17:32 +00:00
Dan Fandrich 9b033e1b8a Added .xml as one of the few common file extensions known by the multipart
form generator.  Made the extensions part of the MIME type struct to reduce
the size and run-time relocations necessary to build the table.
2008-11-14 19:22:40 +00:00
Yang Tse 17d2a464ad Refactor configure script detection of functions used to set sockets into
non-blocking mode, and decouple function detection from function capability.
2008-11-13 18:56:55 +00:00
Daniel Stenberg a6ba9e5ccd 7.19.2 coming up 2008-11-13 12:42:20 +00:00
Michal Marek c331c73ec6 - Fixed a potential data loss in Curl_client_write() when the transfer is
paused.
2008-11-13 08:20:23 +00:00
Daniel Stenberg 4cbc0f6c2e - Rainer Canavan filed bug #2255627
(http://curl.haxx.se/bug/view.cgi?id=2255627) which pointed out that a
  program using libcurl's multi interface to download a HTTPS page with a
  libcurl built powered by OpenSSL, would easily get silly and instead hand
  over SSL details as data instead of the actual HTTP headers and body. This
  happened because libcurl would consider the connection handshake done too
  early. This problem was introduced at September 22nd 2008 with my fix of the
  bug #2107377

  The correct fix is now instead done within the GnuTLS-handling code, as both
  the OpenSSL and the NSS code already deal with this situation in similar
  fashion. I added test case 560 in an attempt to verify this fix, but
  unfortunately it didn't trigger it even before this fix!
2008-11-11 22:19:27 +00:00
Yang Tse 707828b71a Related with bug #2230535 (http://curl.haxx.se/bug/view.cgi?id=2230535)
Daniel Fandrich noticed that curl_addrinfo was also missing in the build
process of other four non-configure platforms. Added now.
2008-11-11 01:12:17 +00:00
Dan Fandrich 6354cbf9d6 The getifaddrs() version of Curl_if2ip() crashed when used on a Linux
system with a TEQL load-balancing device configured, which doesn't
have an address.  Thanks to Adam Sampson for spotting this (bug #2234923).
2008-11-07 18:33:20 +00:00
Yang Tse fe083a94b9 give credit where credit is due 2008-11-07 01:42:34 +00:00
Yang Tse 6fdcdfa5ea Bug #2230535 (http://curl.haxx.se/bug/view.cgi?id=2230535) pointed out a
problem with MSVC 6 makefile that caused a build failure. It was noted that
the curl_addrinfo.obj reference was missing. I took the opportunity to sort
the list in which this was missing.
2008-11-06 19:11:46 +00:00
Yang Tse a0ef686c54 Merged existing IPv4 and IPv6 Curl_ip2addr functions into a single one
which now also takes a protocol address family argument.
2008-11-06 17:19:56 +00:00
Daniel Stenberg 3cda1a23ce 7.19.1 coming up 2008-11-05 12:00:08 +00:00
Daniel Stenberg 5ca2a8318d CURLINFO_FILETIME now works for file:// transfers as well 2008-11-04 09:57:36 +00:00
Yang Tse e27ec862c3 Sync up with reality 2008-11-03 17:39:40 +00:00
Daniel Stenberg d0b8b5a199 - Bug #2218480 (http://curl.haxx.se/bug/view.cgi?id=2218480) pointed out a
problem with my CURLINFO_PRIMARY_IP fix from October 7th that caused a NULL
  pointer read. I also took the opportunity to clean up this logic (storing of
  the connection's IP address) somewhat as we had it stored in two different
  places and ways previously and they are now unified.
2008-11-03 16:24:56 +00:00
Daniel Stenberg 85ffd33f08 Daniel Johnson reported and fixed ipv4 name resolves when libcurl is built
with ipv6-enabled c-ares
2008-11-01 23:49:54 +00:00
Dan Fandrich 4fef0d4f14 Fixed a bug that caused a few bytes of garbage to be sent after a
curl_easy_pause() during a chunky upload. Reported by Steve Roskowski.
2008-10-29 19:06:48 +00:00
Dan Fandrich a10044e110 Changed the "resolve" test precheck program to verify that an IPv6 socket
can be created before resolving the IPv6 name.  In the context of running
a test, it doesn't make sense to run an IPv6 test when a host is resolvable
but IPv6 isn't usable.  This should fix failures of test 1085 on hosts with
library and DNS support for IPv6 but where actual use of IPv6 has been
administratively disabled.
2008-10-28 20:03:22 +00:00
Dan Fandrich e9c94cdd49 Added experimental support for zlib and OpenSSL on Symbian OS. 2008-10-25 05:41:01 +00:00
Dan Fandrich 7ff38c14a9 Fixed some problems with SFTP range support to fix test cases 634 through 637. 2008-10-21 07:10:25 +00:00
Dan Fandrich 3e55fef5e1 Fixed a compile error reported by Albert Chin on AIX and IRIX when using
GTLS.
2008-10-17 22:23:48 +00:00
Daniel Stenberg a9a4300a36 - Igor Novoseltsev added CURLOPT_PROXYUSER and CURLOPT_PROXYPASSWORD that then
make CURLOPT_PROXYUSERPWD sort of deprecated. The primary motive for adding
  these new options is that they have no problems with the colon separator
  that the CURLOPT_PROXYUSERPWD option does.
2008-10-16 20:21:22 +00:00
Daniel Stenberg dd9e0164d5 I renamed the function 2008-10-16 11:04:53 +00:00
Daniel Stenberg a579d67064 - Pascal Terjan filed bug #2154627
(http://curl.haxx.se/bug/view.cgi?id=2154627) which pointed out that libcurl
  uses strcasecmp() in multiple places where it causes failures when the
  Turkish locale is used. This is because 'i' and 'I' isn't the same letter so
  strcasecmp() on those letters are different in Turkish than in English (or
  just about all other languages). I thus introduced a totally new internal
  function in libcurl (called Curl_ascii_equal) for doing case insentive
  comparisons for english-(ascii?) style strings that thus will make "file"
  and "FILE" match even if the Turkish locale is selected.
2008-10-15 21:43:48 +00:00
Dan Fandrich 357383159e A <precheck> command is considered to have failed if it returns a non-zero
return code.  This way, if the precheck command can't be run at all for
whatever reason, it's treated as a precheck failure which causes the
test to be skipped.
2008-10-15 17:41:02 +00:00
Daniel Stenberg 0a9984c27e mention his full name 2008-10-15 07:45:51 +00:00
Daniel Stenberg 0ecdcc253b - John Wilkinson filed bug #2155496
(http://curl.haxx.se/bug/view.cgi?id=2155496) pointing out an error case
  without a proper human-readable error message. When a read callback returns
  a too large value (like when trying to return a negative number) it would
  trigger and the generic error message then makes the proplem slightly
  different to track down. I've added an error message for this now.
2008-10-15 07:43:48 +00:00
Daniel Stenberg 1667890172 credit to John Wilkinson 2008-10-15 07:31:31 +00:00
Dan Fandrich fad3288d20 Fixed the --interface option to work with IPv6 connections on glibc
systems supporting getifaddrs(). Also fixed a problem where an IPv6
address could be chosen instead of an IPv4 one for --interface when it
involved a name lookup.
2008-10-09 19:23:50 +00:00
Dan Fandrich f6d80d66a2 Added tests 633 through 637 to test the new file range support for SFTP.
All but the first test cause an infinite loop or other failure and so
are added to DISABLED.
2008-10-09 05:16:06 +00:00
Daniel Stenberg 830018aa38 - Bug #2152270 (http://curl.haxx.se/bug/view.cgi?id=2152270) identified and
fixed a CURLINFO_REDIRECT_URL memory leak and an additional wrong-doing:

  Any subsequent transfer with a redirect leaks memory, eventually crashing
  the process potentially.

  Any subsequent transfer WITHOUT a redirect causes the most recent redirect
  that DID occur on some previous transfer to still be reported.
2008-10-08 22:01:23 +00:00
Dan Fandrich 8dfddd279b Added tests 1082 through 1085 to test symbolic --interface parameters 2008-10-08 21:46:55 +00:00
Daniel Stenberg 544f2f74df - Igor filed bug #2111613 (http://curl.haxx.se/bug/view.cgi?id=2111613) that
eventually identified a flaw in how the multi_socket interface in some cases
  missed to call the timeout callback when easy interfaces are removed and
  added within the same millisecond.
2008-10-08 21:42:29 +00:00
Daniel Stenberg 08cf6780ba - Igor Novoseltsev brought a patch that introduced two new options to
curl_easy_setopt: CURLOPT_USERNAME and CURLOPT_PASSWORD that sort of
  deprecates the good old CURLOPT_USERPWD since they allow applications to set
  the user name and password independently and perhaps more importantly allow
  both to contain colon(s) which CURLOPT_USERPWD doesn't fully support.
2008-10-08 10:39:43 +00:00
Dan Fandrich 11a8a25528 Created test cases 1080 and 1081 to reproduce a problem of
CURLINFO_REDIRECT_URL leaking memory and returning incorrect results when
two URLs are requested. Reported by vmpdemo in bug #2152270
2008-10-08 03:32:10 +00:00
Dan Fandrich b9ce871463 Changed the handling of read/write errors in Curl_perform() to allow a
a fresh connection to be made in such cases and the request retransmitted.
This should fix test case 160.  Added test case 1079 in an attempt to
test a similar connection dropping scenario, but as a race condition, it's
hard to test reliably.
2008-10-07 23:15:02 +00:00
Daniel Stenberg 61cfbecc74 - Fixed CURLINFO_PRIMARY_IP: When libcurl created a connection to host A then
the app re-used the handle to do a connection to host B and then again
  re-used the handle to host A, it would not update the info with host A's IP
  address (due to the connection being re-used) but it would instead report
  the info from host B.
2008-10-07 21:56:56 +00:00
Yang Tse bfc09ac211 Sync up with reality 2008-10-07 13:34:59 +00:00
Dan Fandrich 1bfaf76dd0 "make clean" now cleans out the docs and tests directories, too. 2008-10-01 18:29:13 +00:00
Daniel Stenberg 038542ea3e - The libcurl FTP code now returns CURLE_REMOTE_FILE_NOT_FOUND error when SIZE
gets a 550 response back for the cases where a download (or NOBODY) is
  wanted. It still allows a 550 as response if the SIZE is used as part of an
  upload process (like if resuming an upload is requested and the file isn't
  there before the upload). I also modified the FTP test server and a few test
  cases accordingly to match this modified behavior.
2008-09-30 09:51:58 +00:00
Daniel Stenberg f3ab5d5500 - Daniel Egger provided a patch that allows you to disable proxy support in
libcurl to somewhat reduce the size of the binary. Run configure
  --disable-proxy.
2008-09-29 21:46:04 +00:00
Dan Fandrich 4adcf7e9ed Moved all signal-based name resolution timeout handling into a single new
Curl_resolv_timeout function to reduce coupling.
2008-09-29 21:02:22 +00:00
Daniel Stenberg c27d2d4b93 - Ian Lynagh provided a patch that now makes CURLOPT_RANGE work fine for SFTP
downloads!
2008-09-29 13:21:21 +00:00
Daniel Stenberg 09bbca2f61 credit Maxim Ivanov 2008-09-29 12:36:47 +00:00
Daniel Stenberg 0a305eb79f - Bug #2107803 (http://curl.haxx.se/bug/view.cgi?id=2107803) "no
CURLINFO_REDIRECT_URL in multi mode" also contained a patch that fixed the
  problem.
2008-09-29 12:22:10 +00:00
Daniel Stenberg 9e9f70a693 give proper credit! 2008-09-25 22:35:57 +00:00
Daniel Stenberg 1b9d311b5c - Fixed the HTTP Digest auth code to not behave badly when getting a blank realm
with realm="". http://curl.haxx.se/bug/view.cgi?id=2126435
2008-09-25 14:09:22 +00:00
Dan Fandrich 515893595d Make sure not to dereference the wrong UrlState proto union member when
switching from one protocol to another in a single request (e.g.
redirecting from HTTP to FTP as in test 1055) by resetting
state.expect100header before every request.
2008-09-24 01:08:01 +00:00
Daniel Stenberg d369a2b775 - Introducing Jamie Lokier's function for date to epoch conversion used in the
date parser function. This makes our function less dependent on system-
  provided functions and instead we do all the magic ourselves. We also no
  longer depend on the TZ environment variable.
2008-09-23 11:00:01 +00:00
Daniel Stenberg 23e5402bec - Rob Crittenden brought a patch to "add some locking for thread-safety to NSS
implementation".
2008-09-23 10:27:04 +00:00
Daniel Stenberg 391e8afd1f - Made the SOCKS code use the new Curl_read_plain() function to fix the bug
Markus Moeller reported: http://curl.haxx.se/mail/archive-2008-09/0016.html

- recv() errors other than those equal to EAGAIN now cause proper
  CURLE_RECV_ERROR to get returned. This made test case 160 fail so I've now
  disabled it until we can figure out another way to exercise that logic.
2008-09-22 23:12:00 +00:00
Daniel Stenberg c4a694862c - Michael Goffioul filed bug report #2107377 "Problem with mutli + GnuTLS +
proxy" (http://curl.haxx.se/bug/view.cgi?id=2107377) that showed how a multi
  interface using program didn't work when built with GnuTLS and a CONNECT
  request was done over a proxy (basically test 502 over a proxy to a HTTPS
  site). It turned out the ssl connect function would get called twice which
  caused the second call to fail.
2008-09-22 20:42:13 +00:00
Dan Fandrich abe61b9926 Fixed test 539 to handle an out of memory condition that shows up now
that memdebug.h is included in the test programs.
2008-09-22 17:20:29 +00:00
Yang Tse 6abbbaad1b fix regression in configure script which affected OpenSSL builds on MSYS 2008-09-20 12:44:44 +00:00
Yang Tse 4e4f6c1ec8 configure script now checks availability of the alarm() function 2008-09-19 18:39:24 +00:00
Dan Fandrich dfa0fd5b33 Don't bother to install a SIGALRM handler unless alarm() is available.
Also, leave the existing SIGALRM handler alone if the timeout is too small
to handle.
2008-09-19 00:43:51 +00:00
Yang Tse aa29735868 sync up with reality 2008-09-18 11:35:59 +00:00
Dan Fandrich df725aade2 Removed reference to curl-ca-bundle.crt in the host verification failure
error message.
2008-09-17 17:33:23 +00:00
Yang Tse cb9951dcad sync up with reality 2008-09-17 01:45:16 +00:00
Yang Tse 89367d47a8 Disable tracking of fdopen() calls in the low-level memory leak tracking
code when fdopen() is not available, to avoid compiler error.
2008-09-13 03:45:03 +00:00
Yang Tse a1d1f43e6a sync with reality 2008-09-12 11:19:54 +00:00
Dan Fandrich 6cea51585f Checked in some code improvements and minor fixes that I discovered in the
FreeBSD ports system.
2008-09-10 20:05:45 +00:00
Dan Fandrich 152cf6325d Checked in some grammatical and minor other fixes in the documentation and
examples that I found in the FreeBSD ports system.
2008-09-10 07:11:45 +00:00
Dan Fandrich f7cce15156 Mike Revi discovered some swapped speed switches documented in the curl man
page.
2008-09-09 18:45:52 +00:00
Daniel Stenberg 2816902f0e Dmitry Kurochkin fixed pipelining over proxy using the multi interface 2008-09-08 12:15:09 +00:00
Daniel Stenberg f72a26d340 - Stefan Krause pointed out that libcurl would wrongly send away cookies to
sites in cases where the cookie clearly has a very old expiry date. The
  condition was simply that libcurl's date parser would fail to convert the
  date and it would then count as a (timed-based) match. Starting now, a
  missed date due to an unsupported date format or date range will now cause
  the cookie to not match.
2008-09-08 11:36:19 +00:00
Dan Fandrich 91ff938035 Improved the logic the decides whether to use HTTP 1.1 features or not in a
request.

Detect cases where an upload must be sent chunked and the server supports
only HTTP 1.0 and return CURLE_UPLOAD_FAILED.
2008-09-05 17:58:53 +00:00
Daniel Stenberg 18110b519c - Martin Drasar provided the CURLOPT_POSTREDIR patch. It renames
CURLOPT_POST301 (but adds a define for backwards compatibility for you who
  don't define CURL_NO_OLDIES). This option allows you to now also change the
  libcurl behavior for a HTTP response 302 after a POST to not use GET in the
  subsequent request (when CURLOPT_FOLLOWLOCATION is enabled). I edited the
  patch somewhat before commit. The curl tool got a matching --post302
  option. Test case 1076 was added to verify this.
2008-09-05 16:13:20 +00:00
Daniel Stenberg 4c9768565e - Introducing CURLOPT_CERTINFO and the corresponding CURLINFO_CERTINFO. By
enabling this feature with CURLOPT_CERTINFO for a request using SSL (HTTPS
  or FTPS), libcurl will gather lots of server certificate info and that info
  can then get extracted by a client after the request has completed with
  curl_easy_getinfo()'s CURLINFO_CERTINFO option. Linus Nielsen Feltzing
  helped me test and smoothen out this feature.

  Unfortunately, this feature currently only works with libcurl built to use
  OpenSSL.

  This feature was sponsored by networking4all.com - thanks!
2008-09-05 14:29:21 +00:00
Daniel Stenberg 873e734c39 - Dmitriy Sergeyev pointed out that curl_easy_pause() didn't unpause properly
during certain conditions. I also changed this code to use realloc() based
  on Daniel Fandrich's suggestion.
2008-09-05 09:37:37 +00:00
Yang Tse 29f7f468ce sync with reality 2008-09-05 00:16:35 +00:00
Yang Tse 3dcd2b82c4 fix print formatting string directives 2008-09-04 18:59:05 +00:00
Dan Fandrich 304537c24f Search for the FreeBSD CA cert file /usr/local/share/certs/ca-root.crt 2008-09-03 18:04:47 +00:00
Dan Fandrich 29ec219b82 Fixed an out of memory problem that caused torture test failures in tests
706 and 707.
2008-09-02 23:12:00 +00:00
Daniel Stenberg bbc002a505 - Keith Mok added supported_protocols and supported_features to the pkg-config
file for libcurl, and while doing that fix he unified with curl-config.in
  how the supported protocols and features are extracted and used, so both those
  tools should now always be synced.
2008-09-02 12:07:08 +00:00
Daniel Stenberg 95b817e8d7 stand back for 7.19.0 2008-09-01 14:28:48 +00:00
Dan Fandrich 85a79f9d67 Added tests 1071 through 1074 to test automatic downgrading from HTTP 1.1
to HTTP 1.0 upon receiving a response from the HTTP server.  Tests 1072
and 1073 are similar to test 1069 in that they involve the impossible
scenario of sending chunked data to a HTTP 1.0 server.  All these currently
fail and are added to DISABLED.

Added test 1075 to test --anyauth with Basic authentication.
2008-08-29 23:42:39 +00:00
Daniel Stenberg c67a99ff27 - When libcurl was doing a HTTP POST and the server would respond with
"Connection: close" and actually close the connection after the
  response-body, libcurl could still have outstanding data to send and it
  would not properly notice this and stop sending. This caused weirdness and
  sad faces. http://curl.haxx.se/bug/view.cgi?id=2080222

  Note that there are still reasons to consider libcurl's behavior when
  getting a >= 400 response code while sending data, as Craig Perras' note
  "http upload: how to stop on error" specifies:
  http://curl.haxx.se/mail/archive-2008-08/0138.html
2008-08-29 10:47:59 +00:00
Daniel Stenberg e138ae5ec9 - I'm abandoning the system with the web site mirrors (but keeping download
files bing mirrored) and thus I've changed the URL in the cookiejar header
  to no longer use curlm.haxx.se but instead use the main site curl.haxx.se
2008-08-28 11:35:54 +00:00
Daniel Stenberg 099b62f124 - Dengminwen reported that libcurl would lock a (cookie) share twice (without
an unlock in between) for a certain case and that in fact works when using
  regular windows mutexes but not with pthreads'! Locks should of course not
  get locked again so this is now fixed.
  http://curl.haxx.se/mail/lib-2008-08/0422.html
2008-08-28 07:37:29 +00:00
Dan Fandrich 8ce78ca488 Fixed test case 1065 by changing the handling of CURLOPT_UPLOAD to set
the HTTP method to GET (or HEAD) when given a value of 0.
2008-08-28 06:28:07 +00:00
Yang Tse ecff50c2b4 VC6 generated .dsp file now supports 4 configurations:
libcurl - Win32 DLL Debug
libcurl - Win32 DLL Release
libcurl - Win32 LIB Debug
libcurl - Win32 LIB Release
2008-08-27 23:31:58 +00:00
Dan Fandrich 4b01dfe369 Fixed out of memory problems that caused torture test failures in tests
1021 and 1067.
2008-08-26 21:28:57 +00:00
Yang Tse fef60d9d41 Added check and symbol definition for WIN32 file API usage in configure,
supporting configure's --disable-largefile option for WIN32 targets also.
Non-configure systems which do not use config-win32.h configuration file,
and want to use the WIN32 file API, must define USE_WIN32_LARGE_FILES or
USE_WIN32_SMALL_FILES as appropriate in their own configuration files.
2008-08-26 12:54:12 +00:00
Daniel Stenberg 1c04aa54a7 - Running 'make ca-firefox' in the root build dir will now run the new
firefox-db2pem.sh conversion script that converts a local Firefox db of ca
  certs into PEM format, suitable for use with a OpenSSL or GnuTLS built
  libcurl.
2008-08-23 22:02:41 +00:00
Daniel Stenberg 13dc82b9d4 - Constantine Sapuntzakis fixed a bug when doing proxy CONNECT with the multi
interface, and the proxy would send Connection: close during the
  authentication phase.  http://curl.haxx.se/bug/view.cgi?id=2069047
2008-08-23 12:11:38 +00:00
Dan Fandrich e3ad6d2bd1 Fixed a problem when --dump-header - was given with more than one URL,
which caused an error when the second header was dumped due to stdout
being closed.  Added test case 1066 to verify.  Also fixed a potential
problem where a closed file descriptor might be used for an upload
when more than one URL is given.
2008-08-22 22:57:25 +00:00
Yang Tse 9849c6b847 Adjustments to better select/differentiate when large/small file
support is provided using WIN32 functions directly.
2008-08-22 18:09:03 +00:00
Yang Tse 9bb5da968c Improved curl_m*printf() integral data type size and signedness handling 2008-08-22 11:11:33 +00:00
Yang Tse 42eeb93d99 Fixed a couple of bugs in libcurl's internal curl_m*printf() functions. 2008-08-21 01:55:33 +00:00
Yang Tse 44142f8234 Update of lib/Makefile.Watcom. 2008-08-20 23:40:40 +00:00
Dan Fandrich 6768e81d5d Added an edited version of Vincent Le Normand's documentation of SFTP quote
commands to the man pages.
2008-08-20 19:45:43 +00:00
Daniel Stenberg 3743f515cf - Phil Pellouchoud pointed out that the windows version of libcurl had a
memory leak because it never called the OpenSSL function
  CRYPTO_cleanup_all_ex_data() as it was supposed to. This was because of a
  missing define in config-win32.h!
2008-08-20 19:29:00 +00:00
Yang Tse 2f71461b29 Added test case 557 to verify libcurl's internal curl_m*printf() functions
formatting functionality when handling signed and unsigned longs, as well as
our curl_off_t data type.
2008-08-18 09:58:08 +00:00
Yang Tse fb8fe6f2b3 OpenSSl enabled NetWare builds are changed to use the 'openssl' subdirectory
when including the OpenSSL header files. This is the recommended setting, this
prevents the undesired inclusion of header files with the same name as those
of OpenSSL but which do not belong to the OpenSSL package. The visible change
from previously released libcurl versions is that now OpenSSl enabled NetWare
builds also define USE_OPENSSL in config files, and that OpenSSL header files
must be located in a subdirectory named 'openssl'.
2008-08-17 13:25:54 +00:00
Yang Tse ad638da2c2 Library internal only C preprocessor macros FORMAT_OFF_T and FORMAT_OFF_TU
remain in use as internal curl_off_t print formatting strings for the internal
*printf functions which still cannot handle print formatting string directives
such as "I64d", "I64u", and others available on MSVC, MinGW, Intel's ICC, and
other DOS/Windows compilers.

This reverts previous commit part which did:

FORMAT_OFF_T  -> CURL_FORMAT_CURL_OFF_T
FORMAT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU
2008-08-16 01:33:59 +00:00
Dan Fandrich a923d8541c Added test case 1065 to test a PUT with a single file but two URLs. This
was discovered to be problematic while investigating an incident reported by
Von back in May.  curl in this case doesn't include a Content-Length: or
Transfer-Encoding: chunked header which is illegal. This test case is
added to DISABLED until a solution is found.
2008-08-15 19:18:46 +00:00
Yang Tse 66fb9ca5f6 For congruency sake with the naming of other CURL_XXXXXX_CURL_OFF_T macros,
the names of the curl_off_t formatting string directives now become
CURL_FORMAT_CURL_OFF_T and CURL_FORMAT_CURL_OFF_TU.

CURL_FMT_OFF_T  -> CURL_FORMAT_CURL_OFF_T
CURL_FMT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU

Remove the use of an internal name for the curl_off_t formatting string directives
and use the common one available from the inside and outside of the library.

FORMAT_OFF_T  -> CURL_FORMAT_CURL_OFF_T
FORMAT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU
2008-08-15 02:58:15 +00:00
Yang Tse 5303cdc4af Remove first version of comment not intended to be finally committed. 2008-08-13 15:48:44 +00:00
Yang Tse feb03e4717 The size of long is a build time characteristic and as such it is now recorded
in curlbuild.h as CURL_SIZEOF_LONG. Definition now done from configure process
and in CVS curlbuild.h.dist for non-configure systems.
2008-08-13 15:32:20 +00:00
Dan Fandrich 7eab7fa353 Fixed a buffer overflow problem in Curl_proxyCONNECT that could occur
when a server responded with long headers and data.  Luckily, the buffer
overflowed into another unused buffer, so no actual harm was done.
Added test cases 1060 and 1061 to verify.
2008-08-12 20:07:52 +00:00
Daniel Stenberg 14a5596346 - Andy Tsouladze fixed runtests.pl to not attempt to execute the stunnel
_directory_ if that happened to appear in the path!
2008-08-12 07:21:39 +00:00
Yang Tse 60a3773c50 Added macros for minimum-width signed and unsigned curl_off_t integer
constants CURL_OFF_T_C and CURL_OFF_TU_C. The clever double helper macro
used internally to provide its functionality is thanks to Lars Nilsson.
2008-08-12 03:00:24 +00:00
Dan Fandrich f1fe04245a Fixed a boundary condition error in ftp_readresp() whereby a non-terminal
line of a multiline FTP response whose last byte landed exactly at the end
of the BUFSIZE-length buffer would be treated as the terminal response
line.  The following response code read in would then actually be the
end of the previous response line, and all responses from then on would
correspond to the wrong command. Test case 1062 verifies this.

Stop closing a never-opened ftp socket.
2008-08-11 23:16:08 +00:00
Daniel Stenberg f8a3aa91cd - Constantine Sapuntzakis filed bug report #2042430
(http://curl.haxx.se/bug/view.cgi?id=2042430) with a patch. "NTLM Windows
  SSPI code is not thread safe". This was due to libcurl using static
  variables to tell wether to load the necessary SSPI DLL, but now the loading
  has been moved to the more suitable curl_global_init() call.
2008-08-11 20:29:36 +00:00
Daniel Stenberg 019bde82ce - Constantine Sapuntzakis filed bug report #2042440
(http://curl.haxx.se/bug/view.cgi?id=2042440) with a patch. He identified a
  problem when using NTLM over a proxy but the end-point does Basic, and then
  libcurl would do wrong when the host sent "Connection: close" as the proxy's
  NTLM state was erroneously cleared.
2008-08-11 19:26:01 +00:00
Yang Tse b5b25b39e9 Added missing signed and unsigned curl_off_t integer constant suffixes for
internal and external use. CURL_SUFFIX_CURL_OFF_T, CURL_SUFFIX_CURL_OFF_TU.
2008-08-11 18:27:21 +00:00
Dan Fandrich 40b2e06a7f Added test1059 to test the FTP proxy tunnel problem fixed July 11. 2008-08-08 07:26:30 +00:00
Dan Fandrich e54209d643 Fixed an uninitialized variable in multi_runsingle() that could cause a
request to prematurely end.
2008-08-08 01:52:08 +00:00
Yang Tse f6a958dc3a Remove last adjustment done to testcurl.pl to verify if change introduced by
Guenter Knauf in lib/Makefile.netware is enough to get the netware autobuilds
going again.
2008-08-07 22:40:06 +00:00
Yang Tse a7d52c414f Adjust testcurl.pl to copy checked out curlbuild.h.dist as curlbuild.h
for non-configure targets when host system doesn't run buildconf.bat.
2008-08-07 20:41:12 +00:00
Yang Tse 479466a495 Skip data type check in DO_CURL_OFF_T_CHECK macro when argument is empty. 2008-08-07 19:03:46 +00:00
Yang Tse fa2a8f6fb8 Prevent buildconf from removing 'Makefile' and 'missing' files. This would blow
away our CVS checked 'missing' file and also CVS checked 'hiper/Makefile'.
2008-08-07 16:22:25 +00:00
Yang Tse ddfa33be79 Fix CURL_CHECK_DEF so that when the expansion of the preprocessor symbol results
in a set of double-quoted strings, this macro will now return an expansion which
consists of a single double-quoted string result of concatenating all of them.
2008-08-07 16:07:26 +00:00
Yang Tse 14240e9e10 Initial support of curlbuild.h and curlrules.h which allows
to have a curl_off_t data type no longer gated to off_t.
2008-08-07 00:29:08 +00:00
Yang Tse 09f278121e Validate that autom4te and autoconf versions match.
Validate that aclocal and automake versions match.

Improve removal of previous run generated files.

Remove verbose debug logging of aclocal on Solaris.
2008-08-05 06:20:18 +00:00
Daniel Stenberg ed50e3f1b4 - Yehoshua Hershberg found a problem that would make libcurl re-use a
connection with the multi interface even if a previous use of it caused a
  CURLE_PEER_FAILED_VERIFICATION to get returned. I now make sure that failed
  SSL connections properly close the connections.
2008-08-04 22:07:50 +00:00
Daniel Stenberg 3a499099af - Test cases 1051, 1052 and 1055 were added by Daniel Fandrich on July 30 and
proved how PUT and POST with a redirect could lead to a "hang" due to the
  data stream not being rewound properly when it had to in order to get sent
  properly (again) to the subsequent URL. This is now fixed and these test
  cases are no longer disabled.
2008-08-04 22:00:22 +00:00
Yang Tse b4fdccf87a Autoconf 2.62 has changed the behaviour of the AC_AIX macro which we use.
Prior versions of autoconf defined _ALL_SOURCE if _AIX was defined. But,
autoconf 2.62 version of AC_AIX defines _ALL_SOURCE along with other four
preprocessor symbols no matter if the system is AIX or not. To keep the
traditional behaviour, as well as an uniform one, across autoconf versions
AC_AIX is replaced with our own internal macro.
2008-08-04 06:48:11 +00:00
Daniel Stenberg 8d012181b0 - Test case 1041 (added by Daniel Fandrich April 14th) proved a bug where PUT
with -C - sent garbage in the Content-Range: header. I fixed this problem by
  making sure libcurl always sets the size of the _entire_ upload if an app
  attemps to do resumed uploads since libcurl simply cannot know the size of
  what is currently at the server end. Test 1041 is no longer disabled.
2008-08-03 22:20:58 +00:00
Daniel Stenberg d6344d9b5f refer to the new option by its real name 2008-08-03 21:50:56 +00:00
Yang Tse 7c6df7132e No longer test availability of the gdi32 library, nor use it for linking, even
when we have been doing this since revision 1.47 of configure.ac 4 years and
5 months ago when cross-compiling a Windows target. We actually don't use any
function from the Windows GDI (Graphics Device Interface) related with drawing
or graphics-related operations.
2008-08-02 01:44:13 +00:00
Dan Fandrich 42cabc14d4 Added support for --append on SFTP uploads. Unfortunately, OpenSSH doesn't
support this so it goes untested.
2008-08-01 18:41:14 +00:00
Yang Tse 1035469662 Removed definition of CURL_CHECK_WORKING_RESOLVER from acinclude.m4 it has
not been in use since revision 1.81 of configure.in 6 years, 9 months ago.
2008-08-01 05:24:19 +00:00
Yang Tse 296a6f7749 Sync up with reality 2008-08-01 03:17:38 +00:00
Dan Fandrich 9251dd7b24 User names embedded in proxy URLs without a password were parsed
incorrectly--the host name is treated as part of the user name and the
port number becomes the password.  This can be observed in test 279
(was KNOWN_ISSUE #54).
2008-08-01 02:09:08 +00:00
Dan Fandrich b4a5ce89c2 Fixed a problem with any FTP URL or any URLs containing an IPv6 address
being mangled when passed to proxies when CURLOPT_PORT is also set
(reported by Pramod Sharma).
2008-07-31 22:46:29 +00:00
Dan Fandrich 660516914e Fixed parsing of an IPv6 proxy address to support a scope identifier,
as well as IPv4 addresses in IPv6 format. Also, better handle the case
of a malformatted IPv6 address (avoid empty and NULL strings).
2008-07-31 20:04:00 +00:00
Dan Fandrich d69a630989 Fixed a couple of buffer overflows in the MS-DOS port of the curl tool.
Factored out unslashquote. Added some 'const's in function parameters.
2008-07-31 01:12:06 +00:00
Daniel Stenberg 5aed78e183 - Phil Blundell added the CURLOPT_SCOPE option, as well as adjusted the URL
parser to allow numerical IPv6-addresses to be specified with the scope
  given, as per RFC4007 - with a percent letter that itself needs to be URL
  escaped. For example, for an address of fe80::1234%1 the HTTP URL is:
  "http://[fe80::1234%251]/"
2008-07-30 21:55:26 +00:00
Daniel Stenberg ae654266df - PHP's bug report #43158 (http://bugs.php.net/bug.php?id=43158) identifies a
true bug in libcurl built with OpenSSL. It made curl_easy_getinfo() more or
  less always return 0 for CURLINFO_SSL_VERIFYRESULT because the function that
  would set it to something non-zero would return before the assign in almost
  all error cases. The internal variable is now set to non-zero from the start
  of the function only to get cleared later on if things work out fine.
2008-07-30 21:24:59 +00:00
Dan Fandrich bc649593e4 Added test cases 1052 through 1055 to test uploading data from files
during redirects.  Test cases 1052 and 1055 show problems (maybe the same
root cause as 1051) and are disabled.
2008-07-30 21:04:44 +00:00
Dan Fandrich 1f26ea4a85 Added test case 1051 to test Location: following with PUT, as reported
by Ben Sutcliffe.  The test when run manually shows a problem in curl,
but the test harness web server doesn't run the test correctly so it's
disabled for now.
2008-07-30 07:24:59 +00:00
Dan Fandrich 7a8b11d716 Fixed --use-ascii to properly convert text files on Symbian OS, MS-DOS
and OS/2.
2008-07-30 00:09:02 +00:00
Dan Fandrich 4ff37a4ed1 Added test case 1050 to test --ftp-port with an IPv6 address.
Made --interface tests less restrictive on host address.
2008-07-29 01:05:28 +00:00
Dan Fandrich f042a7419d Added test cases 1045 through 1049 as simple tests of --interface using the
localhost interface.
2008-07-28 18:39:32 +00:00
Dan Fandrich b6b03c8ab9 Added feature in runtests.pl to select tests based on key word. 2008-07-27 02:34:27 +00:00
Daniel Stenberg a96784b98e - David Bau filed bug report #2026240 "CURL_READFUNC_PAUSE leads to buffer
overrun" (http://curl.haxx.se/bug/view.cgi?id=2026240) identifying two
  problems, and providing the fix for them:

  - CURL_READFUNC_PAUSE did in fact not pause the _sending_ of data that it is
    designed for but paused _receiving_ of data!

  - libcurl didn't internally set the read counter to zero when this return
    code was detected, which would potentially lead to junk getting sent to
    the server.
2008-07-26 21:15:47 +00:00
Dan Fandrich e06944438a Added test 1044 to test large file support in ftp with -I. 2008-07-26 20:09:36 +00:00
Dan Fandrich 932b589780 Changed the long logfile elision code in runtests.pl to properly handle
lines ending in \r.
2008-07-24 02:16:48 +00:00
Daniel Stenberg 7d0eabaa80 - I went over the curl_easy_setopt man page and replaced most references to
non-zero with the fixed value of 1. We should strive at making options
  support '1' for enabling them mentioned explicitly, as that then will allow
  us for to extend them in the future without breaking older programs.
2008-07-23 20:53:04 +00:00
Yang Tse 1b37baf656 Use the sreadfrom() wrapper to replace recvfrom() in our code. 2008-07-21 03:06:07 +00:00
Yang Tse bffe69a151 when recvfrom prototype uses a void pointer for arguments 2, 5 or 6 this will
now cause the definition of RECVFROM_TYPE_ARG2_IS_VOID, RECVFROM_TYPE_ARG5_IS_VOID
or RECVFROM_TYPE_ARG6_IS_VOID, as appropriate.
2008-07-21 00:36:55 +00:00
Yang Tse 39f23aec6b RECVFROM_TYPE_ARG2, RECVFROM_TYPE_ARG5 and RECVFROM_TYPE_ARG6 are now defined
to the data type pointed by its respective argument and not the pointer type.
2008-07-17 03:07:54 +00:00
Yang Tse a9dc900515 Configure process now checks availability of recvfrom() socket function and
finds out its return type and the types of its arguments. Added definitions
for non-configure systems config files, and introduced macro sreadfrom which
will be used on udp sockets as a recvfrom() wrapper.
2008-07-16 19:16:41 +00:00
Yang Tse a00febe1a0 add comment for include paths 2008-07-15 13:54:30 +00:00
Dan Fandrich aa4a7471dd Added test1042 and test1043 to test -C - on HTTP. 2008-07-15 04:12:15 +00:00