Compare commits

...

130 Commits

Author SHA1 Message Date
Daniel Stenberg
c2d4fd876c 7.9.5 commit 2002-03-07 08:50:18 +00:00
Daniel Stenberg
58cad04bbb added the "known bugs" file 2002-03-07 08:29:24 +00:00
Daniel Stenberg
9bb64d6827 new VMS messages from Nico Baggus 2002-03-06 23:18:22 +00:00
Daniel Stenberg
4441df90c1 Kevin Roth nicely saved us from this backslash-removing problem! 2002-03-06 22:52:00 +00:00
Daniel Stenberg
f51f2417c5 Brad corrected the include path (again) 2002-03-06 22:19:16 +00:00
Daniel Stenberg
aad617647d corrected the newlines 2002-03-06 22:08:11 +00:00
Daniel Stenberg
49c0d62dda two items since pre6 2002-03-06 15:05:00 +00:00
Daniel Stenberg
f752098ba5 when removed, an easy handle can be curl_easy_perform()ed again 2002-03-06 15:01:45 +00:00
Daniel Stenberg
a4477b9e4b Paul Nolan built it on pocket pc 2002-03-06 12:33:34 +00:00
Daniel Stenberg
ad3cef0fc8 Ralph Mitchell's minor #include patch to prevent some warnings 2002-03-06 09:40:06 +00:00
Daniel Stenberg
d89dbe5bd6 we don't skip what looks like already escaped strings, that was fixed
ages ago
2002-03-06 07:44:49 +00:00
Daniel Stenberg
b0475dbdbc read POST data using the read callback 2002-03-05 14:14:22 +00:00
Daniel Stenberg
60b2e74fa3 corrected the progress callback prototype!!! 2002-03-05 10:15:38 +00:00
Daniel Stenberg
cda16297d1 added text to the progress chapter 2002-03-05 09:01:58 +00:00
Daniel Stenberg
d6c9a72e15 explicitly mention easy handle 2002-03-04 13:10:15 +00:00
Daniel Stenberg
4d7b1512c1 mention 'easy handle' and not just handle, there will soon be other handles
to keep track of too
2002-03-04 13:06:46 +00:00
Daniel Stenberg
d8a35d745e cut off 2001 and put those changes in a separate file 2002-03-04 10:34:58 +00:00
Daniel Stenberg
e22657ea13 added docs/libcurl/
removed multi/
2002-03-04 10:28:02 +00:00
Daniel Stenberg
d06d6b5534 moved lots to the new subdir 'libcurl' 2002-03-04 10:27:37 +00:00
Daniel Stenberg
cec8ab1fde remove this directory, this is history 2002-03-04 10:19:32 +00:00
Daniel Stenberg
9fc62a8dd0 multi interface using examples 2002-03-04 10:15:44 +00:00
Daniel Stenberg
61540b98c2 no longer include the multi dir, the examples should be in the examples
dir
2002-03-04 10:15:12 +00:00
Daniel Stenberg
465ae39e86 moved to the new libcurl/ directory 2002-03-04 10:10:58 +00:00
Daniel Stenberg
01f04b9a41 ripped out from ../ and put in its own directory now 2002-03-04 10:09:48 +00:00
Daniel Stenberg
34f9ab1046 Added packages/EPM 2002-03-04 08:00:25 +00:00
Daniel Stenberg
699876778b Added EPM stuff, thanks to Giuseppe Corbelli 2002-03-04 07:59:53 +00:00
Daniel Stenberg
8fc5a0d19e bug report #524427 pointed out a mistake in the example source 2002-03-01 17:22:40 +00:00
Daniel Stenberg
62b5926d58 initial and still basic curl multi interface documentation 2002-03-01 15:34:23 +00:00
Daniel Stenberg
4d1037f385 removed incorrect and unnecessary words 2002-03-01 13:38:56 +00:00
Daniel Stenberg
e4addb3975 several little things since pre4 2002-03-01 10:48:08 +00:00
Daniel Stenberg
2aef351980 memanalyze is now moved to the tests/ dir 2002-03-01 09:20:03 +00:00
Daniel Stenberg
d88c153c7d include memanalyze.pl in the dist archive 2002-03-01 09:19:28 +00:00
Daniel Stenberg
9e9883082e moved memanalyze.pl into the tests dir 2002-03-01 09:18:54 +00:00
Daniel Stenberg
71440df4c7 Nico Baggus added more error codes to the VMS stuff. 2002-02-28 23:55:18 +00:00
Daniel Stenberg
80b004a57d Wesley Laxton's CURLOPT_PREQUOTE work 2002-02-28 23:31:23 +00:00
Daniel Stenberg
ea8476a2dc Ralph Mitchell's SSL problems made me notice that we didn't increase the
header byte counter properly
2002-02-28 15:13:35 +00:00
Daniel Stenberg
cb85ca18ab more fancy alloc, we store the size in each allocated block so that we
can destroy the full allocated area just before we free it
2002-02-28 12:37:05 +00:00
Daniel Stenberg
f1103b95cf set CURL_MEMDEBUG to enable memory debugging in case curl is compiled
with it
2002-02-28 12:36:25 +00:00
Daniel Stenberg
aa5ff53bcf added -t for trace, helps searching for leaks and similar 2002-02-28 12:35:54 +00:00
Daniel Stenberg
907dabed5d memory debugging is now only enabled if the CURL_MEMDEBUG environment
variable is set when curl is invoked
2002-02-28 12:35:09 +00:00
Daniel Stenberg
0cacbc892c always allocates at least 64 bytes for real, and damages them before free 2002-02-28 12:18:15 +00:00
Daniel Stenberg
6753c3c715 made building outside the source tree work again, Kevin Roth reported 2002-02-27 15:09:23 +00:00
Daniel Stenberg
36e1363e3d minor edit 2002-02-27 12:40:01 +00:00
Daniel Stenberg
d1a711eb6a oops, we weren't doing HTTPS - now we are 2002-02-27 07:50:22 +00:00
Daniel Stenberg
d8dea4dcc7 test 304, HTTPS multipart formpost 2002-02-27 07:49:01 +00:00
Daniel Stenberg
ca161737bc use the correct time in the cookie jar 2002-02-27 07:41:46 +00:00
Daniel Stenberg
3612c3774e made Max-Age work as defined in the RFC.
my brain damaged fix to not parse spaces as part of the value is now fixed
to instead strip off trailing spaces from values.
2002-02-27 07:38:04 +00:00
Daniel Stenberg
e6a65bb3ef modified cookie expire date 2002-02-26 13:38:12 +00:00
Daniel Stenberg
ff291eee48 new field1 functionality testing too 2002-02-26 13:18:39 +00:00
Daniel Stenberg
66b8f48a88 When saving a cookie jar, set field 1 (counted from 0) properly to TRUE if the
domain starts with a dot.
2002-02-26 13:18:08 +00:00
Daniel Stenberg
634760cbdc test 31: "HTTP with weirdly formatted cookies and cookiejar storage" 2002-02-26 13:09:46 +00:00
Daniel Stenberg
a23a897ad2 removed crash on weird input, this also better discards silly input 2002-02-26 13:07:53 +00:00
Daniel Stenberg
d9c244278d 7.9.5-pre4 commit 2002-02-26 07:59:43 +00:00
Daniel Stenberg
b6c4185b27 more custom stuff, much about dealing with cookies 2002-02-25 15:25:34 +00:00
Daniel Stenberg
5896d35e72 a never ending stream of things to do... 2002-02-25 14:09:31 +00:00
Daniel Stenberg
b4dfdd8bbc use env to run perl 2002-02-25 14:08:51 +00:00
Daniel Stenberg
e6ed3478ea automake usage and options cleanup 2002-02-25 14:08:18 +00:00
Daniel Stenberg
db08d9c6b9 happy new year 2002-02-25 13:25:33 +00:00
Daniel Stenberg
9490278ece We got this web server's embryo from Georg Horn, muchos gracias. 2002-02-25 12:49:21 +00:00
Daniel Stenberg
fd8bf5f171 the test suite http server is now automake'd 2002-02-25 12:45:48 +00:00
Daniel Stenberg
c9bc14a222 use the pid file, use the automake subdir 2002-02-25 12:45:20 +00:00
Daniel Stenberg
63708cbfb0 automake this dir too 2002-02-25 12:44:58 +00:00
Daniel Stenberg
d9f307623c use the former logfile name again since the ftp server also uses that... 2002-02-25 12:14:24 +00:00
Daniel Stenberg
540f77a627 we actually ran all tests just now, feb 25th, 2002 12:11 MET. with the
new http server on Linux
2002-02-25 11:12:10 +00:00
Daniel Stenberg
71bb2d0b8b reply/postcmd support for "wait" 2002-02-25 11:11:03 +00:00
Daniel Stenberg
87dc44e434 portability, step one, use a config.h.in file 2002-02-25 11:00:16 +00:00
Daniel Stenberg
29e0fcd091 generate a config file for the test suite http server too 2002-02-25 10:56:37 +00:00
Daniel Stenberg
2e9a798f09 create the pidfile and store the pid on invoke 2002-02-25 10:27:29 +00:00
Daniel Stenberg
b32a39f44f oops, #if not #ifdef 2002-02-25 10:12:04 +00:00
Daniel Stenberg
d86f9611b3 support HUGE requests too 2002-02-25 09:42:58 +00:00
Daniel Stenberg
6a62fc4a40 make sure -d is treated as a POST request and thus should fail if mixed
with -I for example
2002-02-25 09:08:28 +00:00
Daniel Stenberg
7cdd6455d7 modified the command to fail properly! ;-) 2002-02-25 09:07:26 +00:00
Daniel Stenberg
e4fefd088d cygnus can't include winsock.h even though it has it, why we need to
make a different and more complicated check for when to include it
2002-02-25 08:20:29 +00:00
Daniel Stenberg
95e601e2b1 "Yet Another Geek" made %{content_type} work in the -w/--writeout option. 2002-02-25 07:40:49 +00:00
Daniel Stenberg
b1ffe7b74a better time selection for the connect timeout 2002-02-22 15:44:37 +00:00
Daniel Stenberg
417c8fb602 16 tests OK 2002-02-22 15:40:17 +00:00
Daniel Stenberg
85efa64c31 cut off big parts of the banner 2002-02-22 15:17:41 +00:00
Daniel Stenberg
d8cb026e80 make sure the custom config-*.h files are in the dist as well 2002-02-22 15:12:17 +00:00
Daniel Stenberg
41dd5121f0 adjusted to work on test case 11 better 2002-02-22 13:54:06 +00:00
Daniel Stenberg
94482d7ca5 use -W too 2002-02-22 13:53:41 +00:00
Daniel Stenberg
4d0e51aead fixed to work with 'nonewline' and thus this passes OK with the new http
server and things
2002-02-22 10:51:19 +00:00
Daniel Stenberg
ae8a8c8ba4 support for using protocol without a trailing newline 2002-02-22 10:50:36 +00:00
Daniel Stenberg
7d043f46d5 hide debug output from screen, use log/ for logfiles 2002-02-22 10:40:05 +00:00
Daniel Stenberg
cbca19d6c2 lib/config.h.in added to dist 2002-02-22 07:51:23 +00:00
Daniel Stenberg
b40b9677b6 VMS adjustments 2002-02-20 23:24:04 +00:00
Daniel Stenberg
c80ad865db new from Nico! 2002-02-20 13:48:03 +00:00
Daniel Stenberg
758eae49ab four more bugfixes, one VMS adjustment 2002-02-20 13:47:36 +00:00
Daniel Stenberg
721b05e343 Nico Baggus' VMS tweaks 2002-02-20 13:46:53 +00:00
Daniel Stenberg
a333bddeeb Andrs Garca solved bug report #515228 by making sure the progress meter
is updated even if everything is read in one single pass, as the windows
functions apparantly does more often than other systems.
2002-02-20 13:38:34 +00:00
Daniel Stenberg
4c6a52fe90 corrected reference to multi-using examples 2002-02-19 11:02:01 +00:00
Daniel Stenberg
792d73a9cf include winsock.h on window boxen to work smoother there 2002-02-19 11:00:34 +00:00
Daniel Stenberg
9a95a3f8c3 moved the config.h to lib/config.h 2002-02-19 01:06:56 +00:00
Daniel Stenberg
485edb777f a minor step forwards 2002-02-19 01:04:46 +00:00
Daniel Stenberg
a8c3431ae9 use the new HTTP server input file 2002-02-19 01:04:31 +00:00
Daniel Stenberg
6fe4a6fa9a cut off the old perl one, this only runs the C coded version 2002-02-19 01:03:45 +00:00
Daniel Stenberg
6d8c7356d6 fixed the huge text just in case anyone actually reads it 2002-02-19 00:26:44 +00:00
Daniel Stenberg
a782c96e81 no .. in path 2002-02-19 00:26:25 +00:00
Daniel Stenberg
c795123cd5 fixed a long long mistake 2002-02-18 23:32:45 +00:00
Daniel Stenberg
0ec370e6fb auth on multiple hosts with follow-location 2002-02-18 23:17:57 +00:00
Daniel Stenberg
3d5732d4e0 Rick Richardson's getaddrinfo() usage fix to speed up name resolves 2002-02-18 23:12:37 +00:00
Daniel Stenberg
b795929858 INADDR_NONE should be in_addr_t to work with 64bit archs better.
Really, we should only #define this in one file, not both here and in
connect.c!
2002-02-18 22:59:26 +00:00
Daniel Stenberg
535258ffe4 Philip Gladstone's size problem in add_buffer_send() 2002-02-18 22:41:52 +00:00
Daniel Stenberg
cc161b96ac 4 fixes 2002-02-18 10:51:50 +00:00
Daniel Stenberg
5c4b422b18 offer SSL verfication callback,
add 'headers=' in client formpost
2002-02-18 10:51:28 +00:00
Daniel Stenberg
89bad584c3 updated LDAP URL syntax references by Aron Roberts 2002-02-18 10:47:27 +00:00
Daniel Stenberg
e21926f7f0 connection timeout comparison fix by Emil 2002-02-18 10:05:18 +00:00
Daniel Stenberg
e452f467d4 Philip Gladstone's 64-bit issues corrected.
Reminder for the future: when we're using malloc() we MUST include <stdlib.h>
as otherwise 64bit archs go bananas.

