Commit Graph

773 Commits

Author SHA1 Message Date
Daniel Stenberg 479ddb1fee - Igor Novoseltsev filed bug #2351645
(http://curl.haxx.se/bug/view.cgi?id=2351645) that identified a problem with
  the multi interface that occured if you removed an easy handle while in
  progress and the handle was used in a HTTP pipeline.
2008-12-03 15:20:27 +00:00
Daniel Stenberg 797bc8504c - Andreas Wurf and Markus Koetter helped me analyze a problem that Andreas got
when uploading files to a single FTP server using multiple easy handle
  handles with the multi interface. Occasionally a handle would stall in
  mysterious ways.

  The problem turned out to be a side-effect of the ConnectionExists()
  function's eagerness to re-use a handle for HTTP pipelining so it would
  select it even if already being in use, due to an inadequate check for its
  chances of being used for pipelnining.
2008-11-19 10:15:19 +00:00
Daniel Stenberg b80c5cff49 corrected and clarified the *_SPEED_LARGE comments 2008-11-05 21:46: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 b701ea36a7 moved the Curl_raw_ functions into the new lib/rawstr.c file for easier curlx_
inclusion by the curl tool without colliding with the curl_strequal functions.
2008-10-23 11:49:19 +00:00
Dan Fandrich bab5183820 Created Curl_raw_nequal() which does a C-locale string case comparison.
Changed checkprefix() to use it and those instances of strnequal() that
compare host names or other protocol strings that are defined to be
independent of case in the C locale.  This should fix a few more
Turkish locale problems.
2008-10-23 01:20:57 +00:00
Yang Tse 5779283a52 attempt to fix or allow further detection of an elusive icc SIGSEGV 2008-10-19 20:17:16 +00:00
Daniel Stenberg 80d0dcc9a3 clarified an argument's situation due to a false positive alert pointed out
by coverity.com
2008-10-19 18:20:47 +00:00
Yang Tse e7886aa9b4 oops ;-) 2008-10-17 13:55:13 +00:00
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
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 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
Yang Tse ad61b58036 fix compiler warning 2008-10-14 02:35:39 +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 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
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
Dan Fandrich 2393c94363 Fixed a compile problem with --disable-proxy 2008-09-29 22:45:25 +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
Yang Tse 4e909ee8b1 ntoa() and inet_ntoa_r() no longer used 2008-09-24 12:22:16 +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
Dan Fandrich 459e67b2a7 Only define alarmfunc when signals are used 2008-09-19 17:46:59 +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 a6c915aab9 fix compiler warning: external declaration in primary source file 2008-09-18 16:21:09 +00:00
Yang Tse 2ef72f7abb fix compiler warning 2008-09-08 19:34:58 +00:00
Yang Tse 59e378f48f remove unnecessary typecasting of malloc() 2008-09-06 05:29:05 +00:00
Yang Tse a622fd90b4 remove unnecessary typecasting of calloc() 2008-09-06 04:47:14 +00:00
Yang Tse 861b647e7b remove unnecessary typecasting of realloc() 2008-09-06 04:28:43 +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
Yang Tse 3dcd2b82c4 fix print formatting string directives 2008-09-04 18:59:05 +00:00
Dan Fandrich 934708d950 Made some variables const which eliminated some casts 2008-09-02 17:41:20 +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
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
Gisle Vanem 17e1f58fd6 Work around a scanf() bug in djgpp 2.04. The assignments for this
format is working okay. But the return value is incorrectly EOF.
2008-08-21 16:20:38 +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
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
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
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 09664f1ab8 Refactored create_conn by breaking it up into many smaller functions 2008-08-01 00:55:43 +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