Commit Graph

4143 Commits

Author SHA1 Message Date
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
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
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
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 3615063fbc Added more code under #ifndef CURL_DISABLE_HTTP to fix builds with
--disable-http
2008-08-01 01:39:24 +00:00
Dan Fandrich 09664f1ab8 Refactored create_conn by breaking it up into many smaller functions 2008-08-01 00:55:43 +00:00
Dan Fandrich bdf1157d55 Made a parameter const 2008-08-01 00:49:29 +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 fe1d024351 Fixed a couple of problems in the IPv6 scope code. First, a host name in
an URL in a Location: header didn't have the scope ID removed, so an
invalid host name was used.  Second, when the scope ID was removed, it
also removed any port number that may have existed in the URL.
2008-07-31 02:18:01 +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 cc0285da7f Factored out Curl_copy_header_value 2008-07-30 20:11:51 +00:00
Yang Tse 5febd06c25 Sync comment with reality. 2008-07-30 08:21:25 +00:00
Yang Tse 537490e391 Undo using the sreadfrom() wrapper to replace recvfrom() in our code. 2008-07-30 05:10:42 +00:00
Dan Fandrich 1c8f689ecb Minor Symbian updates. 2008-07-30 00:10:32 +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 248c2b9bf5 Eliminate a unnecessary socket creation in Curl_getaddrinfo for an IPv4
address in an IPv6 capable libcurl.
2008-07-29 18:26:35 +00:00
Yang Tse d785ed2588 ignore *.dist files 2008-07-29 02:05:07 +00:00
Dan Fandrich bc0ebfcdeb Fixed display of the interface bind address in the trace output when it's
an IPv6 address.
2008-07-28 18:35:34 +00:00
Yang Tse 1ac1212925 setup.h handles definition of _REENTRANT based on NEED_REENTRANT
definition which might be defined in config.h or config-*.h files
2008-07-27 03:16:37 +00:00
Dan Fandrich 432945e422 Eliminate a unnecessary socket creation in Curl_getaddrinfo for an IPv4
address in an IPv6 capable libcurl.
2008-07-27 02:20:34 +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
Yang Tse a7abd5bf70 ignore curllib.vcproj 2008-07-24 15:11:24 +00:00
Yang Tse f22114aeed minor reordering in OS/400 config/setup files 2008-07-22 00:12:06 +00:00
Yang Tse 0919de4511 Change recvfrom's sixth argument data type to the 'historically standard' 'int'
data type for systems where this sixth argument is prototyped as a void pointer.

Start of thread: http://curl.haxx.se/mail/lib-2008-07/0153.html
2008-07-21 18:24:32 +00:00
Gisle Vanem 3e5292a052 Undefine 'byte' due to dict.c. 2008-07-21 15:39:54 +00:00
Yang Tse 775d9e0615 fix compiler warning: comparison between signed and unsigned 2008-07-21 03:59:23 +00:00
Yang Tse a20d55fb64 Adjust recvfrom's sixth arg data type definition for NetWare (LIBC) 2008-07-21 03:50:02 +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 362422641e fix comment 2008-07-16 19:24:03 +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 1e7125ae7b add comment for include paths 2008-07-15 05:46:49 +00:00
Yang Tse 0f50cd7623 Move _REENTRANT definition earlier in lib/setup.h 2008-07-14 17:31:39 +00:00
Yang Tse 669c555874 Removed inclusion of remaining system header files from configuration files.
These are included from lib/setup.h or specific source code file.
2008-07-14 16:58:34 +00:00
Yang Tse 1cfb73a129 Inclusion of <extra/stricmp.h> and <extra/strdup.h> is moved to lib/setup.h 2008-07-14 16:10:29 +00:00
Yang Tse 2a585c2fba Remove duplicate file inclusions. These are already done in lib/setup.h
and lib/setup_once.h
2008-07-14 15:58:02 +00:00
Yang Tse 32a83128e6 Remove duplicate file inclusions. These are already done in lib/setup.h 2008-07-14 15:30:26 +00:00
Yang Tse fe7bb33af8 HTTP_ONLY definition check in lib/setup.h is now done once that configuration
file has been included. In this way if symbol is defined in the config file
it will no longer be ignored.
2008-07-14 12:39:50 +00:00
Yang Tse da6fa34f02 fix multiple header inclusion prevention definition 2008-07-11 18:59:00 +00:00
Yang Tse 37a358ab93 move multiple header inclusion prevention definition to top of file 2008-07-11 18:52:35 +00:00
Yang Tse 3452c8d693 Added missing multiple header inclusion prevention definition 2008-07-11 18:42:30 +00:00
Daniel Stenberg 57625b6c4c indent and comment cleanup (no code change) 2008-07-11 09:18:30 +00:00
Daniel Stenberg 0d058d2174 - Daniel Fandrich found out we didn't pass on the user-agent properly when
doing "proxy-tunnels" with non-HTTP prototols and that was simply because
  the code assumed the user-agent was only needed for HTTP.