Bug report #517687
2002-02-17 14:55:35 +00:00
Daniel Stenberg
dfda7ba456 corrected the Expect: ignore, made Content-Type: possible to skip 2002-02-17 14:42:44 +00:00
Daniel Stenberg
feb6b6445e Giaslas Georgios's Host: over proxy fix 2002-02-17 11:17:37 +00:00
Daniel Stenberg
0b57fa9c51 http server added to CVS, config*h files moved 2002-02-07 15:13:11 +00:00
Daniel Stenberg
55c6f60c90 ugh. the VMS stuff must've been like that for a reason, I put it back again 2002-02-07 14:47:41 +00:00
Daniel Stenberg
9def011e8e moved the config-* files to lib/Makefile.am 2002-02-07 14:35:14 +00:00
Daniel Stenberg
7cf6e8c9cc moved the config-* files here from the ../Makefile.am 2002-02-07 14:34:34 +00:00
Daniel Stenberg
cdee43aa59 use the config files in this directory now, not ../ 2002-02-07 14:33:36 +00:00
Daniel Stenberg
9c25b58b4c moved the config-*.h files from root to the lib/ dir 2002-02-07 14:32:28 +00:00
Daniel Stenberg
83f35463f5 added note about persistancy in the server 2002-02-07 12:52:04 +00:00
Daniel Stenberg
818cdb879e POSTs seems to work somewhat now 2002-02-07 12:42:59 +00:00
Daniel Stenberg
3eead2d6c4 port number fix, now stores the processed request sent to the server 2002-02-07 12:40:06 +00:00
Daniel Stenberg
5cffe055ad added Cris Bailiff's CAdir option suggestion 2002-02-07 10:43:43 +00:00
Daniel Stenberg
3d4511daf3 the initial C code for the new HTTP test server 2002-02-07 09:39:15 +00:00
Daniel Stenberg
4748b40ad9 changes since 7.9.4 2002-02-07 09:34:43 +00:00
Daniel Stenberg
c40b4f6c39 don't add 2 to the post size, that was a previous mistake because there
was an extra CRLF added to the post data
2002-02-07 09:32:40 +00:00
Daniel Stenberg
d3b96dd394 Miklos Nemeth windows update 2002-02-06 16:04:03 +00:00
Daniel Stenberg
f946df640b Miklos Nemeth added comments 2002-02-06 16:03:28 +00:00
Daniel Stenberg
fef78bd6f1 Miklos Nemeth improved the windows section 2002-02-06 16:01:10 +00:00
Daniel Stenberg
9e6cc86bf7 Miklos Nemeth improved 2002-02-06 16:00:55 +00:00
Daniel Stenberg
b544c5fa5c ARGH the CRLF I removed recently was not only done after the initial
content-type header, it was used for each part and thus without this it
failed MISERABLY. *smacks forhead*
2002-02-06 15:48:53 +00:00
Daniel Stenberg
afa64ee31f a few of the SSL options were added in 7.9.3 and it should be noted
accordingly
2002-02-06 09:49:34 +00:00
Daniel Stenberg
e9bfef0eb1 Brent Beardsley found the content-type bug! 2002-02-06 07:02:13 +00:00
Daniel Stenberg
ddbcccd43d Kevin Roth's discovered SSL download problem 2002-02-05 15:33:00 +00:00
108 changed files with 3914 additions and 2592 deletions

2160
CHANGES

File diff suppressed because it is too large Load Diff

1957
CHANGES.2001 Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -2,16 +2,15 @@
# $Id$
#
AUTOMAKE_OPTIONS = foreign no-dependencies
AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = \
CHANGES LEGAL maketgz MITX.txt MPL-1.1.txt \
reconf Makefile.dist curl-config.in build_vms.com curl-mode.el \
config-vms.h config-win32.h config-riscos.h config-mac.h
reconf Makefile.dist curl-config.in build_vms.com curl-mode.el
bin_SCRIPTS = curl-config
SUBDIRS = docs lib src include tests packages multi
SUBDIRS = docs lib src include tests packages
# create a root makefile in the distribution:
dist-hook:

View File

@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 2001, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 2002, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# In order to be useful for every potential user, curl and libcurl are
# dual-licensed under the MPL and the MIT/X-derivate licenses.
@@ -51,6 +51,12 @@ vc-ssl:
cd lib
nmake -f Makefile.vc6 cfg=release-ssl
cd ..\src
nmake -f Makefile.vc6 cfg=release-ssl
vc-ssl-dll:
cd lib
nmake -f Makefile.vc6 cfg=release-ssl-dll
cd ..\src
nmake -f Makefile.vc6
cygwin:

View File

@@ -6,14 +6,16 @@ $ loc = f$environment("PROCEDURE")
$ def = f$parse("X.X;1",loc) - "X.X;1"
$
$ set def 'def'
$ cc_qual = "/define=HAVE_CONFIG_H=1/include=(""../include/"",""../"")"
$ cc_qual = "/define=HAVE_CONFIG_H=1/include=(""../include/"",""../"",""../../openssl-0_9_6c/include/"")"
$ if p1 .eqs. "LISTING" then cc_qual = cc_qual + "/LIST/MACHINE"
$ if p1 .eqs. "DEBUG" then cc_qual = cc_qual + "/LIST/MACHINE/DEBUG"
$ msg_qual = ""
$ call build "[.lib]" "*.c"
$ call build "[.src]" "*.c"
$ call build "[.src]" "*.msg"
$ link /exe=curl.exe [.src]curl/lib/include=main,[.lib]curl/lib
$ link /exe=curl.exe [.src]curl/lib/include=main,[.lib]curl/lib, -
[-.openssl-0_9_6c.axp.exe.ssl]libssl/lib, -
[-.openssl-0_9_6c.axp.exe.crypto]libcrypto/lib
$
$
$ goto Common_Exit

View File

