big last-beta (?) cleanup commit

This commit is contained in:
Daniel Stenberg 2000-07-31 22:42:34 +00:00
Родитель 513ac758da
Коммит c3c7739811
17 изменённых файлов: 987 добавлений и 401 удалений

24
CHANGES
Просмотреть файл

@ -7,6 +7,27 @@
History of Changes
Version 7.0.11beta
Daniel (1 August 2000)
- Albert Chin-A-Young pointed out that 'make install' did not properly create
the header include directory, why it failed to install the header files as
it should. Automake isn't really equipped to deal with subdirectories
without Makefiles in any nice way. I had to run ahead and add Makefiles in
both include and include/curl before I managed to create a top-level
makefile that succeeds in install everything properly!
- Ok, no more "features" added now. Let's just verify that there's no major
flaws added now.
Daniel (31 July 2000)
- Both Jeff Schasny and Ketil Froyn asked me how to tell curl not to send one
of those internally generated headers. They didn't settle with the blank
ones you could tell curl to use. I rewrote the header-replace stuff a
little. Now, if you replace an internal header with your own and that new
one is a blank header you will only remove the internal one and not get any
blank. I couldn't figure out any case when you want that blank header.
Daniel (29 July 2000)
- It struck me that the lib used localtime() which is not thread-safe, so now
I use localtime_r() in the systems that has it.
@ -14,7 +35,8 @@ Daniel (29 July 2000)
- I went through this entire document and removed all email addresses and left
names only. I've really made an effort to always note who brought be bug
reports or fixes, but more and more people ask me to remove the email
addresses since they become victims for spams this way.
addresses since they become victims for spams this way. Gordon Beaton got me
working on this.
Daniel (27 July 2000)
- Jörn Hartroth found out that when you specified a HTTP proxy in an

4
FILES
Просмотреть файл

@ -51,5 +51,9 @@ lib/*am
lib/Makefile.vc6
lib/*m32
include/README
include/Makefile.in
include/Makefile.am
include/curl/*.h
include/curl/Makefile.in
include/curl/Makefile.am

Просмотреть файл

@ -6,5 +6,5 @@ AUTOMAKE_OPTIONS = foreign no-dependencies
EXTRA_DIST = curl.spec curl-ssl.spec
SUBDIRS = docs lib src
SUBDIRS = docs lib src include

413
aclocal.m4 поставляемый
Просмотреть файл

@ -125,3 +125,416 @@ else
fi
AC_SUBST($1)])
# serial 40 AC_PROG_LIBTOOL
AC_DEFUN(AC_PROG_LIBTOOL,
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
# Save cache, so that ltconfig can load it
AC_CACHE_SAVE
# Actually configure libtool. ac_aux_dir is where install-sh is found.
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
|| AC_MSG_ERROR([libtool configure failed])
# Reload cache, that may have been modified by ltconfig
AC_CACHE_LOAD
# This can be used to rebuild libtool when needed
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
AC_SUBST(LIBTOOL)dnl
# Redirect the config.log output again, so that the ltconfig log is not
# clobbered by the next message.
exec 5>>./config.log
])
AC_DEFUN(AC_LIBTOOL_SETUP,
[AC_PREREQ(2.13)dnl
AC_REQUIRE([AC_ENABLE_SHARED])dnl
AC_REQUIRE([AC_ENABLE_STATIC])dnl
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_LD])dnl
AC_REQUIRE([AC_PROG_NM])dnl
AC_REQUIRE([AC_PROG_LN_S])dnl
dnl
case "$target" in
NONE) lt_target="$host" ;;
*) lt_target="$target" ;;
esac
# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
[libtool_flags="$libtool_flags --enable-dlopen"])
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
[libtool_flags="$libtool_flags --enable-win32-dll"])
AC_ARG_ENABLE(libtool-lock,
[ --disable-libtool-lock avoid locking (might break parallel builds)])
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case "$lt_target" in
*-*-irix6*)
# Find out which ABI we are using.
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
;;
*N32*)
LD="${LD-ld} -n32"
;;
*64-bit*)
LD="${LD-ld} -64"
;;
esac
fi
rm -rf conftest*
;;
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
[AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
CFLAGS="$SAVE_CFLAGS"
fi
;;
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
[*-*-cygwin* | *-*-mingw*)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
;;
])
esac
])
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
# AC_ENABLE_SHARED - implement the --enable-shared flag
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
# `yes'.
AC_DEFUN(AC_ENABLE_SHARED, [dnl
define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(shared,
changequote(<<, >>)dnl
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
changequote([, ])dnl
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
for pkg in $enableval; do
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
IFS="$ac_save_ifs"
;;
esac],
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
])
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_SHARED(no)])
# AC_ENABLE_STATIC - implement the --enable-static flag
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
# `yes'.
AC_DEFUN(AC_ENABLE_STATIC, [dnl
define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(static,
changequote(<<, >>)dnl
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
changequote([, ])dnl
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
for pkg in $enableval; do
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
IFS="$ac_save_ifs"
;;
esac],
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
])
# AC_DISABLE_STATIC - set the default static flag to --disable-static
AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_STATIC(no)])
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
# `yes'.
AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(fast-install,
changequote(<<, >>)dnl
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
changequote([, ])dnl
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
for pkg in $enableval; do
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
IFS="$ac_save_ifs"
;;
esac],
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
])
# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_FAST_INSTALL(no)])
# AC_PROG_LD - find the path to the GNU or non-GNU linker
AC_DEFUN(AC_PROG_LD,
[AC_ARG_WITH(gnu-ld,
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
ac_prog=ld
if test "$ac_cv_prog_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
AC_MSG_CHECKING([for ld used by GCC])
ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in
# Accept absolute paths.
changequote(,)dnl
[\\/]* | [A-Za-z]:[\\/]*)
re_direlt='/[^/][^/]*/\.\./'
changequote([,])dnl
# Canonicalize the path of ld
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
done
test -z "$LD" && LD="$ac_prog"
;;
"")
# If it fails, then pretend we aren't using GCC.
ac_prog=ld
;;
*)
# If it is relative, then search for the first ld in PATH.
with_gnu_ld=unknown
;;
esac
elif test "$with_gnu_ld" = yes; then
AC_MSG_CHECKING([for GNU ld])
else
AC_MSG_CHECKING([for non-GNU ld])
fi
AC_CACHE_VAL(ac_cv_path_LD,
[if test -z "$LD"; then
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
ac_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
test "$with_gnu_ld" != no && break
else
test "$with_gnu_ld" != yes && break
fi
fi
done
IFS="$ac_save_ifs"
else
ac_cv_path_LD="$LD" # Let the user override the test with a path.
fi])
LD="$ac_cv_path_LD"
if test -n "$LD"; then
AC_MSG_RESULT($LD)
else
AC_MSG_RESULT(no)
fi
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
AC_PROG_LD_GNU
])
AC_DEFUN(AC_PROG_LD_GNU,
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
ac_cv_prog_gnu_ld=yes
else
ac_cv_prog_gnu_ld=no
fi])
])
# AC_PROG_NM - find the path to a BSD-compatible name lister
AC_DEFUN(AC_PROG_NM,
[AC_MSG_CHECKING([for BSD-compatible nm])
AC_CACHE_VAL(ac_cv_path_NM,
[if test -n "$NM"; then
# Let the user override the test.
ac_cv_path_NM="$NM"
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
# Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
ac_cv_path_NM="$ac_dir/nm -B"
break
elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
ac_cv_path_NM="$ac_dir/nm -p"
break
else
ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
continue # so that we can try to find one that supports BSD flags
fi
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
fi])
NM="$ac_cv_path_NM"
AC_MSG_RESULT([$NM])
])
# AC_CHECK_LIBM - check for math library
AC_DEFUN(AC_CHECK_LIBM,
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
LIBM=
case "$lt_target" in
*-*-beos* | *-*-cygwin*)
# These system don't have libm
;;
*-ncr-sysv4.3*)
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
;;
*)
AC_CHECK_LIB(m, main, LIBM="-lm")
;;
esac
])
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
# the libltdl convenience library and INCLTDL to the include flags for
# the libltdl header and adds --enable-ltdl-convenience to the
# configure arguments. Note that LIBLTDL and INCLTDL are not
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
# with '${top_builddir}/' and INCLTDL will be prefixed with
# '${top_srcdir}/' (note the single quotes!). If your package is not
# flat and you're not using automake, define top_builddir and
# top_srcdir appropriately in the Makefiles.
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
case "$enable_ltdl_convenience" in
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
"") enable_ltdl_convenience=yes
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
esac
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
])
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
# the libltdl installable library and INCLTDL to the include flags for
# the libltdl header and adds --enable-ltdl-install to the configure
# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
# with '${top_srcdir}/' (note the single quotes!). If your package is
# not flat and you're not using automake, define top_builddir and
# top_srcdir appropriately in the Makefiles.
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_CHECK_LIB(ltdl, main,
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
[if test x"$enable_ltdl_install" = xno; then
AC_MSG_WARN([libltdl not installed, but installation disabled])
else
enable_ltdl_install=yes
fi
])
if test x"$enable_ltdl_install" = x"yes"; then
ac_configure_args="$ac_configure_args --enable-ltdl-install"
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
else
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
LIBLTDL="-lltdl"
INCLTDL=
fi
])
dnl old names
AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
dnl This is just to silence aclocal about the macro not being used
ifelse([AC_DISABLE_FAST_INSTALL])dnl

Просмотреть файл

@ -82,6 +82,9 @@
/* Define if you have the inet_ntoa_r function. */
#undef HAVE_INET_NTOA_R
/* Define if you have the localtime_r function. */
#undef HAVE_LOCALTIME_R
/* Define if you have the perror function. */
#undef HAVE_PERROR

Просмотреть файл

