Daniel Stenberg
d1d35ba85f
Christopher R. Palmer made it possible to build libcurl with the
...
USE_WINDOWS_SSPI on Windows, and then libcurl will be built to use the native
way to do NTLM. SSPI also allows libcurl to pass on the current user and its
password in the request.
2005-03-10 23:15:29 +00:00
Daniel Stenberg
0472629222
As reported by 'nodak sodak' we should check for a NULL pointer before
...
referencing the proxy name pointer.
2005-03-09 22:13:52 +00:00
Daniel Stenberg
89cac6f25c
prevent a compiler warning
2005-02-09 22:47:57 +00:00
Daniel Stenberg
6a2e21ec8c
FTP code turned into state machine. Not completely yet, but a good start.
...
The tag 'before_ftp_statemachine' was set just before this commit in case
of future need.
2005-02-09 13:06:40 +00:00
Daniel Stenberg
e6034ea299
Use calloc() to save us the memset() call and terminate conn->host.name
...
properly, to avoid reading uninited variables when using file:// (valgrind)
2005-01-30 12:42:15 +00:00
Daniel Stenberg
c4ff5eb0ca
conn->ip_addr MUST NOT be used on re-used connections
2005-01-29 13:07:16 +00:00
Daniel Stenberg
4551e7ce49
KNOWN_BUGS #17 fixed. A DNS cache entry may not remain locked between two
...
curl_easy_perform() invokes. It was previously unlocked at disconnect, which
could mean that it remained locked between multiple transfers. The DNS cache
may not live as long as the connection cache does, as they are separate.
To deal with the lack of DNS (host address) data availability in re-used
connections, libcurl now keeps a copy of the IP adress as a string, to be able
to show it even on subsequent requests on the same connection.
2005-01-28 22:14:48 +00:00
Daniel Stenberg
177dbc7be0
Ian Ford asked about support for the FTP command ACCT, and I discovered it is
...
present in RFC959... so now (lib)curl supports it as well. --ftp-account and
CURLOPT_FTP_ACCOUNT set the account string. (The server may ask for an account
string after PASS have been sent away. The client responds with "ACCT [account
string]".) Added test case 228 and 229 to verify the functionality. Updated
the test FTP server to support ACCT somewhat.
2005-01-25 22:13:12 +00:00
Daniel Stenberg
7e42cb61f7
FTP third transfer support overhaul. See CHANGES for details.
2005-01-21 09:32:32 +00:00
Daniel Stenberg
a0c8b9bc68
Stephan Bergmann pointed out two flaws in libcurl built with HTTP disabled:
...
1) the proxy environment variables are still read and used to set HTTP proxy
2) you couldn't disable http proxy with CURLOPT_PROXY (since the option was
disabled)
2005-01-19 09:36:44 +00:00
Daniel Stenberg
e0bea7d541
Alex aka WindEagle pointed out that when doing "curl -v dictionary.com", curl
...
assumed this used the DICT protocol. While guessing protocols will remain
fuzzy, I've now made sure that the host names must start with "[protocol]."
for them to be a valid guessable name. I also removed "https" as a prefix that
indicates HTTPS, since we hardly ever see any host names using that.
2005-01-16 08:51:52 +00:00
Daniel Stenberg
e3fa7d021e
Renamed easy.h and multi.h to easyif.h and multiif.h to make sure they don't
...
shadow our public headers with the former names.
2005-01-11 15:25:29 +00:00
Daniel Stenberg
9d1145598a
Bruce Mitchener identified (bug report #1099640 ) the never-ending SOCKS5
...
problem with the version byte and the check for bad versions. Bruce has lots
of clues on this, and based on his suggestion I've now removed the check of
that byte since it seems to be able to contain 1 or 5.
2005-01-10 23:32:14 +00:00
Daniel Stenberg
21bb852750
Pavel Orehov reported memory problems with the multi interface in bug report
...
#1098843 . In short, a shared DNS cache was setup for a multi handle and when
the shared cache was deleted before the individual easy handles, the latter
cleanups caused read/writes to already freed memory.
2005-01-10 10:07:07 +00:00
Gisle Vanem
b1bdba7db5
Print true netrc name (.netrc/_netrc).
2004-12-17 12:26:18 +00:00
Dan Fandrich
26fe6da93b
Renamed a struct member to avoid conflict with a C++ reserved word.
2004-12-16 21:27:23 +00:00
Daniel Stenberg
0d0d5e7ee3
Harshal Pradhan fixed changing username/password on a persitent HTTP
...
connection.
2004-12-14 21:22:51 +00:00
Gisle Vanem
bdb0620529
Added handling of CURLINFO_SSL_ENGINES;
...
Added Curl_SSL_engines_list(), cleanup SSL in url.c
(no HAVE_OPENSSL_x etc.).
2004-12-13 16:43:00 +00:00
Daniel Stenberg
8a4eb8ed45
move the port number extraction to after the extraction of user name/password,
...
as suggested by Kai Sommerfeld
2004-12-10 15:11:11 +00:00
Daniel Stenberg
ac269a8f68
Dan Fandrich added the --disable-cookies option to configure to build
...
libcurl without cookie support. This is mainly useful if you want to build a
minimalistic libcurl with no cookies support at all. Like for embedded
systems or similar.
2004-12-05 23:59:32 +00:00
Gisle Vanem
d85bc18178
I changed my mind. Remove ioctl() macro in setup.h instead.
2004-11-26 16:08:15 +00:00
Gisle Vanem
af114358c8
Renamed urldata.h members 'ioctl*' to 'ioctrl*' due to
...
clash with djgpp ioctl() macro in setup.h.
2004-11-26 14:57:01 +00:00
Daniel Stenberg
bf51f05a50
FTP improvements:
...
If EPSV, EPRT or LPRT is tried and doesn't work, it will not be retried on
the same server again even if a following request is made using a persistent
connection.
If a second request is made to a server, requesting a file from the same
directory as the previous request operated on, libcurl will no longer make
that long series of CWD commands just to end up on the same spot. Note that
this is only for *exactly* the same dir. There is still room for improvements
to optimize the CWD-sending when the dirs are only slightly different.
Added test 210, 211 and 212 to verify these changes. Had to improve the
test script too and added a new primitive to the test file format.
2004-11-25 22:21:49 +00:00
Daniel Stenberg
3e1caa6185
HTTP "auth done right". See lib/README.httpauth
2004-11-24 16:11:35 +00:00
Daniel Stenberg
1a05a90f1c
David Phillips' FD_SETSIZE fix
2004-11-19 08:52:33 +00:00
Daniel Stenberg
dcea109bb5
Dan Fandrich fix: eliminates some pedantic CodeWarrior compiler warnings and
...
errors.
2004-11-18 14:04:40 +00:00
Daniel Stenberg
5931d43a36
clean up start time and t_startsingle use so that redirect_time works properly
2004-11-15 11:27:03 +00:00
Daniel Stenberg
94043b1150
Dan Fandrich added the --disable-crypto-auth option to configure to allow
...
libcurl to build without Digest support. (I figure it should also explicitly
disable Negotiate and NTLM.)
2004-11-12 09:18:14 +00:00
Daniel Stenberg
59c063dfd3
Fix behaviour when passing NULL to CURLOPT_POSTFIELDS and CURLOPT_HTTPPOST.
2004-11-11 23:11:04 +00:00
Daniel Stenberg
24d47a6e07
Paul Nolan fix to make libcurl build nicely on Windows CE
2004-11-02 10:12:22 +00:00
Daniel Stenberg
e8f85cba0f
Eric Vergnaud pointed out that libcurl didn't treat ?-letters in the user name
...
and password fields properly in URLs, like
ftp://us?er:pass?word@site.com/. Added test 191 to verify the fix.
2004-10-14 13:44:54 +00:00
Daniel Stenberg
5322a86313
another lame attempt to avoid the "warning: will never be executed" warning
...
by gcc 3.4
2004-10-10 14:36:22 +00:00
Daniel Stenberg
c274e51654
use tld_strerror() only if previously detected, since otherwise we can't
...
work with libidn < 0.5.6
2004-10-07 07:41:44 +00:00
Gisle Vanem
071218a201
Fixed tld_check_name(). idna_to_unicode_lzlz() should never fail,
...
but return FALSE if 'uc_name == NULL' just in case.
2004-10-06 18:55:58 +00:00
Gisle Vanem
f0d6cc23ae
USE_LIBIDN: Added Top-level-domain (TLD) check for host->name.
...
Only print a warning if check fails.
2004-10-06 18:40:10 +00:00
Daniel Stenberg
39af394a1c
removed tabs and trailing whitespace from source
2004-10-06 07:50:18 +00:00
Daniel Stenberg
1a61bcecfc
minor edit to re-use a variable and to hopefully avoid a (moot) warning
...
about code that won't be reached
2004-10-05 11:03:59 +00:00
Daniel Stenberg
95def48071
Made the dns entry remain locked while a connection to the host remains to
...
allow verbose output during this period. Bertrand Demiddelaer reported and
helped fixing.
2004-10-04 10:36:51 +00:00
Daniel Stenberg
19b284c214
Gisle Vanem provided code that displays an error message when the (libidn
...
based) IDN conversion fails. This is really due to a missing suitable
function in the libidn API that I hope we can remove once libidn gets a
function like this.
2004-10-02 13:01:44 +00:00
Daniel Stenberg
1003628103
Only active the engine code if ssl is enabled. This is how the actual engine
...
member in the struct is used.
2004-09-28 07:11:32 +00:00
Daniel Stenberg
c189687188
allow setting CURLOPT_SSLENGINE to NULL even if no SSL engine is supported
2004-09-25 21:28:26 +00:00
Daniel Stenberg
6a06667cc0
Added CURLOPT_FTPSSLAUTH
2004-09-16 21:45:16 +00:00
Daniel Stenberg
b8b56248bd
- Bug report #1025986 . When following a Location: with a custom Host: header
...
replacement, curl only replaced the Host: header on the initial request
and didn't replace it on the following ones. This resulted in requests with
two Host: headers.
Now, curl checks if the location is on the same host as the initial request
and then continues to replace the Host: header. And when it moves to another
host, it doesn't replace the Host: header but it also doesn't make the
second Host: header get used in the request.
This change is verified by the two new test cases 184 and 185.
2004-09-10 20:58:51 +00:00
Daniel Stenberg
2646af106b
allow a custom "Accept-Encoding:" header override the internally set one
...
that gets set with CURLOPT_ENCODING
2004-08-16 13:25:30 +00:00
Daniel Stenberg
d5bdf5f89c
Ok, setting CURLOPT_POST to 0 will now convert the request to a GET (this
...
remains undocumented as this is not the way we recommend)
2004-08-10 13:21:32 +00:00
Daniel Stenberg
0cfa9b52ae
prevent all the sig and alarm stuff when using ares
2004-07-29 08:06:33 +00:00
Daniel Stenberg
b9f1dd7691
Bertrand Demiddelaer fixed the host name to get setup properly even when
...
a connection is re-used, when a proxy is in use.
2004-07-28 21:27:33 +00:00
Gunter Knauf
03cb3b9db1
ifdef keep_sigact since its only used when SIGALRM is defined.
2004-07-10 23:11:22 +00:00
Daniel Stenberg
17841a20e3
explicit typecasts when converting from long to int to avoid warnings
2004-07-04 21:37:35 +00:00
Daniel Stenberg
d2e6a0583a
made 'connectindex' a long variable to prevent compiler warnings when
...
implicitly converting it to int
2004-07-04 21:36:14 +00:00
Daniel Stenberg
f05d47ddd6
variable type cleanup to fix picky compiler warnings
2004-07-01 07:43:20 +00:00
Daniel Stenberg
185baf036b
NOBODY set TRUE after a POST makes a good HEAD now
2004-06-30 11:09:16 +00:00
Daniel Stenberg
00ee738fdd
typecasts to prevent warnings
2004-06-24 09:14:59 +00:00
Daniel Stenberg
c39858aac0
Source cleanups. The major one being that we now _always_ use a Curl_addrinfo
...
linked list for name resolved data, even on hosts/systems with only IPv4
stacks as this simplifies a lot of code.
2004-06-24 07:43:48 +00:00
Daniel Stenberg
d73425061a
Moved the "About to connect() to" text to the place where the host name is
...
actually known, as before this text lied when used in i.e FTP.
2004-06-22 15:23:01 +00:00
Daniel Stenberg
bd3d5a17b4
Gisle's "SSL patch" from June 16th 2004, modified by me as discussed on the
...
mailing list.
2004-06-18 06:20:43 +00:00
Daniel Stenberg
9f341f9ce5
Gisle Vanem's improved verbose output and timeout handling when connecting to
...
a host name that resolves to multiple IP addresses.
2004-06-10 11:06:21 +00:00
Daniel Stenberg
90037b85d1
Alexander Krasnostavsky's fix to make libcurl build fine with configure
...
--disable-http, which thus builds a libcurl without HTTP support.
2004-06-09 08:23:55 +00:00
Daniel Stenberg
ea81dd9e2e
Alexander Krasnostavsky's FTP third party transfer (proxy) support
2004-06-03 11:41:05 +00:00
Daniel Stenberg
d3f796ac59
Made CURLOPT_UPLOAD and CURLOPT_PUT mean the same thing internally (the
...
previous difference was not clear nor documented properly). They can now both
be used interchangeably, but we prefer UPLOAD to PUT since it is a more
generic term.
2004-06-02 13:57:38 +00:00
Daniel Stenberg
aca79af7de
check for failing strdup()s
2004-05-28 09:56:59 +00:00
Daniel Stenberg
2c43d64302
Added a new 'bit' in the connect struct named 'tunnel_proxy' that is set
...
if a connection is tunneled through a proxy. A tunnel is done with CONNECT,
either when using HTTPS or FTPS, or if explicitly enabled by the app.
2004-05-26 08:54:36 +00:00
Daniel Stenberg
fd802db39f
initial support for "uploading" to file:// URLs
2004-05-25 21:47:29 +00:00
Daniel Stenberg
0912015a5c
preprocessor magic around the libidn idn_free() stuff to remain workable
...
both with older libidn versions without idn_free() and with libidn versions
that gets installed without idn-free.h
2004-05-25 12:00:15 +00:00
Daniel Stenberg
85b2056dc7
only idn_free() if built with libidn
2004-05-24 08:19:37 +00:00
Daniel Stenberg
24420c2191
Simon Josefsson added a idn_free() function in libidn 0.4.5 as a reaction to
...
Gisle's previous mail. We now use this function, and thus we require libidn
0.4.5 or later. No earler version will do.
2004-05-24 07:40:00 +00:00
Daniel Stenberg
59f904d8de
Robert D. Young reported that CURLOPT_COOKIEFILE and CURLOPT_COOKIE could
...
not be used both in one request. Fixed it and added test case 172 to verify.
2004-05-24 07:13:48 +00:00
Daniel Stenberg
cdd70596df
killed trailing whitespace
2004-05-19 09:25:00 +00:00
Daniel Stenberg
8001921112
I made Curl_done() take a pointer-pointer in the first argument instead, and
...
if the connection is killed it blanks the pointer it points to, to make it
easier to detect usage problems whereever Curl_done() is used.
2004-05-17 08:05:46 +00:00
Daniel Stenberg
b121e41ec3
bail out when no memory occurs
2004-05-13 14:12:49 +00:00
Daniel Stenberg
aa3ae01878
clean up and return better on out of memory
2004-05-12 13:05:01 +00:00
Daniel Stenberg
d60c22572b
Curl_done() and the protocol-specific conn->curl_done() functions now all
...
take a CURLcode as a second argument, that is non-zero when Curl_done()
is called after an error was returned from Curl_do() (or similar).
2004-05-12 12:06:39 +00:00
Daniel Stenberg
d301d69fbf
bail out if we can't allocate the new range string, and make use of aprintf()
...
instead of using snprintf() + strdup().
2004-05-12 08:26:56 +00:00
Daniel Stenberg
2f60e91a9b
removed another jhrg-reference in a comment
2004-05-12 07:56:01 +00:00
Daniel Stenberg
98f968f2ee
fixed Curl_open() to not leak anything if one malloc() fails, fix by
...
James Bursa only modified by me.
2004-05-11 21:17:03 +00:00
Daniel Stenberg
bbafb2eb27
curl_global_init_mem() allows the memory functions to be replaced.
...
memory.h is included everywhere for this.
2004-05-11 11:30:23 +00:00
Daniel Stenberg
3394c01826
We don't support any long protocol names so we can use a smaller buffer.
...
Also, make sure we have room for the trailing zero, only scan to size-1.
Gisle Vanem reported.
2004-05-07 18:46:28 +00:00
Daniel Stenberg
91c8be3628
removed two odd comments
2004-05-06 15:17:10 +00:00
Daniel Stenberg
7591e07b7c
do the alarm time-left math using unsigned longs since that is what alarm()
...
returns and uses as input and converting to signed generates warnings and
actually risks loss of accuracy
2004-05-05 07:17:37 +00:00
Daniel Stenberg
35ab93f484
fix_hostname() now (void)s the conn argument to prevent warnings on non-idn
...
enabled builds
2004-05-05 07:08:31 +00:00
Daniel Stenberg
4d9517f0b4
prevent warnings when using the gcc option -Wunreachable-code
2004-05-05 06:57:26 +00:00
Daniel Stenberg
fc6eff13b5
General HTTP authentication cleanup and fixes
2004-05-04 07:52:53 +00:00
Daniel Stenberg
59907ebc0e
fixed the host/proxy name issue when re-using a connection and made IDN names
...
work when using proxy by converting the IDN-name to the ACE-encoded version
before the request-URL is passed to the proxy.
2004-04-29 13:41:48 +00:00
Daniel Stenberg
8ca37dd1c7
encode the correct name
2004-04-29 11:57:52 +00:00
Daniel Stenberg
4b9f8e766d
Made host name and proxy name get stored in a 'struct hostname' and set
...
all things up to work with encoded host names internally, as well as keeping
'display names' to show in debug messages. IDN resolves work for me now using
ipv6, ipv4 and ares resolving. Even cookies on IDN sites seem to do right.
2004-04-27 13:56:23 +00:00
Daniel Stenberg
e218811ca3
made the verbose connect use the proper host name string even when using
...
a proxy
2004-04-26 15:19:55 +00:00
Daniel Stenberg
a9f2274bd8
NI_MAXHOST is not generally available, we use plain 256 bytes for the hostname
...
instead, its only for debug verbose output anyway
2004-04-26 15:14:19 +00:00
Daniel Stenberg
245e3122df
Made defines instead of plain numbers for the Curl_resolv() return code to
...
make the code easier to read
2004-04-26 14:18:00 +00:00
Daniel Stenberg
f5042cce34
IDN adjustments and host cleanups by Gisle
2004-04-26 14:03:25 +00:00
Daniel Stenberg
648e82f05d
Major hostip.c cleanup and split into multiple files and easier #ifdef
...
usage.
2004-04-26 07:20:11 +00:00
Daniel Stenberg
9ba010c629
typecast tolower/toupper arguments to int to make picky compilers complain
...
less
2004-04-21 11:15:02 +00:00
Daniel Stenberg
b7a7600465
Cleaned up hostname/name/gname and path/ppath confusion. Removed the fixed-
...
length limit of the hostname part of the URL.
2004-04-20 07:53:24 +00:00
Daniel Stenberg
b48bf7470d
proper typecast to prevent compiler warning
2004-04-13 10:42:32 +00:00
Daniel Stenberg
ee7d1d0701
remove an long time #defined struct member and use the actual "real" name
...
instead to make it easier to find/read
2004-04-13 07:37:28 +00:00
Daniel Stenberg
4e3aa250c4
Moved the 'tcp_nodelay' member to the proper 'UserDefined' struct within the
...
sessionhandle to make the duphandle() function work as supposed. Also tried
to start document functions the doxygen way (in the headers of the functions).
Can't make it work though...
2004-04-13 07:16:26 +00:00
Daniel Stenberg
8ed44e8dfb
New authentication code added, particularly noticable when doing POST or PUT
...
with Digest or NTLM. libcurl will now use HEAD to negotiate the authentication
and when done perform the requested POST.
2004-04-06 15:14:10 +00:00
Daniel Stenberg
5804c995e1
Use the new HAVE_NI_WITHSCOPEID define instead of merely checking for the
...
existance of NI_WITHSCOPEID since some platforms have that define but still
can't function with it set.
2004-03-31 21:33:52 +00:00
Daniel Stenberg
dd2add82ee
Fixed how the user name is extracted from http_proxy environment variable
...
when set.
2004-03-31 10:46:06 +00:00
Daniel Stenberg
bb3d6e8552
tcp-nodelay patch by Joe Halpin
2004-03-25 13:37:18 +00:00
Daniel Stenberg
1ebda8fa0e
Added CURLOPT_POSTFIELDSIZE_LARGE to offer a large file version of the
...
CURLOPT_POSTFIELDSIZE option to allow really big HTTP POSTs.
2004-03-12 08:55:47 +00:00