@@ -8,7 +8,7 @@ AC_PREREQ(2.50)
dnl First some basic init macros
AC_INIT
AC_CONFIG_SRCDIR([lib/urldata.h])
AM_CONFIG_HEADER(config.h src/config.h)
AM_CONFIG_HEADER(lib/config.h src/config.h tests/server/config.h)
dnl figure out the libcurl version
VERSION=`sed -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curl.h`
@@ -594,13 +594,14 @@ dnl AC_SUBST(RANLIB)
AC_CONFIG_FILES([Makefile \
docs/Makefile \
docs/examples/Makefile \
docs/libcurl/Makefile \
include/Makefile \
include/curl/Makefile \
src/Makefile \
multi/Makefile \
lib/Makefile \
tests/Makefile \
tests/data/Makefile \
tests/server/Makefile \
packages/Makefile \
packages/Win32/Makefile \
packages/Win32/cygwin/Makefile \
@@ -609,6 +610,8 @@ AC_CONFIG_FILES([Makefile \
packages/Linux/RPM/curl.spec \
packages/Linux/RPM/curl-ssl.spec \
packages/Solaris/Makefile \
packages/EPM/curl.list \
packages/EPM/Makefile \
curl-config
])
AC_OUTPUT

View File

@@ -203,15 +203,32 @@ Win32
----------------------------
Please read the OpenSSL documentation on how to compile and install
the OpenSSL library. This generates the libeay32.dll and ssleay32.dll
files.
files in the out32dll subdirectory in the OpenSSL home directory. If
you compiled OpenSSL static libraries (libeay32.lib, ssleay32.lib,
RSAglue.lib) they are created in the out32 subdirectory.
Run the 'vcvars32.bat' file to get the proper environment variables
set. Edit the makefile.vc6 in the lib directory and define
OPENSSL_PATH. Set the location of the OpenSSL library and run 'nmake
vc-ssl' in the root directory.
set. The vcvars32.bat file is part of the Microsoft development
environment and you may find it in 'C:\Program Files\Microsoft Visual
Studio\vc98\bin' if you installed Visual C/C++ 6 in the default
directory.
The vcvars32.bat file is part of the Microsoft development
environment.
Before running nmake define the OPENSSL_PATH environment variable with
the root/base directory of OpenSSL, for example:
set OPENSSL_PATH=c:\openssl-0.9.6b
Then run 'nmake vc-ssl' or 'nmake vc-ssl-dll' in the curl's root
directory. 'nmake vc-ssl' will create a libcurl static and dynamic
libraries in the lib subdirectory, as well as a statically linked
version of curl.exe in the scr subdirectory. This statically linked
version is a standalone executable not requiring any DLL at
runtime. This making method requires that you have build the static
libraries of OpenSSL available in OpenSSL's out32 subdirectory.
'nmake vc-ssl-dll' creates the libcurl dynamic library and
links curl.exe against libcurl and OpenSSL dynamically.
This executables requires libcurl.dll and the OpenSSL DLLs
at runtime.
Microsoft / Borland style
-------------------------
@@ -391,6 +408,7 @@ PORTS
- HP-PA Linux
- MIPS IRIX 6.2, 6.5
- MIPS Linux
- Pocket PC/Win CE 3.0
- Power AIX 4.2, 4.3.1, 4.3.2
- PowerPC Darwin 1.0
- PowerPC Linux

View File

@@ -54,7 +54,7 @@ Windows vs Unix
Inside the source code, We make an effort to avoid '#ifdef [Your OS]'. All
conditionals that deal with features *should* instead be in the format
'#ifdef HAVE_THAT_WEIRD_FUNCTION'. Since Windows can't run configure scripts,
we maintain two config-win32.h files (one in / and one in src/) that are
we maintain two config-win32.h files (one in lib/ and one in src/) that are
supposed to look exactly as a config.h file would have looked like on a
Windows machine!
@@ -69,10 +69,10 @@ Library
rather small and easy-to-follow. All the ones prefixed with 'curl_easy' are
put in the lib/easy.c file.
Starting with libcurl 7.8, curl_global_init_() and curl_global_cleanup() were
introduced. They should be called by the application to initialize and clean
up global stuff in the library. As of today, they just do the global SSL
initing if SSL is enabled. libcurl itself has no "global" scope.
curl_global_init_() and curl_global_cleanup() should be called by the
application to initialize and clean up global stuff in the library. As of
today, it can handle the global SSL initing if SSL is enabled and it can init
the socket layer on windows machines. libcurl itself has no "global" scope.
All printf()-style functions use the supplied clones in lib/mprintf.c. This
makes sure we stay absolutely platform independent.

14
docs/KNOWN_BUGS Normal file
View File

@@ -0,0 +1,14 @@
These are problems known to exist at the time of this release. Feel free to
join in and help us correct one or more of these! Also be sure to check the
changelog of the current development status, as one or more of these problems
may have been fixed since this was written!
* curl_formadd() fails on OSF1. Why? Fix! Need help from OSF1 dudes.
https://sourceforge.net/tracker/index.php?func=detail&aid=524433&group_id=976&atid=100976
* Running 'make test' on Mac OS X gives 4 errors. This seems to be related
to some kind of libtool problem:
http://curl.haxx.se/mail/archive-2002-03/0029.html and
http://curl.haxx.se/mail/archive-2002-03/0033.html
* libcurl does not deal nicely with files larger than 2GB

View File

@@ -246,25 +246,25 @@ POST (HTTP)
-F accepts parameters like -F "name=contents". If you want the contents to
be read from a file, use <@filename> as contents. When specifying a file,
you can also specify the file content type by appending ';type=<mime type>'
to the file name. You can also post the contents of several files in one field.
For example, the field name 'coolfiles' is used to send three files, with
different content types using the following syntax:
to the file name. You can also post the contents of several files in one
field. For example, the field name 'coolfiles' is used to send three files,
with different content types using the following syntax:
curl -F "coolfiles=@fil1.gif;type=image/gif,fil2.txt,fil3.html" \
http://www.post.com/postit.cgi
If the content-type is not specified, curl will try to guess from the file
extension (it only knows a few), or use the previously specified type
(from an earlier file if several files are specified in a list) or else it
will using the default type 'text/plain'.
extension (it only knows a few), or use the previously specified type (from
an earlier file if several files are specified in a list) or else it will
using the default type 'text/plain'.
Emulate a fill-in form with -F. Let's say you fill in three fields in a
form. One field is a file name which to post, one field is your name and one
field is a file description. We want to post the file we have written named
"cooltext.txt". To let curl do the posting of this data instead of your
favourite browser, you have to read the HTML source of the form page and find
the names of the input fields. In our example, the input field names are
'file', 'yourname' and 'filedescription'.
favourite browser, you have to read the HTML source of the form page and
find the names of the input fields. In our example, the input field names
are 'file', 'yourname' and 'filedescription'.
curl -F "file=@cooltext.txt" -F "yourname=Daniel" \
-F "filedescription=Cool text file with cool text inside" \
@@ -668,8 +668,14 @@ LDAP
and offer ldap:// support.
LDAP is a complex thing and writing an LDAP query is not an easy task. I do
advice you to dig up the syntax description for that elsewhere, RFC 1959 if
no other place is better.
advice you to dig up the syntax description for that elsewhere. Two places
that might suit you are:
Netscape's "Netscape Directory SDK 3.0 for C Programmer's Guide Chapter 10:
Working with LDAP URLs":
http://developer.netscape.com/docs/manuals/dirsdk/csdk30/url.htm
RFC 2255, "The LDAP URL Format" http://www.rfc-editor.org/rfc/rfc2255.txt
To show you an example, this is now I can get all people from my local LDAP
server that has a certain sub-domain in their email address:

View File

@@ -6,69 +6,24 @@ AUTOMAKE_OPTIONS = foreign no-dependencies
man_MANS = \
curl.1 \
curl-config.1 \
curl_easy_cleanup.3 \
curl_easy_getinfo.3 \
curl_easy_init.3 \
curl_easy_perform.3 \
curl_easy_setopt.3 \
curl_easy_duphandle.3 \
curl_formparse.3 \
curl_formadd.3 \
curl_formfree.3 \
curl_getdate.3 \
curl_getenv.3 \
curl_slist_append.3 \
curl_slist_free_all.3 \
curl_version.3 \
curl_escape.3 \
curl_unescape.3 \
curl_strequal.3 \
curl_strnequal.3 \
curl_mprintf.3 \
curl_global_init.3 \
curl_global_cleanup.3 \
libcurl.3
SUBDIRS = examples
curl-config.1
HTMLPAGES = \
curl.html \
curl-config.html \
curl_easy_cleanup.html \
curl_easy_getinfo.html \
curl_easy_init.html \
curl_easy_perform.html \
curl_easy_setopt.html \
curl_easy_duphandle.html \
curl_formadd.html \
curl_formparse.html \
curl_formfree.html \
curl_getdate.html \
curl_getenv.html \
curl_slist_append.html \
curl_slist_free_all.html \
curl_version.html \
curl_escape.html \
curl_unescape.html \
curl_strequal.html \
curl_strnequal.html \
curl_mprintf.html \
curl_global_init.html \
curl_global_cleanup.html \
libcurl.html \
index.html
curl-config.html
EXTRA_DIST = $(man_MANS) \
MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS \
README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS \
VERSIONS $(HTMLPAGES)
SUBDIRS = examples libcurl
EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS \
README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS \
VERSIONS KNOWN_BUGS $(man_MANS) $(HTMLPAGES)
MAN2HTML= gnroff -man $< | man2html >$@
SUFFIXES = .1 .3 .html
html: $(HTMLPAGES)
cd libcurl; make html
.3.html:
$(MAN2HTML)

View File

@@ -49,8 +49,8 @@ TODO
very long time idle connections.
* Make sure we don't ever loop because of non-blocking sockets return
EWOULDBLOCK or similar. This concerns the HTTP request sending, the FTP
command sending etc.
EWOULDBLOCK or similar. This concerns the HTTP request sending (and
especially regular HTTP POST), the FTP command sending etc.
* Go through the code and verify that libcurl deals with big files >2GB and
>4GB all over. Bug reports indicate that it doesn't currently work
@@ -78,11 +78,20 @@ TODO
HTTP
* Make it possible to supply normal POST data through the ordinary read data
callback.
* HTTP PUT for files passed on stdin *OR* when the --crlf option is
used. Requires libcurl to send the file with chunked content
encoding. [http://curl.haxx.se/dev/HTTP-PUT-stdin.txt] When the filter
system mentioned above gets real, it'll be a piece of cake to add.
* Pass a list of host name to libcurl to which we allow the user name and
password to get sent to. Currently, it only get sent to the host name that
the first URL uses (to prevent others from being able to read it), but this
also prevents the authentication info from getting sent when following
locations to legitimate other host names.
* "Content-Encoding: compress/gzip/zlib" HTTP 1.1 clearly defines how to get
and decode compressed documents. There is the zlib that is pretty good at
decompressing stuff. This work was started in October 1999 but halted again
@@ -127,6 +136,14 @@ TODO
SSL
* If you really want to improve the SSL situation, you should probably have a
look at SSL cafile loading as well - quick traces look to me like these are
done on every request as well, when they should only be necessary once per
ssl context (or once per handle). Even better would be to support the SSL
CAdir option - instead of loading all of the root CA certs for every
request, this option allows you to only read the CA chain that is actually
required (into the cache)...
* Add an interface to libcurl that enables "session IDs" to get
exported/imported. Cris Bailiff said: "OpenSSL has functions which can
serialise the current SSL state to a buffer of your choice, and
@@ -135,6 +152,11 @@ TODO
idea might become moot if we enable the 'data sharing' as mentioned in the
LIBCURL label above.
* OpenSSL supports a callback for customised verification of the peer
certificate, but this doesn't seem to be exposed in the libcurl APIs. Could
it be? There's so much that could be done if it were! (brought by Chris
Clark)
* Make curl's SSL layer option capable of using other free SSL libraries.
Such as the Mozilla Security Services
(http://www.mozilla.org/projects/security/pki/nss/) and GNUTLS
@@ -159,6 +181,18 @@ TODO
make sure that happens. It should of course not make more than one
connection to the same remote host.
* Extending the capabilities of the multipart formposting. How about leaving
the ';type=foo' syntax as it is and adding an extra tag (headers) which
works like this: curl -F "coolfiles=@fil1.txt;headers=@fil1.hdr" where
fil1.hdr contains extra headers like
Content-Type: text/plain; charset=KOI8-R"
Content-Transfer-Encoding: base64
X-User-Comment: Please don't use browser specific HTML code
which should overwrite the program reasonable defaults (plain/text,
8bit...) (Idea brough to us by kromJx)
TEST SUITE
* Extend the test suite to include more protocols. The telnet could just do

View File

@@ -2,7 +2,7 @@
.\" nroff -man curl.1
.\" Written by Daniel Stenberg
.\"
.TH curl 1 "30 Nov 2001" "Curl 7.9.2" "Curl Manual"
.TH curl 1 "25 Feb 2002" "Curl 7.9.5" "Curl Manual"
.SH NAME
curl \- transfer a URL
.SH SYNOPSIS
@@ -594,6 +594,9 @@ The average download speed that curl measured for the complete download.
.TP
.B speed_upload
The average upload speed that curl measured for the complete upload.
.TP
.B content_type
The Content-Type of the requested document, if there was any. (Added in 7.9.5)
.RE
If this option is used several times, the last one will be used.

View File

@@ -1,29 +0,0 @@
.\" You can view this file with:
.\" nroff -man [file]
.\" $Id$
.\"
.TH curl_easy_cleanup 3 "5 March 2001" "libcurl 7.7" "libcurl Manual"
.SH NAME
curl_easy_cleanup - End a libcurl session
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "void curl_easy_cleanup(CURL *" handle ");"
.ad
.SH DESCRIPTION
This function must be the last function to call for a curl session. It is the
opposite of the
.I curl_easy_init
function and must be called with the same
.I handle
as input as the curl_easy_init call returned.
This will effectively close all connections libcurl has been used and possibly
has kept open until now. Don't call this function if you intend to transfer
more files (libcurl 7.7 or later).
.SH RETURN VALUE
None
.SH "SEE ALSO"
.BR curl_easy_init "(3), "
.SH BUGS
Surely there are some, you tell me!

View File

@@ -1,34 +0,0 @@
.\" You can view this file with:
.\" nroff -man [file]
.\" $Id$
.\"
.TH curl_easy_init 3 "14 August 2001" "libcurl 7.8.1" "libcurl Manual"
.SH NAME
curl_easy_init - Start a libcurl session
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURL *curl_easy_init( );"
.ad
.SH DESCRIPTION
This function must be the first function to call, and it returns a CURL handle
that you shall use as input to the other easy-functions. The init calls
intializes curl and this call MUST have a corresponding call to
.I curl_easy_cleanup
when the operation is complete.
On win32 systems, if you want to init the winsock stuff manually, libcurl will
not do that for you. WSAStartup() and WSACleanup() should then be called
accordingly. If you want libcurl to handle this, use the CURL_GLOBAL_WIN32
flag in the initial curl_global_init() call.
Using libcurl 7.7 and later, you should perform all your sequential file
transfers using the same curl handle. This enables libcurl to use persistant
connections where possible.
.SH RETURN VALUE
If this function returns NULL, something went wrong and you cannot use the
other curl functions.
.SH "SEE ALSO"
.BR curl_easy_cleanup "(3), " curl_global_init "(3)
.SH BUGS
Surely there are some, you tell me!

View File

@@ -114,7 +114,7 @@ Global Preparation
call initialized.
Repeated calls to curl_global_init() and curl_global_cleanup() should be
avoided. They should be called once each.
avoided. They should only be called once each.
Handle the Easy libcurl
@@ -470,7 +470,30 @@ HTTP POSTing
Showing Progress
[ built-in progress meter, progress callback ]
For historical and traditional reasons, libcurl has a built-in progress meter
that can be switched on and then makes it presents a progress meter in your
terminal.
Switch on the progress meter by, oddly enough, set CURLOPT_NOPROGRESS to
FALSE. This option is set to TRUE by default.
For most applications however, the built-in progress meter is useless and
what instead is interesting is the ability to specify a progress
callback. The function pointer you pass to libcurl will then be called on
irregular intervals with information about the current transfer.
Set the progress callback by using CURLOPT_PROGRESSFUNCTION. And pass a
pointer to a function that matches this prototype:
int progress_callback(void *clientp,
double dltotal,
double dlnow,
double ultotal,
double ulnow);
If any of the input arguments is unknown, a 0 will be passed. The first
argument, the 'clientp' is the pointer you pass to libcurl with
CURLOPT_PROGRESSDATA. libcurl won't touch it.
libcurl with C++
@@ -741,6 +764,15 @@ Customizing Operations
consideration and you should be aware that you may violate the HTTP protocol
when doing so.
There's only one aspect left in the HTTP requests that we haven't yet
mentioned how to modify: the version field. All HTTP requests includes the
version number to tell the server which version we support. libcurl speak
HTTP 1.1 by default. Some very old servers don't like getting 1.1-requests
and when dealing with stubborn old things like that, you can tell libcurl to
use 1.0 instead by doing something like this:
curl_easy_setopt(easyhandle, CURLOPT_HTTP_VERSION, CURLHTTP_VERSION_1_0);
Not all protocols are HTTP-like, and thus the above may not help you when you
want to make for example your FTP transfers to behave differently.
@@ -770,16 +802,71 @@ Customizing Operations
instead be called CURLOPT_POSTQUOTE and used the exact same way.
The custom FTP command will be issued to the server in the same order they
are built in the list, and if a command gets an error code returned back from
the server no more commands will be issued and libcurl will bail out with an
error code. Note that if you use CURLOPT_QUOTE to send commands before a
transfer, no transfer will actually take place then.
are added to the list, and if a command gets an error code returned back from
the server, no more commands will be issued and libcurl will bail out with an
error code (CURLE_FTP_QUOTE_ERROR). Note that if you use CURLOPT_QUOTE to
send commands before a transfer, no transfer will actually take place when a
quote command has failed.
If you set the CURLOPT_HEADER to true, you will tell libcurl to get
information about the target file and output "headers" about it. The headers
will be in "HTTP-style", looking like they do in HTTP.
The option to enable headers or to run custom FTP commands may be useful to
combine with CURLOPT_NOBODY. If this option is set, no actual file content
transfer will be performed.
[ custom FTP commands without transfer, FTP "header-only", HTTP 1.0 ]
Cookies Without Chocolate Chips
[ set cookies, read cookies from file, cookie-jar ]
In the HTTP sense, a cookie is a name with an associated value. A server
sends the name and value to the client, and expects it to get sent back on
every subsequent request to the server that matches the particular conditions
set. The conditions include that the domain name and path match and that the
cookie hasn't become too old.
In real-world cases, servers send new cookies to replace existing one to
update them. Server use cookies to "track" users and to keep "sessions".
Cookies are sent from server to clients with the header Set-Cookie: and
they're sent from clients to servers with the Cookie: header.
To just send whatever cookie you want to a server, you can use CURLOPT_COOKIE
to set a cookie string like this:
curl_easy_setopt(easyhandle, CURLOPT_COOKIE, "name1=var1; name2=var2;");
In many cases, that is not enough. You might want to dynamicly save whatever
cookies the remote server passes to you, and make sure those cookies are then
use accordingly on later requests.
One way to do this, is to save all headers you receive in a plain file and
when you make a request, you tell libcurl to read the previous headers to
figure out which cookies to use. Set header file to read cookies from with
CURLOPT_COOKIEFILE.
The CURLOPT_COOKIEFILE option also automaticly enables the cookie parser in
libcurl. Until the cookie parser is enabled, libcurl will not parse or
understand incoming cookies and they will just be ignored. However, when the
parser is enabled the cookies will be understood and the cookies will be kept
in memory and used properly in subsequent requests when the same handle is
used. Many times this is enough, and you may not have to save the cookies to
disk at all. Note that the file you specify to CURLOPT_COOKIEFILE doesn't
have to exist to enable the parser, so a common way to just enable the parser
and not read able might be to use a file name you know doesn't exist.
If you rather use existing cookies that you've previously received with your
Netscape or Mozilla browsers, you can make libcurl use that cookie file as
input. The CURLOPT_COOKIEFILE is used for that too, as libcurl will
automaticly find out what kind of file it is and act accordingly.
The perhaps most advanced cookie operation libcurl offers, is saving the
entire internal cookie state back into a Netscape/Mozilla formatted cookie
file. We call that the cookie-jar. When you set a file name with
CURLOPT_COOKIEJAR, that file name will be created and all received cookies
will be stored in it when curl_easy_cleanup() is called. This enabled cookies
to get passed on properly between multiple handles without any information
getting lost.
Headers Equal Fun

68
docs/libcurl/Makefile.am Normal file
View File

@@ -0,0 +1,68 @@
#
# $Id$
#
AUTOMAKE_OPTIONS = foreign no-dependencies
man_MANS = \
curl_easy_cleanup.3 \
curl_easy_getinfo.3 \
curl_easy_init.3 \
curl_easy_perform.3 \
curl_easy_setopt.3 \
curl_easy_duphandle.3 \
curl_formparse.3 \
curl_formadd.3 \
curl_formfree.3 \
curl_getdate.3 \
curl_getenv.3 \
curl_slist_append.3 \
curl_slist_free_all.3 \
curl_version.3 \
curl_escape.3 \
curl_unescape.3 \
curl_strequal.3 \
curl_strnequal.3 \
curl_mprintf.3 \
curl_global_init.3 \
curl_global_cleanup.3 \
libcurl.3
HTMLPAGES = \
curl_easy_cleanup.html \
curl_easy_getinfo.html \
curl_easy_init.html \
curl_easy_perform.html \
curl_easy_setopt.html \
curl_easy_duphandle.html \
curl_formadd.html \
curl_formparse.html \
curl_formfree.html \
curl_getdate.html \
curl_getenv.html \
curl_slist_append.html \
curl_slist_free_all.html \
curl_version.html \
curl_escape.html \
curl_unescape.html \
curl_strequal.html \
curl_strnequal.html \
curl_mprintf.html \
curl_global_init.html \
curl_global_cleanup.html \
libcurl.html \
index.html
EXTRA_DIST = $(man_MANS) $(HTMLPAGES)
MAN2HTML= gnroff -man $< | man2html >$@
SUFFIXES = .1 .3 .html
html: $(HTMLPAGES)
.3.html:
$(MAN2HTML)
.1.html:
$(MAN2HTML)

View File

@@ -0,0 +1,25 @@
.\" You can view this file with:
.\" nroff -man [file]
.\" $Id$
.\"
.TH curl_easy_cleanup 3 "4 March 2002" "libcurl 7.7" "libcurl Manual"
.SH NAME
curl_easy_cleanup - End a libcurl easy session
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "void curl_easy_cleanup(CURL *" handle ");"
.ad
.SH DESCRIPTION
This function must be the last function to call for an easy session. It is the
opposite of the \fIcurl_easy_init\fP function and must be called with the same
\fIhandle\fP as input that the curl_easy_init call returned.
This will effectively close all connections this handle has used and possibly
has kept open until now. Don't call this function if you intend to transfer
more files.
.SH RETURN VALUE
None
.SH "SEE ALSO"
.BR curl_easy_init "(3), "

View File

@@ -0,0 +1,25 @@
.\" You can view this file with:
.\" nroff -man [file]
.\" $Id$
.\"
.TH curl_easy_init 3 "4 March 2002" "libcurl 7.8.1" "libcurl Manual"
.SH NAME
curl_easy_init - Start a libcurl easy session
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURL *curl_easy_init( );"
.ad
.SH DESCRIPTION
This function must be the first function to call, and it returns a CURL easy
handle that you must use as input to other easy-functions. curl_easy_init
intializes curl and this call MUST have a corresponding call to
\fIcurl_easy_cleanup\fP when the operation is complete.
.SH RETURN VALUE
If this function returns NULL, something went wrong and you cannot use the
other curl functions.
.SH "SEE ALSO"
.BR curl_easy_cleanup "(3), " curl_global_init "(3)
.SH BUGS
Surely there are some, you tell me!

View File

@@ -324,7 +324,8 @@ changed with \fICURLOPT_SSLCERTTYPE\fP.
.TP
.B CURLOPT_SSLCERTTYPE
Pass a pointer to a zero terminated string as parameter. The string should be
the format of your certificate. Supported formats are "PEM" and "DER".
the format of your certificate. Supported formats are "PEM" and "DER". (Added
in 7.9.3)
.TP
.B CURLOPT_SSLCERTPASSWD
Pass a pointer to a zero terminated string as parameter. It will be used as
@@ -339,11 +340,12 @@ a certificate but you need one to load your private key.
.B CURLOPT_SSLKEY
Pass a pointer to a zero terminated string as parameter. The string should be
the file name of your private key. The default format is "PEM" and can be
changed with \fICURLOPT_SSLKEYTYPE\fP.
changed with \fICURLOPT_SSLKEYTYPE\fP. (Added in 7.9.3)
.TP
.B CURLOPT_SSLKEYTYPE
Pass a pointer to a zero terminated string as parameter. The string should be
the format of your private key. Supported formats are "PEM", "DER" and "ENG".
(Added in 7.9.3)
\fBNOTE:\fPThe format "ENG" enables you to load the private key from a crypto
engine. in this case \fICURLOPT_SSLKEY\fP is used as an identifier passed to
@@ -351,22 +353,25 @@ the engine. You have to set the crypto engine with \fICURLOPT_SSL_ENGINE\fP.
.TP
.B CURLOPT_SSLKEYASSWD
Pass a pointer to a zero terminated string as parameter. It will be used as
the password required to use the \fICURLOPT_SSLKEY\fP private key. If the password
is not supplied, you will be prompted for it. \fICURLOPT_PASSWDFUNCTION\fP can
be used to set your own prompt function.
the password required to use the \fICURLOPT_SSLKEY\fP private key. If the
password is not supplied, you will be prompted for
it. \fICURLOPT_PASSWDFUNCTION\fP can be used to set your own prompt function.
(Added in 7.9.3)
.TP
.B CURLOPT_SSL_ENGINE
Pass a pointer to a zero terminated string as parameter. It will be used as
the identifier for the crypto engine you want to use for your private key.
the identifier for the crypto engine you want to use for your private
key. (Added in 7.9.3)
\fBNOTE:\fPIf the crypto device cannot be loaded, \fICURLE_SSL_ENGINE_NOTFOUND\fP
is returned.
\fBNOTE:\fPIf the crypto device cannot be loaded,
\fICURLE_SSL_ENGINE_NOTFOUND\fP is returned.
.TP
.B CURLOPT_SSL_ENGINEDEFAULT
Sets the actual crypto engine as the default for (asymetric) crypto operations.
Sets the actual crypto engine as the default for (asymetric) crypto
operations. (Added in 7.9.3)
\fBNOTE:\fPIf the crypto device cannot be set, \fICURLE_SSL_ENGINE_SETFAILED\fP
is returned.
\fBNOTE:\fPIf the crypto device cannot be set,
\fICURLE_SSL_ENGINE_SETFAILED\fP is returned.
.TP
.B CURLOPT_CRLF
Convert Unix newlines to CRLF newlines on FTP uploads.

View File

@@ -2,7 +2,7 @@
.\" nroff -man [file]
.\" $Id$
.\"
.TH curl_escape 3 "22 March 2001" "libcurl 7.7" "libcurl Manual"
.TH curl_escape 3 "6 March 2002" "libcurl 7.9" "libcurl Manual"
.SH NAME
curl_escape - URL encodes the given string
.SH SYNOPSIS
@@ -13,10 +13,8 @@ curl_escape - URL encodes the given string
.SH DESCRIPTION
This function will convert the given input string to an URL encoded string and
return that as a new allocated string. All input characters that are not a-z,
A-Z or 0-9 will be converted to their "URL escaped" version. If a sequence of
%NN (where NN is a two-digit hexadecimal number) is found in the string to
encode, that 3-letter combination will be copied to the output unmodifed,
assuming that it is an already encoded piece of data.
A-Z or 0-9 will be converted to their "URL escaped" version (%NN where NN is a
two-digit hexadecimal number).
If the 'length' argument is set to 0, curl_escape() will use strlen() on the
input 'url' string to find out the size.

View File

@@ -2,7 +2,7 @@
.\" nroff -man [file]
.\" $Id$
.\"
.TH curl_formadd 3 "29 October 2001" "libcurl 7.9.1" "libcurl Manual"
.TH curl_formadd 3 "1 Match 2002" "libcurl 7.9.1" "libcurl Manual"
.SH NAME
curl_formadd - add a section to a multipart/formdata HTTP POST
.SH SYNOPSIS
@@ -87,8 +87,8 @@ Returns non-zero if an error occurs.
.SH EXAMPLE
.nf
HttpPost* post = NULL;
HttpPost* last = NULL;
struct HttpPost* post = NULL;
struct HttpPost* last = NULL;
char namebuffer[] = "name buffer";
long namelength = strlen(namebuffer);
char buffer[] = "test buffer";

View File

@@ -0,0 +1,20 @@
.\" $Id$
.\"
.TH curl_multi_add_handle 3 "4 March 2002" "libcurl 7.9.5" "libcurl Manual"
.SH NAME
curl_multi_add_handle - add an easy handle to a multi session
.SH SYNOPSIS
#include <curl/curl.h>
CURLMcode curl_multi_add_handle(CURLM *multi_handle, CURL *easy_handle);
.ad
.SH DESCRIPTION
Adds a standard easy handle to the multi stack. This will make this multi
handle control the specified easy handle.
When an easy handle has been added to a multi stack, you can not and you must
not use curl_easy_perform() on that handle!
.SH RETURN VALUE
CURLMcode type, general libcurl multi interface error code.
.SH "SEE ALSO"
.BR curl_multi_cleanup "(3)," curl_multi_init "(3)"

View File

@@ -0,0 +1,18 @@
.\" $Id$
.\"
.TH curl_multi_cleanup 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual"
.SH NAME
curl_multi_cleanup - close down a multi session
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLMcode curl_multi_cleanup( CURLM *multi_handle );"
.ad
.SH DESCRIPTION
Cleans up and removes a whole multi stack. It does not free or touch any
individual easy handles in any way - they still need to be closed
individually, using the usual curl_easy_cleanup() way.
.SH RETURN VALUE
CURLMcode type, general libcurl multi interface error code.
.SH "SEE ALSO"
.BR curl_multi_init "(3)," curl_easy_cleanup "(3)," curl_easy_init "(3)"

View File

@@ -0,0 +1,23 @@
.\" $Id$
.\"
.TH curl_multi_fdset 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual"
.SH NAME
curl_multi_fdset - add an easy handle to a multi session
.SH SYNOPSIS
#include <curl/curl.h>
CURLMcode curl_multi_fdset(CURLM *multi_handle,
fd_set *read_fd_set,
fd_set *write_fd_set,
fd_set *exc_fd_set,
int *max_fd);
.ad
.SH DESCRIPTION
This function extracts file descriptor information from a given multi_handle.
libcurl returns its fd_set sets. The application can use these to select() or
poll() on. The curl_multi_perform() function should be called as soon as one
of them are ready to be read from or written to.
.SH RETURN VALUE
CURLMcode type, general libcurl multi interface error code.
.SH "SEE ALSO"
.BR curl_multi_cleanup "(3)," curl_multi_init "(3)"

View File

@@ -0,0 +1,35 @@
.\" $Id$
.\"
.TH curl_multi_info_read 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual"
.SH NAME
curl_multi_info_read - read multi stack informationals
.SH SYNOPSIS
#include <curl/curl.h>
CURLMsg *curl_multi_info_read( CURLM *multi_handle,
int *msgs_in_queue);
.ad
.SH DESCRIPTION
Ask the multi handle if there's any messages/informationals from the
individual transfers. Messages include informationals such as an error code
from the transfer or just the fact that a transfer is completed. More details
on these should be written down as well.
Repeated calls to this function will return a new struct each time, until a
special "end of msgs" struct is returned as a signal that there is no more to
get at this point. The integer pointed to with \fImsgs_in_queue\fP will
contain the number of remaining messages after this function was called.
The data the returned pointer points to will not survive calling
curl_multi_cleanup().
The 'CURLMsg' struct is very simple and only contain very basic informations.
If more involved information is wanted, the particular "easy handle" in
present in that struct and can thus be used in subsequent regular
curl_easy_getinfo() calls (or similar).
.SH "RETURN VALUE"
A pointer to a filled-in struct, or NULL if it failed or ran out of
structs. It also writes the number of messages left in the queue (after this
read) in the integer the second argument points to.
.SH "SEE ALSO"
.BR curl_multi_cleanup "(3)," curl_multi_init "(3)," curl_multi_perform "(3)"

View File

@@ -0,0 +1,22 @@
.\" $Id$
.\"
.TH curl_multi_init 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual"
.SH NAME
curl_multi_init - Start a multi session
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLM *curl_multi_init( );"
.ad
.SH DESCRIPTION
This function returns a CURLM handle to be used as input to all the other
multi-functions, sometimes refered to as a multi handle on some places in the
documentation. This init call MUST have a corresponding call to
\fIcurl_multi_cleanup\fP when the operation is complete.
.SH RETURN VALUE
If this function returns NULL, something went wrong and you cannot use the
other curl functions.
.SH "SEE ALSO"
.BR curl_multi_cleanup "(3)," curl_global_init "(3)," curl_easy_init "(3)"
.SH BUGS
Surely there are some, you tell me!

View File

@@ -0,0 +1,30 @@
.\" $Id$
.\"
.TH curl_multi_perform 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual"
.SH NAME
curl_multi_perform - add an easy handle to a multi session
.SH SYNOPSIS
#include <curl/curl.h>
CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles);
.ad
.SH DESCRIPTION
When the app thinks there's data available for the multi_handle, it should
call this function to read/write whatever there is to read or write right
now. curl_multi_perform() returns as soon as the reads/writes are done. This
function does not require that there actually is any data available for
reading or that data can be written, it can be called just in case. It will
write the number of handles that still transfer data in the second argument's
integer-pointer.
.SH "RETURN VALUE"
CURLMcode type, general libcurl multi interface error code.
NOTE that this only returns errors etc regarding the whole multi stack. There
might still have occurred problems on invidual transfers even when this
function returns OK.
.SH "TYPICAL USAGE"
Most application will use \fIcurl_multi_fdset\fP to get the multi_handle's
file descriptors, then it'll wait for action on them using select() and as
soon as one or more of them are ready, \fIcurl_multi_perform\fP gets called.
.SH "SEE ALSO"
.BR curl_multi_cleanup "(3)," curl_multi_init "(3)"

View File

@@ -0,0 +1,20 @@
.\" $Id$
.\"
.TH curl_multi_remove_handle 3 "6 March 2002" "libcurl 7.9.5" "libcurl Manual"
.SH NAME
curl_multi_remove_handle - add an easy handle to a multi session
.SH SYNOPSIS
#include <curl/curl.h>
CURLMcode curl_multi_remove_handle(CURLM *multi_handle, CURL *easy_handle);
.ad
.SH DESCRIPTION
Removes a given easy_handle from the multi_handle. This will make the
specified easy handle be removed from this multi handle's control.
When the easy handle has been removed from a multi stack, it is again
perfectly legal to invoke \fIcurl_easy_perform()\fP on this easy handle.
.SH RETURN VALUE
CURLMcode type, general libcurl multi interface error code.
.SH "SEE ALSO"
.BR curl_multi_cleanup "(3)," curl_multi_init "(3)"

View File

@@ -75,10 +75,10 @@ struct HttpPost {
};
typedef int (*curl_progress_callback)(void *clientp,
size_t dltotal,
size_t dlnow,
size_t ultotal,
size_t ulnow);
double dltotal,
double dlnow,
double ultotal,
double ulnow);
typedef size_t (*curl_write_callback)(char *buffer,
size_t size,
@@ -493,6 +493,9 @@ typedef enum {
/* DNS cache timeout */
CINIT(DNS_CACHE_TIMEOUT, LONG, 92),
/* send linked-list of pre-transfer QUOTE commands (Wesley Laxton)*/
CINIT(PREQUOTE, OBJECTPOINT, 93),
CURLOPT_LASTENTRY /* the last unusued */
} CURLoption;
@@ -613,8 +616,8 @@ CURLcode curl_global_init(long flags);
void curl_global_cleanup(void);
/* This is the version number */
#define LIBCURL_VERSION "7.9.4"
#define LIBCURL_VERSION_NUM 0x070904
#define LIBCURL_VERSION "7.9.5"
#define LIBCURL_VERSION_NUM 0x070905
/* linked-list structure for the CURLOPT_QUOTE option (and other) */
struct curl_slist {

View File

@@ -2,16 +2,20 @@
# $Id$
#
AUTOMAKE_OPTIONS = foreign no-dependencies
AUTOMAKE_OPTIONS = foreign nostdinc
EXTRA_DIST = getdate.y \
Makefile.b32 Makefile.b32.resp Makefile.m32 Makefile.vc6 \
libcurl.def dllinit.c curllib.dsp curllib.dsw
libcurl.def dllinit.c curllib.dsp curllib.dsw \
config-vms.h config-win32.h config-riscos.h config-mac.h \
config.h.in
lib_LTLIBRARIES = libcurl.la
INCLUDES = -I$(top_srcdir)/include
# we use srcdir/include for the static global include files
# we use builddir/lib for the generated lib/config.h file to get found
# we use srcdir/lib for the lib-private header files
INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/lib -I$(top_srcdir)/lib
libcurl_la_LDFLAGS = -no-undefined -version-info 2:2:0
# This flag accepts an argument of the form current[:revision[:age]]. So,

View File

@@ -23,13 +23,18 @@
# CHANGE LOG
# ------------------------------------------------------------
# 05.11.2001 John Lask Initial Release
# 02.05.2002 Miklos Nemeth OPENSSL_PATH environment; no need
# for OpenSSL libraries when creating a
# static libcurl.lib
#
#
##############################################################
LIB_NAME = libcurl
LIB_NAME_DEBUG = libcurld
!IFNDEF OPENSSL_PATH
OPENSSL_PATH = ../../openssl-0.9.6
!ENDIF
#############################################################
## Nothing more to do below this line!
@@ -46,6 +51,8 @@ LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)/out32dll
LINKLIBS = ws2_32.lib
SSLLIBS = libeay32.lib ssleay32.lib RSAglue.lib
CFGSET = FALSE
LFLAGSSSL=
SSLLIBS =
######################
# release

View File

@@ -221,22 +221,22 @@
#define HAVE_NETINET_IN_H 1
/* Define if you have the <openssl/crypto.h> header file. */
#undef HAVE_OPENSSL_CRYPTO_H
#define HAVE_OPENSSL_CRYPTO_H 1
/* Define if you have the <openssl/err.h> header file. */
#undef HAVE_OPENSSL_ERR_H
#define HAVE_OPENSSL_ERR_H 1
/* Define if you have the <openssl/pem.h> header file. */
#undef HAVE_OPENSSL_PEM_H
#define HAVE_OPENSSL_PEM_H 1
/* Define if you have the <openssl/rsa.h> header file. */
#undef HAVE_OPENSSL_RSA_H
#define HAVE_OPENSSL_RSA_H 1
/* Define if you have the <openssl/ssl.h> header file. */
#undef HAVE_OPENSSL_SSL_H
#define HAVE_OPENSSL_SSL_H 1
/* Define if you have the <openssl/x509.h> header file. */
#undef HAVE_OPENSSL_X509_H
#define HAVE_OPENSSL_X509_H 1
/* Define if you have the <pem.h> header file. */
#undef HAVE_PEM_H
@@ -296,7 +296,7 @@
#undef HAVE_X509_H
/* Define if you have the crypto library (-lcrypto). */
#undef HAVE_LIBCRYPTO
#define HAVE_LIBCRYPTO 1
/* Define if you have the dl library (-ldl). */
#undef HAVE_LIBDL
@@ -314,7 +314,7 @@
#define HAVE_LIBSOCKET 1
/* Define if you have the ssl library (-lssl). */
#undef HAVE_LIBSSL
#define HAVE_LIBSSL 1
/* Define if you have the ucb library (-lucb). */
#undef HAVE_LIBUCB
@@ -346,7 +346,7 @@
#undef HAVE_GETPASS
/* Define if you have a working OpenSSL installation */
#undef OPENSSL_ENABLED
#define OPENSSL_ENABLED 1
/* Define if you have the `dlopen' function. */
#undef HAVE_DLOPEN
@@ -365,3 +365,4 @@
#define HAVE_MEMORY_H 1
#define HAVE_FIONBIO 1

View File

@@ -48,6 +48,10 @@
#include <stdlib.h> /* required for free() prototype, without it, this crashes
on macos 68K */
#endif
#ifdef VMS
#include <in.h>
#include <inet.h>
#endif
#endif
#include <stdio.h>
@@ -360,8 +364,13 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
#endif
/* get the most strict timeout of the ones converted to milliseconds */
if(data->set.timeout &&
(data->set.timeout>data->set.connecttimeout))
if(data->set.timeout && data->set.connecttimeout) {
if (data->set.timeout < data->set.connecttimeout)
timeout_ms = data->set.timeout*1000;
else
timeout_ms = data->set.connecttimeout*1000;
}
else if(data->set.timeout)
timeout_ms = data->set.timeout*1000;
else
timeout_ms = data->set.connecttimeout*1000;

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 2001, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 2002, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* In order to be useful for every potential user, curl and libcurl are
* dual-licensed under the MPL and the MIT/X-derivate licenses.
@@ -127,22 +127,37 @@ Curl_cookie_add(struct CookieInfo *c,
if(httpheader) {
/* This line was read off a HTTP-header */
char *sep;
semiptr=strchr(lineptr, ';'); /* first, find a semicolon */
ptr = lineptr;
do {
/* we have a <what>=<this> pair or a 'secure' word here */
if(strchr(ptr, '=')) {
sep = strchr(ptr, '=');
if(sep && (!semiptr || (semiptr>sep)) ) {
/*
* There is a = sign and if there was a semicolon too, which make sure
* that the semicolon comes _after_ the equal sign.
*/
name[0]=what[0]=0; /* init the buffers */
if(1 <= sscanf(ptr, "%" MAX_NAME_TXT "[^=]=%"
if(1 <= sscanf(ptr, "%" MAX_NAME_TXT "[^;=]=%"
MAX_COOKIE_LINE_TXT "[^;\r\n]",
name, what)) {
/* this is a legal <what>=<this> pair */
/* this is a <name>=<what> pair */
/* Strip off trailing whitespace from the 'what' */
int len=strlen(what);
while(len && isspace((int)what[len-1])) {
what[len-1]=0;
len--;
}
if(strequal("path", name)) {
co->path=strdup(what);
}
else if(strequal("domain", name)) {
co->domain=strdup(what);
co->field1= (what[0]=='.')?2:1;
}
else if(strequal("version", name)) {
co->version=strdup(what);
@@ -159,7 +174,7 @@ Curl_cookie_add(struct CookieInfo *c,
*/
co->maxage = strdup(what);
co->expires =
atoi((*co->maxage=='\"')?&co->maxage[1]:&co->maxage[0]);
atoi((*co->maxage=='\"')?&co->maxage[1]:&co->maxage[0]) + now;
}
else if(strequal("expires", name)) {
co->expirestr=strdup(what);
@@ -187,8 +202,11 @@ Curl_cookie_add(struct CookieInfo *c,
}
}
if(!semiptr)
continue; /* we already know there are no more cookies */
if(!semiptr || !*semiptr) {
/* we already know there are no more cookies */
semiptr = NULL;
continue;
}
ptr=semiptr+1;
while(ptr && *ptr && isspace((int)*ptr))
@@ -198,9 +216,23 @@ Curl_cookie_add(struct CookieInfo *c,
if(!semiptr && *ptr)
/* There are no more semicolons, but there's a final name=value pair
coming up */
semiptr=ptr;
semiptr=strchr(ptr, '\0');
} while(semiptr);
if(NULL == co->name) {
/* we didn't get a cookie name, this is an illegal line, bail out */
if(co->domain)
free(co->domain);
if(co->path)
free(co->path);
if(co->name)
free(co->name);
if(co->value)
free(co->value);
free(co);
return NULL;
}
if(NULL == co->domain)
/* no domain given in the header line, set the default now */
co->domain=domain?strdup(domain):NULL;

View File

@@ -38,7 +38,7 @@ struct Cookie {
char *value; /* name = <this> */
char *path; /* path = <this> */
char *domain; /* domain = <this> */
time_t expires; /* expires = <this> */
long expires; /* expires = <this> */
char *expirestr; /* the plain text version */
char field1; /* read from a cookie file, 1 => FALSE, 2=> TRUE */

View File

@@ -81,6 +81,10 @@ DllMain (
}
return TRUE;
}
#else
#ifdef VMS
int VOID_VAR_DLLINIT;
#endif
#endif
/*

View File

@@ -1065,6 +1065,9 @@ struct FormData *Curl_getFormData(struct HttpPost *post,
do {
if(size)
size += AddFormDataf(&form, "\r\n");
/* boundary */
size += AddFormDataf(&form, "--%s\r\n", boundary);

View File

@@ -55,6 +55,7 @@
#include <netdb.h>
#endif
#ifdef VMS
#include <in.h>
#include <inet.h>
#endif
#endif
@@ -1575,7 +1576,7 @@ CURLcode ftp_perform(struct connectdata *conn)
struct tm buffer;
tm = (struct tm *)localtime_r(&data->info.filetime, &buffer);
#else
tm = localtime(&data->info.filetime);
tm = localtime((unsigned long *)&data->info.filetime);
#endif
/* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
strftime(buf, BUFSIZE-1, "Last-Modified: %a, %d %b %Y %H:%M:%S %Z\r\n",
@@ -1617,6 +1618,12 @@ CURLcode ftp_perform(struct connectdata *conn)
if(result)
return result;
/* Send any PREQUOTE strings after transfer type is set? (Wesley Laxton)*/
if(data->set.prequote) {
if ((result = ftp_sendquote(conn, data->set.prequote)) != CURLE_OK)
return result;
}
if(conn->resume_from) {
/* we're about to continue the uploading of a file */
/* 1. get already existing file's size. We use the SIZE
@@ -1802,6 +1809,12 @@ CURLcode ftp_perform(struct connectdata *conn)
if(result)
return result;
/* Send any PREQUOTE strings after transfer type is set? (Wesley Laxton)*/
if(data->set.prequote) {
if ((result = ftp_sendquote(conn, data->set.prequote)) != CURLE_OK)
return result;
}
/* Attempt to get the size, it'll be useful in some cases: for resumed
downloads and when talking to servers that don't give away the size
in the RETR response line. */

View File

@@ -34,8 +34,6 @@
#include "setup.h"
#ifdef HAVE_CONFIG_H
# include "config.h"
# ifdef HAVE_ALLOCA_H
# include <alloca.h>
# endif
@@ -43,7 +41,6 @@
# ifdef HAVE_TIME_H
# include <time.h>
# endif
#endif
#ifndef YYDEBUG
/* to satisfy gcc -Wundef, we set this to 0 */
@@ -230,7 +227,7 @@ typedef struct _CONTEXT {
#define YYLEX_PARAM cookie
#define context ((CONTEXT *) cookie)
#line 218 "getdate.y"
#line 215 "getdate.y"
typedef union {
int Number;
enum _MERIDIAN Meridian;
@@ -313,11 +310,11 @@ static const short yyrhs[] = { -1,
#if YYDEBUG != 0
static const short yyrline[] = { 0,
234, 235, 238, 241, 244, 247, 250, 253, 256, 262,
268, 277, 283, 295, 298, 301, 307, 311, 315, 321,
325, 343, 349, 355, 359, 364, 368, 375, 383, 386,
389, 392, 395, 398, 401, 404, 407, 410, 413, 416,
419, 422, 425, 428, 431, 434, 437, 442, 476, 480
231, 232, 235, 238, 241, 244, 247, 250, 253, 259,
265, 274, 280, 292, 295, 298, 304, 308, 312, 318,
322, 340, 346, 352, 356, 361, 365, 372, 380, 383,
386, 389, 392, 395, 398, 401, 404, 407, 410, 413,
416, 419, 422, 425, 428, 431, 434, 439, 473, 477
};
#endif
@@ -943,37 +940,37 @@ yyreduce:
switch (yyn) {
case 3:
#line 238 "getdate.y"
#line 235 "getdate.y"
{
context->yyHaveTime++;
;
break;}
case 4:
#line 241 "getdate.y"
#line 238 "getdate.y"
{
context->yyHaveZone++;
;
break;}
case 5:
#line 244 "getdate.y"
#line 241 "getdate.y"
{
context->yyHaveDate++;
;
break;}
case 6:
#line 247 "getdate.y"
#line 244 "getdate.y"
{
context->yyHaveDay++;
;
break;}
case 7:
#line 250 "getdate.y"
#line 247 "getdate.y"
{
context->yyHaveRel++;
;
break;}
case 9:
#line 256 "getdate.y"
#line 253 "getdate.y"
{
context->yyHour = yyvsp[-1].Number;
context->yyMinutes = 0;
@@ -982,7 +979,7 @@ case 9:
;
break;}
case 10:
#line 262 "getdate.y"
#line 259 "getdate.y"
{
context->yyHour = yyvsp[-3].Number;
context->yyMinutes = yyvsp[-1].Number;
@@ -991,7 +988,7 @@ case 10:
;
break;}
case 11:
#line 268 "getdate.y"
#line 265 "getdate.y"
{
context->yyHour = yyvsp[-3].Number;
context->yyMinutes = yyvsp[-1].Number;
@@ -1003,7 +1000,7 @@ case 11:
;
break;}
case 12:
#line 277 "getdate.y"
#line 274 "getdate.y"
{
context->yyHour = yyvsp[-5].Number;
context->yyMinutes = yyvsp[-3].Number;
@@ -1012,7 +1009,7 @@ case 12:
;
break;}
case 13:
#line 283 "getdate.y"
#line 280 "getdate.y"
{
context->yyHour = yyvsp[-5].Number;
context->yyMinutes = yyvsp[-3].Number;
@@ -1025,53 +1022,53 @@ case 13:
;
break;}
case 14:
#line 295 "getdate.y"
#line 292 "getdate.y"
{
context->yyTimezone = yyvsp[0].Number;
;
break;}
case 15:
#line 298 "getdate.y"
#line 295 "getdate.y"
{
context->yyTimezone = yyvsp[0].Number - 60;
;
break;}
case 16:
#line 302 "getdate.y"
#line 299 "getdate.y"
{
context->yyTimezone = yyvsp[-1].Number - 60;
;
break;}
case 17:
#line 307 "getdate.y"
#line 304 "getdate.y"
{
context->yyDayOrdinal = 1;
context->yyDayNumber = yyvsp[0].Number;
;
break;}
case 18:
#line 311 "getdate.y"
#line 308 "getdate.y"
{
context->yyDayOrdinal = 1;
context->yyDayNumber = yyvsp[-1].Number;
;
break;}
case 19:
#line 315 "getdate.y"
#line 312 "getdate.y"
{
context->yyDayOrdinal = yyvsp[-1].Number;
context->yyDayNumber = yyvsp[0].Number;
;
break;}
case 20:
#line 321 "getdate.y"
#line 318 "getdate.y"
{
context->yyMonth = yyvsp[-2].Number;
context->yyDay = yyvsp[0].Number;
;
break;}
case 21:
#line 325 "getdate.y"
#line 322 "getdate.y"
{
/* Interpret as YYYY/MM/DD if $1 >= 1000, otherwise as MM/DD/YY.
The goal in recognizing YYYY/MM/DD is solely to support legacy
@@ -1092,7 +1089,7 @@ case 21:
;
break;}
case 22:
#line 343 "getdate.y"
#line 340 "getdate.y"
{
/* ISO 8601 format. yyyy-mm-dd. */
context->yyYear = yyvsp[-2].Number;
@@ -1101,7 +1098,7 @@ case 22:
;
break;}
case 23:
#line 349 "getdate.y"
#line 346 "getdate.y"
{
/* e.g. 17-JUN-1992. */
context->yyDay = yyvsp[-2].Number;
@@ -1110,14 +1107,14 @@ case 23:
;
break;}
case 24:
#line 355 "getdate.y"
#line 352 "getdate.y"
{
context->yyMonth = yyvsp[-1].Number;
context->yyDay = yyvsp[0].Number;
;
break;}
case 25:
#line 359 "getdate.y"
#line 356 "getdate.y"
{
context->yyMonth = yyvsp[-3].Number;
context->yyDay = yyvsp[-2].Number;
@@ -1125,14 +1122,14 @@ case 25:
;
break;}
case 26:
#line 364 "getdate.y"
#line 361 "getdate.y"
{
context->yyMonth = yyvsp[0].Number;
context->yyDay = yyvsp[-1].Number;
;
break;}
case 27:
#line 368 "getdate.y"
#line 365 "getdate.y"
{
context->yyMonth = yyvsp[-1].Number;
context->yyDay = yyvsp[-2].Number;
@@ -1140,7 +1137,7 @@ case 27:
;
break;}
case 28:
#line 375 "getdate.y"
#line 372 "getdate.y"
{
context->yyRelSeconds = -context->yyRelSeconds;
context->yyRelMinutes = -context->yyRelMinutes;
@@ -1151,115 +1148,115 @@ case 28:
;
break;}
case 30:
#line 386 "getdate.y"
#line 383 "getdate.y"
{
context->yyRelYear += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 31:
#line 389 "getdate.y"
#line 386 "getdate.y"
{
context->yyRelYear += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 32:
#line 392 "getdate.y"
#line 389 "getdate.y"
{
context->yyRelYear += yyvsp[0].Number;
;
break;}
case 33:
#line 395 "getdate.y"
#line 392 "getdate.y"
{
context->yyRelMonth += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 34:
#line 398 "getdate.y"
#line 395 "getdate.y"
{
context->yyRelMonth += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 35:
#line 401 "getdate.y"
#line 398 "getdate.y"
{
context->yyRelMonth += yyvsp[0].Number;
;
break;}
case 36:
#line 404 "getdate.y"
#line 401 "getdate.y"
{
context->yyRelDay += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 37:
#line 407 "getdate.y"
#line 404 "getdate.y"
{
context->yyRelDay += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 38:
#line 410 "getdate.y"
#line 407 "getdate.y"
{
context->yyRelDay += yyvsp[0].Number;
;
break;}
case 39:
#line 413 "getdate.y"
#line 410 "getdate.y"
{
context->yyRelHour += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 40:
#line 416 "getdate.y"
#line 413 "getdate.y"
{
context->yyRelHour += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 41:
#line 419 "getdate.y"
#line 416 "getdate.y"
{
context->yyRelHour += yyvsp[0].Number;
;
break;}
case 42:
#line 422 "getdate.y"
#line 419 "getdate.y"
{
context->yyRelMinutes += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 43:
#line 425 "getdate.y"
#line 422 "getdate.y"
{
context->yyRelMinutes += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 44:
#line 428 "getdate.y"
#line 425 "getdate.y"
{
context->yyRelMinutes += yyvsp[0].Number;
;
break;}
case 45:
#line 431 "getdate.y"
#line 428 "getdate.y"
{
context->yyRelSeconds += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 46:
#line 434 "getdate.y"
#line 431 "getdate.y"
{
context->yyRelSeconds += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 47:
#line 437 "getdate.y"
#line 434 "getdate.y"
{
context->yyRelSeconds += yyvsp[0].Number;
;
break;}
case 48:
#line 443 "getdate.y"
#line 440 "getdate.y"
{
if (context->yyHaveTime && context->yyHaveDate &&
!context->yyHaveRel)
@@ -1293,13 +1290,13 @@ case 48:
;
break;}
case 49:
#line 477 "getdate.y"
#line 474 "getdate.y"
{
yyval.Meridian = MER24;
;
break;}
case 50:
#line 481 "getdate.y"
#line 478 "getdate.y"
{
yyval.Meridian = yyvsp[0].Meridian;
;
@@ -1526,7 +1523,7 @@ yyerrhandle:
}
return 1;
}
#line 486 "getdate.y"
#line 483 "getdate.y"
/* Include this file down here because bison inserts code above which

View File

@@ -7,9 +7,7 @@
** This code is in the public domain and has no copyright.
*/
#if HAVE_CONFIG_H
# include <config.h>
#endif
# include "setup.h"
#ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)

View File

@@ -10,8 +10,6 @@
#include "setup.h"
#ifdef HAVE_CONFIG_H
# include "config.h"
# ifdef HAVE_ALLOCA_H
# include <alloca.h>
# endif
@@ -19,7 +17,6 @@
# ifdef HAVE_TIME_H
# include <time.h>
# endif
#endif
#ifndef YYDEBUG
/* to satisfy gcc -Wundef, we set this to 0 */

View File

@@ -31,6 +31,10 @@
#include <string.h>
#include <stdarg.h>
#ifdef VMS
#include <stdlib.h>
#endif
/*
* This is supposed to be called in the beginning of a permform() session
* and should reset all session-info variables
@@ -44,6 +48,7 @@ CURLcode Curl_initinfo(struct SessionHandle *data)
pro->t_connect = 0;
pro->t_pretransfer = 0;
pro->t_starttransfer = 0;
pro->timespent = 0;
info->httpcode = 0;
info->httpversion=0;

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 2001, Daniel Stenberg, <daniel@haxx.se>, et al
* Copyright (C) 2002, Daniel Stenberg, <daniel@haxx.se>, et al
*
* In order to be useful for every potential user, curl and libcurl are
* dual-licensed under the MPL and the MIT/X-derivate licenses.
@@ -24,7 +24,7 @@
#include "setup.h"
#include <string.h>
#include <stdlib.h>
#include "hash.h"
#include "llist.h"

View File

@@ -50,6 +50,7 @@
#include <stdlib.h> /* required for free() prototypes */
#endif
#ifdef VMS
#include <in.h>
#include <inet.h>
#include <stdlib.h>
#endif
@@ -292,7 +293,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct SessionHandle *data,
char sbuf[NI_MAXSERV];
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_family = PF_INET;
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_CANONNAME;
snprintf(sbuf, sizeof(sbuf), "%d", port);
@@ -409,7 +410,7 @@ static char *MakeIP(unsigned long num,char *addr, int addr_len)
considerably. */
#ifndef INADDR_NONE
#define INADDR_NONE (unsigned long) ~0
#define INADDR_NONE (in_addr_t) ~0
#endif
Curl_addrinfo *Curl_getaddrinfo(struct SessionHandle *data,
@@ -510,7 +511,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct SessionHandle *data,
/* we make a copy of the hostent right now, right here, as the
static one we got a pointer to might get removed when we don't
want/expect that */
h = pack_hostent(buf, h);
h = pack_hostent((char *)buf, h);
#endif
}
return (h);

View File

@@ -151,7 +151,7 @@ CURLcode add_buffer_send(int sockfd, struct connectdata *conn, send_buffer *in,
break;
if(amount != size) {
size += amount;
size -= amount;
ptr += amount;
}
else
@@ -815,8 +815,6 @@ CURLcode Curl_http(struct connectdata *conn)
}
if(HTTPREQ_POST_FORM == data->set.httpreq) {
char contentType[256];
int linelength=0;
if(Curl_FormInit(&http->form, http->sendit)) {
failf(data, "Internal HTTP POST error!");
return CURLE_HTTP_POST_ERROR;
@@ -831,7 +829,7 @@ CURLcode Curl_http(struct connectdata *conn)
data->set.in = (FILE *)&http->form;
add_bufferf(req_buffer,
"Content-Length: %d\r\n", http->postsize-2);
"Content-Length: %d\r\n", http->postsize);
if(!checkheaders(data, "Expect:")) {
/* if not disabled explicitly we add a Expect: 100-continue
@@ -840,10 +838,19 @@ CURLcode Curl_http(struct connectdata *conn)
add_bufferf(req_buffer,
"Expect: 100-continue\r\n");
data->set.expect100header = TRUE;
}
if(!checkheaders(data, "Content-Type:")) {
/* Get Content-Type: line from Curl_FormReadOneLine, which happens
to always be the first line. We can know this for sure since
we always build the formpost linked list the same way! */
we always build the formpost linked list the same way!
The Content-Type header line also contains the MIME boundary
string etc why disabling this header is likely to not make things
work, but we support it anyway.
*/
char contentType[256];
int linelength=0;
linelength = Curl_FormReadOneLine (contentType,
sizeof(contentType),
1,
@@ -853,11 +860,11 @@ CURLcode Curl_http(struct connectdata *conn)
return CURLE_HTTP_POST_ERROR;
}
add_buffer(req_buffer, contentType, linelength);
/* make the request end in a true CRLF */
add_buffer(req_buffer, "\r\n", 2);
}
/* make the request end in a true CRLF */
add_buffer(req_buffer, "\r\n", 2);
/* set upload size to the progress meter */
Curl_pgrsSetUploadSize(data, http->postsize);

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 2001, Daniel Stenberg, <daniel@haxx.se>, et al
* Copyright (C) 2002, Daniel Stenberg, <daniel@haxx.se>, et al
*
* In order to be useful for every potential user, curl and libcurl are
* dual-licensed under the MPL and the MIT/X-derivate licenses.
@@ -23,8 +23,8 @@
#include "setup.h"
#include <string.h>
#include <stdlib.h>
#include "llist.h"

View File

@@ -47,6 +47,11 @@
/* DONT include memdebug.h here! */
struct memdebug {
int size;
char mem[1];
};
/*
* Note that these debug functions are very simple and they are meant to
* remain so. For advanced analysis, record a log file and write perl scripts
@@ -67,16 +72,25 @@ void curl_memdebug(const char *logname)
}
void *curl_domalloc(size_t size, int line, const char *source)
void *curl_domalloc(size_t wantedsize, int line, const char *source)
{
void *mem=(malloc)(size);
if(mem)
struct memdebug *mem;
size_t size;
/* alloc at least 64 bytes */
size = sizeof(struct memdebug)+wantedsize;
mem=(struct memdebug *)(malloc)(size);
if(mem) {
/* fill memory with junk */
memset(mem, 0xA5, size);
if(logfile)
memset(mem->mem, 0xA5, wantedsize);
mem->size = wantedsize;
}
if(logfile && source)
fprintf(logfile, "MEM %s:%d malloc(%d) = %p\n",
source, line, size, mem);
return mem;
source, line, wantedsize, mem->mem);
return mem->mem;
}
char *curl_dostrdup(const char *str, int line, const char *source)
@@ -90,32 +104,56 @@ char *curl_dostrdup(const char *str, int line, const char *source)
exit(2);
}
mem=(strdup)(str);
len=strlen(str)+1;
mem=curl_domalloc(len, 0, NULL); /* NULL prevents logging */
memcpy(mem, str, len);
if(logfile)
fprintf(logfile, "MEM %s:%d strdup(%p) (%d) = %p\n",
source, line, str, len, mem);
return mem;
}
void *curl_dorealloc(void *ptr, size_t size, int line, const char *source)
void *curl_dorealloc(void *ptr, size_t wantedsize,
int line, const char *source)
{
void *mem=(realloc)(ptr, size);
struct memdebug *mem;
size_t size = sizeof(struct memdebug)+wantedsize;
mem = (struct memdebug *)((char *)ptr - offsetof(struct memdebug, mem));
mem=(struct memdebug *)(realloc)(mem, size);
if(logfile)
fprintf(logfile, "MEM %s:%d realloc(%p, %d) = %p\n",
source, line, ptr, size, mem);
return mem;
source, line, ptr, wantedsize, mem?mem->mem:NULL);
if(mem) {
mem->size = wantedsize;
return mem->mem;
}
return NULL;
}
void curl_dofree(void *ptr, int line, const char *source)
{
struct memdebug *mem;
if(NULL == ptr) {
fprintf(stderr, "ILLEGAL free() on NULL at %s:%d\n",
source, line);
exit(2);
}
mem = (struct memdebug *)((char *)ptr - offsetof(struct memdebug, mem));
(free)(ptr);
/* destroy */
memset(mem->mem, 0x13, mem->size);
/* free for real */
(free)(mem);
if(logfile)
fprintf(logfile, "MEM %s:%d free(%p)\n", source, line, ptr);
@@ -168,7 +206,10 @@ int curl_fclose(FILE *file, int line, const char *source)
source, line, file);
return res;
}
#else
#ifdef VMS
int VOID_VAR_MEMDEBUG;
#endif
#endif /* MALLOCDEBUG */
/*

View File

@@ -699,9 +699,8 @@ static int dprintf_formatf(
#if SIZEOF_LONG_LONG
if(p->flags & FLAGS_LONGLONG) {
/* long long */
num = p->data.lnum;
is_neg = num < 0;
num = is_neg ? (- num) : num;
is_neg = p->data.lnum < 0;
num = is_neg ? (- p->data.lnum) : p->data.lnum;
}
else
#endif

View File

@@ -44,12 +44,16 @@
o Enable the application to select() on its own file descriptors and curl's
file descriptors simultaneous easily.
Example source using this interface: http://curl.haxx.se/dev/multi-app.c
Example sources using this interface is here: ../multi/
*/
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
#include <winsock.h>
#endif
#include <curl/curl.h>
typedef void CURLM;

View File

@@ -310,7 +310,7 @@ int Curl_read(struct connectdata *conn,
do {
nread = SSL_read(conn->ssl.handle, buf, buffersize);
if(nread > 0)
if(nread >= 0)
/* successful read */
break;

View File

@@ -34,19 +34,19 @@
#ifdef HAVE_CONFIG_H
#ifdef VMS
#include "../config-vms.h"
#include "config-vms.h"
#else
#include "../config.h" /* the configure script results */
#include "config.h" /* the configure script results */
#endif
#else
#ifdef WIN32
/* hand-modified win32 config.h! */
#include "../config-win32.h"
#include "config-win32.h"
#endif
#ifdef macintosh
/* hand-modified MacOS config.h! */
#include "../config-mac.h"
#include "config-mac.h"
#endif
#endif
@@ -94,11 +94,12 @@ defined(HAVE_LIBSSL) && defined(HAVE_LIBCRYPTO)
#ifdef VMS
#include "../include/curl/stdcheaders.h"
#else
#include "curl/stdcheaders.h"
#include <curl/stdcheaders.h>
#endif
#else
#ifdef _AIX
#include "curl/stdcheaders.h"
#include <curl/stdcheaders.h>
#endif
#endif

View File

@@ -380,6 +380,8 @@ CURLcode Curl_readwrite(struct connectdata *conn,
/* we make sure that this socket isn't read more now */
k->keepon &= ~KEEP_READ;
FD_ZERO(&k->rkeepfd);
/* for a progress meter/info update before going away */
Curl_pgrsUpdate(conn);
return CURLE_OK;
}
@@ -478,7 +480,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
start++);
/* count all non-space letters following */
for(end=start+1, len=0;
for(end=start, len=0;
*end && !isspace((int)*end);
end++, len++);
@@ -601,6 +603,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
return result;
data->info.header_size += k->hbuflen;
conn->headerbytecount += k->hbuflen;
/* reset hbufp pointer && hbuflen */
k->hbufp = data->state.headerbuff;

View File

@@ -735,6 +735,12 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
*/
data->set.postquote = va_arg(param, struct curl_slist *);
break;
case CURLOPT_PREQUOTE:
/*
* List of RAW FTP commands to use prior to RETR (Wesley Laxton)
*/
data->set.prequote = va_arg(param, struct curl_slist *);
break;
case CURLOPT_QUOTE:
/*
* List of RAW FTP commands to use before a transfer
@@ -1983,7 +1989,8 @@ static CURLcode CreateConnection(struct SessionHandle *data,
conn = conn_temp; /* use this connection from now on */
/* we need these pointers if we speak over a proxy */
conn->hostname = old_conn->gname;
conn->hostname = conn->gname;
conn->name = &conn->gname[old_conn->name - old_conn->gname];
free(conn->path); /* free the previously allocated path pointer */

View File

@@ -604,8 +604,9 @@ struct UserDefined {
char *crypto_engine; /* name of the crypto engine to use */
char *cookiejar; /* dump all cookies to this file */
bool crlf; /* convert crlf on ftp upload(?) */
struct curl_slist *quote; /* before the transfer */
struct curl_slist *quote; /* after connection is established */
struct curl_slist *postquote; /* after the transfer */
struct curl_slist *prequote; /* before the transfer, after type (Wesley Laxton)*/
struct curl_slist *telnet_options; /* linked list of telnet options */
curl_TimeCond timecondition; /* kind of time/date comparison */
time_t timevalue; /* what time to compare with */

View File

@@ -1,21 +0,0 @@
#
# $Id$
#
INCLUDES = -I$(top_srcdir)/include
noinst_PROGRAMS = app single double
app_SOURCES = app.c
app_LDADD = ../lib/libcurl.la
app_DEPENDENCIES = ../lib/libcurl.la
single_SOURCES = single.c
single_LDADD = ../lib/libcurl.la
single_DEPENDENCIES = ../lib/libcurl.la
double_SOURCES = double.c
double_LDADD = ../lib/libcurl.la
double_DEPENDENCIES = ../lib/libcurl.la
AUTOMAKE_OPTIONS = foreign no-dependencies

3
packages/EPM/Makefile.am Normal file
View File

@@ -0,0 +1,3 @@
AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = README curl.list.in

12
packages/EPM/README Normal file
View File

@@ -0,0 +1,12 @@
EPM is a free UNIX software/file packaging program that generates distribution
archives from a list of files. EPM Can:
* Generate portable script-based distribution packages complete with
installation and removal scripts.
* Generate vendor distributions in AIX, BSD, Compaq Tru64, Debian, HP-UX,
IRIX, Red Hat, and Solaris formats.
* Provide a complete, cross-platform software distribution solution for your
applications.
http://www.easysw.com/epm/

58
packages/EPM/curl.list.in Normal file
View File

@@ -0,0 +1,58 @@
# Directories...
$prefix=@prefix@
$exec_prefix=@exec_prefix@
$bindir=@bindir@
$confdir=@sysconfdir@
$docdir=@prefix@/doc
$mandir=@mandir@
$libdir=@libdir@
$srcdir=@top_srcdir@
$includedir=@includedir@
# Product information
%product curl
%copyright 1998-2002 by Daniel Stenberg
%vendor Daniel Stenberg, <daniel@haxx.se>
%license ${srcdir}/MITX.txt
%readme ${srcdir}/README
%description Curl is a command line tool for transfering data specified
%description with URL syntax
%version @VERSION@
%packager Giuseppe "Cowo" Corbelli <cowo@lugbs.linux.it>
f 0644 cowo pppusers ${mandir}/man1/curl.1 ./docs/curl.1
f 0644 cowo pppusers ${mandir}/man1/curl-config.1 ./docs/curl-config.1
f 0644 cowo pppusers ${mandir}/man3/curl_easy_cleanup.3 ./docs/curl_easy_cleanup.3
f 0644 cowo pppusers ${mandir}/man3/curl_easy_getinfo.3 ./docs/curl_easy_getinfo.3
f 0644 cowo pppusers ${mandir}/man3/curl_easy_init.3 ./docs/curl_easy_init.3
f 0644 cowo pppusers ${mandir}/man3/curl_easy_perform.3 ./docs/curl_easy_perform.3
f 0644 cowo pppusers ${mandir}/man3/curl_easy_setopt.3 ./docs/curl_easy_setopt.3
f 0644 cowo pppusers ${mandir}/man3/curl_easy_duphandle.3 ./docs/curl_easy_duphandle.3
f 0644 cowo pppusers ${mandir}/man3/curl_formparse.3 ./docs/curl_formparse.3
f 0644 cowo pppusers ${mandir}/man3/curl_formadd.3 ./docs/curl_formadd.3
f 0644 cowo pppusers ${mandir}/man3/curl_formfree.3 ./docs/curl_formfree.3
f 0644 cowo pppusers ${mandir}/man3/curl_getdate.3 ./docs/curl_getdate.3
f 0644 cowo pppusers ${mandir}/man3/curl_getenv.3 ./docs/curl_getenv.3
f 0644 cowo pppusers ${mandir}/man3/curl_slist_append.3 ./docs/curl_slist_append.3
f 0644 cowo pppusers ${mandir}/man3/curl_slist_free_all.3 ./docs/curl_slist_free_all.3
f 0644 cowo pppusers ${mandir}/man3/curl_version.3 ./docs/curl_version.3
f 0644 cowo pppusers ${mandir}/man3/curl_escape.3 ./docs/curl_escape.3
f 0644 cowo pppusers ${mandir}/man3/curl_unescape.3 ./docs/curl_unescape.3
f 0644 cowo pppusers ${mandir}/man3/curl_strequal.3 ./docs/curl_strequal.3
f 0644 cowo pppusers ${mandir}/man3/curl_strnequal.3 ./docs/curl_strnequal.3
f 0644 cowo pppusers ${mandir}/man3/curl_mprintf.3 ./docs/curl_mprintf.3
f 0644 cowo pppusers ${mandir}/man3/curl_global_init.3 ./docs/curl_global_init.3
f 0644 cowo pppusers ${mandir}/man3/curl_global_cleanup.3 ./docs/curl_global_cleanup.3
f 0644 cowo pppusers ${mandir}/man3/libcurl.3 ./docs/libcurl.3
f 0755 cowo pppusers ${libdir}/libcurl.so.2.0.2 ./lib/.libs/libcurl.so.2.0.2
f 0755 cowo pppusers ${libdir}/libcurl.la ./lib/libcurl.la
f 0755 cowo pppusers ${libdir}/libcurl.la ./lib/.libs/libcurl.la
f 0644 cowo pppusers ${libdir}/libcurl.a ./lib/.libs/libcurl.a
f 0755 cowo pppusers ${bindir}/curl ./src/curl
f 0755 cowo pppusers ${bindir}/curl ./src/.libs/curl
f 0644 cowo pppusers ${includedir}/curl/curl.h ./include/curl/curl.h
f 0644 cowo pppusers ${includedir}/curl/easy.h ./include/curl/easy.h
f 0644 cowo pppusers ${includedir}/curl/mprintf.h ./include/curl/mprintf.h
f 0644 cowo pppusers ${includedir}/curl/stdcheaders.h ./include/curl/stdcheaders.h
f 0644 cowo pppusers ${includedir}/curl/types.h ./include/curl/types.h
f 0755 cowo pppusers ${bindir}/curl-config ./curl-config

View File

@@ -1,3 +1,3 @@
SUBDIRS = Win32 Linux Solaris
SUBDIRS = Win32 Linux Solaris EPM
EXTRA_DIST = README

View File

@@ -2,25 +2,29 @@
# $Id$
#
# Some flags needed when trying to cause warnings ;-)
# CFLAGS = -g -DMALLOCDEBUG # -Wall -pedantic
#CPPFLAGS = -DGLOBURL -DCURL_SEPARATORS
AUTOMAKE_OPTIONS = foreign nostdinc
INCLUDES = -I$(top_srcdir)/include
# we use srcdir/include for the static global include files
# we use builddir/src for the generated src/config.h file to get found
# we use srcdir/lib for the client-private header files
INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/src -I$(top_srcdir)/src
bin_PROGRAMS = curl #memtest
noinst_HEADERS = setup.h \
config-win32.h \
config-mac.h \
urlglob.h \
version.h \
writeout.h
#memtest_SOURCES = memtest.c
#memtest_LDADD = $(top_srcdir)/lib/libcurl.la
curl_SOURCES = main.c hugehelp.c urlglob.c writeout.c
curl_SOURCES = main.c hugehelp.c urlglob.c writeout.c setup.h \
config-win32.h \
config-mac.h \
config-vms.h \
urlglob.h \
version.h \
writeout.h \
config-win32.h \
config-mac.h \
config-vms.h
curl_LDADD = ../lib/libcurl.la
curl_DEPENDENCIES = ../lib/libcurl.la
BUILT_SOURCES = hugehelp.c
@@ -34,8 +38,6 @@ EXTRA_DIST = mkhelp.pl curlmsg.msg \
macos/src/curl_GUSIConfig.cpp \
macos/src/macos_main.cpp
AUTOMAKE_OPTIONS = foreign no-dependencies
MANPAGE=$(top_srcdir)/docs/curl.1
README=$(top_srcdir)/docs/MANUAL
MKHELP=$(top_srcdir)/src/mkhelp.pl

View File

@@ -1,10 +1,13 @@
########################################################
## Makefile for building curl.exe with MSVC6
## Use: nmake -f makefile.vc6 [release | debug]
## Use: nmake -f makefile.vc6 [release | debug] [CFG=release-ssl]
## (default is release)
## "nmake -f makefile.vc6 CFG=release-ssl" statically links OpenSSL
## into curl.exe producing a standalone SSL-enabled executable.
##
## Comments to: Troy Engel <tengel@sonic.net>
## Updated by: Craig Davison <cd@securityfocus.com>
## release-ssl added by Miklos Nemeth <mnemeth@kfkisystems.com>
PROGRAM_NAME = curl.exe

21
src/config-vms.h Normal file
View File

@@ -0,0 +1,21 @@
/* src/config.h. Generated automatically by configure. */
/* Define cpu-machine-OS */
#define OS "ALPHA-COMPAQ-VMS"
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define if you have the <io.h> header file. */
#undef HAVE_IO_H
/* Define if you have strdup() */
#define HAVE_STRDUP 1
/* Define if you have utime() */
#undef HAVE_UTIME
/* Define if you have the <utime.h> header file */
#undef HAVE_UTIME_H
/* Define if you have thhe <sys/utime.h> header file */
#undef HAVE_SYS_UTIME_H

View File

@@ -48,4 +48,9 @@ BADPARAM <Internal Error, Bad parameter to function>
BADORDER <Internal Error, Bad function calling order>
BADPWD <Bad password entered>
MNYREDIR <Too many redirects>
UNKTELNET <Unknown TELNET option specified>
UNKMSG <Unknown message (50)>
BADSSLCERT <Remote peer's SSL certificate wasn't OK>
SRVNOERR <The Server didn't reply anything, which here is considered an error>
MAXMSG <This is the LAST KNOWN MESSAGE, appearantly more have been added>
.END

View File

@@ -191,6 +191,11 @@ globalvalue int CURL_BADPARAM;
globalvalue int CURL_BADORDER;
globalvalue int CURL_BADPWD;
globalvalue int CURL_MNYREDIR;
globalvalue int CURL_UNKTELNET;
globalvalue int CURL_UNKMSG;
globalvalue int CURL_BADSSLCERT;
globalvalue int CURL_SRVNOERR;
globalvalue int CURL_MAXMSG;
long vms_cond[] = {
VMS_STS(1,FAC_SYSTEM,MSG_NORMAL,SEV_SUCCESS),
CURL_UNSUPPROTO, /* these are from curlmsg.msg file..... */
@@ -238,7 +243,12 @@ long vms_cond[] = {
CURL_BADPARAM,
CURL_BADORDER,
CURL_BADPWD,
CURL_MNYREDIR
CURL_MNYREDIR,
CURL_UNKTELNET,
CURL_UNKMSG,
CURL_BADSSLCERT,
CURL_SRVNOERR,
CURL_MAXMSG
};
#endif
@@ -448,6 +458,7 @@ struct Configurable {
struct curl_slist *quote;
struct curl_slist *postquote;
struct curl_slist *prequote;
long ssl_version;
curl_TimeCond timecond;
@@ -1176,8 +1187,8 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
config->postfields=postdata;
}
/* if(SetHTTPrequest(HTTPREQ_SIMPLEPOST, &config->httpreq))
return PARAM_BAD_USE;*/
if(SetHTTPrequest(HTTPREQ_SIMPLEPOST, &config->httpreq))
return PARAM_BAD_USE;
break;
case 'D':
/* dump-header to given file name */
@@ -1376,12 +1387,18 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
break;
case 'Q':
/* QUOTE command to send to FTP server */
if(nextarg[0] == '-') {
switch(nextarg[0]) {
case '-':
/* prefixed with a dash makes it a POST TRANSFER one */
nextarg++;
config->postquote = curl_slist_append(config->postquote, nextarg);
}
else {
break;
case '+':
/* prefixed with a plus makes it a just-before-transfer one */
nextarg++;
config->prequote = curl_slist_append(config->prequote, nextarg);
break;
default:
config->quote = curl_slist_append(config->quote, nextarg);
}
break;
@@ -1890,13 +1907,18 @@ operate(struct Configurable *config, int argc, char *argv[])
int res = 0;
int i;
errorbuffer[0]=0; /* prevent junk from being output */
#ifdef MALLOCDEBUG
/* this sends all memory debug messages to a logfile named memdump */
curl_memdebug("memdump");
char *env;
env = curl_getenv("CURL_MEMDEBUG");
if(env) {
free(env);
curl_memdebug("memdump");
}
#endif
errorbuffer[0]=0; /* prevent junk from being output */
main_init(); /* inits */
config->showerror=TRUE;
@@ -2477,6 +2499,7 @@ int main(int argc, char *argv[])
free_config_fields(&config);
#ifdef VMS
if (res > 52) res = 53; /* MAXMSG, porting helper */
return (vms_cond[res]|vms_show);
#else
return res;

View File

@@ -32,7 +32,11 @@
#endif
#ifdef HAVE_CONFIG_H
#ifdef VMS
#include "config-vms.h"
#else
#include "config.h" /* the configure script results */
#endif
#else
#ifdef WIN32
/* include the hand-modified win32 adjusted config.h! */

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 2001, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 2002, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* In order to be useful for every potential user, curl and libcurl are
* dual-licensed under the MPL and the MIT/X-derivate licenses.
@@ -222,15 +222,19 @@ GlobCode glob_word(URLGlob *glob, char *pattern, int pos, int *amount)
*amount = 1; /* default is one single string */
while (*pattern != '\0' && *pattern != '{' && *pattern != '[') {
if (*pattern == '}' || *pattern == ']') {
if (*pattern == '}' || *pattern == ']')
return GLOB_ERROR;
}
if (*pattern == '\\') { /* escape character, skip '\' */
/* only allow \ to escape known "special letters" */
if (*pattern == '\\' &&
(*(pattern+1) == '{' || *(pattern+1) == '[' ||
*(pattern+1) == '}' || *(pattern+1) == ']') ) {
/* escape character, skip '\' */
++pattern;
++pos;
if (*pattern == '\0') { /* but no escaping of '\0'! */
if (*pattern == '\0') /* but no escaping of '\0'! */
return GLOB_ERROR;
}
}
*buf++ = *pattern++; /* copy character to literal */
++pos;

View File

@@ -1,3 +1,3 @@
#define CURL_NAME "curl"
#define CURL_VERSION "7.9.4"
#define CURL_VERSION "7.9.5"
#define CURL_ID CURL_NAME " " CURL_VERSION " (" OS ") "

View File

@@ -46,6 +46,7 @@ typedef enum {
VAR_HEADER_SIZE,
VAR_REQUEST_SIZE,
VAR_EFFECTIVE_URL,
VAR_CONTENT_TYPE,
VAR_NUM_OF_VARS /* must be the last */
} replaceid;
@@ -69,6 +70,7 @@ static struct variable replacements[]={
{"size_upload", VAR_SIZE_UPLOAD},
{"speed_download", VAR_SPEED_DOWNLOAD},
{"speed_upload", VAR_SPEED_UPLOAD},
{"content_type", VAR_CONTENT_TYPE},
{NULL, 0}
};
@@ -165,6 +167,11 @@ void ourWriteOut(CURL *curl, char *writeinfo)
curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &doubleinfo))
fprintf(stream, "%.3f", doubleinfo);
break;
case VAR_CONTENT_TYPE:
if(CURLE_OK ==
curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &stringp))
fputs(stringp, stream);
break;
default:
break;
}

View File

@@ -62,8 +62,10 @@ One regex per line that is removed from the protocol dumps before the
comparison is made. This is very useful to remove dependencies on dynamicly
changing protocol data such as port numbers or user-agent strings.
</strip>
<protocol>
the protocol dump curl should transmit
<protocol [nonewline=yes]>
the protocol dump curl should transmit, if 'nonewline' is set, we will cut
off the trailing newline of this given data before comparing with the one
actually sent by the client
</protocol>
<stdout>
This verfies that this data was passed to stdout.

View File

@@ -1,8 +1,8 @@
EXTRA_DIST = ftpserver.pl httpserver.pl httpsserver.pl runtests.pl \
ftpsserver.pl stunnel.pm getpart.pm FILEFORMAT README \
stunnel.pem
stunnel.pem memanalyze.pl
SUBDIRS = data
SUBDIRS = data server
PERLFLAGS = -I$(srcdir)
@@ -12,11 +12,11 @@ install:
curl:
@(cd ..; make)
test:
test: server/sws
@cd data && exec $(MAKE) test
srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl
quiet-test:
quiet-test: server/sws
@cd data && exec $(MAKE) test
srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl -s -a
@@ -24,3 +24,5 @@ clean:
rm -rf log
find . -name "*~" | xargs rm -f
server/sws:
cd server; make sws

View File

@@ -12,6 +12,8 @@ test101 test110 test12 test15 test202 test3 test4 test6 \
test102 test111 test120 test16 test21 test30 test400 test7 \
test103 test112 test121 test17 test22 test300 test401 test8 \
test104 test113 test122 test18 test23 test301 test402 test9 \
test105 test114 test123 test19 test24 test302 test43 \
test105 test114 test123 test19 test24 test302 test43 test31 \
test106 test115 test124 test190 test25 test303 test44 test38 \
test107 test116 test125 test2 test26 test33 test45 test126
test107 test116 test125 test2 test26 test33 test45 test126 \
test304

View File

@@ -10,7 +10,7 @@
use curl with multiple request methods
</name>
<command>
-I -X FOOO localhost
-I -d FOOO localhost
</command>
</test>

View File

@@ -28,7 +28,7 @@ HTTP POST with user and password
<strip>
^User-Agent:.*
</strip>
<protocol>
<protocol nonewline=yes>
POST /3 HTTP/1.1
Authorization: Basic ZmFrZTotdXNlcg==
Host: 127.0.0.1:8999
@@ -37,6 +37,6 @@ Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
Content-Length: 37
Content-Type: application/x-www-form-urlencoded
fooo=mooo&pooo=clue&doo=%20%20%20++++
fooo=mooo&pooo=clue&doo=%20%20%20++++
</protocol>
</verify>

58
tests/data/test304 Normal file
View File

@@ -0,0 +1,58 @@
# Server-side
<reply>
<data>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
blablabla
</data>
</reply>
# Client-side
<client>
<name>
HTTPS multipart formpost
</name>
<command>
https://%HOSTIP:%HTTPSPORT/we/want/304 -F name=daniel -F tool=curl -F file=@log/test304.txt
</command>
# We create this file before the command is invoked!
<file name="log/test304.txt">
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
</file>
</test>
# Verify data after the test has been "shot"
<verify>
<strip>
^(User-Agent:|Content-Type: multipart/form-data;|--curl).*
</strip>
<protocol>
POST /we/want/304 HTTP/1.1
User-Agent: curl/7.9.5-pre4 (sparc-sun-solaris2.7) libcurl 7.9.5-pre4 (OpenSSL 0.9.6c) (krb4 enabled)
Host: 127.0.0.1:8433
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
Content-Length: 1354
Expect: 100-continue
Content-Type: multipart/form-data; boundary=curlfPpkLyYwSYaH6Fkg0WkEldoJyAQ
--curlfPpkLyYwSYaH6Fkg0WkEldoJyAQ
Content-Disposition: form-data; name="name"
daniel
--curlfPpkLyYwSYaH6Fkg0WkEldoJyAQ
Content-Disposition: form-data; name="tool"
curl
--curlfPpkLyYwSYaH6Fkg0WkEldoJyAQ
Content-Disposition: form-data; name="file"; filename="log/test304.txt"
Content-Type: text/plain
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
--curlfPpkLyYwSYaH6Fkg0WkEldoJyAQ--
</protocol>
</verify>

56
tests/data/test31 Normal file
View File

@@ -0,0 +1,56 @@
# Server-side
<reply>
<data>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Content-Type: text/html
Funny-head: yesyes
Set-Cookie: foobar=name; domain=127.0.0.1; path=/ ; secure
Set-Cookie:mismatch=this ; domain=127.0.0.1; path=/silly/
Set-Cookie: partmatch=present; domain=127.0.0.1 ; path=/;
Set-Cookie: eat=this; domain=moo.foo.moo;
Set-Cookie: eat=this-too; domain=.foo.moo;
Set-Cookie: nodomainnovalue
Set-Cookie: nodomain=value; expires=Tue Feb 1 11:56:27 MET 2014
Set-Cookie: nodomainnovalue; domain=reallysilly
boo
</data>
</reply>
# Client-side
<client>
<name>
HTTP with weirdly formatted cookies and cookiejar storage
</name>
<command>
http://%HOSTIP:%HOSTPORT/we/want/31 -b none -c log/jar31.txt
</command>
</test>
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
GET /we/want/31 HTTP/1.1
Host: 127.0.0.1:8999
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
</protocol>
<file name="log/jar31.txt">
# Netscape HTTP Cookie File
# http://www.netscape.com/newsref/std/cookie_spec.html
# This file was generated by libcurl! Edit at your own risk.
127.0.0.1 FALSE / TRUE 0 foobar name
127.0.0.1 FALSE /silly/ FALSE 0 ismatch this
127.0.0.1 FALSE / FALSE 0 partmatch present
moo.foo.moo FALSE / FALSE 0 eat this
.foo.moo TRUE / FALSE 0 eat this-too
127.0.0.1 FALSE / FALSE 1391252187 nodomain value
</file>
</verify>

Some files were not shown because too many files have changed in this diff Show More