Commit Graph

2802 Commits

Author SHA1 Message Date
Daniel Stenberg c890149c8c Dima Barsky reported a problem with GnuTLS-enabled libcurl in bug report
#1334338 (http://curl.haxx.se/bug/view.cgi?id=1334338). When reading an SSL
  stream from a server and the server requests a "rehandshake", the current
  code simply returns this as an error. I have no good way to test this, but
  I've added a crude attempt of dealing with this situation slightly better -
  it makes a blocking handshake if this happens. Done like this because fixing
  this the "proper" way (that would handshake asynchronously) will require
  quite some work and I really need a good way to test this to do such a
  change.
2005-10-22 21:05:07 +00:00
Daniel Stenberg 1a1ab2e2e8 "Ofer" reported a problem when libcurl re-used a connection and failed to do
it, it could then accidentally actually crash. Presumably, this concerns FTP
connections.  http://curl.haxx.se/bug/view.cgi?id=1330310
2005-10-21 21:00:44 +00:00
Daniel Stenberg 715b706caa Temprimus improved the MSVC makefile so that the static debug SSL libs are
linked to the executable and not to the libcurld.lib
http://curl.haxx.se/bug/view.cgi?id=1326676
2005-10-21 19:32:12 +00:00
Daniel Stenberg bfa9c42c25 Bradford Bruce made the windows resolver code properly return
CURLE_COULDNT_RESOLVE_PROXY and CURLE_COULDNT_RESOLVE_HOST on resolving
errors (as documented).
2005-10-21 19:21:19 +00:00
Daniel Stenberg be9c873a6e Dave Dribin made libcurl understand and handle cases when the server
(wrongly) sends *two* WWW-Authenticate headers for Digest. While this should
never happen in a sane world, libcurl previously got into an infinite loop
when this occurred. Dave added test 273 to verify this.
2005-10-20 20:07:32 +00:00
Daniel Stenberg 021e786c71 Added a dump_addrinfo() function to ease debugging of resolved names. Define
DEBUG_ADDRINFO to enable.
2005-10-20 19:40:02 +00:00
Daniel Stenberg 0c6bb8cb66 Temprimus improved the MSVC makefile: "makes a build option available so if
you set rtlibcfg=static for the make, then it would build with /MT. The
default behaviour is /MD (the original)."
http://curl.haxx.se/bug/view.cgi?id=1326665
2005-10-20 19:07:33 +00:00
Daniel Stenberg 51369753bb Reported by 'TemPRImus' in bug 1326665: use the "Multi-Threaded" options even
when building the static library. http://curl.haxx.se/bug/view.cgi?id=1326665
2005-10-14 13:22:49 +00:00
Daniel Stenberg 943aea6267 Make sure that the user and domain strings fit in the target buffer before we
copy them there.
2005-10-13 07:57:51 +00:00
Daniel Stenberg b2be6799f2 pass a NULL pointer in the service argument (the second) if the port number
was 0 as it seems at least some AIX versions don't like a "0" string there
2005-10-10 18:28:05 +00:00
Gisle Vanem ea2618fc6f Added tftp.obj. 2005-10-06 18:47:05 +00:00
Daniel Stenberg 3beb2f6b5d CURL_TIMECOND_IFMODSINCE actually requires that the remote document has been
modded since the given time, so we should compare <= and not just <.
2005-10-05 06:09:20 +00:00
Daniel Stenberg db83a0ebbc Michael Wallner reported that the date parser had wrong offset stored for
the MEST and CEST time zones.
2005-10-04 18:15:33 +00:00
Gisle Vanem 06c3bec65d Avoid gcc warning "dereferencing type-punned pointer
will break strict-aliasing rules".
2005-10-02 18:22:45 +00:00
Gisle Vanem e8c3bb45ba Fix for building with MS Visual-C and single-threaded
runtime libs.
2005-10-02 16:52:07 +00:00
Daniel Stenberg e43217e664 Starting now, the verbose text that goes like "About to connect() to" will
now contain the word "proxy" is the hostname is in fact a proxy. This will
help users detect situations when they mistakenly use a proxy.
2005-09-29 11:37:52 +00:00
Daniel Stenberg b4c53e2cfd An anonymous submitter filed bug #1299181
(http://curl.haxx.se/bug/view.cgi?id=1299181) that identified a silly problem
with Content-Range: headers with the 'bytes' keyword written in a different
case than all lowercase! It would cause a segfault!
2005-09-27 09:13:39 +00:00
Daniel Stenberg a2902de67c TJ Saunders of the proftpd project identified and pointed out problems with
the modified FTPS negotiation change of August 19 2005. Thus, we revert the
change back to pre-7.14.1 status.
2005-09-27 08:46:54 +00:00
Daniel Stenberg bd5a622400 stricter type usage for time variables to avoid picky compiler warnings 2005-09-21 11:28:40 +00:00
Daniel Stenberg b6f0aa4394 return an error string for the missing URL case 2005-09-21 06:38:33 +00:00
Daniel Stenberg 58d628c9f8 Uses __stdcall instead of SEC_ENTRY since it seems (at least) mingw doesn't
define SEC_ENTRY and thus fails unless this is done!
2005-09-20 08:29:56 +00:00
Daniel Stenberg 1cf798ad14 typecasts added in an attempt to please the picky compilers 2005-09-20 06:51:23 +00:00
Daniel Stenberg 3fe5311967 Dmitry Bartsevich made the SSPI support work on Windows 9x as well 2005-09-19 21:45:16 +00:00
Daniel Stenberg e7093b3ca8 keep 'socktype' in the connectdata struct and make sure we use that for all
protocol sockets even if the resolved address may say otherwise
2005-09-16 21:30:08 +00:00
Daniel Stenberg 97a6d7b1a8 minor changes, the biggest one being using Curl_select() 2005-09-15 20:21:27 +00:00
Daniel Stenberg 0b8ccd0ae7 oops, return error if an error did occur! 2005-09-14 15:04:01 +00:00
Daniel Stenberg 0e7d93858d added tftp.c 2005-09-07 14:42:15 +00:00
Gisle Vanem 9889a811db Fix warning about missing initializers. 2005-09-06 15:58:09 +00:00
Gisle Vanem 9e38d882b9 Fix for bind() on Winsock; AF_UNSPEC (0) is illegal.
Should we do this for all targets?
2005-09-06 15:43:14 +00:00
Daniel Stenberg e8b77477c7 sockets are curl_socket_t to build cleaner 2005-09-06 10:39:01 +00:00
Daniel Stenberg 64298e528d Use SOCK_DGRAM for TFTP. Consider setting this up at one central place, we
have this check done on far too many places by now...
2005-09-06 10:37:57 +00:00
Gunter Knauf 4f1465e7c7 minor Makefile fixes. 2005-09-06 00:39:41 +00:00
Daniel Stenberg a3d776187a check that bind() returns success 2005-09-04 18:33:20 +00:00
Daniel Stenberg 7e845e7cfd Added FTP_SKIP_PASV_IP and --ftp-skip-pasv-ip 2005-09-04 05:16:06 +00:00
Daniel Stenberg 56d9624b56 John Kelly added TFTP support to libcurl. A bunch of new error codes was
added. TODO: add them to docs. add TFTP server to test suite. add TFTP to
list of protocols whereever those are mentioned.
2005-09-02 15:11:08 +00:00
Daniel Stenberg 2fe3c22108 use it as 'struct addrinfo' so perhaps it builds on mingw again 2005-08-31 06:04:48 +00:00
Daniel Stenberg 64414df27e Use the more correct BUILDING_LIBCURL define instead of CURLLIB_EXPORTS.
Kevin Lussier pointed this out!
2005-08-29 20:56:20 +00:00
Daniel Stenberg 87bbd13899 Igor Polyakov fixed a rather nasty problem with the threaded name resolver
for Windows, that could lead to an Access Violation when the multi interface
was used due to an issue with how the resolver thread was and was not
terminated.
2005-08-29 14:23:53 +00:00
Daniel Stenberg 5effe8f336 Simon Josefson brought GNU GSS support 2005-08-29 08:42:45 +00:00
Daniel Stenberg 9853acba66 Moved the GnuTLS related TODO items from lib/TODO.gnutls to the proper
docs/TODO
2005-08-29 06:59:44 +00:00
Daniel Stenberg a4773fcbbb Toby Peterson added CURLOPT_IGNORE_CONTENT_LENGTH to the library, accessible
from the command line tool with --ignore-content-length. This will make it
easier to download files from Apache 1.x (and similar) servers that are
still having problems serving files larger than 2 or 4 GB. When this option
is enabled, curl will simply have to wait for the server to close the
connection to signal end of transfer. I wrote test case 269 that runs a
simple test that this works.
2005-08-24 10:57:28 +00:00
Daniel Stenberg 432dfe2b8f Fixed CA cert verification using GnuTLS with the default bundle, which
previously failed due to GnuTLS not allowing x509 v1 CA certs by default.
2005-08-24 07:40:13 +00:00
Gunter Knauf f14195f786 enabled statically linked builds. 2005-08-22 02:39:05 +00:00
Daniel Stenberg 710ee3b0e0 Norbert Novotny had problems with FTPS and he helped me work out a patch
that made curl run fine in his end. The key was to make sure we do the
SSL/TLS negotiation immediately after the TCP connect is done and not after
a few other commands have been sent like we did previously. I don't consider
this change necessary to obey the standards, I think this server is pickier
than what the specs allow it to be, but I can't see how this modified
libcurl code can add any problems to those who are interpreting the
standards more liberally.
2005-08-19 14:41:09 +00:00
Gunter Knauf 2a94387fc3 minor Makefile fixes. 2005-08-18 16:39:29 +00:00
Daniel Stenberg 90e1a6905a remove the typecast to long from time_t, since we now store it as curl_off_t 2005-08-17 09:11:27 +00:00
Daniel Stenberg a676c18502 - Jeff Pohlmeyer found out that if you ask libcurl to load a cookiefile (with
CURLOPT_COOKIEFILE), add a cookie (with CURLOPT_COOKIELIST), tell it to
  write the result to a given cookie jar and then never actually call
  curl_easy_perform() - the given file(s) to read was never read but the
  output file was written and thus it caused a "funny" result.

- While doing some tests for the bug above, I noticed that Firefox generates
  large numbers (for the expire time) in the cookies.txt file and libcurl
  didn't treat them properly. Now it does.
2005-08-17 08:55:43 +00:00
Gunter Knauf 362912ff83 added curl_mvsnprintf to the export list; I appened to the end cause of the numbering ... 2005-08-16 20:12:58 +00:00
Gunter Knauf 46ff13f243 added curl_mvsnprintf to the export list. 2005-08-16 20:11:25 +00:00
Daniel Stenberg 35110eca73 James Bursa identified a libcurl HTTP bug and a good way to repeat it. If a
site responds with bad HTTP response that doesn't contain any header at all,
only a response body, and the write callback returns 0 to abort the
transfer, it didn't have any real effect but the write callback would be
called once more anyway.
2005-08-13 21:28:46 +00:00
Daniel Stenberg 84c4d96e71 removed old debug left-over infof() call 2005-08-11 21:41:11 +00:00
Daniel Stenberg 6d14a80608 Added comment about strtoimax() 2005-08-11 20:42:02 +00:00
Daniel Stenberg 20b17d6b04 the debug callback was called with CURLINFO_TEXT with the data size one
too big
2005-08-10 22:57:14 +00:00
Gunter Knauf 0ae6ff9f72 some minor Makefile fixes for SSL. 2005-08-10 19:19:25 +00:00
Daniel Stenberg 6c157a404b Christopher R. Palmer fixed the offsets used for date parsings when the time
zone name of a daylight savings time was used. For example, PDT vs PDS. This
flaw was introduced with the new date parser (11 sep 2004 - 7.12.2).
Fortunately, no web server or cookie string etc should be using such time
zone names thus limiting the effect of this bug.
2005-08-09 21:59:31 +00:00
Daniel Stenberg 493d6033aa Jon Grubbs filed bug report #1249962 which identified a problem with NTLM on a
HTTP proxy if an FTP URL was given. libcurl now properly switches to pure HTTP
internally when an HTTP proxy is used, even for FTP URLs. The problem would
also occur with other multi-pass auth methods.
2005-08-07 22:59:06 +00:00
Daniel Stenberg aeb04136f7 Don't prevent FTPS:// through a http proxy, as we cannot know if it works or
not!
2005-08-07 21:39:44 +00:00
Daniel Stenberg e358a24a75 reset the numcookies counter too (I missed it in the previous commit) 2005-07-28 21:53:09 +00:00
Daniel Stenberg ec3f269d1f now strdups the cookielist inpointer before passed on, as the cookie function
modifies it
2005-07-28 21:50:34 +00:00
Daniel Stenberg 1c388a52a5 curl standard indent/format 2005-07-28 21:49:58 +00:00
Daniel Stenberg 726b9e2240 If any of the options CURLOPT_HTTPGET, CURLOPT_POST and CURLOPT_HTTPPOST is
set to 1, CURLOPT_NOBODY will now automatically be set to 0.
2005-07-27 22:29:50 +00:00
Daniel Stenberg 2236ba0d20 Peteris Krumins added CURLOPT_COOKIELIST and CURLINFO_COOKIELIST, which is a
simple interface to extracting and setting cookies in libcurl's internal
"cookie jar". See the new cookie_interface.c example code.
2005-07-27 22:17:14 +00:00
Daniel Stenberg 463c0f7096 disabling HTTP should also nullify this function call 2005-07-27 21:44:43 +00:00
Dan Fandrich 6e87cf5b30 Fixed some typos in output messages. 2005-07-21 22:18:35 +00:00
Daniel Stenberg 4922904991 Simplified the code within curl_easy_perform() that calls Curl_perform().
Pointed out by Bjorn Reese.
2005-07-17 12:44:11 +00:00
Daniel Stenberg 16bbd13af7 Diego Casorran patches to make (lib)curl build fine on Amiga again 2005-07-13 18:06:40 +00:00
Daniel Stenberg 465e19dbe9 Adrian Schuur added trailer support in the chunked encoding stream. The
trailer is then sent to the normal header callback/stream.
2005-07-12 18:15:34 +00:00
Daniel Stenberg c3a826fdce correction for the 407 with response-body case 2005-07-05 22:07:34 +00:00
Gisle Vanem c5d6a42abf Update copyright. 2005-07-05 18:07:55 +00:00
Daniel Stenberg d49c144297 Gisle Vanem came up with a nice little work-around for bug #1230118. It
seems the Windows (MSVC) libc time functions may return data one hour off if
TZ is not set and automatic DST adjustment is enabled. This made
curl_getdate() return wrong value, and it also concerned internal cookie
expirations etc.
2005-07-05 14:57:41 +00:00
Daniel Stenberg 20005a83d2 Andrew Bushnell provided enough info for me to tell that we badly needed to
fix the CONNECT authentication code with multi-pass auth methods (such as
NTLM) as it didn't previously properly ignore response-bodies - in fact it
stopped reading after all response headers had been received. This could
lead to libcurl sending the next request and reading the body from the first
request as response to the second request. (I also renamed the function,
which wasn't strictly necessary but...)

The best fix would to once and for all make the CONNECT code use the
ordinary request sending/receiving code, treating it as any ordinary request
instead of the special-purpose function we have now. It should make it
better for multi-interface too. And possibly lead to less code...

Added test case 265 for this. It doesn't work as a _really_ good test case
since the test proxy is too stupid, but the test case helps when running the
debugger to verify.
2005-07-03 22:25:15 +00:00
Daniel Stenberg 701de67b79 use %p to printf pointers since %x doesn't work properly on tru64 for this
(and besides, we should be using the same %-code for all pointers)
2005-06-30 13:30:23 +00:00
Daniel Stenberg 883479f01e enable memory debugging on tru64 with ipv6 support by doing a little different
defining, since the system headers themselves redefine getaddrinfo
2005-06-30 13:28:58 +00:00
Daniel Stenberg 3b60bb7259 David Shaw's fix that unifies proxy string treatment so that a proxy given
with CURLOPT_PROXY can use a http:// prefix and user + password. The user
and password fields are now also URL decoded properly.

Test case 264 added to verify.
2005-06-22 22:24:10 +00:00
Gisle Vanem bb0aba34fa Ensure thread handle is closed too. 2005-06-14 14:47:21 +00:00
Daniel Stenberg 300b4a9158 Todd Kulesza reported a flaw in the proxy option, since a numerical IPv6
address was not possible to use. It is now, but requires it written
RFC2732-style, within brackets - which incidently is how you enter numerical
IPv6 addresses in URLs. Test case 263 added to verify.
2005-05-31 13:03:26 +00:00
Daniel Stenberg a7846189cd Eric Cooper reported about a problem with HTTP servers that responds with
binary zeroes within the headers. They confused libcurl to do wrong so the
downloaded headers become incomplete. The fix is now verified with test case
262.
2005-05-29 22:30:48 +00:00
Daniel Stenberg 4762995d1f avoid the sensitive word as it looks bad in some people's eyes 2005-05-27 11:39:07 +00:00
Daniel Stenberg d1235ff058 provide the proper copyright texts for these 2005-05-26 20:56:25 +00:00
Daniel Stenberg e7012a515c Now allow TYPE responses to be any 2xx code, and log if it isn't 200. 2005-05-24 09:39:56 +00:00
Daniel Stenberg eff36caea8 additional fix for the malformed URL fix of yday 2005-05-19 07:21:18 +00:00
Daniel Stenberg 4a091bbd8a Bug report #1204435 identified a problem with malformed URLs like
"http://somehost?data" as it added a slash too much in the request ("GET
/?data/"...). Added test case 260 to verify.
2005-05-18 20:01:01 +00:00
Daniel Stenberg dd7b6aef39 The configure check for strerror_r() failed to detect the proper API at
times, like on my HP-UX 10.20 tests. And then lib/strerror.c badly assumed
the glibc version if the posix define wasn't set (since it _had_ found a
strerror_r).
2005-05-18 13:24:23 +00:00
Daniel Stenberg ede9fb4fcc check if getsockname() returns failure before using the address it provides 2005-05-17 09:18:17 +00:00
Daniel Stenberg 723aef71e8 reduced typecasts, from two to one 2005-05-17 09:15:21 +00:00
Daniel Stenberg 944af98be6 fix warning about redefined symbol 2005-05-14 21:15:36 +00:00
Gisle Vanem 95fe8372e8 Updated generated dependencies. 2005-05-14 06:04:21 +00:00
Gisle Vanem ecdcb0ef67 Some patches for (a stricter/smarter) gcc 4.0 and
warnings like:
  'x' may be used uninitialized in this function.
2005-05-14 06:00:40 +00:00
Gisle Vanem 6a04a03eb5 'ssize_t' seems to be a gcc 4.x built-in. 2005-05-14 05:59:26 +00:00
Gisle Vanem 0c96056a94 Change for systems with >1 ways of setting (non-)blocking
mode. (djgpp/Watt-32 has 3 ways). Should rewrite this using
"#elif ..", but maybe there is still broken cpp around?
2005-05-14 05:58:52 +00:00
Daniel Stenberg 3f23e8443e oops, found by bug reported in bug report #1200661 2005-05-12 13:44:25 +00:00
Daniel Stenberg a00f9b093c spell 2005-05-12 12:53:02 +00:00
Daniel Stenberg 5f538ce3f8 typecast to fix warning on 64bit systems 2005-05-12 08:51:30 +00:00
Daniel Stenberg 5d9fc28fa7 Modified the default HTTP headers used by libcurl:
A) Normal non-proxy HTTP:

 - no more "Pragma: no-cache" (this only makes sense to proxies)

B) Non-CONNECT HTTP request over proxy:

 - "Pragma: no-cache" is used (like before)
 - "Proxy-Connection: Keep-alive" (for older style 1.0-proxies)

C) CONNECT HTTP request over proxy:

 - "Host: [name]:[port]"
 - "Proxy-Connection: Keep-alive"
2005-05-11 09:52:59 +00:00
Daniel Stenberg a90e33ad71 Hm, this doesn't feel right. The error bits returned from Curl_select() can
be returned at times when we want to ignore them. Test case 160 fails on Linux,
so I modify the comparison to check for _only_ the error bit set...
2005-05-10 23:02:37 +00:00
Daniel Stenberg 62ab21ce7d me stupid, errno is not set for mere select()-exceptions 2005-05-10 22:48:26 +00:00
Daniel Stenberg cc8e8db1e5 include protos to fix warnings 2005-05-10 22:46:24 +00:00
Daniel Stenberg b19cba2016 If Curl_select() returns with the error bit set, bail out. 2005-05-10 22:44:08 +00:00
Daniel Stenberg 708ed6fded silence compiler warnings 2005-05-08 22:45:01 +00:00
Daniel Stenberg 5c30fa50d6 fix warnings about unused variables for non-debug builds 2005-05-07 20:41:16 +00:00