2008-07-11 09:08:27 +00:00
Dan Fandrich b4b6cfdb1c Changed slightly the SFTP quote commands chmod, chown and chgrp to only
set the attribute that has changed instead of all possible ones. Hopefully,
this will solve the "Permission denied" problem that Nagarajan Sreenivasan
reported when setting some modes, but regardless, it saves a protocol
round trip in the chmod case.
2008-07-11 04:38:11 +00:00
Dan Fandrich 6f3ef94836 Fixed another OOM problem, this time with test 64. 2008-07-10 18:15:22 +00:00
Yang Tse 08ac9866e0 Peter Lamberg filed bug report #2015126: "poll gives WSAEINVAL when POLLPRI
is set in fdset.events" (http://curl.haxx.se/bug/view.cgi?id=2015126) which
exactly pinpointed the problem only triggered on Windows Vista, provided
reference to docs and also a fix. There is much work behind Peter Lamberg's
excellent bug report. Thank You!
2008-07-10 18:01:44 +00:00
Daniel Stenberg 0cd8840dba - Andreas Schuldei improved Phil Blundell's patch for IPv6 using c-ares, and I
edited it slightly. Now you should be able to use IPv6 addresses fine even
  with libcurl built to use c-ares.
2008-07-09 18:39:49 +00:00
Dan Fandrich d4b253ba3e Fixed an OOM handling problem that cause test 11 to fail the torture test. 2008-07-09 18:33:35 +00:00
Dan Fandrich 60f0b4fffe Fixed test 554 to pass the torture test. 2008-07-08 21:16:18 +00:00
Daniel Stenberg 0e5da5b8bc - Scott Barrett provided a test case for a segfault in the FTP code and the
fix for it. It occured when you did a FTP transfer using
  CURLFTPMETHOD_SINGLECWD and then did another one on the same easy handle but
  switched to CURLFTPMETHOD_NOCWD. Due to the "dir depth" variable not being
  cleared properly.  Scott's test case is now known as test 539 and it
  verifies the fix.
2008-07-07 20:37:07 +00:00
Patrick Monnerat ddfa4b8896 New options added to OS400 wrapper and ILERPG definitions.
Wrong defines (typos) for QSSL layer fixed.
2008-07-07 10:39:46 +00:00
Yang Tse 7820391cb9 fix compiler warning: empty body in an if-statement 2008-07-05 03:31:41 +00:00
Daniel Stenberg 82412f218f Phil Blundell provided a fix for libcurl's treatment of unexpected 1xx
response codes. Previously libcurl would hang on such occurances. I added
test case 1033 to verify.
2008-07-03 08:47:53 +00:00
Daniel Stenberg 7c648782bc Introcuding a new timestamp for curl_easy_getinfo():
CURLINFO_APPCONNECT_TIME. This is set with the "application layer"
handshake/connection is completed (typically SSL, TLS or SSH). By using this
you can figure out the application layer's own connect time. You can extract
the time stamp using curl's -w option and the new variable named
'time_appconnect'. This feature was sponsored by Lenny Rachitsky at NeuStar.
2008-07-03 06:56:03 +00:00
Dan Fandrich ee64d14733 Support Open Watcom C on Linux (as well as Windows). 2008-07-02 18:34:00 +00:00
Yang Tse 97333deb3f fallback to gettimeofday when monotonic clock is unavailable at run-time 2008-07-02 03:04:56 +00:00
Daniel Stenberg ad1145a201 CreateConnection collided with a function using the exact same name in the
INTEGRITY RTOS, so I renamed it to create_conn. It then made sense to also
rename SetupConnection to setup_conn to match it.
2008-07-01 21:53:18 +00:00
Daniel Stenberg eb60ba23f5 - Stephen Collyer and Tor Arntsen helped identify a flaw in the range code
which output the range using a signed variable where it should rather use
  unsigned.
2008-06-30 13:07:05 +00:00
Daniel Stenberg 69aac49f79 made %llu work for printing unsigned long longs, added the generic curl source
header
2008-06-30 12:58:15 +00:00
Daniel Stenberg a81a16beac Added README.NSS to describe the current NSS situation. 2008-06-24 08:52:35 +00:00
Daniel Stenberg d92945bb8a - Eduard Bloch filed the debian bug report #487567
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487567) pointing out that
  libcurl used Content-Range: instead of Range when doing a range request with
  --head (CURLOPT_NOBODY). This is now fixed and test case 1032 was added to
  verify.