@ -2,7 +2,7 @@ dnl $Id$
dnl Process this file with autoconf to produce a configure script.
AC_INIT(lib/urldata.h)
AM_CONFIG_HEADER(config.h src/config.h)
AM_INIT_AUTOMAKE(curl,"7.0.10beta")
AM_INIT_AUTOMAKE(curl,"7.0.11test")
AM_PROG_LIBTOOL
dnl
@ -339,6 +339,8 @@ AC_OUTPUT( Makefile \
curl.spec \
curl-ssl.spec \
docs/Makefile \
include/Makefile \
include/curl/Makefile \
src/Makefile \
lib/Makefile )
dnl perl/checklinks.pl \

Просмотреть файл

@ -8,31 +8,41 @@ CONTRIBUTE
To Think About When Contributing Source Code
This document is intended to offer some guidelines that can be useful to
keep in mind when you decide to write a contribution to the project. This
concerns new features as well as corrections to existing flaws or bugs.
This document is intended to offer some guidelines that can be useful to keep
in mind when you decide to write a contribution to the project. This concerns
new features as well as corrections to existing flaws or bugs.
The License Issue
When contributing with code, you agree to put your changes and new code under
the same license curl and libcurl is already using. Curl uses the MozPL, the
Mozilla Public License, which is *NOT* compatible with the well known GPL,
GNU Public License. We can never re-use sources from a GPL program in curl.
If you add a larger piece of code, you can opt to make that file or set of
files to use a different license as long as they don't enfore any changes to
the rest of the package. Such "separate parts" can not be GPL either.
Naming
Try using a non-confusing naming scheme for your new functions and variable
names. It doesn't necessarily have to mean that you should use the same as
in other places of the code, just that the names should be logical,
names. It doesn't necessarily have to mean that you should use the same as in
other places of the code, just that the names should be logical,
understandable and be named according to what they're used for.
Indenting
Please try using the same indenting levels and bracing method as all the
other code already does. It makes the source code a lot easier to follow if
all of it is written using the same style. I don't ask you to like it, I
just ask you to follow the tradition! ;-)
all of it is written using the same style. I don't ask you to like it, I just
ask you to follow the tradition! ;-)
Commenting
Comment your source code extensively. I don't see myself as a very good
source commenter, but I try to become one. Commented code is quality code
and enables future modifications much more. Uncommented code much more risk
being completely replaced when someone wants to extend things, since other
persons' source code can get quite hard to read.
source commenter, but I try to become one. Commented code is quality code and
enables future modifications much more. Uncommented code much more risk being
completely replaced when someone wants to extend things, since other persons'
source code can get quite hard to read.
General Style
@ -41,10 +51,10 @@ General Style
Non-clobbering All Over
When you write new functionality or fix bugs, it is important that you
don't fiddle all over the source files and functions. Remember that it is
likely that other people have done changes in the same source files as you
have and possibly even in the same functions. If you bring completely new
When you write new functionality or fix bugs, it is important that you don't
fiddle all over the source files and functions. Remember that it is likely
that other people have done changes in the same source files as you have and
possibly even in the same functions. If you bring completely new
functionality, try writing it in a new source file. If you fix bugs, try to
fix one bug at a time and send them as separate patches.
@ -61,10 +71,10 @@ Separate Patches Doing Different Things
Document
Writing docs is dead boring and one of the big problems with many open
source projects. Someone's gotta do it. It makes it a lot easier if you
submit a small description of your fix or your new features with every
contribution so that it can be swiftly added to the package documentation.
Writing docs is dead boring and one of the big problems with many open source
projects. Someone's gotta do it. It makes it a lot easier if you submit a
small description of your fix or your new features with every contribution so
that it can be swiftly added to the package documentation.
Write Access to CVS Repository

145
docs/FAQ
Просмотреть файл

