Commit Graph

4308 Commits

Author SHA1 Message Date
Yang Tse fb08868e54 oops 2008-10-17 13:33:13 +00:00
Daniel Stenberg c141d99059 fix syntax error 2008-10-17 13:23:21 +00:00
Yang Tse 4acbe8f20c fix compiler warning 2008-10-17 12:53:53 +00:00
Yang Tse 2ea70a5c73 OOM condition fix 2008-10-17 12:49:02 +00:00
Yang Tse 98b13037e7 remove some spurious line-endings 2008-10-17 03:59:02 +00:00
Yang Tse 29f09f71b4 portability fix to avoid memory alignment problems 2008-10-17 03:38:36 +00:00
Dan Fandrich a00b6e258d Return an error when a proxy option is set when configured with
--disable-proxy mode.
Removed some unnecessary prototypes.
2008-10-16 22:56:40 +00:00
Daniel Stenberg 54582bdce9 don't segfault when NULL is passed in to CURLOPT_USERPWD or
CURLOPT_PROXYUSERPWD
2008-10-16 20:43:02 +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 9d16b4081e Renamed Curl_ascii_equal to Curl_raw_equal and bugfixed the my_toupper function
used in strequal.c so now all test cases run fine for me again.
2008-10-16 08:23:48 +00:00
Daniel Stenberg 545cafce9b Curl_ascii_equal() must not assume that the string is actually ASCII (so that a-z
are consecutive and with a 0x20 "distance" to the uppercase letter), since we do
support EBCDIC as well. Thus I replaced the macro with a (larger) switch case.

I better change the function name...
2008-10-16 07:59:00 +00:00
Daniel Stenberg 5175664174 fix warning 2008-10-15 21:44:49 +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
Daniel Stenberg 0ea1c28135 removed the proto as well since the function is now gone 2008-10-15 11:31:39 +00:00
Daniel Stenberg 36e56f36ad remove Curl_strcasestr() since there is no code at all using this function! 2008-10-15 09:56:34 +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
Yang Tse ad61b58036 fix compiler warning 2008-10-14 02:35:39 +00:00
Daniel Stenberg 18be9882f7 Removed superfluous check of clist->name, as in this code path that pointer
has already been dereferenced so it is bound to be valid. Pointed out to us
by coverity.com
2008-10-13 21:03:12 +00:00
Yang Tse d6114165d3 attempt to fix or allow further detection of an elusive icc SIGSEGV 2008-10-13 06:23:42 +00:00
Yang Tse c3a959cc37 There's no guarantee that a socket was involved at this point, so avoid displaying any error code.
And on the other hand a message after setsockopt() certainly must use SOCKERRNO.
2008-10-13 06:16:02 +00:00
Dan Fandrich 8eb64ad600 Changed Curl_strlcat to strlcat, which is the one guaranteed to exist 2008-10-12 15:17:15 +00:00
Yang Tse a754ea1326 fix compiler warning 2008-10-11 15:32:32 +00:00
Yang Tse 2ecf22e37e fix compiler warning: explicit conversion of a 64-bit integral type to a smaller integral type 2008-10-11 01:56:04 +00:00
Dan Fandrich 9dcd0756ba Fixed some compiler warnings with CURL_DISABLE_HTTP 2008-10-10 19:10:44 +00:00
Yang Tse c455254fd1 attempt to fix or allow further detection of an elusive icc SIGSEGV 2008-10-10 17:25:53 +00:00
Patrick Monnerat bb1f6e6818 _ Adapt OS400 EBCDIC wrappers to new options.
_ Update RPG binding accordingly.
_ Fix new options comments.
2008-10-10 15:54:07 +00:00
Dan Fandrich 8cd76d3921 Allow compilation when no IPv6 stack is available. 2008-10-10 03:46:32 +00:00
Yang Tse 885805b5df move struct namebuf6 declaration out of Curl_ip2addr6() 2008-10-10 03:01:50 +00:00
Yang Tse d0a48627b2 fix compiler warning 2008-10-10 02:14:46 +00:00
Dan Fandrich 5b9a57f536 Get rid of some more code in the CURL_DISABLE_HTTP case 2008-10-09 22:14:38 +00:00
Daniel Stenberg ba9963b8fa I replaced the use of 'struct tm' with a private clone of that struct simply
because the struct is declared on the stack and not all members are used so
we could just as well make struct with only struct members we actually need.
2008-10-09 21:57:51 +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
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
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
Dan Fandrich 450348d6bd Fixed a memory leak in the new CURLOPT_USERPWD handling 2008-10-08 20:14:46 +00:00
Yang Tse 4754880099 fix missing null-pointer check 2008-10-08 18:32:06 +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 95456b8e78 Added const to some pointer variables 2008-10-08 01:17:51 +00:00
Dan Fandrich 79fc481a2b Split off Curl_isxdigit function 2008-10-07 23:20:06 +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 27db045095 fix compiler warning: dereferencing type-punned pointer will break strict-aliasing rules 2008-10-07 18:28:24 +00:00
Yang Tse aec761916e fix another error introduced in previously mentioned commit 2008-10-03 02:25:52 +00:00
Yang Tse 7d750d2b92 fix error introduced in previous commit 2008-10-03 00:35:22 +00:00
Yang Tse bdf1724412 take 2 at fixing compiler warning: argument might be clobbered by `longjmp' or `vfork' 2008-10-02 22:58:09 +00:00
Yang Tse 00dec36c72 fix compiler warning: `variable' might be clobbered by `longjmp' or `vfork' 2008-10-02 14:42:57 +00:00
Yang Tse 26a651f7ae fix compiler warning: `variable' might be clobbered by `longjmp' or `vfork' 2008-10-02 13:28:10 +00:00
Dan Fandrich 88513d2d1a Fixed some compiler warnings with gcc 2008-10-01 17:34:24 +00:00
Yang Tse aed98c5125 fix compiler warning: declaration of 'err' shadows a previous local 2008-09-30 15:10:27 +00:00
Yang Tse 2d77f7cd48 fix compiler warning: function declaration isn't a prototype 2008-09-30 15:06:03 +00:00