2008-06-22 20:38:16 +00:00
Dan Fandrich 90a6a59a2f Stopped using ranges in scanf character sequences (e.g. %[a-z]) since that
is not ANSI C, just a common extension.  This caused problems on
at least Open Watcom C.
2008-06-22 06:57:00 +00:00
Daniel Stenberg 8bae3d9007 Oops, that was an experimental change not meant to be committed! 2008-06-21 21:21:29 +00:00
Daniel Stenberg 98042b858d made Curl_nss_send() take const data to kill compiler warning 2008-06-21 21:19:42 +00:00
Daniel Stenberg da97f78ae0 - Phil Pellouchoud found a case where libcurl built with NSS failed to
handshake with a SSLv2 server, and it turned out to be because it didn't
  recognize the cipher named "rc4-md5". In our list that cipher was named
  plainly "rc4". I've now added rc4-md5 to work as an alias as Phil reported
  that it made things work for him again.
2008-06-20 11:15:54 +00:00
Daniel Stenberg 2e1a9da5e2 remove leftover proto that isn't used, I made it a macro instead 2008-06-20 10:45:26 +00:00
Daniel Stenberg 422fd933f5 - Hans-Jurgen May pointed out that trying SCP or SFTP over a SOCKS proxy
crashed libcurl. This is now addressed by making sure we use "plain send"
  internally when doing the socks handshake instead of the Curl_write()
  function which is designed to use the "target" protocol. That's then SCP or
  SFTP in this case. I also took the opportunity and cleaned up some ssh-
  related #ifdefs in the code for readability.
2008-06-20 10:43:32 +00:00
Daniel Stenberg d09b6ecaa5 - Christopher Palow fixed a curl_multi_socket() issue which previous caused
libcurl to not tell the app properly when a socket was closed (when the name
  resolve done by c-ares is done) and then immediately re-created and put to
  use again (for the actual connection). Since the closure will make the
  "watch status" get lost in several event-based systems libcurl will need to
  tell the app about this close/re-create case.
2008-06-19 21:32:51 +00:00
Daniel Stenberg fb2e71b9bd - Dengminwen found a bug in the connection re-use function when using the
multi interface with pipelining enabled as it would wrongly check for,
  detect and close "dead connections" even though that connection was already
  in use!
2008-06-19 08:31:22 +00:00
Daniel Stenberg 68b67e24f2 Removed the #define of ciphernum since keeping a define updated to be the
number of entries in a provided table is doomed to fail in the long run. Now
we use the NUM_OF_CIPHERS define instead to figure out the amount.
2008-06-19 05:47:27 +00:00
Daniel Stenberg c1e2341f0a s/strcasecmp/strequal to make it more portable 2008-06-19 05:42:45 +00:00
Daniel Stenberg e547bfa933 - Rob Crittenden brought a fix for the NSS layer that makes libcurl no longer
always fire up a new connection rather than using the existing one when the
  multi interface is used. Original bug report:
  https://bugzilla.redhat.com/show_bug.cgi?id=450140
2008-06-18 22:01:55 +00:00
Daniel Stenberg 36ddb13d1f removed warning about unused argument by simply removing that argument from
the check_issuer_cert() proto
2008-06-18 21:50:40 +00:00
Daniel Stenberg 74e3def5b3 check_issuer_cert() now builds and there's one warning less. Still one compiler
warning in the code though but we need NSS' base64.h header for that and we
don't currently have a suitable way to include it as our own base64.h header
kind of "blocks" it.
2008-06-18 21:48:51 +00:00
Daniel Stenberg 2597020d22 In checkPendPipeline() we can't be setting the TIMER_CONNECT correctly as that
is for the TCP connect. I changed it to TIMER_PRETRANSFER which seems to be
what was intended here.
2008-06-13 21:16:10 +00:00
Daniel Stenberg 5c56bdf229 fixed bad infof() usage! 2008-06-12 22:00:35 +00:00
Daniel Stenberg 04d5c8fb77 - I did a cleanup of the internal generic SSL layer and how the various SSL
libraries are supported. Starting now, each underlying SSL library support
  code does a set of defines for the 16 functions the generic layer (sslgen.c)
  uses (all these new function defines use the prefix "curlssl_"). This
  greatly simplified the generic layer in readability by involving much less
  #ifdefs and other preprocessor stuff and should make it easier for people to
  make libcurl work with new SSL libraries.

  Hopefully I can later on document these 16 functions somewhat as well.

  I also made most of the internal SSL-dependent functions (using Curl_ssl_
  prefix) #defined to nothing when no SSL support is requested - previously
  they would unnecessarily call mostly empty functions.