@ -121,106 +121,139 @@ FAQ
9. Why do I get problems when I use & in the URL?
In general unix shells, the & letter is treated special and when used it
runs the specified command in the background. To safely send the & as a
part of a URL, you should qoute the entire URL by using single (') or
double (") quotes around it.
In general unix shells, the & letter is treated special and when used it
runs the specified command in the background. To safely send the & as a part
of a URL, you should qoute the entire URL by using single (') or double (")
quotes around it.
An example that would invoke a remote CGI that uses &-letters could be:
An example that would invoke a remote CGI that uses &-letters could be:
curl 'http://www.altavista.com/cgi-bin/query?text=yes&q=curl'
10. How can I use {, }, [ or ] to specify multiple URLs?
Because those letters have a special meaning to the shell, and to be used
in a URL specified to curl you must quote them.
Because those letters have a special meaning to the shell, and to be used in
a URL specified to curl you must quote them.
An example that downloads two URLs (sequentially) would do:
An example that downloads two URLs (sequentially) would do:
curl '{curl,www}.haxx.se'
11. Where can I find a copy of LIBEAY32.DLL?
That is an OpenSSL binary built for Windows.
That is an OpenSSL binary built for Windows.
Curl uses OpenSSL to do the SSL stuff. The LIBEAY32.DLL is what curl needs
on a windows machine to do https://. Check out the curl web page to find
accurate and up-to-date pointers to recent OpenSSL DDLs and other binary
packages.
Curl uses OpenSSL to do the SSL stuff. The LIBEAY32.DLL is what curl needs
on a windows machine to do https://. Check out the curl web page to find
accurate and up-to-date pointers to recent OpenSSL DDLs and other binary
packages.
12. Why do I get downloaded data even though the web page doesn't exist?
Curl asks remote servers for the page you specify. If the page doesn't
exist at the server, the HTTP protocol defines how the server should
respond and that means that headers and a "page" will be returned. That's
simply how HTTP works.
Curl asks remote servers for the page you specify. If the page doesn't exist
at the server, the HTTP protocol defines how the server should respond and
that means that headers and a "page" will be returned. That's simply how
HTTP works.
By using the --fail option you can tell curl explicitly to not get any data
if the HTTP return code doesn't say success.
By using the --fail option you can tell curl explicitly to not get any data
if the HTTP return code doesn't say success.
13. Why do I get "HTTP/1.1 403 Forbidden" from a http server?
RFC2616 clearly explains this return code:
RFC2616 clearly explains this return code:
10.4.4 403 Forbidden
10.4.4 403 Forbidden
The server understood the request, but is refusing to fulfill it.
Authorization will not help and the request SHOULD NOT be repeated.
If the request method was not HEAD and the server wishes to make
public why the request has not been fulfilled, it SHOULD describe the
reason for the refusal in the entity. If the server does not wish to
make this information available to the client, the status code 404
(Not Found) can be used instead.
The server understood the request, but is refusing to fulfill it.
Authorization will not help and the request SHOULD NOT be repeated. If the
request method was not HEAD and the server wishes to make public why the
request has not been fulfilled, it SHOULD describe the reason for the
refusal in the entity. If the server does not wish to make this information
available to the client, the status code 404 (Not Found) can be used
instead.
14. How can I disable the Pragma: nocache header?
You can change all internally generated headers by adding a replacement
with the -H/--header option. By adding a header with empty contents you
safelt disables the headers. Use -H "Pragma:" to disable that specific
header.
You can change all internally generated headers by adding a replacement with
the -H/--header option. By adding a header with empty contents you safelt
disables the headers. Use -H "Pragma:" to disable that specific header.
15. Can you tell me what error code 142 means?
All error codes that are larger than the highest documented error code
means that curl has existed due to a timeout. There is currentl no nice way
for curl to abort from such a condition and that's why it gets this
undocumented error. This is planned to change in a future release.
All error codes that are larger than the highest documented error code means
that curl has existed due to a timeout. There is currentl no nice way for
curl to abort from such a condition and that's why it gets this undocumented
error. This is planned to change in a future release.
16. How do I keep usernames and passwords secret in Curl command lines?
I see this problem as two parts:
I see this problem as two parts:
The first part is to avoid having clear-text passwords in the command line
so that they don't appear in 'ps' outputs and similar. That is easily
avoided by using the "-K" option that tells curl to read parameters from a
file or stdin to which you can pass the secret info.
The first part is to avoid having clear-text passwords in the command line
so that they don't appear in 'ps' outputs and similar. That is easily
avoided by using the "-K" option tho tell curl to read parameters from a
file or stdin to which you can pass the secret info.
To keep the passwords in your account secret from the rest of the world is
not a task that curl addresses. You could of course encrypt them somehow to
at least hide them from being read by human eyes, but that is not what
anyone would call security.
To keep the passwords in your account secret from the rest of the world is
not a task that curl addresses. You could of course encrypt them somehow to
at least hide them from being read by human eyes, but that is not what
anyone would call security.
17. Does curl support javascript, ASP, XML, XHTML or HTML version Y?
To curl, all contents are alike. It doesn't matter how the page was
generated. It may be ASP, PHP, perl, shell-script, SSI or plain
HTML-files. There's no difference to curl and it doesn't even know what
kind of language that generated the page.
To curl, all contents are alike. It doesn't matter how the page was
generated. It may be ASP, PHP, perl, shell-script, SSI or plain
HTML-files. There's no difference to curl and it doesn't even know what kind
of language that generated the page.
Javascript is slightly different since that is code embedded in the HTML
that is sent for the client to interpret and curl has no javascript
interpreter.
Javascript is slightly different since that is code embedded in the HTML
that is sent for the client to interpret and curl has no javascript
interpreter.
18. Does cURL support Socks (RFC 1928) ?
No. Nobody has wanted it that badly yet. I would appriciate patches that
brings this functionality.
No. Nobody has wanted it that badly yet. I would appriciate patches that
brings this functionality.
19. Can I use curl to delete/rename a file through FTP?
Yes. You specify custom ftp commands with -Q/--quote.
Yes. You specify custom ftp commands with -Q/--quote.
One example would be to delete a file after you have downloaded it:
One example would be to delete a file after you have downloaded it:
curl -O ftp://download.com/coolfile -Q '-DELE coolfile'
20. Can I use curl/libcurl in my program licensed under XXX?
Curl and libcurl are released under the MPL, the Mozilla Public License. To
get a really good answer to this or other licensing questions, you should
study the MPL license and the license you are about to use and check for
clashes yourself. This is a brief summary for a few cases for which we get
questions:
I have a GPL program, can I use the libcurl library?
No. GPL'd software requires all parts of the final executable to be
licensed under GPL.
I have a closed-source program, can I use the libcurl library?
Yes, libcurl does not put any restrictions on the program that uses the
library. If you end up doing changes to the library, only those changes
must be made available, not the ones to your program.
I have a program that uses LGPL libraries, can I use libcurl?
Yes you can. LGPL libraries don't spread to other libraries the same way
GPL ones do.
Can I modify curl/libcurl for my own program and keep the changes secret?
No, you're not allowed to do that.
Can you please change the curl/libcurl license to XXXX?
No. We carefully picked this license years ago and a large amount of
people have contributed with source code knowing that this is the license
we use. This license puts the restrictions we want on curl/libcurl and it
does not spread to other programs or libraries.

Просмотреть файл

@ -31,7 +31,7 @@ HTTP
- custom HTTP request
- cookie get/send
- understands the netscape cookie file
- custom headers (that can replace internally generated headers)
- custom headers (that can replace/remove internally generated headers)
- custom user-agent string
- custom referer string
- range
@ -57,7 +57,7 @@ FTP
- upload via http-proxy as HTTP PUT
- download resume
- upload resume
- QUOT commands (before and/or after the transfer)
- custom ftp commands (before and/or after the transfer)
- simple "range" support
- via http-proxy

Просмотреть файл

@ -82,7 +82,7 @@ Software
Similar Tools
-------------
wget - ftp://prep.ai.mit.edu/pub/gnu/
wget - http://www.gnu.org/software/wget/wget.html
snarf - http://www.xach.com/snarf/
@ -90,8 +90,6 @@ Similar Tools
swebget - http://www.uni-hildesheim.de/~smol0075/swebget/
fetch - ?
Related Software
----------------
ftpparse - http://cr.yp.to/ftpparse.html parses FTP LIST responses
@ -105,3 +103,5 @@ Related Software
gzip - http://www.gnu.org/software/gzip/gzip.html
tar - http://www.gnu.org/software/tar/tar.html
libtool - http://www.gnu.org/software/libtool/libtool.html

Просмотреть файл

@ -414,8 +414,8 @@ char *curl_getenv(char *variable);
char *curl_version(void);
/* This is the version number */
#define LIBCURL_VERSION "7.0.8beta"
#define LIBCURL_VERSION_NUM 0x070008
#define LIBCURL_VERSION "7.0.11test"
#define LIBCURL_VERSION_NUM 0x07000b
/* linked-list structure for the CURLOPT_QUOTE option */
struct curl_slist {

Просмотреть файл

@ -63,9 +63,14 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AS = @AS@
CC = @CC@
DLLTOOL = @DLLTOOL@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAKEINFO = @MAKEINFO@
NROFF = @NROFF@
OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
PERL = @PERL@
RANLIB = @RANLIB@
@ -74,35 +79,37 @@ YACC = @YACC@
AUTOMAKE_OPTIONS = foreign no-dependencies
noinst_LIBRARIES = libcurl.a
lib_LTLIBRARIES = libcurl.la
# Some flags needed when trying to cause warnings ;-)
CFLAGS = -g -Wall #-pedantic
# CFLAGS = -g -Wall #-pedantic
INCLUDES = -I$(top_srcdir)/include
libcurl_a_SOURCES = arpa_telnet.h file.c getpass.h netrc.h timeval.c base64.c file.h hostip.c progress.c timeval.h base64.h formdata.c hostip.h progress.h cookie.c formdata.h http.c sendf.c cookie.h ftp.c http.h sendf.h url.c dict.c ftp.h if2ip.c speedcheck.c url.h dict.h getdate.c if2ip.h speedcheck.h urldata.h download.c getdate.h ldap.c ssluse.c version.c download.h getenv.c ldap.h ssluse.h escape.c getenv.h mprintf.c telnet.c escape.h getpass.c netrc.c telnet.h writeout.c writeout.h highlevel.c strequal.c strequal.h easy.c
libcurl_la_SOURCES = arpa_telnet.h file.c getpass.h netrc.h timeval.c base64.c file.h hostip.c progress.c timeval.h base64.h formdata.c hostip.h progress.h cookie.c formdata.h http.c sendf.c cookie.h ftp.c http.h sendf.h url.c dict.c ftp.h if2ip.c speedcheck.c url.h dict.h getdate.c if2ip.h speedcheck.h urldata.h download.c getdate.h ldap.c ssluse.c version.c download.h getenv.c ldap.h ssluse.h escape.c getenv.h mprintf.c telnet.c escape.h getpass.c netrc.c telnet.h writeout.c writeout.h highlevel.c strequal.c strequal.h easy.c
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h ../src/config.h
CONFIG_CLEAN_FILES =
LIBRARIES = $(noinst_LIBRARIES)
LTLIBRARIES = $(lib_LTLIBRARIES)
DEFS = @DEFS@ -I. -I$(srcdir) -I.. -I../src
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
libcurl_a_LIBADD =
libcurl_a_OBJECTS = file.o timeval.o base64.o hostip.o progress.o \
formdata.o cookie.o http.o sendf.o ftp.o url.o dict.o if2ip.o \
speedcheck.o getdate.o download.o ldap.o ssluse.o version.o getenv.o \
escape.o mprintf.o telnet.o getpass.o netrc.o writeout.o highlevel.o \
strequal.o easy.o
AR = ar
libcurl_la_LDFLAGS =
libcurl_la_LIBADD =
libcurl_la_OBJECTS = file.lo timeval.lo base64.lo hostip.lo progress.lo \
formdata.lo cookie.lo http.lo sendf.lo ftp.lo url.lo dict.lo if2ip.lo \
speedcheck.lo getdate.lo download.lo ldap.lo ssluse.lo version.lo \
getenv.lo escape.lo mprintf.lo telnet.lo getpass.lo netrc.lo \
writeout.lo highlevel.lo strequal.lo easy.lo
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
DIST_COMMON = Makefile.am Makefile.in
@ -110,28 +117,44 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
SOURCES = $(libcurl_a_SOURCES)
OBJECTS = $(libcurl_a_OBJECTS)
SOURCES = $(libcurl_la_SOURCES)
OBJECTS = $(libcurl_la_OBJECTS)
all: all-redirect
.SUFFIXES:
.SUFFIXES: .S .c .o .s
.SUFFIXES: .S .c .lo .o .s
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/Makefile
cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps lib/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-noinstLIBRARIES:
mostlyclean-libLTLIBRARIES:
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
distclean-noinstLIBRARIES:
distclean-libLTLIBRARIES:
maintainer-clean-noinstLIBRARIES:
maintainer-clean-libLTLIBRARIES:
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(libdir)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
else :; fi; \
done
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
list='$(lib_LTLIBRARIES)'; for p in $$list; do \
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
done
.c.o:
$(COMPILE) -c $<
@ -152,10 +175,27 @@ distclean-compile:
maintainer-clean-compile:
libcurl.a: $(libcurl_a_OBJECTS) $(libcurl_a_DEPENDENCIES)
-rm -f libcurl.a
$(AR) cru libcurl.a $(libcurl_a_OBJECTS) $(libcurl_a_LIBADD)
$(RANLIB) libcurl.a
.c.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
.s.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
.S.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
maintainer-clean-libtool:
libcurl.la: $(libcurl_la_OBJECTS) $(libcurl_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libcurl_la_LDFLAGS) $(libcurl_la_OBJECTS) $(libcurl_la_LIBADD) $(LIBS)
tags: TAGS
@ -209,7 +249,7 @@ check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am:
install-exec-am: install-libLTLIBRARIES
install-exec: install-exec-am
install-data-am:
@ -218,13 +258,14 @@ install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am:
uninstall-am: uninstall-libLTLIBRARIES
uninstall: uninstall-am
all-am: Makefile $(LIBRARIES)
all-am: Makefile $(LTLIBRARIES)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(libdir)
mostlyclean-generic:
@ -236,33 +277,39 @@ distclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
mostlyclean-tags mostlyclean-generic
mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \
mostlyclean-libtool mostlyclean-tags \
mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
mostlyclean-am
clean-am: clean-libLTLIBRARIES clean-compile clean-libtool clean-tags \
clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-noinstLIBRARIES distclean-compile \
distclean-tags distclean-generic clean-am
distclean-am: distclean-libLTLIBRARIES distclean-compile \
distclean-libtool distclean-tags distclean-generic \
clean-am
-rm -f libtool
distclean: distclean-am
maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
maintainer-clean-compile maintainer-clean-tags \
maintainer-clean-generic distclean-am
maintainer-clean-am: maintainer-clean-libLTLIBRARIES \
maintainer-clean-compile maintainer-clean-libtool \
maintainer-clean-tags maintainer-clean-generic \
distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile tags mostlyclean-tags distclean-tags \
.PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
distclean-compile clean-compile maintainer-clean-compile \
mostlyclean-libtool distclean-libtool clean-libtool \
maintainer-clean-libtool tags mostlyclean-tags distclean-tags \
clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
check-am installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \

Просмотреть файл

@ -32,6 +32,10 @@
** This code is in the public domain and has no copyright.
*/
#define _REENTRANT /* Necessary to use in Solaris, since the silly guys at Sun
made the localtime_r() prototype dependent on it (or
_POSIX_C_SOURCE or _POSIX_PTHREAD_SEMANTICS). */
#ifdef HAVE_CONFIG_H
# include "config.h"
# ifdef HAVE_ALLOCA_H
@ -215,7 +219,7 @@ static int yyRelSeconds;
static int yyRelYear;
#line 198 "getdate.y"
#line 202 "getdate.y"
typedef union {
int Number;
enum _MERIDIAN Meridian;
@ -298,11 +302,11 @@ static const short yyrhs[] = { -1,
#if YYDEBUG != 0
static const short yyrline[] = { 0,
214, 215, 218, 221, 224, 227, 230, 233, 236, 242,
248, 257, 263, 275, 278, 281, 287, 291, 295, 301,
305, 323, 329, 335, 339, 344, 348, 355, 363, 366,
369, 372, 375, 378, 381, 384, 387, 390, 393, 396,
399, 402, 405, 408, 411, 414, 417, 422, 455, 459
218, 219, 222, 225, 228, 231, 234, 237, 240, 246,
252, 261, 267, 279, 282, 285, 291, 295, 299, 305,
309, 327, 333, 339, 343, 348, 352, 359, 367, 370,
373, 376, 379, 382, 385, 388, 391, 394, 397, 400,
403, 406, 409, 412, 415, 418, 421, 426, 459, 463
};
#endif
@ -926,37 +930,37 @@ yyreduce:
switch (yyn) {
case 3:
#line 218 "getdate.y"
#line 222 "getdate.y"
{
yyHaveTime++;
;
break;}
case 4:
#line 221 "getdate.y"
#line 225 "getdate.y"
{
yyHaveZone++;
;
break;}
case 5:
#line 224 "getdate.y"
#line 228 "getdate.y"
{
yyHaveDate++;
;
break;}
case 6:
#line 227 "getdate.y"
#line 231 "getdate.y"
{
yyHaveDay++;
;
break;}
case 7:
#line 230 "getdate.y"
#line 234 "getdate.y"
{
yyHaveRel++;
;
break;}
case 9:
#line 236 "getdate.y"
#line 240 "getdate.y"
{
yyHour = yyvsp[-1].Number;
yyMinutes = 0;
@ -965,7 +969,7 @@ case 9:
;
break;}
case 10:
#line 242 "getdate.y"
#line 246 "getdate.y"
{
yyHour = yyvsp[-3].Number;
yyMinutes = yyvsp[-1].Number;
@ -974,7 +978,7 @@ case 10:
;
break;}
case 11:
#line 248 "getdate.y"
#line 252 "getdate.y"
{
yyHour = yyvsp[-3].Number;
yyMinutes = yyvsp[-1].Number;
@ -986,7 +990,7 @@ case 11:
;
break;}
case 12:
#line 257 "getdate.y"
#line 261 "getdate.y"
{
yyHour = yyvsp[-5].Number;
yyMinutes = yyvsp[-3].Number;
@ -995,7 +999,7 @@ case 12:
;
break;}
case 13:
#line 263 "getdate.y"
#line 267 "getdate.y"
{
yyHour = yyvsp[-5].Number;
yyMinutes = yyvsp[-3].Number;
@ -1008,53 +1012,53 @@ case 13:
;
break;}
case 14:
#line 275 "getdate.y"
#line 279 "getdate.y"
{
yyTimezone = yyvsp[0].Number;
;
break;}
case 15:
#line 278 "getdate.y"
#line 282 "getdate.y"
{
yyTimezone = yyvsp[0].Number - 60;
;
break;}
case 16:
#line 282 "getdate.y"
#line 286 "getdate.y"
{
yyTimezone = yyvsp[-1].Number - 60;
;
break;}
case 17:
#line 287 "getdate.y"
#line 291 "getdate.y"
{
yyDayOrdinal = 1;
yyDayNumber = yyvsp[0].Number;
;
break;}
case 18:
#line 291 "getdate.y"
#line 295 "getdate.y"
{
yyDayOrdinal = 1;
yyDayNumber = yyvsp[-1].Number;
;
break;}
case 19:
#line 295 "getdate.y"
#line 299 "getdate.y"
{
yyDayOrdinal = yyvsp[-1].Number;
yyDayNumber = yyvsp[0].Number;
;
break;}
case 20:
#line 301 "getdate.y"
#line 305 "getdate.y"
{
yyMonth = yyvsp[-2].Number;
yyDay = yyvsp[0].Number;
;
break;}
case 21:
#line 305 "getdate.y"
#line 309 "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
@ -1075,7 +1079,7 @@ case 21:
;
break;}
case 22:
#line 323 "getdate.y"
#line 327 "getdate.y"
{
/* ISO 8601 format. yyyy-mm-dd. */
yyYear = yyvsp[-2].Number;
@ -1084,7 +1088,7 @@ case 22:
;
break;}
case 23:
#line 329 "getdate.y"
#line 333 "getdate.y"
{
/* e.g. 17-JUN-1992. */
yyDay = yyvsp[-2].Number;
@ -1093,14 +1097,14 @@ case 23:
;
break;}
case 24:
#line 335 "getdate.y"
#line 339 "getdate.y"
{
yyMonth = yyvsp[-1].Number;
yyDay = yyvsp[0].Number;
;
break;}
case 25:
#line 339 "getdate.y"
#line 343 "getdate.y"
{
yyMonth = yyvsp[-3].Number;
yyDay = yyvsp[-2].Number;
@ -1108,14 +1112,14 @@ case 25:
;
break;}
case 26:
#line 344 "getdate.y"
#line 348 "getdate.y"
{
yyMonth = yyvsp[0].Number;
yyDay = yyvsp[-1].Number;
;
break;}
case 27:
#line 348 "getdate.y"
#line 352 "getdate.y"
{
yyMonth = yyvsp[-1].Number;
yyDay = yyvsp[-2].Number;
@ -1123,7 +1127,7 @@ case 27:
;
break;}
case 28:
#line 355 "getdate.y"
#line 359 "getdate.y"
{
yyRelSeconds = -yyRelSeconds;
yyRelMinutes = -yyRelMinutes;
@ -1134,115 +1138,115 @@ case 28:
;
break;}
case 30:
#line 366 "getdate.y"
#line 370 "getdate.y"
{
yyRelYear += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 31:
#line 369 "getdate.y"
#line 373 "getdate.y"
{
yyRelYear += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 32:
#line 372 "getdate.y"
#line 376 "getdate.y"
{
yyRelYear += yyvsp[0].Number;
;
break;}
case 33:
#line 375 "getdate.y"
#line 379 "getdate.y"
{
yyRelMonth += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 34:
#line 378 "getdate.y"
#line 382 "getdate.y"
{
yyRelMonth += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 35:
#line 381 "getdate.y"
#line 385 "getdate.y"
{
yyRelMonth += yyvsp[0].Number;
;
break;}
case 36:
#line 384 "getdate.y"
#line 388 "getdate.y"
{
yyRelDay += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 37:
#line 387 "getdate.y"
#line 391 "getdate.y"
{
yyRelDay += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 38:
#line 390 "getdate.y"
#line 394 "getdate.y"
{
yyRelDay += yyvsp[0].Number;
;
break;}
case 39:
#line 393 "getdate.y"
#line 397 "getdate.y"
{
yyRelHour += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 40:
#line 396 "getdate.y"
#line 400 "getdate.y"
{
yyRelHour += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 41:
#line 399 "getdate.y"
#line 403 "getdate.y"
{
yyRelHour += yyvsp[0].Number;
;
break;}
case 42:
#line 402 "getdate.y"
#line 406 "getdate.y"
{
yyRelMinutes += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 43:
#line 405 "getdate.y"
#line 409 "getdate.y"
{
yyRelMinutes += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 44:
#line 408 "getdate.y"
#line 412 "getdate.y"
{
yyRelMinutes += yyvsp[0].Number;
;
break;}
case 45:
#line 411 "getdate.y"
#line 415 "getdate.y"
{
yyRelSeconds += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 46:
#line 414 "getdate.y"
#line 418 "getdate.y"
{
yyRelSeconds += yyvsp[-1].Number * yyvsp[0].Number;
;
break;}
case 47:
#line 417 "getdate.y"
#line 421 "getdate.y"
{
yyRelSeconds += yyvsp[0].Number;
;
break;}
case 48:
#line 423 "getdate.y"
#line 427 "getdate.y"
{
if (yyHaveTime && yyHaveDate && !yyHaveRel)
yyYear = yyvsp[0].Number;
@ -1275,13 +1279,13 @@ case 48:
;
break;}
case 49:
#line 456 "getdate.y"
#line 460 "getdate.y"
{
yyval.Meridian = MER24;
;
break;}
case 50:
#line 460 "getdate.y"
#line 464 "getdate.y"
{
yyval.Meridian = yyvsp[0].Meridian;
;
@ -1508,7 +1512,7 @@ yyerrhandle:
}
return 1;
}
#line 465 "getdate.y"
#line 469 "getdate.y"
/* Include this file down here because bison inserts code above which
@ -1518,7 +1522,6 @@ yyerrhandle:
extern struct tm *gmtime ();
extern struct tm *localtime ();
extern struct tm *localtime_r (time_t *, struct tm *);
extern time_t mktime ();
/* Month and day table. */

Просмотреть файл

@ -8,6 +8,10 @@
** This code is in the public domain and has no copyright.
*/
#define _REENTRANT /* Necessary to use in Solaris, since the silly guys at Sun
made the localtime_r() prototype dependent on it (or
_POSIX_C_SOURCE or _POSIX_PTHREAD_SEMANTICS). */
#ifdef HAVE_CONFIG_H
# include "config.h"
# ifdef HAVE_ALLOCA_H
@ -471,7 +475,6 @@ o_merid : /* NULL */
extern struct tm *gmtime ();
extern struct tm *localtime ();
extern struct tm *localtime_r (time_t *, struct tm *);
extern time_t mktime ();
/* Month and day table. */

Просмотреть файл

@ -38,6 +38,10 @@
* ------------------------------------------------------------
****************************************************************************/
#define _REENTRANT /* Necessary to use in Solaris, since the silly guys at Sun
made the localtime_r() prototype dependent on it (or
_POSIX_C_SOURCE or _POSIX_PTHREAD_SEMANTICS). */
/* -- WIN32 approved -- */
#include <stdio.h>
#include <string.h>
@ -62,6 +66,12 @@
#include <netinet/in.h>
#include <sys/time.h>
#ifdef HAVE_TIME_H
#ifdef TIME_WITH_SYS_TIME
#include <time.h>
#endif
#endif
#include <sys/resource.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@ -362,7 +372,6 @@ CURLcode http(struct connectdata *conn)
struct tm *thistime;
#ifdef HAVE_LOCALTIME_R
extern struct tm *localtime_r(time_t *, struct tm *);
/* thread-safe version */
struct tm keeptime;
thistime = localtime_r(&data->timevalue, &keeptime);

Просмотреть файл

@ -80,184 +80,196 @@ puts (
" To store cookies, save the HTTP headers to a file using\n"
" -D/--dump-header!\n"
"\n"
" -B/--ftp-ascii\n"
" (FTP/LDAP) Use ASCII transfer when getting an FTP file\n"
" or LDAP info. For FTP, this can also be enforced by\n"
" using an URL that ends with \";type=A\".\n"
" -B/--use-ascii\n"
" Use ASCII transfer when getting an FTP file or LDAP\n"
" info. For FTP, this can also be enforced by using an\n"
" URL that ends with \";type=A\". This option causes data\n"
" sent to stdout to be in text mode for win32 systems.\n"
"\n"
" -c/--continue\n"
" Continue/Resume a previous file transfer. This\n"
" instructs curl to continue appending data on the file\n"
" where it was previously left, possibly because of a\n"
" broken connection to the server. There must be a named\n"
" physical file to append to for this to work. Note:\n"
" Upload resume is depening on a command named SIZE not\n"
" Continue/Resume a previous file transfer. This\n"
" instructs curl to continue appending data on the file\n"
" where it was previously left, possibly because of a\n"
" broken connection to the server. There must be a named\n"
" physical file to append to for this to work. Note:\n"
" Upload resume is depening on a command named SIZE not\n"
" always present in all ftp servers! Upload resume is for\n"
" FTP only. HTTP resume is only possible with HTTP/1.1\n"
" FTP only. HTTP resume is only possible with HTTP/1.1\n"
" or later servers.\n"
"\n"
" -C/--continue-at <offset>\n"
" Continue/Resume a previous file transfer at the given\n"
" offset. The given offset is the exact number of bytes\n"
" that will be skipped counted from the beginning of the\n"
" Continue/Resume a previous file transfer at the given\n"
" offset. The given offset is the exact number of bytes\n"
" that will be skipped counted from the beginning of the\n"
" source file before it is transfered to the destination.\n"
" If used with uploads, the ftp server command SIZE will\n"
" not be used by curl. Upload resume is for FTP only.\n"
" HTTP resume is only possible with HTTP/1.1 or later\n"
" If used with uploads, the ftp server command SIZE will\n"
" not be used by curl. Upload resume is for FTP only.\n"
" HTTP resume is only possible with HTTP/1.1 or later\n"
" servers.\n"
"\n"
" -d/--data <data>\n"
" (HTTP) Sends the specified data in a POST request to\n"
" the HTTP server. Note that the data is sent exactly as\n"
" (HTTP) Sends the specified data in a POST request to\n"
" the HTTP server. Note that the data is sent exactly as\n"
" specified with no extra processing. The data is\n"
" expected to be \"url-encoded\". This will cause curl to\n"
" pass the data to the server using the content-type\n"
" expected to be \"url-encoded\". This will cause curl to\n"
" pass the data to the server using the content-type\n"
" application/x-www-form-urlencoded. Compare to -F.\n"
"\n"
" If you start the data with the letter @, the rest\n"
" should be a file name to read the data from, or - if\n"
" you want curl to read the data from stdin. The con­\n"
" If you start the data with the letter @, the rest\n"
" should be a file name to read the data from, or - if\n"
" you want curl to read the data from stdin. The con­\n"
" tents of the file must already be url-encoded.\n"
"\n"
" -D/--dump-header <file>\n"
" (HTTP/FTP) Write the HTTP headers to this file. Write\n"
" (HTTP/FTP) Write the HTTP headers to this file. Write\n"
" the FTP file info to this file if -I/--head is used.\n"
"\n"
" This option is handy to use when you want to store the\n"
" cookies that a HTTP site sends to you. The cookies\n"
" This option is handy to use when you want to store the\n"
" cookies that a HTTP site sends to you. The cookies\n"
" could then be read in a second curl invoke by using the\n"
" -b/--cookie option!\n"
"\n"
" -e/--referer <URL>\n"
" (HTTP) Sends the \"Referer Page\" information to the HTTP\n"
" server. Some badly done CGIs fail if it's not set. This\n"
" can also be set with the -H/--header flag of course.\n"
" server. This can also be set with the -H/--header flag\n"
" of course. When used with -L/--location you can append\n"
" \";auto\" to the referer URL to make curl automatically\n"
" set the previous URL when it follows a Location:\n"
" header. The \";auto\" string can be used alone, even if\n"
" you don't set an initial referer.\n"
"\n"
" -E/--cert <certificate[:password]>\n"
" (HTTPS) Tells curl to use the specified certificate\n"
" file when getting a file with HTTPS. The certificate\n"
" must be in PEM format. If the optional password isn't\n"
" (HTTPS) Tells curl to use the specified certificate\n"
" file when getting a file with HTTPS. The certificate\n"
" must be in PEM format. If the optional password isn't\n"
" specified, it will be queried for on the terminal. Note\n"
" that this certificate is the private key and the pri­\n"
" that this certificate is the private key and the pri­\n"
" vate certificate concatenated!\n"
"\n"
" -f/--fail\n"
" (HTTP) Fail silently (no output at all) on server\n"
" errors. This is mostly done like this to better enable\n"
" scripts etc to better deal with failed attempts. In\n"
" (HTTP) Fail silently (no output at all) on server\n"
" errors. This is mostly done like this to better enable\n"
" scripts etc to better deal with failed attempts. In\n"
" normal cases when a HTTP server fails to deliver a doc­\n"
" ument, it returns a HTML document stating so (which\n"
" ument, it returns a HTML document stating so (which\n"
" often also describes why and more). This flag will pre­\n"
" vent curl from outputting that and fail silently\n"
" instead.\n"
"\n"
" -F/--form <name=content>\n"
" (HTTP) This lets curl emulate a filled in form in which\n"
" a user has pressed the submit button. This causes curl\n"
" a user has pressed the submit button. This causes curl\n"
" to POST data using the content-type multipart/form-data\n"
" according to RFC1867. This enables uploading of binary\n"
" files etc. To force the 'content' part to be read from\n"
" a file, prefix the file name with an @ sign. Example,\n"
" to send your password file to the server, where 'pass­\n"
" word' is the name of the form-field to which\n"
" /etc/passwd will be the input:\n"
" according to RFC1867. This enables uploading of binary\n"
" files etc. To force the 'content' part to be be a file,\n"
" prefix the file name with an @ sign. To just get the\n"
" content part from a file, prefix the file name with the\n"
" letter <. The difference between @ and < is then that @\n"
" makes a file get attached in the post as a file upload,\n"
" while the < makes a text field and just get the con­\n"
" tents for that text field from a file.\n"
"\n"
" Example, to send your password file to the server,\n"
" where input:\n"
"\n"
" curl -F password=@/etc/passwd www.mypasswords.com\n"
"\n"
" To read the file's content from stdin insted of a file,\n"
" use - where the file name should've been.\n"
" use - where the file name should've been. This goes for\n"
" both @ and < constructs.\n"
"\n"
" -h/--help\n"
" Usage help.\n"
"\n"
" -H/--header <header>\n"
" (HTTP) Extra header to use when getting a web page. You\n"
" may specify any number of extra headers. Note that if\n"
" you should add a custom header that has the same name\n"
" may specify any number of extra headers. Note that if\n"
" you should add a custom header that has the same name\n"
" as one of the internal ones curl would use, your exter­\n"
" nally set header will be used instead of the internal\n"
" one. This allows you to make even trickier stuff than\n"
" curl would normally do. You should not replace inter­\n"
" nally set headers without knowing perfectly well what\n"
" nally set header will be used instead of the internal\n"
" one. This allows you to make even trickier stuff than\n"
" curl would normally do. You should not replace inter­\n"
" nally set headers without knowing perfectly well what\n"
" you're doing.\n"
"\n"
" -i/--include\n"
" (HTTP) Include the HTTP-header in the output. The HTTP-\n"
" header includes things like server-name, date of the\n"
" header includes things like server-name, date of the\n"
" document, HTTP-version and more...\n"
"\n"
" -I/--head\n"
" (HTTP/FTP) Fetch the HTTP-header only! HTTP-servers\n"
" (HTTP/FTP) Fetch the HTTP-header only! HTTP-servers\n"
" feature the command HEAD which this uses to get nothing\n"
" but the header of a document. When used on a FTP file,\n"
" but the header of a document. When used on a FTP file,\n"
" curl displays the file size only.\n"
"\n"
" -K/--config <config file>\n"
" Specify which config file to read curl arguments from.\n"
" The config file is a text file in which command line\n"
" arguments can be written which then will be used as if\n"
" they were written on the actual command line. If the\n"
" first column of a config line is a '#' character, the\n"
" Specify which config file to read curl arguments from.\n"
" The config file is a text file in which command line\n"
" arguments can be written which then will be used as if\n"
" they were written on the actual command line. If the\n"
" first column of a config line is a '#' character, the\n"
" rest of the line will be treated as a comment.\n"
"\n"
" Specify the filename as '-' to make curl read the file\n"
" Specify the filename as '-' to make curl read the file\n"
" from stdin.\n"
"\n"
" -l/--list-only\n"
" (FTP) When listing an FTP directory, this switch forces\n"
" a name-only view. Especially useful if you want to\n"
" machine-parse the contents of an FTP directory since\n"
" the normal directory view doesn't use a standard look\n"
" a name-only view. Especially useful if you want to\n"
" machine-parse the contents of an FTP directory since\n"
" the normal directory view doesn't use a standard look\n"
" or format.\n"
"\n"
" -L/--location\n"
" (HTTP/HTTPS) If the server reports that the requested\n"
" page has a different location (indicated with the\n"
" header line Location:) this flag will let curl attempt\n"
" (HTTP/HTTPS) If the server reports that the requested\n"
" page has a different location (indicated with the\n"
" header line Location:) this flag will let curl attempt\n"
" to reattempt the get on the new place. If used together\n"
" with -i or -I, headers from all requested pages will be\n"
);
puts(
" shown.\n"
"\n"
" -m/--max-time <seconds>\n"
" Maximum time in seconds that you allow the whole opera­\n"
" tion to take. This is useful for preventing your batch\n"
" jobs from hanging for hours due to slow networks or\n"
" links going down. This doesn't work properly in win32\n"
" jobs from hanging for hours due to slow networks or\n"
" links going down. This doesn't work properly in win32\n"
" systems.\n"
"\n"
" -M/--manual\n"
" Manual. Display the huge help text.\n"
"\n"
" -n/--netrc\n"
" Makes curl scan the .netrc file in the user's home\n"
" directory for login name and password. This is typi­\n"
" cally used for ftp on unix. If used with http, curl\n"
);
puts(
" will enable user authentication. See netrc(5) for\n"
" details on the file format. Curl will not complain if\n"
" that file hasn't the right permissions (it should not\n"
" be world nor group readable). The environment variable\n"
" Makes curl scan the .netrc file in the user's home\n"
" directory for login name and password. This is typi­\n"
" cally used for ftp on unix. If used with http, curl\n"
" will enable user authentication. See netrc(4) for\n"
" details on the file format. Curl will not complain if\n"
" that file hasn't the right permissions (it should not\n"
" be world nor group readable). The environment variable\n"
" \"HOME\" is used to find the home directory.\n"
"\n"
" A quick and very simple example of how to setup a\n"
" .netrc to allow curl to ftp to the machine\n"
" A quick and very simple example of how to setup a\n"
" .netrc to allow curl to ftp to the machine\n"
" host.domain.com with user name\n"
"\n"
" machine host.domain.com login myself password secret\n"
"\n"
" -N/--no-buffer\n"
" Disables the buffering of the output stream. In normal\n"
" Disables the buffering of the output stream. In normal\n"
" work situations, curl will use a standard buffered out­\n"
" put stream that will have the effect that it will out­\n"
" put the data in chunks, not necessarily exactly when\n"
" the data arrives. Using this option will disable that\n"
" put stream that will have the effect that it will out­\n"
" put the data in chunks, not necessarily exactly when\n"
" the data arrives. Using this option will disable that\n"
" buffering.\n"
"\n"
" -o/--output <file>\n"
" Write output to <file> instead of stdout. If you are\n"
" Write output to <file> instead of stdout. If you are\n"
" using {} or [] to fetch multiple documents, you can use\n"
" '#' followed by a number in the <file> specifier. That\n"
" variable will be replaced with the current string for\n"
" '#' followed by a number in the <file> specifier. That\n"
" variable will be replaced with the current string for\n"
" the URL being fetched. Like in:\n"
"\n"
" curl http://{one,two}.site.com -o \"file_#1.txt\"\n"
@ -272,14 +284,14 @@ puts (
" the path is cut off.)\n"
"\n"
" -P/--ftpport <address>\n"
" (FTP) Reverses the initiator/listener roles when con­\n"
" necting with ftp. This switch makes Curl use the PORT\n"
" command instead of PASV. In practice, PORT tells the\n"
" (FTP) Reverses the initiator/listener roles when con­\n"
" necting with ftp. This switch makes Curl use the PORT\n"
" command instead of PASV. In practice, PORT tells the\n"
" server to connect to the client's specified address and\n"
" port, while PASV asks the server for an ip address and\n"
" port, while PASV asks the server for an ip address and\n"
" port to connect to. <address> should be one of:\n"
"\n"
" interface i.e \"eth0\" to specify which interface's IP\n"
" interface i.e \"eth0\" to specify which interface's IP\n"
" address you want to use (Unix only)\n"
"\n"
" IP address i.e \"192.168.10.1\" to specify exact IP num­\n"
@ -287,28 +299,28 @@ puts (
"\n"
" host name i.e \"my.host.domain\" to specify machine\n"
"\n"
" - (any single-letter string) to make it pick\n"
" - (any single-letter string) to make it pick\n"
" the machine's default\n"
"\n"
" -q If used as the first parameter on the command line, the\n"
" $HOME/.curlrc file will not be read and used as a con­\n"
" $HOME/.curlrc file will not be read and used as a con­\n"
" fig file.\n"
"\n"
" -Q/--quote <comand>\n"
" (FTP) Send an arbitrary command to the remote FTP\n"
" server, by using the QUOTE command of the server. Not\n"
" all servers support this command, and the set of QUOTE\n"
" commands are server specific! Quote commands are sent\n"
" BEFORE the transfer is taking place. To make commands\n"
" take place after a successful transfer, prefix them\n"
" (FTP) Send an arbitrary command to the remote FTP\n"
" server, by using the QUOTE command of the server. Not\n"
" all servers support this command, and the set of QUOTE\n"
" commands are server specific! Quote commands are sent\n"
" BEFORE the transfer is taking place. To make commands\n"
" take place after a successful transfer, prefix them\n"
" with a dash '-'. You may specify any amount of commands\n"
" to be run before and after the transfer. If the server\n"
" returns failure for one of the commands, the entire\n"
" to be run before and after the transfer. If the server\n"
" returns failure for one of the commands, the entire\n"
" operation will be aborted.\n"
"\n"
" -r/--range <range>\n"
" (HTTP/FTP) Retrieve a byte range (i.e a partial docu­\n"
" ment) from a HTTP/1.1 or FTP server. Ranges can be\n"
" (HTTP/FTP) Retrieve a byte range (i.e a partial docu­\n"
" ment) from a HTTP/1.1 or FTP server. Ranges can be\n"
" specified in a number of ways.\n"
"\n"
" 0-499 specifies the first 500 bytes\n"
@ -321,165 +333,167 @@ puts (
" ward\n"
"\n"
" 0-0,-1 specifies the first and last byte only(*)(H)\n"
"\n"
" 500-700,600-799\n"
" specifies 300 bytes from offset 500(H)\n"
"\n"
" 100-199,500-599\n"
" specifies two separate 100 bytes ranges(*)(H)\n"
"\n"
" (*) = NOTE that this will cause the server to reply with a\n"
" (*) = NOTE that this will cause the server to reply with a\n"
" multipart response!\n"
"\n"
" You should also be aware that many HTTP/1.1 servers do not\n"
" You should also be aware that many HTTP/1.1 servers do not\n"
" have this feature enabled, so that when you attempt to get a\n"
" range, you'll instead get the whole document.\n"
"\n"
" FTP range downloads only support the simple syntax 'start-\n"
" stop' (optionally with one of the numbers omitted). It\n"
" FTP range downloads only support the simple syntax 'start-\n"
" stop' (optionally with one of the numbers omitted). It\n"
" depends on the non-RFC command SIZE.\n"
"\n"
" -s/--silent\n"
" Silent mode. Don't show progress meter or error mes­\n"
" Silent mode. Don't show progress meter or error mes­\n"
" sages. Makes Curl mute.\n"
"\n"
" -S/--show-error\n"
" When used with -s it makes curl show error message if\n"
" When used with -s it makes curl show error message if\n"
" it fails.\n"
"\n"
" -t/--upload\n"
" Transfer the stdin data to the specified file. Curl\n"
" will read everything from stdin until EOF and store\n"
" with the supplied name. If this is used on a http(s)\n"
" Transfer the stdin data to the specified file. Curl\n"
" will read everything from stdin until EOF and store\n"
" with the supplied name. If this is used on a http(s)\n"
" server, the PUT command will be used.\n"
"\n"
" -T/--upload-file <file>\n"
" Like -t, but this transfers the specified local file.\n"
" If there is no file part in the specified URL, Curl\n"
" Like -t, but this transfers the specified local file.\n"
" If there is no file part in the specified URL, Curl\n"
" will append the local file name. NOTE that you must use\n"
" a trailing / on the last directory to really prove to\n"
" a trailing / on the last directory to really prove to\n"
" Curl that there is no file name or curl will think that\n"
" your last directory name is the remote file name to\n"
" use. That will most likely cause the upload operation\n"
" to fail. If this is used on a http(s) server, the PUT\n"
" your last directory name is the remote file name to\n"
" use. That will most likely cause the upload operation\n"
" to fail. If this is used on a http(s) server, the PUT\n"
" command will be used.\n"
"\n"
" -u/--user <user:password>\n"
" Specify user and password to use when fetching. See\n"
" README.curl for detailed examples of how to use this.\n"
" If no password is specified, curl will ask for it\n"
" Specify user and password to use when fetching. See\n"
" README.curl for detailed examples of how to use this.\n"
" If no password is specified, curl will ask for it\n"
" interactively.\n"
"\n"
" -U/--proxy-user <user:password>\n"
" Specify user and password to use for Proxy authentica­\n"
" Specify user and password to use for Proxy authentica­\n"
" tion. If no password is specified, curl will ask for it\n"
" interactively.\n"
"\n"
" -v/--verbose\n"
" Makes the fetching more verbose/talkative. Mostly\n"
" usable for debugging. Lines starting with '>' means\n"
" Makes the fetching more verbose/talkative. Mostly\n"
" usable for debugging. Lines starting with '>' means\n"
" data sent by curl, '<' means data received by curl that\n"
" is hidden in normal cases and lines starting with '*'\n"
" is hidden in normal cases and lines starting with '*'\n"
" means additional info provided by curl.\n"
"\n"
" -V/--version\n"
" Displays the full version of curl, libcurl and other\n"
" Displays the full version of curl, libcurl and other\n"
" 3rd party libraries linked with the executable.\n"
"\n"
" -w/--write-out <format>\n"
" Defines what to display after a completed and success­\n"
" ful operation. The format is a string that may contain\n"
" plain text mixed with any number of variables. The\n"
" Defines what to display after a completed and success­\n"
" ful operation. The format is a string that may contain\n"
" plain text mixed with any number of variables. The\n"
" string can be specified as \"string\", to get read from a\n"
" particular file you specify it \"@filename\" and to tell\n"
" particular file you specify it \"@filename\" and to tell\n"
" curl to read the format from stdin you write \"@-\".\n"
"\n"
" The variables present in the output format will be sub­\n"
" stituted by the value or text that curl thinks fit, as\n"
" stituted by the value or text that curl thinks fit, as\n"
" described below. All variables are specified like\n"
" %{variable_name} and to output a normal % you just\n"
" write them like %%. You can output a newline by using\n"
" %{variable_name} and to output a normal % you just\n"
" write them like %%. You can output a newline by using\n"
" \\n, a carrige return with \\r and a tab space with \\t.\n"
"\n"
" NOTE: The %-letter is a special letter in the\n"
" win32-environment, where all occurrences of % must be\n"
" NOTE: The %-letter is a special letter in the\n"
" win32-environment, where all occurrences of % must be\n"
" doubled when using this option.\n"
"\n"
" Available variables are at this point:\n"
"\n"
" url_effective The URL that was fetched last. This is\n"
" url_effective The URL that was fetched last. This is\n"
" mostly meaningful if you've told curl to\n"
" follow location: headers.\n"
"\n"
" http_code The numerical code that was found in the\n"
" last retrieved HTTP(S) page.\n"
"\n"
" time_total The total time, in seconds, that the\n"
" full operation lasted. The time will be\n"
" time_total The total time, in seconds, that the\n"
" full operation lasted. The time will be\n"
" displayed with millisecond resolution.\n"
"\n"
" time_namelookup\n"
" The time, in seconds, it took from the\n"
" start until the name resolving was com­\n"
" The time, in seconds, it took from the\n"
" start until the name resolving was com­\n"
" pleted.\n"
"\n"
" time_connect The time, in seconds, it took from the\n"
" start until the connect to the remote\n"
" time_connect The time, in seconds, it took from the\n"
" start until the connect to the remote\n"
" host (or proxy) was completed.\n"
"\n"
" time_pretransfer\n"
" The time, in seconds, it took from the\n"
" start until the file transfer is just\n"
" about to begin. This includes all pre-\n"
" transfer commands and negotiations that\n"
" are specific to the particular proto­\n"
" The time, in seconds, it took from the\n"
" start until the file transfer is just\n"
" about to begin. This includes all pre-\n"
" transfer commands and negotiations that\n"
" are specific to the particular proto­\n"
" col(s) involved.\n"
"\n"
" size_download The total amount of bytes that were\n"
" size_download The total amount of bytes that were\n"
" downloaded.\n"
"\n"
" size_upload The total amount of bytes that were\n"
" size_upload The total amount of bytes that were\n"
" uploaded.\n"
"\n"
" speed_download The average download speed that curl\n"
" speed_download The average download speed that curl\n"
" measured for the complete download.\n"
"\n"
" speed_upload The average upload speed that curl mea­\n"
" speed_upload The average upload speed that curl mea­\n"
" sured for the complete download.\n"
"\n"
" -x/--proxy <proxyhost[:port]>\n"
" Use specified proxy. If the port number is not speci­\n"
" Use specified proxy. If the port number is not speci­\n"
" fied, it is assumed at port 1080.\n"
"\n"
" -X/--request <command>\n"
" (HTTP) Specifies a custom request to use when communi­\n"
" cating with the HTTP server. The specified request\n"
" (HTTP) Specifies a custom request to use when communi­\n"
" cating with the HTTP server. The specified request\n"
" will be used instead of the standard GET. Read the HTTP\n"
" 1.1 specification for details and explanations.\n"
"\n"
" (FTP) Specifies a custom FTP command to use instead of\n"
" (FTP) Specifies a custom FTP command to use instead of\n"
);
puts(
" LIST when doing file lists with ftp.\n"
"\n"
" -y/--speed-time <time>\n"
" If a download is slower than speed-limit bytes per sec­\n"
" ond during a speed-time period, the download gets\n"
" ond during a speed-time period, the download gets\n"
" aborted. If speed-time is used, the default speed-limit\n"
" will be 1 unless set with -y.\n"
"\n"
" -Y/--speed-limit <speed>\n"
" If a download is slower than this given speed, in bytes\n"
" per second, for speed-time seconds it gets aborted.\n"
" per second, for speed-time seconds it gets aborted.\n"
" speed-time is set with -Y and is 30 if not set.\n"
"\n"
" -z/--time-cond <date expression>\n"
" (HTTP) Request to get a file that has been modified\n"
);
puts(
" later than the given time and date, or one that has\n"
" (HTTP) Request to get a file that has been modified\n"
" later than the given time and date, or one that has\n"
" been modified before that time. The date expression can\n"
" be all sorts of date strings or if it doesn't match any\n"
" internal ones, it tries to get the time from a given\n"
" file name instead! See the GNU date(1) man page for\n"
" internal ones, it tries to get the time from a given\n"
" file name instead! See the GNU date(1) man page for\n"
" date expression details.\n"
" Start the date expression with a dash (-) to make it\n"
" request for a document that is older than the given\n"
"\n"
" Start the date expression with a dash (-) to make it\n"
" request for a document that is older than the given\n"
" date/time, default is a document that is newer than the\n"
" specified date/time.\n"
"\n"
@ -492,15 +506,15 @@ puts (
" ing with a remote SSL server.\n"
"\n"
" -#/--progress-bar\n"
" Make curl display progress information as a progress\n"
" Make curl display progress information as a progress\n"
" bar instead of the default statistics.\n"
"\n"
" --crlf\n"
" (FTP) Convert LF to CRLF in upload. Useful for MVS\n"
" (FTP) Convert LF to CRLF in upload. Useful for MVS\n"
" (OS/390).\n"
"\n"
" --stderr <file>\n"
" Redirect all writes to stderr to the specified file\n"
" Redirect all writes to stderr to the specified file\n"
" instead. If the file name is a plain '-', it is instead\n"
" written to stdout. This option has no point when you're\n"
" using a shell with decent redirecting capabilities.\n"
@ -515,7 +529,6 @@ puts (
"\n"
" HTTPS_PROXY [protocol://]<host>[:port]\n"
" Sets proxy server to use for HTTPS.\n"
"\n"
" FTP_PROXY [protocol://]<host>[:port]\n"
" Sets proxy server to use for FTP.\n"
"\n"
@ -523,19 +536,20 @@ puts (
" Sets proxy server to use for GOPHER.\n"
"\n"
" ALL_PROXY [protocol://]<host>[:port]\n"
" Sets proxy server to use if no protocol-specific proxy\n"
" Sets proxy server to use if no protocol-specific proxy\n"
" is set.\n"
"\n"
" NO_PROXY <comma-separated list of hosts>\n"
" list of host names that shouldn't go through any proxy.\n"
" If set to a asterisk '*' only, it matches all hosts.\n"
"\n"
" COLUMNS <integer>\n"
" The width of the terminal. This variable only affects\n"
" The width of the terminal. This variable only affects\n"
" curl when the --progress-bar option is used.\n"
"\n"
"EXIT CODES\n"
" There exists a bunch of different error codes and their cor­\n"
" responding error messages that may appear during bad condi­\n"
" responding error messages that may appear during bad condi­\n"
" tions. At the time of this writing, the exit codes are:\n"
"\n"
" 1 Unsupported protocol. This build of curl has no support\n"
@ -545,42 +559,42 @@ puts (
"\n"
" 3 URL malformat. The syntax was not correct.\n"
"\n"
" 4 URL user malformatted. The user-part of the URL syntax\n"
" 4 URL user malformatted. The user-part of the URL syntax\n"
" was not correct.\n"
"\n"
" 5 Couldn't resolve proxy. The given proxy host could not\n"
" 5 Couldn't resolve proxy. The given proxy host could not\n"
" be resolved.\n"
"\n"
" 6 Couldn't resolve host. The given remote host was not\n"
" 6 Couldn't resolve host. The given remote host was not\n"
" resolved.\n"
"\n"
" 7 Failed to connect to host.\n"
"\n"
" 8 FTP weird server reply. The server sent data curl\n"
" 8 FTP weird server reply. The server sent data curl\n"
" couldn't parse.\n"
"\n"
" 9 FTP access denied. The server denied login.\n"
"\n"
" 10 FTP user/password incorrect. Either one or both were\n"
" 10 FTP user/password incorrect. Either one or both were\n"
" not accepted by the server.\n"
"\n"
" 11 FTP weird PASS reply. Curl couldn't parse the reply\n"
" 11 FTP weird PASS reply. Curl couldn't parse the reply\n"
" sent to the PASS request.\n"
"\n"
" 12 FTP weird USER reply. Curl couldn't parse the reply\n"
" 12 FTP weird USER reply. Curl couldn't parse the reply\n"
" sent to the USER request.\n"
"\n"
" 13 FTP weird PASV reply, Curl couldn't parse the reply\n"
" 13 FTP weird PASV reply, Curl couldn't parse the reply\n"
" sent to the PASV request.\n"
"\n"
" 14 FTP weird 227 formay. Curl couldn't parse the 227-line\n"
" 14 FTP weird 227 formay. Curl couldn't parse the 227-line\n"
" the server sent.\n"
"\n"
" 15 FTP can't get host. Couldn't resolve the host IP we got\n"
" in the 227-line.\n"
"\n"
" 16 FTP can't reconnect. Couldn't connect to the host we\n"
" 16 FTP can't reconnect. Couldn't connect to the host we\n"
" got in the 227-line.\n"
"\n"
" 17 FTP couldn't set binary. Couldn't change transfer\n"
" method to binary.\n"
"\n"
@ -588,51 +602,51 @@ puts (
"\n"
" 19 FTP couldn't RETR file. The RETR command failed.\n"
"\n"
" 20 FTP write error. The transfer was reported bad by the\n"
" 20 FTP write error. The transfer was reported bad by the\n"
" server.\n"
"\n"
" 21 FTP quote error. A quote command returned error from\n"
" 21 FTP quote error. A quote command returned error from\n"
" the server.\n"
"\n"
" 22 HTTP not found. The requested page was not found. This\n"
" 22 HTTP not found. The requested page was not found. This\n"
" return code only appears if --fail is used.\n"
"\n"
" 23 Write error. Curl couldn't write data to a local\n"
" 23 Write error. Curl couldn't write data to a local\n"
" filesystem or similar.\n"
"\n"
" 24 Malformat user. User name badly specified.\n"
"\n"
" 25 FTP couldn't STOR file. The server denied the STOR\n"
" 25 FTP couldn't STOR file. The server denied the STOR\n"
" operation.\n"
"\n"
" 26 Read error. Various reading problems.\n"
"\n"
" 27 Out of memory. A memory allocation request failed.\n"
"\n"
" 28 Operation timeout. The specified time-out period was\n"
" 28 Operation timeout. The specified time-out period was\n"
" reached according to the conditions.\n"
"\n"
" 29 FTP couldn't set ASCII. The server returned an unknown\n"
" 29 FTP couldn't set ASCII. The server returned an unknown\n"
" reply.\n"
"\n"
" 30 FTP PORT failed. The PORT command failed.\n"
"\n"
" 31 FTP couldn't use REST. The REST command failed.\n"
"\n"
" 32 FTP couldn't use SIZE. The SIZE command failed. The\n"
" command is an extension to the original FTP spec RFC\n"
" 32 FTP couldn't use SIZE. The SIZE command failed. The\n"
" command is an extension to the original FTP spec RFC\n"
" 959.\n"
"\n"
" 33 HTTP range error. The range \"command\" didn't work.\n"
"\n"
" 34 HTTP post error. Internal post-request generation\n"
" 34 HTTP post error. Internal post-request generation\n"
" error.\n"
"\n"
" 35 SSL connect error. The SSL handshaking failed.\n"
"\n"
" 36 FTP bad download resume. Couldn't continue an earlier\n"
" 36 FTP bad download resume. Couldn't continue an earlier\n"
" aborted download.\n"
" 37 FILE couldn't read file. Failed to open the file. Per­\n"
"\n"
" 37 FILE couldn't read file. Failed to open the file. Per­\n"
" missions?\n"
"\n"
" 38 LDAP cannot bind. LDAP bind operation failed.\n"
@ -641,27 +655,27 @@ puts (
"\n"
" 40 Library not found. The LDAP library was not found.\n"
"\n"
" 41 Function not found. A required LDAP function was not\n"
" 41 Function not found. A required LDAP function was not\n"
" found.\n"
"\n"
" XX There will appear more error codes here in future\n"
" releases. The existing ones are meant to never change.\n"
" XX There will appear more error codes here in future\n"
" releases. The existing ones are meant to never change.\n"
"\n"
"BUGS\n"
" If you do find any (or have other suggestions), mail Daniel\n"
" Stenberg <Daniel.Stenberg@haxx.nu>.\n"
" If you do find any (or have other suggestions), mail Daniel\n"
" Stenberg <Daniel.Stenberg@haxx.se>.\n"
"\n"
"AUTHORS / CONTRIBUTORS\n"
" - Daniel Stenberg <Daniel.Stenberg@haxx.nu>\n"
" - Daniel Stenberg <Daniel.Stenberg@haxx.se>\n"
" - Rafael Sagula <sagula@inf.ufrgs.br>\n"
" - Sampo Kellomaki <sampo@iki.fi>\n"
" - Linas Vepstas <linas@linas.org>\n"
" - Bjorn Reese <breese@mail1.stofanet.dk>\n"
" - Johan Anderson <johan@homemail.com>\n"
" - Kjell Ericson <Kjell.Ericson@haxx,nu>\n"
" - Kjell Ericson <Kjell.Ericson@haxx.se>\n"
" - Troy Engel <tengel@sonic.net>\n"
" - Ryan Nelson <ryan@inch.com>\n"
" - Bjorn Stenberg <Bjorn.Stenberg@haxx.nu>\n"
" - Björn Stenberg <Bjorn.Stenberg@haxx.se>\n"
" - Angus Mackay <amackay@gus.ml.org>\n"
" - Eric Young <eay@cryptsoft.com>\n"
" - Simon Dick <simond@totally.irrelevant.org>\n"
@ -679,9 +693,9 @@ puts (
" - Ralph Beckmann <rabe@uni-paderborn.de>\n"
" - T. Yamada <tai@imasy.or.jp>\n"
" - Lars J. Aas <larsa@sim.no>\n"
" - Jörn Hartroth <Joern.Hartroth@telekom.de>\n"
" - Jörn Hartroth <Joern.Hartroth@computer.org>\n"
" - Matthew Clarke <clamat@van.maves.ca>\n"
" - Linus Nielsen <Linus.Nielsen@haxx.nu>\n"
" - Linus Nielsen <Linus.Nielsen@haxx.se>\n"
" - Felix von Leitner <felix@convergence.de>\n"
" - Dan Zitter <dzitter@zitter.net>\n"
" - Jongki Suwandi <Jongki.Suwandi@eng.sun.com>\n"
@ -695,9 +709,12 @@ puts (
" - Paul Marquis <pmarquis@iname.com>\n"
" - David LeBlanc <dleblanc@qnx.com>\n"
" - Rich Gray at Plus Technologies\n"
" - Luong Dinh Dung <u8luong@lhsystems.hu>\n"
" - Torsten Foertsch <torsten.foertsch@gmx.net>\n"
" - Kristian Köhntopp <kris@koehntopp.de>\n"
"\n"
"WWW\n"
" http://curl.haxx.nu\n"
" http://curl.haxx.se\n"
"\n"
"FTP\n"
" ftp://ftp.sunet.se/pub/www/utilities/curl/\n"
@ -710,7 +727,7 @@ puts (
" You always find news about what's going on as well as the latest versions\n"
" from the curl web pages, located at:\n"
"\n"
" http://curl.haxx.nu\n"
" http://curl.haxx.se\n"
"\n"
"SIMPLE USAGE\n"
"\n"
@ -769,6 +786,8 @@ puts (
" pick a file like:\n"
"\n"
" curl http://name:passwd@machine.domain/full/path/to/file\n"
);
puts(
"\n"
" or specify user and password separately like in\n"
"\n"
@ -798,8 +817,6 @@ puts (
" curl -u user:passwd -x my-proxy:888 http://www.get.this/\n"
"\n"
" Some proxies require special authentication. Specify by using -U as above:\n"
);
puts(
"\n"
" curl -U user:passwd -x my-proxy:888 http://www.get.this/\n"
"\n"
@ -887,7 +904,7 @@ puts (
"\n"
" Store the HTTP headers in a separate file:\n"
"\n"
" curl --dump-header headers.txt curl.haxx.nu\n"
" curl --dump-header headers.txt curl.haxx.se\n"
"\n"
" Note that headers stored in a separate file can be very useful at a later\n"
" time if you want curl to use cookies sent by the server. More about that in\n"
@ -1049,6 +1066,8 @@ puts (
"\n"
" Note that by specifying -b you enable the \"cookie awareness\" and with -L\n"
" you can make curl follow a location: (which often is used in combination\n"
);
puts(
" with cookies). So that if a site sends cookies and a location, you can\n"
" use a non-existing file to trig the cookie awareness like:\n"
"\n"
@ -1069,8 +1088,6 @@ puts (
"\n"
" From left-to-right:\n"
" % - percentage completed of the whole transfer\n"
);
puts(
" Total - total size of the whole expected transfer\n"
" % - percentage completed of the download\n"
" Received - currently downloaded amount of bytes\n"
@ -1245,6 +1262,26 @@ puts (
"\n"
" Otherwise, curl will first attempt to use v3 and then v2.\n"
"\n"
" To use OpenSSL to convert your favourite browser's certificate into a PEM\n"
" formatted one that curl can use, do something like this (assuming netscape,\n"
" but IE is likely to work similarly):\n"
"\n"
" You start with hitting the 'security' menu button in netscape. \n"
"\n"
" Select 'certificates->yours' and then pick a certificate in the list \n"
"\n"
" Press the 'export' button \n"
"\n"
" enter your PIN code for the certs \n"
"\n"
" select a proper place to save it \n"
"\n"
" Run the 'openssl' application to convert the certificate. If you cd to the\n"
" openssl installation, you can do it like:\n"
"\n"
" # ./apps/openssl pkcs12 -certfile [file you saved] -out [PEMfile]\n"
"\n"
"\n"
"RESUMING FILE TRANSFERS\n"
"\n"
" To continue a file transfer where it was previously aborted, curl supports\n"
@ -1302,6 +1339,8 @@ puts (
"\n"
" Aliases for 'm' are 'match' and 'find', and aliases for 'd' are 'define'\n"
" and 'lookup'. For example,\n"
);
puts(
"\n"
" curl dict://dict.org/find:curl\n"
"\n"
@ -1351,8 +1390,6 @@ puts (
"\n"
"\n"
" The usage of the -x/--proxy flag overrides the environment variables.\n"
);
puts(
"\n"
"NETRC\n"
"\n"
@ -1369,7 +1406,7 @@ puts (
"\n"
" A very simple .netrc file could look something like:\n"
"\n"
" machine curl.haxx.nu login iamdaniel password mysecret\n"
" machine curl.haxx.se login iamdaniel password mysecret\n"
"\n"
"CUSTOM OUTPUT\n"
"\n"

Просмотреть файл

@ -1,3 +1,3 @@
#define CURL_NAME "curl"
#define CURL_VERSION "7.0.1beta"
#define CURL_VERSION "7.0.11test"
#define CURL_ID CURL_NAME " " CURL_VERSION " (" OS ") "