2008-06-11 17:01:58 +00:00
Yang Tse 5980b3cbb0 fix compiler warning: conversion from `pointer to void' to `pointer to int
function(pointer to char,int,int,pointer to void)' is compiler dependent
2008-06-11 15:26:04 +00:00
Daniel Stenberg 3940e69c91 fix warning in GnuTLS build by making sure Curl_gtls_send() takes a const
void *
2008-06-10 21:53:59 +00:00
Daniel Stenberg 0ace5f6553 - I made the OpenSSL code build again with OpenSSL 0.9.6. The CRLFILE
functionality killed it due to its unconditional use of
  X509_STORE_set_flags...
2008-06-10 20:49:17 +00:00
Gunter Knauf 72870e2c57 enable additional CFLAGS from commandline. 2008-06-08 22:29:34 +00:00
Gunter Knauf d8bc4a0e9a use our *printf functions only. 2008-06-08 15:52:03 +00:00
Daniel Stenberg a2e45a2211 code style cleanup 2008-06-06 20:57:32 +00:00
Daniel Stenberg 621c2b9015 - Axel Tillequin and Arnaud Ebalard added support for CURLOPT_ISSUERCERT, for
OpenSSL, NSS and GnuTLS-built libcurls.
2008-06-06 20:52:32 +00:00
Daniel Stenberg 3fe8251dfb - Axel Tillequin and Arnaud Ebalard added support for CURLOPT_CRLFILE, for
OpenSSL, NSS and GnuTLS-built libcurls.
2008-06-06 18:40:21 +00:00
Daniel Stenberg 930a45e7a9 - Added CURLINFO_PRIMARY_IP as a new information retrievable with
curl_easy_getinfo. It returns a pointer to a string with the most recently
  used IP address. Modified test case 500 to also verify this feature. The
  implementing of this feature was sponsored by Lenny Rachitsky at NeuStar.
2008-06-06 17:33:35 +00:00
Dan Fandrich 6f0a2608b4 Fixed a problem where telnet data would be lost if an EWOULDBLOCK
condition were encountered.
2008-06-03 18:03:11 +00:00
Yang Tse 4774582dfb Fix problem: 'result' may be used uninitialized.
Issue detected by Guenter Knauf's NetWare autobuild.
2008-05-31 01:37:21 +00:00
Daniel Stenberg ec4f6e93c2 - Emil Romanus found a problem and helped me repeat it. It occured when using
the curl_multi_socket() API with HTTP pipelining enabled and could lead to
  the pipeline basically stalling for a very long period of time until it took
  off again.
2008-05-28 20:56:19 +00:00
Daniel Stenberg b49dcfb52b - Jeff Weber reported memory leaks with aborted SCP and SFTP transfers and
provided excellent repeat recipes. I fixed the cases I managed to reproduce
  but Jeff still got some (SCP) problems even after these fixes:
  http://curl.haxx.se/mail/lib-2008-05/0342.html
2008-05-28 20:31:28 +00:00
Daniel Stenberg f7815fa93c - Bug report #1973352 (http://curl.haxx.se/bug/view.cgi?id=1973352) identified
how the HTTP redirect following code didn't properly follow to a new URL if
  the new url was but a query string such as "Location: ?moo=foo". Test case
  1031 was added to verify this fix.
2008-05-26 20:39:41 +00:00
Daniel Stenberg b97606f0b0 Andreas Faerber and Scott McCreary made (lib)curl build for the Haiku OS 2008-05-26 15:09:28 +00:00
Yang Tse c57e748107 David Rosenstrauch reported that header files spnegohelp.h and
openssl/objects.h were needed to compile SPNEGO support.
2008-05-26 03:10:34 +00:00
Yang Tse d6f8f16068 fix: preprocessor complaining about macro redefinition 2008-05-26 01:59:00 +00:00
Daniel Stenberg d001f6a396 Dan Fandrich pointed out that this is the way we should increase the number
for 7.18.2 since we have added functions in this release.

http://curl.haxx.se/mail/lib-2008-05/0240.html
2008-05-23 17:56:03 +00:00
Daniel Stenberg b8abeab6d3 we bump the SO "revision" for next release due to the new functions added 2008-05-22 20:34:47 +00:00
Dan Fandrich 4aa176c127 Fixed some include file problems on Windows reported by David Rosenstrauch 2008-05-22 19:44:10 +00:00