diff --git a/libs/curl/Makefile.am b/libs/curl/Makefile.am index 0674f696c5..170a980803 100644 --- a/libs/curl/Makefile.am +++ b/libs/curl/Makefile.am @@ -29,13 +29,12 @@ EXTRA_DIST = CHANGES COPYING maketgz reconf Makefile.dist curl-config.in \ bin_SCRIPTS = curl-config SUBDIRS = lib src -DIST_SUBDIRS = $(SUBDIRS) tests include packages docs +DIST_SUBDIRS = $(SUBDIRS) include packages pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libcurl.pc dist-hook: - rm -rf $(top_builddir)/tests/log find $(distdir) -name "*.dist" -exec rm {} \; (distit=`find $(srcdir) -name "*.dist"`; \ for file in $$distit; do \ @@ -43,88 +42,11 @@ dist-hook: cp $$file $(distdir)$$strip; \ done) -html: - cd docs; make html - -pdf: - cd docs; make pdf - -check: test - -if CROSSCOMPILING -test-full: test -test-torture: test - -test: - @echo "NOTICE: we can't run the tests when cross-compiling!" - -else - -test: - @(cd tests; $(MAKE) all quiet-test) - -test-full: - @(cd tests; $(MAKE) all full-test) - -test-torture: - @(cd tests; $(MAKE) all torture-test) - -endif - -# -# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros -# must contain the following line: -# %_topdir /home/loic/local/rpm -# and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc. -# -# cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS -# -# If additional configure flags are needed to build the package, add the -# following in ~/.rpmmacros -# %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS} -# and run make rpm in the following way: -# AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm -# - -rpms: - $(MAKE) RPMDIST=curl rpm - $(MAKE) RPMDIST=curl-ssl rpm - -rpm: - RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \ - cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \ - cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \ - rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \ - mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \ - mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm . - -# -# Build a Solaris pkkgadd format file -# run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format -# file (which ends up back in this directory). -# The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do -# pkgadd -d ./HAXXcurl-* -# - -# gak - libtool requires an absoulte directory, hence the pwd below... -pkgadd: - umask 022 ; \ - make install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \ - cat COPYING > $(srcdir)/packages/Solaris/copyright ; \ - cd $(srcdir)/packages/Solaris && $(MAKE) package - -# -# Build a cygwin binary tarball installation file -# resulting .tar.bz2 file will end up at packages/Win32/cygwin -cygwinbin: - $(MAKE) -C packages/Win32/cygwin cygwinbin - # We extend the standard install with a custom hook: install-data-hook: cd include && $(MAKE) install - cd docs && $(MAKE) install # We extend the standard uninstall with a custom hook: uninstall-hook: cd include && $(MAKE) uninstall - cd docs && $(MAKE) uninstall + diff --git a/libs/curl/configure.ac b/libs/curl/configure.ac index f504eec0e0..27976f2514 100644 --- a/libs/curl/configure.ac +++ b/libs/curl/configure.ac @@ -34,7 +34,7 @@ terms of the curl license; see COPYING for more details]) AC_CONFIG_SRCDIR([lib/urldata.h]) AM_CONFIG_HEADER(lib/config.h src/config.h) -AM_MAINTAINER_MODE +#AM_MAINTAINER_MODE dnl SED is needed by some of the tools AC_PATH_PROG( SED, sed, sed-was-not-found-by-configure, @@ -2038,17 +2038,10 @@ fi AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes) AC_CONFIG_FILES([Makefile \ - docs/Makefile \ - docs/examples/Makefile \ - docs/libcurl/Makefile \ include/Makefile \ include/curl/Makefile \ src/Makefile \ lib/Makefile \ - tests/Makefile \ - tests/data/Makefile \ - tests/server/Makefile \ - tests/libtest/Makefile \ packages/Makefile \ packages/Win32/Makefile \ packages/Win32/cygwin/Makefile \ diff --git a/libs/curl/docs/BINDINGS b/libs/curl/docs/BINDINGS deleted file mode 100644 index 486e67590b..0000000000 --- a/libs/curl/docs/BINDINGS +++ /dev/null @@ -1,190 +0,0 @@ - _ _ ____ _ - ___| | | | _ \| | - / __| | | | |_) | | - | (__| |_| | _ <| |___ - \___|\___/|_| \_\_____| - - libcurl bindings - -Creative people have written bindings or interfaces for various environments -and programming languages. Using one of these allows you to take advantage of -curl powers from within your favourite language or system. - -This is a list of all known interfaces as of this writing. - -The bindings listed below are not part of the curl/libcurl distribution -archives, but must be downloaded and installed separately. - -Ada95 - - Writtten by Andreas Almroth - http://www.almroth.com/adacurl/index.html - -Basic - - ScriptBasic bindings to libcurl. Writtten by Peter Verhas - http://scriptbasic.com/ - -C - libcurl is a C library in itself! - http://curl.haxx.se/libcurl/ - -C++ - - Written by Jean-Philippe Barrette-LaPierre - http://rrette.com/curlpp.html - -Ch - - Written by Stephen Nestinger and Jonathan Rogado - http://chcurl.sourceforge.net/ - -Cocoa - - Written by Dan Wood - http://curlhandle.sourceforge.net/ - -D - - Written by Kenneth Bogert - http://curl.haxx.se/libcurl/d/ - -Dylan - - Written by Chris Double - http://dylanlibs.sourceforge.net/ - -Euphoria - - Written by Ray Smith - http://rays-web.com/eulibcurl.htm - -Ferite - Written by Paul Querna - http://www.ferite.org/ - -Gambas - http://gambas.sourceforge.net - -glib/GTK+ - Written by Richard Atterer - http://atterer.net/glibcurl/ - -Java - - Maintained by Vic Hanson - http://curl.haxx.se/libcurl/java/ - -Lisp - - Written by Liam Healy - http://common-lisp.net/project/cl-curl/ - -Lua - - LuaCURL Written by Alexander Marinov - http://luacurl.luaforge.net/ - -Mono - - Written by Jeffrey Phillips - http://forge.novell.com/modules/xfmod/project/?libcurl-mono - -.NET - - libcurl-net Written by Jeffrey Phillips - http://sourceforge.net/projects/libcurl-net/ - -Object-Pascal - - Free Pascal, Delphi and Kylix binding written by Christophe Espern. - http://www.tekool.com/opcurl - -O'Caml - - Written by Lars Nilsson - http://sourceforge.net/projects/ocurl/ - -Pascal - - Free Pascal, Delphi and Kylix binding written by Jeffrey Pohlmeyer. - http://houston.quik.com/jkp/curlpas/ - -Perl - - Maintained by Cris Bailiff - http://curl.haxx.se/libcurl/perl/ - -PHP - - Written by Sterling Hughes - http://curl.haxx.se/libcurl/php/ - -PostgreSQL - - Written by Gian Paolo Ciceri - http://gborg.postgresql.org/project/pgcurl/projdisplay.php - -Python - - PycURL is written by Kjetil Jacobsen - http://pycurl.sourceforge.net/ - -R - - RCurl is written by Duncan Temple Lang - http://www.omegahat.org/RCurl/ - -Rexx - - Written Mark Hessling - http://rexxcurl.sourceforge.net/ - -Ruby - - Written by Hirotaka Matsuyuki - http://www.d1.dion.ne.jp/~matuyuki/ruby.html - -Scheme - - Bigloo binding written by Kirill Lisovsky - http://curl.haxx.se/libcurl/scheme/ - -S-Lang - - S-Lang binding written by John E Davis - http://www.jedsoft.org/slang/modules/curl.html - -Smalltalk - - Smalltalk binding written by Danil Osipchuk - http://www.squeaksource.com/CurlPlugin/ - -SPL - - SPL binding written by Clifford Wolf - http://www.clifford.at/spl/ - -Tcl - - Tclcurl is written by Andrés García - http://personal1.iddeo.es/andresgarci/tclcurl/english/docs.html - -Visual Basic - - libcurl-vb is written by Jeffrey Phillips - http://sourceforge.net/projects/libcurl-vb/ - -Q - The libcurl module is part of the default install - http://q-lang.sourceforge.net/ - -wxWidgets - - Written by Casey O'Donnell - http://homepage.mac.com/codonnell/wxcurldav/ - -XBLite - - Written by David Szafranski - http://perso.wanadoo.fr/xblite/libraries.html diff --git a/libs/curl/docs/BUGS b/libs/curl/docs/BUGS deleted file mode 100644 index d1448a0d21..0000000000 --- a/libs/curl/docs/BUGS +++ /dev/null @@ -1,81 +0,0 @@ -$Id: BUGS,v 1.7 2003/08/18 15:24:46 bagder Exp $ - _ _ ____ _ - ___| | | | _ \| | - / __| | | | |_) | | - | (__| |_| | _ <| |___ - \___|\___/|_| \_\_____| - -BUGS - - Curl and libcurl have grown substantially since the beginning. At the time - of writing (August 2003), there are about 40000 lines of source code, and by - the time you read this it has probably grown even more. - - Of course there are lots of bugs left. And lots of misfeatures. - - To help us make curl the stable and solid product we want it to be, we need - bug reports and bug fixes. - -WHERE TO REPORT - - If you can't fix a bug yourself and submit a fix for it, try to report an as - detailed report as possible to a curl mailing list to allow one of us to - have a go at a solution. You should also post your bug/problem at curl's bug - tracking system over at - - http://sourceforge.net/bugs/?group_id=976 - - (but please read the sections below first before doing that) - - If you feel you need to ask around first, find a suitable mailing list and - post there. The lists are available on http://curl.haxx.se/mail/ - -WHAT TO REPORT - - When reporting a bug, you should include all information that will help us - understand what's wrong, what you expected to happen and how to repeat the - bad behavior. You therefore need to tell us: - - - your operating system's name and version number (uname -a under a unix - is fine) - - what version of curl you're using (curl -V is fine) - - what URL you were working with (if possible), at least which protocol - - and anything and everything else you think matters. Tell us what you - expected to happen, tell use what did happen, tell us how you could make it - work another way. Dig around, try out, test. Then include all the tiny bits - and pieces in your report. You will benefit from this yourself, as it will - enable us to help you quicker and more accurately. - - Since curl deals with networks, it often helps us if you include a protocol - debug dump with your bug report. The output you get by using the -v or - --trace options. - - If curl crashed, causing a core dump (in unix), there is hardly any use to - send that huge file to anyone of us. Unless we have an exact same system - setup as you, we can't do much with it. Instead we ask you to get a stack - trace and send that (much smaller) output to us instead! - - The address and how to subscribe to the mailing lists are detailed in the - MANUAL file. - -HOW TO GET A STACK TRACE - - First, you must make sure that you compile all sources with -g and that you - don't 'strip' the final executable. Try to avoid optimizing the code as - well, remove -O, -O2 etc from the compiler options. - - Run the program until it cores. - - Run your debugger on the core file, like ' curl core'. - should be replaced with the name of your debugger, in most cases that will - be 'gdb', but 'dbx' and others also occur. - - When the debugger has finished loading the core file and presents you a - prompt, enter 'where' (without the quotes) and press return. - - The list that is presented is the stack trace. If everything worked, it is - supposed to contain the chain of functions that were called when curl - crashed. Include the stack trace with your detailed bug report. It'll help a - lot. - diff --git a/libs/curl/docs/CONTRIBUTE b/libs/curl/docs/CONTRIBUTE deleted file mode 100644 index a14d1aa828..0000000000 --- a/libs/curl/docs/CONTRIBUTE +++ /dev/null @@ -1,172 +0,0 @@ - _ _ ____ _ - ___| | | | _ \| | - / __| | | | |_) | | - | (__| |_| | _ <| |___ - \___|\___/|_| \_\_____| - - When Contributing Source Code - - This document is intended to offer guidelines that can be useful to keep in - mind when you decide to contribute to the project. This concerns new features - as well as corrections to existing flaws or bugs. - -Join the Community - - Skip over to http://curl.haxx.se/mail/ and join the appropriate mailing - list(s). Read up on details before you post questions. Read this file before - you start sending patches! We prefer patches and discussions being held on - the mailing list(s), not sent to individuals. - -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 unless stated and agreed - otherwise. - - 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 enforce any changes to - the rest of the package and they make sense. Such "separate parts" can not be - GPL licensed (as we don't want copyleft to affect users of libcurl) but they - must use "GPL compatible" licenses (as we want to allow users to use libcurl - properly in GPL licensed environments). - - When changing existing source code, you do not alter the copyright of the - original file(s). The copyright will still be owned by the original - creator(s) or those who have been assigned copyright by the original - author(s). - - By submitting a patch to the curl project, you are assumed to have the right - to the code and to be allowed by your employer or whatever to hand over that - patch/code to us. We will credit you for your changes as far as possible, to - give credit but also to keep a trace back to who made what changes. Please - always provide us with your full real name when contributing! - -What To Read - - Source code, the man pages, the INTERNALS document, the TODO, the most recent - CHANGES. Just lurking on the libcurl mailing list is gonna give you a lot of - insights on what's going on right now. Asking there is a good idea too. - -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, - understandable and be named according to what they're used for. File-local - functions should be made static. We like lower case names. - - See the INTERNALS document on how we name non-exported library-global - symbols. - -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. We don't ask you to like it, we - just ask you to follow the tradition! ;-) This mainly means: 2-level indents, - using spaces only (no tabs) and having the opening brace ({) on the same line - as the if() or while(). - -Commenting - - Comment your source code extensively using C comments (/* comment */), DO NOT - use C++ comments (// this style). Commented code is quality code and enables - future modifications much more. Uncommented code risk having to be completely - replaced when someone wants to extend things, since other persons' source - code can get quite hard to read. - -General Style - - Keep your functions small. If they're small you avoid a lot of mistakes and - you don't accidentally mix up variables etc. - -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 - 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. - -Platform Dependent Code - - Use #ifdef HAVE_FEATURE to do conditional code. We avoid checking for - particular operating systems or hardware in the #ifdef lines. The - HAVE_FEATURE shall be generated by the configure script for unix-like systems - and they are hard-coded in the config-[system].h files for the others. - -Separate Patches - - It is annoying when you get a huge patch from someone that is said to fix 511 - odd problems, but discussions and opinions don't agree with 510 of them - or - 509 of them were already fixed in a different way. Then the patcher needs to - extract the single interesting patch from somewhere within the huge pile of - source, and that gives a lot of extra work. Preferably, all fixes that - correct different problems should be in their own patch with an attached - description exactly what they correct so that all patches can be selectively - applied by the maintainer or other interested parties. - -Patch Against Recent Sources - - Please try to get the latest available sources to make your patches - against. It makes the life of the developers so much easier. The very best is - if you get the most up-to-date sources from the CVS repository, but the - latest release archive is quite OK as well! - -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. - - The documentation is always made in man pages (nroff formatted) or plain - ASCII files. All HTML files on the web site and in the release archives are - generated from the nroff/ASCII versions. - -Write Access to CVS Repository - - If you are a frequent contributor, or have another good reason, you can of - course get write access to the CVS repository and then you'll be able to - check-in all your changes straight into the CVS tree instead of sending all - changes by mail as patches. Just ask if this is what you'd want. You will be - required to have posted a few quality patches first, before you can be - granted write access. - -Test Cases - - Since the introduction of the test suite, we can quickly verify that the main - features are working as they're supposed to. To maintain this situation and - improve it, all new features and functions that are added need to be tested - in the test suite. Every feature that is added should get at least one valid - test case that verifies that it works as documented. If every submitter also - posts a few test cases, it won't end up as a heavy burden on a single person! - -How To Make a Patch - - Keep a copy of the unmodified curl sources. Make your changes in a separate - source tree. When you think you have something that you want to offer the - curl community, use GNU diff to generate patches. - - If you have modified a single file, try something like: - - diff -u unmodified-file.c my-changed-one.c > my-fixes.diff - - If you have modified several files, possibly in different directories, you - can use diff recursively: - - diff -ur curl-original-dir curl-modified-sources-dir > my-fixes.diff - - The GNU diff and GNU patch tools exist for virtually all platforms, including - all kinds of Unixes and Windows: - - For unix-like operating systems: - - http://www.fsf.org/software/patch/patch.html - http://www.gnu.org/directory/diffutils.html - - For Windows: - - http://gnuwin32.sourceforge.net/packages/patch.htm - http://gnuwin32.sourceforge.net/packages/diffutils.htm diff --git a/libs/curl/docs/DISTRO-DILEMMA b/libs/curl/docs/DISTRO-DILEMMA deleted file mode 100644 index b0d4fec0be..0000000000 --- a/libs/curl/docs/DISTRO-DILEMMA +++ /dev/null @@ -1,211 +0,0 @@ - Date: May 15, 2006 - Author: Daniel Stenberg - URL: http://curl.haxx.se/legal/distro-dilemma.html - -Condition - - This document is written to describe the situation as it is right - now. libcurl 7.15.3 is currently the latest version available. Things may of - course change in the future. - - This document reflects my view and understanding of these things. Please tell - me where and how you think I'm wrong, and I'll try to correct my mistakes. - -Background - - The Free Software Foundation has deemed the Original BSD license[1] to be - "incompatible"[2] with GPL[3]. I'd rather say it is the other way around, but - the point is the same: if you distribute a binary version of a GPL program, - it MUST NOT be linked with any Original BSD-licensed parts or libraries. - Doing so will violate the GPL license. For a long time, very many GPL - licensed programs have avoided this license mess by adding an exception[8] to - their license. And many others have just closed their eyes for this problem. - - libcurl is MIT-style[4] licensed - how on earth did this dilemma fall onto - our plates? - - libcurl is only a little library. libcurl can be built to use OpenSSL for its - SSL/TLS capabilities. OpenSSL is basically Original BSD licensed[5]. - - If libcurl built to use OpenSSL is used by a GPL-licensed application and you - decide to distribute a binary version of it (Linux distros - for example - - tend to), you have a clash. GPL vs Original BSD. - - This dilemma is not libcurl-specific nor is it specific to any particular - Linux distro. (This article mentions and refers to Debian several times, but - only because Debian seems to be the only Linux distro to have faced this - issue yet since no other distro is shipping libcurl built with two SSL - libraries.) - -Part of the Operating System - - This would not be a problem if the used lib would be considered part of the - underlying operating system, as then the GPL license has an exception - clause[6] that allows applications to use such libs without having to be - allowed to distribute it or its sources. Possibly some distros will claim - that OpenSSL is part of their operating system. - - Debian does however not take this stance and has officially(?) claimed that - OpenSSL is not a required part of the Debian operating system - -GnuTLS - - With the release of libcurl 7.14.0 (May 2005), libcurl can now get built to - use GnuTLS instead of OpenSSL. GnuTLS is an LGPL[7] licensed library that - offers a matching set of features as OpenSSL does. Now, you can build and - distribute an TLS/SSL capable libcurl without including any Original BSD - licensed code. - - I believe Debian is the first distro to provide libcurl/GnutTLS packages. - -GnuTLS vs OpenSSL - - While these two libraries offer similar features, they are not equal. Both - libraries have features the other one lacks. libcurl does not (yet) offer a - standardized stable ABI if you decide to switch from using libcurl-openssl to - libcurl-gnutls or vice versa. The GnuTLS support is very recent in libcurl - and it has not been tested nor used very extensively, while the OpenSSL - equivalent code has been used and thus matured for more than seven (7) years. - - GnuTLS - - LGPL licensened - - supports SRP - - lacks SSLv2 support - - lacks MD2 support (used by at least some CA certs) - - lacks the crypto functions libcurl uses for NTLM - - OpenSSL - - Original BSD licensened - - lacks SRP - - supports SSLv2 - - older and more widely used - - provides crypto functions libcurl uses for NTLM - - libcurl can do non-blocking connects with it in 7.15.4 and later - -The Better License, Original BSD or LGPL? - - It isn't obvious or without debate to any objective interested party that - either of these licenses are the "better" or even the "preferred" one in a - generic situation. - - Instead, I think we should accept the fact that the SSL/TLS libraries and - their different licenses will fit different applications and their authors - differently depending on the applications' licenses and their general usage - pattern (considering how LGPL libraries for example can be burdensome for - embedded systems usage). - - In Debian land, there seems to be a common opinion that LGPL is "maximally - compatible" with apps while Original BSD is not. Like this: - - http://lists.debian.org/debian-devel/2005/09/msg01417.html - -More SSL Libraries - - In libcurl, there's no stopping us here. There are at least a few more Open - Source/Free SSL/TLS libraries and we would very much like to support them as - well, to offer application authors an even wider scope of choice. - -Application Angle of this Problem - - libcurl is built to use one SSL/TLS library. It uses a single fixed name (by - default) on the built/created lib file, and applications are built/linked to - use that single lib. Replacing one libcurl instance with another one that - uses the other SSL/TLS library might break one or more applications (due to - ABI differences and/or different feature set). You want your application to - use the libcurl it was built for. - -Project cURL Angle of this Problem - - We distribute libcurl and everyone may build libcurl with either library at - their choice. This problem is not directly a problem of ours. It merely - affects users - GPL application authors only - of our lib as it comes - included and delivered on some distros. - - libcurl has different ABI when built with different SSL/TLS libraries due to - these reasons: - - 1. No one has worked on fixing this. The mutex/lock callbacks should be set - with a generic libcurl function that should use the proper underlying - functions. - - 2. The CURLOPT_SSL_CTX_FUNCTION option is not possible to "emulate" on GnuTLS - but simply requires OpenSSL. - - 3. There might be some other subtle differences just because nobody has yet - tried to make a fixed ABI like this. - -Distro Angle of this Problem - - To my knowledge there is only one distro that ships libcurl built with either - one of the SSL libs supported. - - Debian Linux is now (since mid September 2005) providing two different - libcurl packages, one for libcurl built with OpenSSL and one built with - GnuTLS. They use different .so names and can this both be installed in a - single system simultaneously. This has been said to be a transitional system - not desired to keep in the long run. - -Fixing the Only Problem - - The only problem is thus for distributions that want to offer libcurl - versions built with more than one SSL/TLS library. - - Since multiple libcurl binaries using different names are ruled out, we need - to come up with a way to have one single libcurl that someone uses different - underlying libraries. The best(?) approach currently suggested involves this: - - A new intermediate library (named lib2 so far in the discussions) with the - single purpose of providing libcurl with SSL/TLS capabilities. It would have - a unified API and ABI no matter what underlying library it would use. - - There would be one lib2 binary provided for each supported SSL/TLS library. - For example: lib2-openssl, lib2-gnutls, lib2-yassl, lib2-matrixssl and - lib2-nossl. Yes, take note of the last one that provides the lib2 ABI but - that lacks the actual powers. - - When libcurl is built and linked, it will be linked against a lib2 with the - set ABI. - - When you link an app against libcurl, it would also need to provide one of - the (many) lib2 libs to decide what approach that fits the app. An app that - doesn't want SSL at all would still need to link with the lib2-nossl lib. - - GPL apps can pick the lib2-gnutls, others may pick the lib2-openssl. - - This concept works equally well both for shared and static libraries. - - A positive side effect of this approach could be a more generic "de facto" - standard API for SSL/TLS libraries. - -When Will This Happen - - This is not a problem in curl, it doesn't solve any actual technical problems - in our project. Don't hold your breath for this to happen very soon (if at - all) unless you step forward and contribute. - - The suggestion that is outlined above is still only a suggestion. Feel free - to bring a better idea! - - Also, to keep in mind: I don't want this new concept to have too much of an - impact on the existing code. Preferably it should be possible to build the - code like today (without the use of lib2), should you decide to ignore the - problems outlined in this document. - - Work on this was suggested by Richard Atterer: - - http://curl.haxx.se/mail/lib-2005-09/0066.html - -Footnotes - - [1] = http://www.xfree86.org/3.3.6/COPYRIGHT2.html#6 - [2] = http://www.fsf.org/licensing/essays/bsd.html - [3] = http://www.fsf.org/licensing/licenses/gpl.html - [4] = http://curl.haxx.se/docs/copyright.html - [5] = http://www.openssl.org/source/license.html - [6] = http://www.fsf.org/licensing/licenses/gpl.html end of section 3 - [7] = http://www.fsf.org/licensing/licenses/lgpl.html - [8] = http://en.wikipedia.org/wiki/OpenSSL_exception - -Feedback/Updates provided by - - Eric Cooper diff --git a/libs/curl/docs/FAQ b/libs/curl/docs/FAQ deleted file mode 100644 index e970e657c0..0000000000 --- a/libs/curl/docs/FAQ +++ /dev/null @@ -1,1113 +0,0 @@ -Updated: November 2, 2005 (http://curl.haxx.se/docs/faq.html) - _ _ ____ _ - ___| | | | _ \| | - / __| | | | |_) | | - | (__| |_| | _ <| |___ - \___|\___/|_| \_\_____| - -FAQ - - 1. Philosophy - 1.1 What is cURL? - 1.2 What is libcurl? - 1.3 What is curl not? - 1.4 When will you make curl do XXXX ? - 1.5 Who makes curl? - 1.6 What do you get for making curl? - 1.7 What about CURL from curl.com? - 1.8 I have a problem who do I mail? - 1.9 Where do I buy commercial support for curl? - 1.10 How many are using curl? - - 2. Install Related Problems - 2.1 configure doesn't find OpenSSL even when it is installed - 2.1.1 native linker doesn't find OpenSSL - 2.1.2 only the libssl lib is missing - 2.2 Does curl work/build with other SSL libraries? - 2.3 Where can I find a copy of LIBEAY32.DLL? - 2.4 Does curl support Socks (RFC 1928) ? - - 3. Usage Problems - 3.1 curl: (1) SSL is disabled, https: not supported - 3.2 How do I tell curl to resume a transfer? - 3.3 Why doesn't my posting using -F work? - 3.4 How do I tell curl to run custom FTP commands? - 3.5 How can I disable the Pragma: nocache header? - 3.6 Does curl support ASP, XML, XHTML or HTML version Y? - 3.7 Can I use curl to delete/rename a file through FTP? - 3.8 How do I tell curl to follow HTTP redirects? - 3.9 How do I use curl in my favorite programming language? - 3.10 What about SOAP, WebDAV, XML-RPC or similar protocols over HTTP? - 3.11 How do I POST with a different Content-Type? - 3.12 Why do FTP specific features over HTTP proxy fail? - 3.13 Why does my single/double quotes fail? - 3.14 Does curl support javascript or pac (automated proxy config)? - 3.15 Can I do recursive fetches with curl? - 3.16 What certificates do I need when I use SSL? - 3.17 How do I list the root dir of an FTP server? - 3.18 Can I use curl to send a POST/PUT and not wait for a response? - - 4. Running Problems - 4.1 Problems connecting to SSL servers. - 4.2 Why do I get problems when I use & or % in the URL? - 4.3 How can I use {, }, [ or ] to specify multiple URLs? - 4.4 Why do I get downloaded data even though the web page doesn't exist? - 4.5 Why do I get return code XXX from a HTTP server? - 4.5.1 "400 Bad Request" - 4.5.2 "401 Unauthorized" - 4.5.3 "403 Forbidden" - 4.5.4 "404 Not Found" - 4.5.5 "405 Method Not Allowed" - 4.5.6 "301 Moved Permanently" - 4.6 Can you tell me what error code 142 means? - 4.7 How do I keep user names and passwords secret in Curl command lines? - 4.8 I found a bug! - 4.9 Curl can't authenticate to the server that requires NTLM? - 4.10 My HTTP request using HEAD, PUT or DELETE doesn't work! - 4.11 Why does my HTTP range requests return the full document? - 4.12 Why do I get "certificate verify failed" ? - 4.13 Why is curl -R on Windows one hour off? - 4.14 Redirects work in browser but not with curl! - - 5. libcurl Issues - 5.1 Is libcurl thread-safe? - 5.2 How can I receive all data into a large memory chunk? - 5.3 How do I fetch multiple files with libcurl? - 5.4 Does libcurl do Winsock initing on win32 systems? - 5.5 Does CURLOPT_WRITEDATA and CURLOPT_READDATA work on win32 ? - 5.6 What about Keep-Alive or persistent connections? - 5.7 Link errors when building libcurl on Windows! - 5.8 libcurl.so.3: open failed: No such file or directory - 5.9 How does libcurl resolve host names? - 5.10 How do I prevent libcurl from writing the response to stdout? - 5.11 How do I make libcurl not receive the whole HTTP response? - 5.12 Can I make libcurl fake or hide my real IP address? - - 6. License Issues - 6.1 I have a GPL program, can I use the libcurl library? - 6.2 I have a closed-source program, can I use the libcurl library? - 6.3 I have a BSD licensed program, can I use the libcurl library? - 6.4 I have a program that uses LGPL libraries, can I use libcurl? - 6.5 Can I modify curl/libcurl for my program and keep the changes secret? - 6.6 Can you please change the curl/libcurl license to XXXX? - 6.7 What are my obligations when using libcurl in my commerical apps? - - 7. PHP/CURL Issues - 7.1 What is PHP/CURL? - 7.2 Who write PHP/CURL? - 7.3 Can I perform multiple requests using the same handle? - -============================================================================== - -1. Philosophy - - 1.1 What is cURL? - - cURL is the name of the project. The name is a play on 'Client for URLs', - originally with URL spelled in uppercase to make it obvious it deals with - URLs. The fact it can also be pronounced 'see URL' also helped, it works as - an abbreviation for "Client URL Request Library" or why not the recursive - version: "Curl URL Request Library". - - The cURL project produces two products: - - libcurl - - A free and easy-to-use client-side URL transfer library, supporting FTP, - FTPS, HTTP, HTTPS, TELNET, DICT, FILE and LDAP. libcurl supports - HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, kerberos, HTTP - form based upload, proxies, cookies, user+password authentication, file - transfer resume, http proxy tunneling and more! - - libcurl is highly portable, it builds and works identically on numerous - platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HPUX, - IRIX, AIX, Tru64, Linux, UnixWare, HURD, Windows, Amiga, OS/2, BeOs, Mac - OS X, Ultrix, QNX, OpenVMS, RISC OS, Novell NetWare, DOS and more... - - libcurl is free, thread-safe, IPv6 compatible, feature rich, well - supported and fast. - - curl - - A command line tool for getting or sending files using URL syntax. - - Since curl uses libcurl, it supports a range of common Internet protocols, - currently including HTTP, HTTPS, FTP, FTPS, LDAP, DICT, TELNET and FILE. - - We pronounce curl and cURL with an initial k sound: [kurl]. - - There are numerous sub-projects and related projects that also use the word - curl in the project names in various combinations, but you should take - notice that this FAQ is directed at the command-line tool named curl (and - libcurl the library), and may therefore not be valid for other curl-related - projects. (There is however a small section for the PHP/CURL in this FAQ.) - - 1.2 What is libcurl? - - libcurl is a reliable and portable library which provides you with an easy - interface to a range of common Internet protocols. - - You can use libcurl for free in your application, be it open source, - commercial or closed-source. - - libcurl is most probably the most portable, most powerful and most often - used C-based multi-platform file transfer library on this planet - be it - open source or commercial. - - 1.3 What is curl not? - - Curl is *not* a wget clone. That is a common misconception. Never, during - curl's development, have we intended curl to replace wget or compete on its - market. Curl is targeted at single-shot file transfers. - - Curl is not a web site mirroring program. If you want to use curl to mirror - something: fine, go ahead and write a script that wraps around curl to make - it reality (like curlmirror.pl does). - - Curl is not an FTP site mirroring program. Sure, get and send FTP with curl - but if you want systematic and sequential behavior you should write a - script (or write a new program that interfaces libcurl) and do it. - - Curl is not a PHP tool, even though it works perfectly well when used from - or with PHP (when using the PHP/CURL module). - - Curl is not a single-OS program. Curl exists, compiles, builds and runs - under a wide range of operating systems, including all modern Unixes (and a - bunch of older ones too), Windows, Amiga, BeOS, OS/2, OS X, QNX etc. - - 1.4 When will you make curl do XXXX ? - - We love suggestions of what to change in order to make curl and libcurl - better. We do however believe in a few rules when it comes to the future of - curl: - - * Curl -- the command line tool -- is to remain a non-graphical command line - tool. If you want GUIs or fancy scripting capabilities, you should look - for another tool that uses libcurl. - - * We do not add things to curl that other small and available tools already - do very fine at the side. Curl's output is fine to pipe into another - program or redirect to another file for the next program to interpret. - - * We focus on protocol related issues and improvements. If you wanna do more - magic with the supported protocols than curl currently does, chances are - big we will agree. If you wanna add more protocols, we may very well - agree. - - * If you want someone else to make all the work while you wait for us to - implement it for you, that is not a very friendly attitude. We spend a - considerable time already on maintaining and developing curl. In order to - get more out of us, you should consider trading in some of your time and - efforts in return. - - * If you write the code, chances are bigger that it will get into curl - faster. - - 1.5 Who makes curl? - - curl and libcurl are not made by any single individual. Daniel Stenberg is - project leader and main developer, but other persons' submissions are - important and crucial. Anyone can contribute and post their changes and - improvements and have them inserted in the main sources (of course on the - condition that developers agree on that the fixes are good). - - The full list of the more than 450 contributors is found in the docs/THANKS - file. - - curl is developed by a community, with Daniel at the wheel. - - 1.6 What do you get for making curl? - - Project cURL is entirely free and open. No person gets paid for developing - (lib)curl. We do this voluntarily on our spare time. - - We get some help from companies. Contactor Data hosts the curl web site, - Haxx owns the curl web site's domain and sourceforge.net hosts project - services we take advantage from, like the bug tracker. Also, some companies - have sponsored certain parts of the development in the past and I hope some - will continue to do so in the future. - - If you want to support our project, consider a donation or a banner-program - or even better: by helping us coding, documenting, testing etc. - - 1.7 What about CURL from curl.com? - - During the summer 2001, curl.com was busy advertising their client-side - programming language for the web, named CURL. - - We are in no way associated with curl.com or their CURL programming - language. - - Our project name curl has been in effective use since 1998. We were not the - first computer related project to use the name "curl" and do not claim any - first-hand rights to the name. - - We recognize that we will be living in parallel with curl.com and wish them - every success. - - 1.8 I have a problem who do I mail? - - Please do not mail any single individual unless you really need to. Keep - curl-related questions on a suitable mailing list. All available mailing - lists are listed in the MANUAL document and online at - http://curl.haxx.se/mail/ - - Keeping curl-related questions and discussions on mailing lists allows - others to join in and help, to share their ideas, contribute their - suggestions and spread their wisdom. Keeping discussions on public mailing - lists also allows for others to learn from this (both current and future - users thanks to the web based archives of the mailing lists), thus saving us - from having to repeat ourselves even more. Thanks for respecting this. - - If you have found or simply suspect a security problem in curl or libcurl, - mail curl-security at haxx.se (closed list of receivers, mails are not - disclosed) and tell. Then we can produce a fix in a timely manner before the - flaw is announced to the world, thus lessen the impact the problem will have - on existing users. - - 1.9 Where do I buy commercial support for curl? - - curl is fully open source. It means you can hire any skilled engineer to fix - your curl-related problems. - - We list available alternatives on the curl web site: - http://curl.haxx.se/support.html - - 1.10 How many are using curl? - - It is impossible to tell. - - We don't know how many users that knowingly have installed and use curl. - - We don't know how many users that use curl without knowing that they are in - fact using it. - - We don't know how many users that downloaded or installed curl and then - never use it. - - Some facts to use as input to the math: - - curl packages have been downloaded from the curl.haxx.se site well over a - million times. curl is installed by default with most Linux - distributions. curl is installed by default with Mac OS X. curl and libcurl - as used by numerous applications that include libcurl binaries in their - distribution packages (like Adobe Acrobat Reader and Google Earth). - - More than 40 known named companies use curl in commercial environments and - products. More than 100 known named open source projects depend on - (lib)curl. - - In a poll on the curl web site mid-2005, more than 50% of the 300+ answers - estimated a user base of one million users or more. - - In March 2005, the "Linux Counter project" estimated a total Linux user base - of some 29 millions, while Netcraft detected some 4 million "active" Linux - based web servers. A guess is that a fair amount of these Linux - installations have curl installed. - - http://curl.haxx.se/docs/companies.html - http://curl.haxx.se/docs/programs.html - http://curl.haxx.se/libcurl/using/apps.html - http://counter.li.org/estimates.php - http://news.netcraft.com/archives/2005/03/14/fedora_makes_rapid_progress.html - - -2. Install Related Problems - - 2.1 configure doesn't find OpenSSL even when it is installed - - This may be because of several reasons. - - 2.1.1 native linker doesn't find openssl - - Affected platforms: - Solaris (native cc compiler) - HPUX (native cc compiler) - SGI IRIX (native cc compiler) - SCO UNIX (native cc compiler) - - When configuring curl, I specify --with-ssl. OpenSSL is installed in - /usr/local/ssl Configure reports SSL in /usr/local/ssl, but fails to find - CRYPTO_lock in -lcrypto - - Cause: The cc for this test places the -L/usr/local/ssl/lib AFTER - -lcrypto, so ld can't find the library. This is due to a bug in the GNU - autoconf tool. - - Workaround: Specifying "LDFLAGS=-L/usr/local/ssl/lib" in front of - ./configure places the -L/usr/local/ssl/lib early enough in the command - line to make things work - - Solution submitted by: Bob Allison - - 2.1.2 only the libssl lib is missing - - If all include files and the libcrypto lib is present, with only the - libssl being missing according to configure, this is mostly likely because - a few functions are left out from the libssl. - - If the function names missing include RSA or RSAREF you can be certain - that this is because libssl requires the RSA and RSAREF libs to build. - - See the INSTALL file section that explains how to add those libs to - configure. Make sure that you remove the config.cache file before you - rerun configure with the new flags. - - 2.2 Does curl work/build with other SSL libraries? - - Curl has been written to use OpenSSL or GnuTLS, although there should not be - many problems using a different library. If anyone does "port" curl to use a - different SSL library, we are of course very interested in getting the - patch! - - 2.3 Where can I find a copy of LIBEAY32.DLL? - - 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 site to find - accurate and up-to-date pointers to recent OpenSSL DLLs and other binary - packages. - - 2.4 Does curl support Socks (RFC 1928) ? - - Yes, SOCKS5 is supported. - - -3. Usage problems - - 3.1 curl: (1) SSL is disabled, https: not supported - - If you get this output when trying to get anything from a https:// server, - it means that the configure script couldn't find all libs and include files - it requires for SSL to work. If the configure script fails to find them, - curl is simply built without SSL support. - - To get the https:// support into a curl that was previously built but that - reports that https:// is not supported, you should dig through the document - and logs and check out why the configure script doesn't find the SSL libs - and/or include files. - - Also, check out the other paragraph in this FAQ labeled "configure doesn't - find OpenSSL even when it is installed". - - 3.2 How do I tell curl to resume a transfer? - - Curl supports resumed transfers both ways on both FTP and HTTP. - - Try the -C option. - - 3.3 Why doesn't my posting using -F work? - - You can't simply use -F or -d at your choice. The web server that will - receive your post assumes one of the formats. If the form you're trying to - "fake" sets the type to 'multipart/form-data', then and only then you must - use the -F type. In all the most common cases, you should use -d which then - causes a posting with the type 'application/x-www-form-urlencoded'. - - This is described in some detail in the MANUAL and TheArtOfHttpScripting - documents, and if you don't understand it the first time, read it again - before you post questions about this to the mailing list. Also, try reading - through the mailing list archives for old postings and questions regarding - this. - - 3.4 How do I tell curl to run custom FTP commands? - - You can tell curl to perform optional commands both before and/or after a - file transfer. Study the -Q/--quote option. - - Since curl is used for file transfers, you don't use curl to just perform - FTP commands without transferring anything. Therefore you must always specify - a URL to transfer to/from even when doing custom FTP commands. - - 3.5 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 safely - disable that one. Use -H "Pragma:" to disable that specific header. - - 3.6 Does curl support 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. - - See also item 3.14 regarding javascript. - - 3.7 Can I use curl to delete/rename a file through FTP? - - Yes. You specify custom FTP commands with -Q/--quote. - - One example would be to delete a file after you have downloaded it: - - curl -O ftp://download.com/coolfile -Q '-DELE coolfile' - - 3.8 How do I tell curl to follow HTTP redirects? - - Curl does not follow so-called redirects by default. The Location: header - that informs the client about this is only interpreted if you're using the - -L/--location option. As in: - - curl -L http://redirector.com - - Not all redirects are HTTP ones, see 4.14 - - 3.9 How do I use curl in my favorite programming language? - - There exist many language interfaces/bindings for curl that integrates it - better with various languages. If you are fluid in a script language, you - may very well opt to use such an interface instead of using the command line - tool. - - Find out more about which languages that support curl directly, and how to - install and use them, in the libcurl section of the curl web site: - http://curl.haxx.se/libcurl/ - - In February 2003, there are interfaces available for the following - languages: Basic, C, C++, Cocoa, Dylan, Euphoria, Java, Lua, Object-Pascal, - Pascal, Perl, PHP, PostgreSQL, Python, Rexx, Ruby, Scheme and Tcl. By the - time you read this, additional ones may have appeared! - - 3.10 What about SOAP, WebDAV, XML-RPC or similar protocols over HTTP? - - Curl adheres to the HTTP spec, which basically means you can play with *any* - protocol that is built on top of HTTP. Protocols such as SOAP, WEBDAV and - XML-RPC are all such ones. You can use -X to set custom requests and -H to - set custom headers (or replace internally generated ones). - - Using libcurl is of course just as fine and you'd just use the proper - library options to do the same. - - 3.11 How do I POST with a different Content-Type? - - You can always replace the internally generated headers with -H/--header. - To make a simple HTTP POST with text/xml as content-type, do something like: - - curl -d "datatopost" -H "Content-Type: text/xml" [URL] - - 3.12 Why do FTP specific features over HTTP proxy fail? - - Because when you use a HTTP proxy, the protocol spoken on the network will - be HTTP, even if you specify a FTP URL. This effectively means that you - normally can't use FTP specific features such as FTP upload and FTP quote - etc. - - There is one exception to this rule, and that is if you can "tunnel through" - the given HTTP proxy. Proxy tunneling is enabled with a special option (-p) - and is generally not available as proxy admins usually disable tunneling to - other ports than 443 (which is used for HTTPS access through proxies). - - 3.13 Why does my single/double quotes fail? - - To specify a command line option that includes spaces, you might need to - put the entire option within quotes. Like in: - - curl -d " with spaces " url.com - - or perhaps - - curl -d ' with spaces ' url.com - - Exactly what kind of quotes and how to do this is entirely up to the shell - or command line interpreter that you are using. For most unix shells, you - can more or less pick either single (') or double (") quotes. For - Windows/DOS prompts I believe you're forced to use double (") quotes. - - Please study the documentation for your particular environment. Examples in - the curl docs will use a mix of both these ones as shown above. You must - adjust them to work in your environment. - - Remember that curl works and runs on more operating systems than most single - individuals have ever tried. - - 3.14 Does curl support javascript or pac (automated proxy config)? - - Many web pages do magic stuff using embedded javascript. Curl and libcurl - have no built-in support for that, so it will be treated just like any other - contents. - - .pac files are a netscape invention and are sometimes used by organizations - to allow them to differentiate which proxies to use. The .pac contents is - just a javascript program that gets invoked by the browser and that returns - the name of the proxy to connect to. Since curl doesn't support javascript, - it can't support .pac proxy configuration either. - - Some work-arounds usually suggested to overcome this javascript dependency: - - - Depending on the javascript complexity, write up a script that - translates it to another language and execute that. - - - Read the javascript code and rewrite the same logic in another language. - - - Implement a javascript interpreter, people have successfully used the - Mozilla javascript engine in the past. - - - Ask your admins to stop this, for a static proxy setup or similar. - - 3.15 Can I do recursive fetches with curl? - - No. curl itself has no code that performs recursive operations, such as - those performed by wget and similar tools. - - There exist wrapper scripts with that functionality (for example the - curlmirror perl script), and you can write programs based on libcurl to do - it, but the command line tool curl itself cannot. - - 3.16 What certificates do I need when I use SSL? - - There are three different kinds of "certificates" to keep track of when we - talk about using SSL-based protocols (HTTPS or FTPS) using curl or libcurl. - - - Client certificate. The server you communicate may require that you can - provide this in order to prove that you actually are who you claim to be. - If the server doesn't require this, you don't need a client certificate. - - - Server certificate. The server you communicate with has a server - certificate. You can and should verify this certificate to make sure that - you are truly talking to the real server and not a server impersonating - it. - - - Certificate Authority certificate ("CA cert"). You often have several CA - certs in a CA cert bundle that can be used to verify a server certificate - that was signed by one of the authorities in the bundle. curl comes with a - default CA cert bundle. You can override the default. - - The server certificate verification process is made by using a Certificate - Authority certificate ("CA cert") that was used to sign the server - certificate. Server certificate verification is enabled by default in curl - and libcurl and is often the reason for problems as explained in FAQ entry - 4.12 and the SSLCERTS document - (http://curl.haxx.se/docs/sslcerts.html). Server certificates that are - "self-signed" or otherwise signed by a CA that you do not have a CA cert - for, cannot be verified. If the verification during a connect fails, you - are refused access. You then need to explicitly disable the verification - to connect to the server. - - 3.17 How do I list the root dir of an FTP server? - - There are two ways. The way defined in the RFC is to use an encoded slash - in the first path part. List the "/tmp" dir like this: - - curl ftp://ftp.sunet.se/%2ftmp/ - - or the not-quite-kosher-but-more-readable way, by simply starting the path - section of the URL with a slash: - - curl ftp://ftp.sunet.se//tmp/ - - 3.18 Can I use curl to send a POST/PUT and not wait for a response? - - No. - - But you could easily write your own program using libcurl to do such stunts. - - -4. Running Problems - - 4.1 Problems connecting to SSL servers. - - It took a very long time before we could sort out why curl had problems to - connect to certain SSL servers when using SSLeay or OpenSSL v0.9+. The - error sometimes showed up similar to: - - 16570:error:1407D071:SSL routines:SSL2_READ:bad mac decode:s2_pkt.c:233: - - It turned out to be because many older SSL servers don't deal with SSLv3 - requests properly. To correct this problem, tell curl to select SSLv2 from - the command line (-2/--sslv2). - - There have also been examples where the remote server didn't like the SSLv2 - request and instead you had to force curl to use SSLv3 with -3/--sslv3. - - 4.2 Why do I get problems when I use & or % 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 quote the entire URL by using single (') or double (") - quotes around it. - - 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' - - In Windows, the standard DOS shell treats the %-letter specially and you - need to use TWO %-letters for each single one you want to use in the URL. - - Also note that if you want the literal %-letter to be part of the data you - pass in a POST using -d/--data you must encode it as '%25' (which then also - needs the %-letter doubled on Windows machines). - - 4.3 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. - - An example that downloads two URLs (sequentially) would do: - - curl '{curl,www}.haxx.se' - - To be able to use those letters as actual parts of the URL (without using - them for the curl URL "globbing" system), use the -g/--globoff option: - - curl -g 'www.site.com/weirdname[].html' - - 4.4 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. - - By using the --fail option you can tell curl explicitly to not get any data - if the HTTP return code doesn't say success. - - 4.5 Why do I get return code XXX from a HTTP server? - - RFC2616 clearly explains the return codes. This is a short transcript. Go - read the RFC for exact details: - - 4.5.1 "400 Bad Request" - - The request could not be understood by the server due to malformed - syntax. The client SHOULD NOT repeat the request without modifications. - - 4.5.2 "401 Unauthorized" - - The request requires user authentication. - - 4.5.3 "403 Forbidden" - - The server understood the request, but is refusing to fulfill it. - Authorization will not help and the request SHOULD NOT be repeated. - - 4.5.4 "404 Not Found" - - The server has not found anything matching the Request-URI. No indication - is given of whether the condition is temporary or permanent. - - 4.5.5 "405 Method Not Allowed" - - The method specified in the Request-Line is not allowed for the resource - identified by the Request-URI. The response MUST include an Allow header - containing a list of valid methods for the requested resource. - - 4.5.6 "301 Moved Permanently" - - If you get this return code and an HTML output similar to this: - -

Moved Permanently

The document has moved here. - - it might be because you request a directory URL but without the trailing - slash. Try the same operation again _with_ the trailing URL, or use the - -L/--location option to follow the redirection. - - 4.6 Can you tell me what error code 142 means? - - All curl error codes are described at the end of the man page, in the - section called "EXIT CODES". - - Error codes that are larger than the highest documented error code means - that curl has exited due to a crash. This is a serious error, and we - appreciate a detailed bug report from you that describes how we could go - ahead and repeat this! - - 4.7 How do I keep user names and passwords secret in Curl command lines? - - This problem has two sides: - - 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 to tell curl to read parameters from a file - or stdin to which you can pass the secret info. curl itself will also - attempt to "hide" the given password by blanking out the option - this - doesn't work on all platforms. - - 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. - - Also note that regular HTTP (using Basic authentication) and FTP passwords - are sent in clear across the network. All it takes for anyone to fetch them - is to listen on the network. Eavesdropping is very easy. Use more secure - authentication methods (like Digest, Negotiate or even NTLM) or consider the - SSL-based alternatives HTTPS and FTPS. - - 4.8 I found a bug! - - It is not a bug if the behavior is documented. Read the docs first. - Especially check out the KNOWN_BUGS file, it may be a documented bug! - - If it is a problem with a binary you've downloaded or a package for your - particular platform, try contacting the person who built the package/archive - you have. - - If there is a bug, read the BUGS document first. Then report it as described - in there. - - 4.9 Curl can't authenticate to the server that requires NTLM? - - This is supported in curl 7.10.6 or later. No earlier curl version knows - of this magic. - - NTLM is a Microsoft proprietary protocol. Proprietary formats are evil. You - should not use such ones. - - 4.10 My HTTP request using HEAD, PUT or DELETE doesn't work! - - Many web servers allow or demand that the administrator configures the - server properly for these requests to work on the web server. - - Some servers seem to support HEAD only on certain kinds of URLs. - - To fully grasp this, try the documentation for the particular server - software you're trying to interact with. This is not anything curl can do - anything about. - - 4.11 Why does my HTTP range requests return the full document? - - Because the range may not be supported by the server, or the server may - choose to ignore it and return the full document anyway. - - 4.12 Why do I get "certificate verify failed" ? - - You invoke curl 7.10 or later to communicate on a https:// URL and get an - error back looking something similar to this: - - curl: (35) SSL: error:14090086:SSL routines: - SSL3_GET_SERVER_CERTIFICATE:certificate verify failed - - Then it means that curl couldn't verify that the server's certificate was - good. Curl verifies the certificate using the CA cert bundle that comes with - the curl installation. - - To disable the verification (which makes it act like curl did before 7.10), - use -k. This does however enable man-in-the-middle attacks. - - If you get this failure but are having a CA cert bundle installed and used, - the server's certificate is not signed by one of the CA's in the bundle. It - might for example be self-signed. You then correct this problem by obtaining - a valid CA cert for the server. Or again, decrease the security by disabling - this check. - - Details are also in the SSLCERTS file in the release archives, found online - here: http://curl.haxx.se/docs/sslcerts.html - - 4.13 Why is curl -R on Windows one hour off? - - During daylight savings time, when -R is used, curl will set a time that - appears one hour off. This happens due to a flaw in how Windows stores and - uses file modification times and it is not easily worked around. For details - on this problem, read this: http://www.codeproject.com/datetime/dstbugs.asp - - 4.14 Redirects work in browser but not with curl! - - curl supports HTTP redirects fine (see item 3.8). Browsers generally support - at least two other ways to perform directs that curl does not: - - - Meta tags. You can write a HTML tag that will cause the browser to - redirect to another given URL after a certain time. - - - Javascript. You can write a javascript program embeded in a HTML page - that redirects the browser to another given URL. - - There is no way to make curl follow these redirects. You must either - manually figure out what the page is set to do, or you write a script that - parses the results and fetches the new URL. - - -5. libcurl Issues - - 5.1 Is libcurl thread-safe? - - Yes. - - We have written the libcurl code specifically adjusted for multi-threaded - programs. libcurl will use thread-safe functions instead of non-safe ones if - your system has such. - - If you use a OpenSSL-powered libcurl in a multi-threaded environment, you - need to provide one or two locking functions: - - http://www.openssl.org/docs/crypto/threads.html#DESCRIPTION - - If you use a GnuTLS-powered libcurl in a multi-threaded environment, you - need to provide locking function(s) for libgcrypt (which is used by GnuTLS - for the crypto functions). - - http://www.gnu.org/software/gnutls/manual/html_node/Multi_002dthreaded-applications.html - - 5.2 How can I receive all data into a large memory chunk? - - [ See also the examples/getinmemory.c source ] - - You are in full control of the callback function that gets called every time - there is data received from the remote server. You can make that callback do - whatever you want. You do not have to write the received data to a file. - - One solution to this problem could be to have a pointer to a struct that you - pass to the callback function. You set the pointer using the - CURLOPT_WRITEDATA option. Then that pointer will be passed to the callback - instead of a FILE * to a file: - - /* imaginary struct */ - struct MemoryStruct { - char *memory; - size_t size; - }; - - /* imaginary callback function */ - size_t - WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data) - { - size_t realsize = size * nmemb; - struct MemoryStruct *mem = (struct MemoryStruct *)data; - - mem->memory = (char *)realloc(mem->memory, mem->size + realsize + 1); - if (mem->memory) { - memcpy(&(mem->memory[mem->size]), ptr, realsize); - mem->size += realsize; - mem->memory[mem->size] = 0; - } - return realsize; - } - - 5.3 How do I fetch multiple files with libcurl? - - libcurl has excellent support for transferring multiple files. You should - just repeatedly set new URLs with curl_easy_setopt() and then transfer it - with curl_easy_perform(). The handle you get from curl_easy_init() is not - only reusable, but you're even encouraged to reuse it if you can, as that - will enable libcurl to use persistent connections. - - 5.4 Does libcurl do Winsock initialization on win32 systems? - - Yes, if told to in the curl_global_init() call. - - 5.5 Does CURLOPT_WRITEDATA and CURLOPT_READDATA work on win32 ? - - Yes, but you cannot open a FILE * and pass the pointer to a DLL and have - that DLL use the FILE * (as the DLL and the client application cannot access - each others' variable memory areas). If you set CURLOPT_WRITEDATA you must - also use CURLOPT_WRITEFUNCTION as well to set a function that writes the - file, even if that simply writes the data to the specified FILE *. - Similarly, if you use CURLOPT_READDATA you must also specify - CURLOPT_READFUNCTION. - - (Provided by Joel DeYoung and Bob Schader) - - 5.6 What about Keep-Alive or persistent connections? - - curl and libcurl have excellent support for persistent connections when - transferring several files from the same server. Curl will attempt to reuse - connections for all URLs specified on the same command line/config file, and - libcurl will reuse connections for all transfers that are made using the - same libcurl handle. - - 5.7 Link errors when building libcurl on Windows! - - You need to make sure that your project, and all the libraries (both static - and dynamic) that it links against, are compiled/linked against the same run - time library. - - This is determined by the /MD, /ML, /MT (and their corresponding /M?d) - options to the command line compiler. /MD (linking against MSVCRT dll) seems - to be the most commonly used option. - - (Provided by Andrew Francis) - - When building an application that uses the static libcurl library, you must - add -DCURL_STATICLIB to your CFLAGS. Otherwise the linker will look for - dynamic import symbols. If you get linker error like "unknown symbol - __imp__curl_easy_init ..." you have linked against the wrong (static) - library. If you want to use the libcurl.dll and import lib, you don't need - any extra CFLAGS, but use one of the import libraries below. These are the - libraries produced by the various lib/Makefile.* files: - - Target: static lib. import lib for libcurl*.dll. - ----------------------------------------------------------- - MingW: libcurl.a libcurldll.a - MSVC (release): libcurl.lib libcurl_imp.lib - MSVC (debug): libcurld.lib libcurld_imp.lib - Borland: libcurl.lib libcurl_imp.lib - - - 5.8 libcurl.so.3: open failed: No such file or directory - - This is an error message you might get when you try to run a program linked - with a shared version of libcurl and your run-time linker (ld.so) couldn't - find the shared library named libcurl.so.3. - - You need to make sure that ld.so finds libcurl.so.3. You can do that - multiple ways, and it differs somewhat between different operating systems, - but they are usually: - - * Add an option to the linker command line that specify the hard-coded path - the run-time linker should check for the lib (usually -R) - - * Set an environment variable (LD_LIBRARY_PATH for example) where ld.so - should check for libs - - * Adjust the system's config to check for libs in the directory where you've - put the dir (like Linux's /etc/ld.so.conf) - - 'man ld.so' and 'man ld' will tell you more details - - 5.9 How does libcurl resolve host names? - - libcurl supports a large a number of different name resolve functions. One - of them is picked at build-time and will be used unconditionally. Thus, if - you want to change name resolver function you must rebuild libcurl and tell - it to use a different function. - - - The non-ipv6 resolver that can use one out of four host name resolve calls - (depending on what your system supports): - - A - gethostbyname() - B - gethostbyname_r() with 3 arguments - C - gethostbyname_r() with 5 arguments - D - gethostbyname_r() with 6 arguments - - - The ipv6-resolver that uses getaddrinfo() - - - The c-ares based name resolver that uses the c-ares library for resolves. - Using this offers asynchronous name resolves but it currently has no IPv6 - support. - - - The Windows threaded resolver. It use: - - A - gethostbyname() on plain ipv4 windows hosts - B - getaddrinfo() on ipv6-enabled windows hosts - - Also note that libcurl never resolves or reverse-lookups addresses given as - pure numbers, such as 127.0.0.1 or ::1. - - 5.10 How do I prevent libcurl from writing the response to stdout? - - libcurl provides a default built-in write function that writes received data - to stdout. Set the CURLOPT_WRITEFUNCTION to receive the data, or possibly - set CURLOPT_WRITEDATA to a different FILE * handle. - - 5.11 How do I make libcurl not receive the whole HTTP response? - - You make the write callback (or progress callback) return an error and - libcurl will then abort the transfer. - - 5.12 Can I make libcurl fake or hide my real IP address? - - No. libcurl operates on a higher level than so. Besides, faking IP address - would imply sending IP packages with a made-up source address, and then you - normally get a problem with intercepting the packages sent back as they - would then not be routed to you! - - If you use a proxy to access remote sites, the sites will not see your local - IP address but instead the address of the proxy. - - Also note that on many networks NATs or other IP-munging techniques are used - that makes you see and use a different IP address locally than what the - remote server will see you coming from. - - -6. License Issues - - Curl and libcurl are released under a MIT/X derivate license. The license is - very liberal and should not impose a problem for your project. This section - is just a brief summary for the cases we get the most questions. (Parts of - this section was much enhanced by Bjorn Reese.) - - We are not lawyers and this is not legal advice. You should probably consult - one if you want true and accurate legal insights without our prejudice. - - 6.1 I have a GPL program, can I use the libcurl library? - - Yes! - - Since libcurl may be distributed under the MIT/X derivate license, it can be - used together with GPL in any software. - - 6.2 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. - - 6.3 I have a BSD licensed program, can I use the libcurl library? - - Yes! - - libcurl does not put any restrictions on the program that uses the library. - - 6.4 I have a program that uses LGPL libraries, can I use libcurl? - - Yes! - - The LGPL license doesn't clash with other licenses. - - 6.5 Can I modify curl/libcurl for my program and keep the changes secret? - - Yes! - - The MIT/X derivate license practically allows you to do almost anything with - the sources, on the condition that the copyright texts in the sources are - left intact. - - 6.6 Can you please change the curl/libcurl license to XXXX? - - No. - - We have carefully picked this license after years of development and - discussions 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 that use it. It should be possible for everyone to use libcurl or - curl in their projects, no matter what license they already have in use. - - 6.7 What are my obligations when using libcurl in my commerical apps? - - Next to none. All you need to adhere to is the MIT-style license (stated in - the COPYING file) which basically says you have to include the copyright - notice in "all copies" and that you may not use the copyright holder's name - when promoting your software. - - You do not have to release any of your source code. - - You do not have to reveal or make public any changes to the libcurl source - code. - - You do not have to reveal or make public that you are using libcurl within - your app. - - As can be seen here: http://curl.haxx.se/docs/companies.html and - elsewhere, more and more companies are dicovering the power - of libcurl and take advantage of it even in commercial environments. - - -7. PHP/CURL Issues - - 7.1 What is PHP/CURL? - - The module for PHP that makes it possible for PHP programs to access curl- - functions from within PHP. - - In the cURL project we call this module PHP/CURL to differentiate it from - curl the command line tool and libcurl the library. The PHP team however - does not refer to it like this (for unknown reasons). They call it plain - CURL (often using all caps) which causes much confusion to users which in - turn gives us a higher question load. - - 7.2 Who write PHP/CURL? - - PHP/CURL is a module that comes with the regular PHP package. It depends and - uses libcurl, so you need to have libcurl installed properly first before - PHP/CURL can be used. PHP/CURL is written by Sterling Hughes. - - 7.3 Can I perform multiple requests using the same handle? - - Yes - at least in PHP version 4.3.8 and later (this has been known to not - work in earlier versions, but the exact version when it started to work is - unknown to me). - - After a transfer, you just set new options in the handle and make another - transfer. This will make libcurl to re-use the same connection if it can. diff --git a/libs/curl/docs/FEATURES b/libs/curl/docs/FEATURES deleted file mode 100644 index e5331fc817..0000000000 --- a/libs/curl/docs/FEATURES +++ /dev/null @@ -1,125 +0,0 @@ - _ _ ____ _ - ___| | | | _ \| | - / __| | | | |_) | | - | (__| |_| | _ <| |___ - \___|\___/|_| \_\_____| - -FEATURES - -curl tool - - config file support - - multiple URLs in a single command line - - range "globbing" support: [0-13], {one,two,three} - - multiple file upload on a single command line - - custom maximum transfer rate - - redirectable stderr - -libcurl supports - - full URL syntax with no length limit - - custom maximum download time - - custom least download speed acceptable - - custom output result after completion - - guesses protocol from host name unless specified - - uses .netrc - - progress bar/time specs while downloading - - "standard" proxy environment variables support - - compiles on win32 (reported builds on 40+ operating systems) - - selectable network interface for outgoing traffic - - IPv6 support on unix and Windows - - persistant connections - - socks5 support - - supports user name + password in proxy environment variables - - operations through proxy "tunnel" (using CONNECT) - - supports large files (>2GB and >4GB) both upload/download - - replacable memory functions (malloc, free, realloc, etc) - - asynchronous name resolving (*6) - -HTTP - - HTTP/1.1 compliant (optionally uses 1.0) - - GET - - PUT - - HEAD - - POST - - multipart formpost (RFC1867-style) - - authentication: Basic, Digest, NTLM(*1), GSS-Negotiate/Negotiate(*3) and - SPNEGO (*4) to server and proxy - - resume (both GET and PUT) - - follow redirects - - maximum amount of redirects to follow - - custom HTTP request - - cookie get/send fully parsed - - reads/writes the netscape cookie file format - - custom headers (replace/remove internally generated headers) - - custom user-agent string - - custom referer string - - range - - proxy authentication - - time conditions - - via http-proxy - - retrieve file modification date - - Content-Encoding support for deflate and gzip - - "Transfer-Encoding: chunked" support for "uploads" - -HTTPS (*1) - - (all the HTTP features) - - using client certificates - - verify server certificate - - via http-proxy - - select desired encryption - - force usage of a specific SSL version (SSLv2(*7), SSLv3 or TLSv1) - -FTP - - download - - authentication - - kerberos4 (*5) - - active/passive using PORT, EPRT, PASV or EPSV - - single file size information (compare to HTTP HEAD) - - 'type=' URL support - - dir listing - - dir listing names-only - - upload - - upload append - - upload via http-proxy as HTTP PUT - - download resume - - upload resume - - custom ftp commands (before and/or after the transfer) - - simple "range" support - - via http-proxy - - all operations can be tunneled through a http-proxy - - customizable to retrieve file modification date - - no dir depth limit - -FTPS (*1) - - implicit ftps:// support that use SSL on both connections - - explicit "AUTH TSL" and "AUTH SSL" usage to "upgrade" plain ftp:// - connection to use SSL for both or one of the connections - -TFTP - - download / upload - -TELNET - - connection negotiation - - custom telnet options - - stdin/stdout I/O - -LDAP (*2) - - full LDAP URL support - -DICT - - extended DICT URL support - -FILE - - URL support - - "uploads" - - resume - -FOOTNOTES -========= - - *1 = requires OpenSSL or GnuTLS - *2 = requires OpenLDAP - *3 = requires a GSSAPI-compliant library, such as Heimdal or similar. - *4 = requires FBopenssl - *5 = requires a krb4 library, such as the MIT one or similar. - *6 = requires c-ares - *7 = requires OpenSSL specificly, as GnuTLS only supports SSLv3 and TLSv1 diff --git a/libs/curl/docs/HISTORY b/libs/curl/docs/HISTORY deleted file mode 100644 index 00d5d6b454..0000000000 --- a/libs/curl/docs/HISTORY +++ /dev/null @@ -1,153 +0,0 @@ - _ _ ____ _ - ___| | | | _ \| | - / __| | | | |_) | | - | (__| |_| | _ <| |___ - \___|\___/|_| \_\_____| - - How cURL Became Like This - - -In the second half of 1997, Daniel Stenberg came up with the idea to make -currency-exchange calculations available to Internet Relay Chat (IRC) -users. All the necessary data are published on the Web; he just needed to -automate their retrieval. - -Daniel simply adopted an existing command-line open-source tool, httpget, that -Brazilian Rafael Sagula had written. After a few minor adjustments, it did -just what he needed. - -Soon, he found currencies on a GOPHER site, so support for that had to go in, -and not before long FTP download support was added as well. The name of the -project was changed to urlget to better fit what it actually did now, since -the http-only days were already passed. - -The project slowly grew bigger. When upload capabilities were added and the -name once again was misleading, a second name change was made and on March 20, -1998 curl 4 was released. (The version numbering from the previous names was -kept.) - -(Unrelated to this project a company called Curl Corporation registered a US -trademark on the name "CURL" on May 18 1998. That company had then already -registered the curl.com domain back in November of the previous year. All this -was revealed to us much later.) - -SSL support was added, powered by the SSLeay library. - -August 1998, first announcement of curl on freshmeat.net. - -October 1998, with the curl 4.9 release and the introduction of cookie -support, curl was no longer released under the GPL license. Now we're at 4000 -lines of code, we switched over to the MPL license to restrict the effects of -"copyleft". - -November 1998, configure script and reported successful compiles on several -major operating systems. The never-quite-understood -F option was added and -curl could now simulate quite a lot of a browser. TELNET support was added. - -Curl 5 was released in December 1998 and introduced the first ever curl man -page. People started making Linux RPM packages out of it. - -January 1999, DICT support added. - -OpenSSL took over where SSLeay was abandoned. - -May 1999, first Debian package. - -August 1999, LDAP:// and FILE:// support added. The curl web site gets 1300 -visits weekly. - -Released curl 6.0 in September. 15000 lines of code. - -December 28 1999, added the project on Sourceforge and started using its -services for managing the project. - -Spring 2000, major internal overhaul to provide a suitable library interface. -The first non-beta release was named 7.1 and arrived in August. This offered -the easy interface and turned out to be the beginning of actually getting -other software and programs to get based on and powered by libcurl. Almost -20000 lines of code. - -August 2000, the curl web site gets 4000 visits weekly. - -The PHP guys adopted libcurl already the same month, when the first ever third -party libcurl binding showed up. CURL has been a supported module in PHP since -the release of PHP 4.0.2. This would soon get followers. More than 16 -different bindings exist at the time of this writing. - -September 2000, kerberos4 support was added. - -In November 2000 started the work on a test suite for curl. It was later -re-written from scratch again. - -January 2001, Daniel released curl 7.5.2 under a new license again: MIT (or -MPL). The MIT license is extremely liberal and can be used combined with GPL -in other projects. This would finally put an end to the "complaints" from -people involved in GPLed projects that previously were prohibited from using -libcurl while it was released under MPL only. (Due to the fact that MPL is -deemed "GPL incompatible".) - -curl supports HTTP 1.1 starting with the release of 7.7, March 22 2001. This -also introduced libcurl's ability to do persistent connections. 24000 lines of -code. - -The first experimental ftps:// support was added in March 2001. - -August 2001. curl is bundled in Mac OS X, 10.1. It was already becoming more -and more of a standard utility of Linux distributions and a regular in the BSD -ports collections. The curl web site gets 8000 visits weekly. Curl Corporation -contacted Daniel to discuss "the name issue". After Daniel's reply, they have -never since got in touch again. - -September 2001, libcurl 7.9 introduces cookie jar and curl_formadd(). During -the forthcoming 7.9.x releases, we introduced the multi interface slowly and -without much whistles. - -June 2002, the curl web site gets 13000 visits weekly. curl and libcurl is -35000 lines of code. Reported successful compiles on more than 40 combinations -of CPUs and operating systems. - -To estimate number of users of the curl tool or libcurl library is next to -impossible. Around 5000 downloaded packages each week from the main site gives -a hint, but the packages are mirrored extensively, bundled with numerous OS -distributions and otherwise retrieved as part of other software. - -September 2002, with the release of curl 7.10 it is released under the MIT -license only. - -January 2003. Started working on the distributed curl tests. The autobuilds. - -February 2003, the curl site averages at 20000 visits weekly. At any given -moment, there's an average of 3 people browsing the curl.haxx.se site. - -Multiple new authentication schemes are supported: Digest (May), NTLM (June) -and Negotiate (June). - -November 2003: curl 7.10.8 is released. 45000 lines of code. ~55000 unique -visitors to the curl.haxx.se site. Five official web mirrors. - -December 2003, full-fledged SSL for FTP is supported. - -January 2004: curl 7.11.0 introduced large file support. - -June 2004: curl 7.12.0 introduced IDN support. 10 official web mirrors. - -August 2004: - Curl and libcurl 7.12.1 - - Public curl release number: 82 - Releases counted from the very beginning: 109 - Available command line options: 96 - Available curl_easy_setopt() options: 120 - Number of public functions in libcurl: 36 - Amount of public web site mirrors: 12 - Number of known libcurl bindings: 26 - -April 2005: - -GnuTLS can now optionally be used for the secure layer when curl is built. - -September 2005: - -TFTP support was added. - -More than 100,000 unique visitors of the curl web site. 25 mirrors. diff --git a/libs/curl/docs/INSTALL b/libs/curl/docs/INSTALL deleted file mode 100644 index 06e4991c12..0000000000 --- a/libs/curl/docs/INSTALL +++ /dev/null @@ -1,719 +0,0 @@ - _ _ ____ _ - ___| | | | _ \| | - / __| | | | |_) | | - | (__| |_| | _ <| |___ - \___|\___/|_| \_\_____| - - How To Compile - -Installing Binary Packages -========================== - - Lots of people download binary distributions of curl and libcurl. This - document does not describe how to install curl or libcurl using such a - binary package. This document describes how to compile, build and install - curl and libcurl from source code. - -UNIX -==== - A normal unix installation is made in three or four steps (after you've - unpacked the source archive): - - ./configure - make - make test (optional) - make install - - You probably need to be root when doing the last command. - - If you have checked out the sources from the CVS repository, read the - CVS-INFO on how to proceed. - - Get a full listing of all available configure options by invoking it like: - - ./configure --help - - If you want to install curl in a different file hierarchy than /usr/local, - you need to specify that already when running configure: - - ./configure --prefix=/path/to/curl/tree - - If you happen to have write permission in that directory, you can do 'make - install' without being root. An example of this would be to make a local - install in your own home directory: - - ./configure --prefix=$HOME - make - make install - - The configure script always tries to find a working SSL library unless - explicitly told not to. If you have OpenSSL installed in the default search - path for your compiler/linker, you don't need to do anything special. If - you have OpenSSL installed in /usr/local/ssl, you can run configure like: - - ./configure --with-ssl - - If you have OpenSSL installed somewhere else (for example, /opt/OpenSSL,) - you can run configure like this: - - ./configure --with-ssl=/opt/OpenSSL - - If you insist on forcing a build without SSL support, even though you may - have OpenSSL installed in your system, you can run configure like this: - - ./configure --without-ssl - - If you have OpenSSL installed, but with the libraries in one place and the - header files somewhere else, you have to set the LDFLAGS and CPPFLAGS - environment variables prior to running configure. Something like this - should work: - - (with the Bourne shell and its clones): - - CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \ - ./configure - - (with csh, tcsh and their clones): - - env CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \ - ./configure - - If you have shared SSL libs installed in a directory where your run-time - linker doesn't find them (which usually causes configure failures), you can - provide the -R option to ld on some operating systems to set a hard-coded - path to the run-time linker: - - LDFLAGS=-R/usr/local/ssl/lib ./configure --with-ssl - - Another option to the previous trick, is to set LD_LIBRARY_PATH or edit the - /etc/ld.so.conf file. - - If your SSL library was compiled with rsaref (this was common in the past - when used in the United States), you may also need to set: - - LIBS=-lRSAglue -lrsaref - (as suggested by Doug Kaufman) - - MORE OPTIONS - - To force configure to use the standard cc compiler if both cc and gcc are - present, run configure like - - CC=cc ./configure - or - env CC=cc ./configure - - To force a static library compile, disable the shared library creation - by running configure like: - - ./configure --disable-shared - - To tell the configure script to skip searching for thread-safe functions, - add an option like: - - ./configure --disable-thread - - To build curl with kerberos4 support enabled, curl requires the krb4 libs - and headers installed. You can then use a set of options to tell - configure where those are: - - --with-krb4-includes[=DIR] Specify location of kerberos4 headers - --with-krb4-libs[=DIR] Specify location of kerberos4 libs - --with-krb4[=DIR] where to look for Kerberos4 - - In most cases, /usr/athena is the install prefix and then it works with - - ./configure --with-krb4=/usr/athena - - If you're a curl developer and use gcc, you might want to enable more - debug options with the --enable-debug option. - - curl can be built to use a whole range of libraries to provide various - useful services, and configure will try to auto-detect a decent - default. But if you want to alter it, you can select how to deal with - each individual library. - - To build with GnuTLS support instead of OpenSSL for SSL/TLS, note that - you need to use both --without-ssl and --with-gnutls. - - To build with yassl support instead of OpenSSL or GunTLS, you must build - yassl with its OpenSSL emulation enabled and point to that directory root - with configure --with-ssl. - - -Win32 -===== - - MingW32 - ------- - - Run the 'mingw32.bat' file to get the proper environment variables set, - then run 'make mingw32' in the root dir. Use 'make mingw32-ssl' to build - curl SSL enabled. - - If you have any problems linking libraries or finding header files, be sure - to verify that the provided "Makefile.m32" files use the proper paths, and - adjust as necessary. - - Cygwin - ------ - - Almost identical to the unix installation. Run the configure script in the - curl root with 'sh configure'. Make sure you have the sh executable in - /bin/ or you'll see the configure fail towards the end. - - Run 'make' - - Dev-Cpp - ------- - - See the separate INSTALL.devcpp file for details. - - MSVC from command line - ---------------------- - - Run the 'vcvars32.bat' file to get a proper environment. 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' - provided that you installed Visual C/C++ 6 in the default directory. - - Then run 'nmake vc' in curl's root directory. - - If you want to compile with zlib support, you will need to build - zlib (http://www.gzip.org/zlib/) as well. Please read the zlib - documentation on how to compile zlib. Define the ZLIB_PATH environment - variable to the location of zlib.h and zlib.lib, for example: - - set ZLIB_PATH=c:\zlib-1.2.1 - - Then run 'nmake vc-zlib' in curl's root directory. - - If you want to compile with SSL support you need the OpenSSL package. - Please read the OpenSSL documentation on how to compile and install - the OpenSSL libraries. The build process of OpenSSL generates the - libeay32.dll and ssleay32.dll files in the out32dll subdirectory in - the OpenSSL home directory. OpenSSL static libraries (libeay32.lib, - ssleay32.lib, RSAglue.lib) are created in the out32 subdirectory. - - 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.7d - - Then run 'nmake vc-ssl' or 'nmake vc-ssl-dll' in 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 src subdirectory. This statically linked - version is a standalone executable not requiring any DLL at - runtime. This make method requires that you have the static OpenSSL - libraries 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 executable requires libcurl.dll and the OpenSSL DLLs - at runtime. - Run 'nmake vc-ssl-zlib' to build with both ssl and zlib support. - - Borland C++ compiler - --------------------- - - compile openssl - - Make sure you include the paths to curl/include and openssl/inc32 in - your bcc32.cnf file - - eg : -I"c:\Bcc55\include;c:\path_curl\include;c:\path_openssl\inc32" - - Check to make sure that all of the sources listed in lib/Makefile.b32 - are present in the /path_to_curl/lib directory. (Check the src - directory for missing ones.) - - Make sure the environment variable "BCCDIR" is set to the install - location for the compiler eg : c:\Borland\BCC55 - - command line: - make -f /path_to_curl/lib/Makefile-ssl.b32 - - compile simplessl.c with appropriate links - - c:\curl\docs\examples\> bcc32 -L c:\path_to_curl\lib\libcurl.lib - -L c:\borland\bcc55\lib\psdk\ws2_32.lib - -L c:\openssl\out32\libeay32.lib - -L c:\openssl\out32\ssleay32.lib - simplessl.c - - - MSVC IDE - -------- - - If you use VC++, Borland or similar compilers. Include all lib source - files in a static lib "project" (all .c and .h files that is). - (you should name it libcurl or similar) - - Make the sources in the src/ drawer be a "win32 console application" - project. Name it curl. - - For VC++ 6, there's an included Makefile.vc6 that should be possible - to use out-of-the-box. - - - Disabling Specific Protocols in Win32 builds - -------------------------------------------- - - The configure utility, unfortunately, is not available for the Windows - environment, therefore, you cannot use the various disable-protocol - options of the configure utility on this platform. - - However, you can use the following defines to disable specific - protocols: - - HTTP_ONLY disables all protocols except HTTP - CURL_DISABLE_FTP disables FTP - CURL_DISABLE_LDAP disables LDAP - CURL_DISABLE_TELNET disables TELNET - CURL_DISABLE_DICT disables DICT - CURL_DISABLE_FILE disables FILE - - If you want to set any of these defines you have the following - possibilities: - - - Modify lib/setup.h - - Modify lib/Makefile.vc6 - - Add defines to Project/Settings/C/C++/General/Preprocessor Definitions - in the curllib.dsw/curllib.dsp Visual C++ 6 IDE project. - - - Important static libcurl usage note - ----------------------------------- - - When building an application that uses the static libcurl library, you must - add '-DCURL_STATICLIB' to your CFLAGS. Otherwise the linker will look for - dynamic import symbols. - - -IBM OS/2 -======== - Building under OS/2 is not much different from building under unix. - You need: - - - emx 0.9d - - GNU make - - GNU patch - - ksh - - GNU bison - - GNU file utilities - - GNU sed - - autoconf 2.13 - - If you want to build with OpenSSL or OpenLDAP support, you'll need to - download those libraries, too. Dirk Ohme has done some work to port SSL - libraries under OS/2, but it looks like he doesn't care about emx. You'll - find his patches on: http://come.to/Dirk_Ohme - - If during the linking you get an error about _errno being an undefined - symbol referenced from the text segment, you need to add -D__ST_MT_ERRNO__ - in your definitions. - - If everything seems to work fine but there's no curl.exe, you need to add - -Zexe to your linker flags. - - If you're getting huge binaries, probably your makefiles have the -g in - CFLAGS. - - -VMS -=== - (The VMS section is in whole contributed by the friendly Nico Baggus) - - Curl seems to work with FTP & HTTP other protocols are not tested. (the - perl http/ftp testing server supplied as testing too cannot work on VMS - because vms has no concept of fork(). [ I tried to give it a whack, but - thats of no use. - - SSL stuff has not been ported. - - Telnet has about the same issues as for Win32. When the changes for Win32 - are clear maybe they'll work for VMS too. The basic problem is that select - ONLY works for sockets. - - Marked instances of fopen/[f]stat that might become a problem, especially - for non stream files. In this regard, the files opened for writing will be - created stream/lf and will thus be safe. Just keep in mind that non-binary - read/wring from/to files will have a records size limit of 32767 bytes - imposed. - - Stat to get the size of the files is again only safe for stream files & - fixed record files without implied CC. - - -- My guess is that only allowing access to stream files is the quickest - way to get around the most issues. Therefore all files need to to be - checked to be sure they will be stream/lf before processing them. This is - the easiest way out, I know. The reason for this is that code that needs to - report the filesize will become a pain in the ass otherwise. - - Exit status.... Well we needed something done here, - - VMS has a structured exist status: - | 3 | 2 | 1 | 0| - |1098|765432109876|5432109876543|210| - +----+------------+-------------+---+ - |Ctrl| Facility | Error code |sev| - +----+------------+-------------+---+ - - With the Ctrl-bits an application can tell if part or the whole message has - already been printed from the program, DCL doesn't need to print it again. - - Facility - basically the program ID. A code assigned to the program - the name can be fetched from external or internal message libraries - Errorcode - the errodes assigned by the application - Sev. - severity: Even = error, off = non error - 0 = Warning - 1 = Success - 2 = Error - 3 = Information - 4 = Fatal - <5-7> reserved. - - This all presents itself with: - %--, - - See also the src/curlmsg.msg file, it has the source for the messages In - src/main.c a section is devoted to message status values, the globalvalues - create symbols with certain values, referenced from a compiled message - file. Have all exit function use a exit status derived from a translation - table with the compiled message codes. - - This was all compiled with: - - Compaq C V6.2-003 on OpenVMS Alpha V7.1-1H2 - - So far for porting notes as of: - 13-jul-2001 - N. Baggus - - -QNX -=== - (This section was graciously brought to us by David Bentham) - - As QNX is targeted for resource constrained environments, the QNX headers - set conservative limits. This includes the FD_SETSIZE macro, set by default - to 32. Socket descriptors returned within the CURL library may exceed this, - resulting in memory faults/SIGSEGV crashes when passed into select(..) - calls using fd_set macros. - - A good all-round solution to this is to override the default when building - libcurl, by overriding CFLAGS during configure, example - # configure CFLAGS='-DFD_SETSIZE=64 -g -O2' - - -RISC OS -======= - The library can be cross-compiled using gccsdk as follows: - - CC=riscos-gcc AR=riscos-ar RANLIB='riscos-ar -s' ./configure \ - --host=arm-riscos-aof --without-random --disable-shared - make - - where riscos-gcc and riscos-ar are links to the gccsdk tools. - You can then link your program with curl/lib/.libs/libcurl.a - - -AmigaOS -======= - (This section was graciously brought to us by Diego Casorran) - - To build cURL/libcurl on AmigaOS just type 'make amiga' ... - - What you need is: (not tested with others versions) - - GeekGadgets / gcc 2.95.3 (http://www.geekgadgets.org/) - - AmiTCP SDK v4.3 (http://www.aminet.net/comm/tcp/AmiTCP-SDK-4.3.lha) - - Native Developer Kit (http://www.amiga.com/3.9/download/NDK3.9.lha) - - As no ixemul.library is required you will be able to build it for - WarpOS/PowerPC (not tested by me), as well a MorphOS version should be - possible with no problems. - - To enable SSL support, you need a OpenSSL native version (without ixemul), - you can find a precompiled package at http://amiga.sourceforge.net/OpenSSL/ - - -NetWare -======= - To compile curl.nlm / libcurl.nlm you need: - - either any gcc / nlmconv, or CodeWarrior 7 PDK 4 or later. - - gnu make and awk running on the platform you compile on; - native Win32 versions can be downloaded from: - http://www.gknw.net/development/prgtools/ - - recent Novell LibC SDK available from: - http://developer.novell.com/ndk/libc.htm - - optional zlib sources (at the moment only dynamic linking with zlib.imp); - sources with NetWare Makefile can be obtained from: - http://www.gknw.net/mirror/zlib/ - - optional OpenSSL sources (version 0.9.8 or later which builds with BSD); - - Set a search path to your compiler, linker and tools; on Linux make - sure that the var OSTYPE contains the string 'linux'; and then type - 'make netware' from the top source directory; other tagets available - are 'netware-ssl', 'netware-ssl-zlib', 'netware-zlib' and 'netware-ares'; - if you need other combinations you can control the build with the - environment variables WITH_SSL, WITH_ZLIB, WITH_ARES and ENABLE_IPV6. - I found on some Linux systems (RH9) that OS detection didnt work although - a 'set | grep OSTYPE' shows the var present and set; I simply overwrote it - with 'OSTYPE=linux-rh9-gnu' and the detection in the Makefile worked... - Any help in testing appreciated! - Builds automatically created 8 times a day from current CVS are here: - http://www.gknw.net/mirror/curl/autobuilds/ - the status of these builds can be viewed at the autobuild table: - http://curl.haxx.se/auto/ - - -eCos -==== - curl does not use the eCos build system, so you must first build eCos - separately, then link curl to the resulting eCos library. Here's a sample - configure line to do so on an x86 Linux box targeting x86: - - GCCLIB=`gcc -print-libgcc-file-name` && \ - CFLAGS="-D__ECOS=1 -nostdinc -I$ECOS_INSTALL/include \ - -I`dirname $GCCLIB`/include" \ - LDFLAGS="-nostdlib -Wl,--gc-sections -Wl,-static \ - -L$ECOS_INSTALL/lib -Ttarget.ld -ltarget" \ - ./configure --host=i386 --disable-shared \ - --without-ssl --without-zlib --disable-manual --disable-ldap - - In most cases, eCos users will be using libcurl from within a custom - embedded application. Using the standard 'curl' executable from - within eCos means facing the limitation of the standard eCos C - startup code which does not allow passing arguments in main(). To - run 'curl' from eCos and have it do something useful, you will need - to either modify the eCos startup code to pass in some arguments, or - modify the curl application itself to retrieve its arguments from - some location set by the bootloader or hard-code them. - - Something like the following patch could be used to hard-code some - arguments. The MTAB_ENTRY line mounts a RAM disk as the root filesystem - (without mounting some kind of filesystem, eCos errors out all file - operations which curl does not take to well). The next section synthesizes - some command-line arguments for curl to use, in this case to direct curl - to read further arguments from a file. It then creates that file on the - RAM disk and places within it a URL to download: a file: URL that - just happens to point to the configuration file itself. The results - of running curl in this way is the contents of the configuration file - printed to the console. - ---- src/main.c 19 Jul 2006 19:09:56 -0000 1.363 -+++ src/main.c 24 Jul 2006 21:37:23 -0000 -@@ -4286,11 +4286,31 @@ - } - - -+#ifdef __ECOS -+#include -+MTAB_ENTRY( testfs_mte1, -+ "/", -+ "ramfs", -+ "", -+ 0); -+#endif - - int main(int argc, char *argv[]) - { - int res; - struct Configurable config; -+#ifdef __ECOS -+ char *args[] = {"ecos-curl", "-K", "curlconf.txt"}; -+ FILE *f; -+ argc = sizeof(args)/sizeof(args[0]); -+ argv = args; -+ -+ f = fopen("curlconf.txt", "w"); -+ if (f) { -+ fprintf(f, "--url file:curlconf.txt"); -+ fclose(f); -+ } -+#endif - memset(&config, 0, sizeof(struct Configurable)); - - config.errors = stderr; /* default errors to stderr */ - - -Minix -===== - curl can be compiled on Minix 3 using gcc (ACK has a few problems due - to mismatched headers and libraries as of ver. 3.1.2). The gcc and bash - packages must be installed first. The default heap size allocated to - bash is inadequate for running configure and will result in out of memory - errors. Increase it with the command: - - chmem =2048000 /usr/local/bin/bash - - Make sure gcc and bash are in the PATH then configure curl with a - command like this: - - ./configure GREP=/usr/bin/grep AR=/usr/gnu/bin/gar --disable-ldap - - Then simply run 'make'. - - -CROSS COMPILE -============= - (This section was graciously brought to us by Jim Duey, with additions by - Dan Fandrich) - - Download and unpack the cURL package. Version should be 7.9.1 or later. - - 'cd' to the new directory. (e.g. cd curl-7.12.3) - - Set environment variables to point to the cross-compile toolchain and call - configure with any options you need. Be sure and specify the '--host' and - '--build' parameters at configuration time. The following script is an - example of cross-compiling for the IBM 405GP PowerPC processor using the - toolchain from MonteVista for Hardhat Linux. - - (begin script) - - #! /bin/sh - - export PATH=$PATH:/opt/hardhat/devkit/ppc/405/bin - export CPPFLAGS="-I/opt/hardhat/devkit/ppc/405/target/usr/include" - export AR=ppc_405-ar - export AS=ppc_405-as - export LD=ppc_405-ld - export RANLIB=ppc_405-ranlib - export CC=ppc_405-gcc - export NM=ppc_405-nm - - ./configure --target=powerpc-hardhat-linux \ - --host=powerpc-hardhat-linux \ - --build=i586-pc-linux-gnu \ - --prefix=/opt/hardhat/devkit/ppc/405/target/usr/local \ - --exec-prefix=/usr/local - - (end script) - - You may also need to provide a parameter like '--with-random=/dev/urandom' - to configure as it cannot detect the presence of a random number - generating device for a target system. The '--prefix' parameter - specifies where cURL will be installed. If 'configure' completes - successfully, do 'make' and 'make install' as usual. - - In some cases, you may be able to simplify the above commands to as - little as: - - ./configure --host=ARCH-OS - - -REDUCING SIZE -============= - There are a number of configure options that can be used to reduce the - size of libcurl for embedded applications where binary size is an - important factor. First, be sure to set the CFLAGS variable when - configuring with any relevant compiler optimization flags to reduce the - size of the binary. For gcc, this would mean at minimum the -Os option - and probably the -march=X option as well, e.g.: - - ./configure CFLAGS='-Os' ... - - Be sure to specify as many --disable- and --without- flags on the configure - command-line as you can to disable all the libcurl features that you - know your application is not going to need. Besides specifying the - --disable-PROTOCOL flags for all the types of URLs your application - will not use, here are some other flags that can reduce the size of the - library: - - --disable-ares (disables support for the ARES DNS library) - --disable-cookies (disables support for HTTP cookies) - --disable-crypto-auth (disables HTTP cryptographic authentication) - --disable-ipv6 (disables support for IPv6) - --disable-verbose (eliminates debugging strings and error code strings) - --enable-hidden-symbols (eliminates unneeded symbols in the shared library) - --without-libidn (disables support for the libidn DNS library) - --without-ssl (disables support for SSL/TLS) - --without-zlib (disables support for on-the-fly decompression) - - The GNU linker has a number of options to reduce the size of the libcurl - dynamic libraries on some platforms even further. Specify them by giving - the options -Wl,-Bsymbolic and -Wl,-s on the gcc command-line. - Be sure also to strip debugging symbols from your binaries after - compiling using 'strip' (or the appropriate variant if cross-compiling). - If space is really tight, you may be able to remove some unneeded - sections of the shared library using the -R option to objcopy (e.g. the - .comment section). - - Using these techniques it is possible to create an HTTP-only shared - libcurl library for i386 Linux platforms that is less than 90 KB in - size (as of version 7.15.4). - - You may find that statically linking libcurl to your application will - result in a lower total size. - - -PORTS -===== - This is a probably incomplete list of known hardware and operating systems - that curl has been compiled for. If you know a system curl compiles and - runs on, that isn't listed, please let us know! - - - Alpha DEC OSF 4 - - Alpha Digital UNIX v3.2 - - Alpha FreeBSD 4.1, 4.5 - - Alpha Linux 2.2, 2.4 - - Alpha NetBSD 1.5.2 - - Alpha OpenBSD 3.0 - - Alpha OpenVMS V7.1-1H2 - - Alpha Tru64 v5.0 5.1 - - HP-PA HP-UX 9.X 10.X 11.X - - HP-PA Linux - - HP3000 MPE/iX - - MIPS IRIX 6.2, 6.5 - - MIPS Linux - - Pocket PC/Win CE 3.0 - - Power AIX 3.2.5, 4.2, 4.3.1, 4.3.2, 5.1, 5.2 - - PowerPC Darwin 1.0 - - PowerPC Linux - - PowerPC Mac OS 9 - - PowerPC Mac OS X - - SINIX-Z v5 - - Sparc Linux - - Sparc Solaris 2.4, 2.5, 2.5.1, 2.6, 7, 8, 9, 10 - - Sparc SunOS 4.1.X - - StrongARM (and other ARM) RISC OS 3.1, 4.02 - - StrongARM/ARM7/ARM9 Linux 2.4, 2.6 - - StrongARM NetBSD 1.4.1 - - Ultrix 4.3a - - UNICOS 9.0 - - i386 BeOS - - i386 DOS - - i386 eCos 1.3.1 - - i386 Esix 4.1 - - i386 FreeBSD - - i386 HURD - - i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4, 2.6 - - i386 MINIX 3.1.2 - - i386 NetBSD - - i386 Novell NetWare - - i386 OS/2 - - i386 OpenBSD - - i386 SCO unix - - i386 Solaris 2.7 - - i386 Windows 95, 98, ME, NT, 2000, XP, 2003 - - i386 QNX 6 - - i486 ncr-sysv4.3.03 (NCR MP-RAS) - - ia64 Linux 2.3.99 - - m68k AmigaOS 3 - - m68k Linux - - m68k OpenBSD - - m88k dg-dgux5.4R3.00 - - s390 Linux - - XScale/PXA250 Linux 2.4 - -Useful URLs -=========== - -OpenSSL http://www.openssl.org -MingW http://www.mingw.org -OpenLDAP http://www.openldap.org -Zlib http://www.gzip.org/zlib/ diff --git a/libs/curl/docs/INSTALL.devcpp b/libs/curl/docs/INSTALL.devcpp deleted file mode 100644 index 8ff4144cc4..0000000000 --- a/libs/curl/docs/INSTALL.devcpp +++ /dev/null @@ -1,302 +0,0 @@ -DevCpp-Mingw Install & Compilation Sept 2005 -================================== - -Reference Emails available at curl@haxx.se: - - Libcurl Install and Use Issues - Awaiting an Answer for Win 32 Install - res = curl_easy_perform(curl); Error - Makefile Issues - - -Having previously done a thorough review of what was available that met my -requirements under GPL, I settled for Libcurl as the software of choice for -many reasons not the least of which was the support. - -Background ----------- - -This quest started when I innocently tried to incorporate the libcurl library -into my simple source code. I figured that a few easy steps would accomplish -this without major headaches. I had no idea that I would be facing an almost -insurmountable challenge. - -The main problem lies in two areas. First the bulk of support for libcurl -exists for a Unix/linux command line environments. This is of little help when -it comes to Windows O/S. - -Secondly the help that does exist for the Windows O/S focused around mingw -thru a command line argument environment. - -You may ask "Why is this a problem?" - -I'm using a Windows O/S with DevCpp. For those of you who are unfamiliar with -DevCpp, it is a window shell GUI that replaces the command line environment -for gcc. A definite improvement that I am unwilling to give up. However using -DevCpp presented its own set of issues. Inadvertently I also made some -careless errors such as compiling the 7.14 version of Makefile with an older -version of source code. Thanks to Dan Fandrich for picking this up. - -I did eventually with the help of Daniel, Phillipe and others manage to -implement successfully (the only mingw available version) -curl-7.13.0-win32-ssl-devel-mingw32 into the DevCpp environment. Only the -dynamic libcurl.dll libcurldll.a libraries worked. The static library which I -was interested in did not. Furthermore when I tried to implement one of the -examples included with the curl package (get info.c) it caused the executable -to crash. Tracing the bug I found it in the code and function res = -curl_easy_perform(curl);. - -At this point I had to make a choice as to whether invest my limited -time-energy resource to fixing the bug or to compile the new version -available. After searching the archives I found a very similar or the same bug -reported from version 7.12x on. Daniel did inform me that he thought that this -bug had been fixed with the latest version. So I proceeded to compile the -latest SSL version where I faced other challenges. - -In order to make this process unremarkable for others using the same -environment I decided to document the process so that others will find it -routine. It would be a shame if newbies could not implement this excellent -package for their use. - -I would like to thank the many others in this forum and in the DevCpp forum -for their help. Without your help I may either have given up or it would have -taken me many times longer to achieve success. - -The Cookbook Approach ---------------------- - -This discussion will be confined to a SSL static library compilation and -installation. Limited mention and comments will be inserted where appropriate -to help with non-SSL, dynamic libraries and executables. - - - Using Makefile from DevCpp to compile Libcurl libraries - -Preamble --------- - -Using the latest version release - curl-7.14.0.tar.gz. Curl source code is -platform independent. This simply means that the source code can be compiled -for any Operating System (Linux/Unix Windows etc. and variations of thereof). - -The first thing to note is that inside curl-7.14.0 you will find two folders -lib and src. Both contain Makefile.m32 (required for win mingw library or exe -compilation) files which are different. The main difference between these two -folders and the makefiles is that the src folder contents are used to compile -an executable file(curl.exe) while the lib folder contents are used to compile -a static (libcurl.a) and dynamic (libcurl.dll & libcurldll.a) file that can be -used to compile libcurl with your own source code so that one can use and -access all libcurl functions. - -Before we start please make sure that DevCpp is installed properly. In -particular make sure you have no spaces in the name of any of the directories -and subdirectories where DevCpp is installed. Failure to comply with the -install instructions may produce erratic behaviour in DevCpp. For further info -check the following sites - -http://aditsu.freeunixhost.com/dev-cpp-faq.html -http://sourceforge.net/forum/message.php?msg_id=3252213 - -As I have mentioned before I will confine this to the SSL Library compilations -but the process is very similar for compilation of the executable - curl.exe; -just substitute the src folder makefile in its stead. - -First use a text processor Notepad, or your own favourite text processor. To -engage your favourite text processor, select Makefile.m32 click once with your -mouse on file icon; icon turns blue, press the shift key and right-click on -mouse, menu appears select "Open with", select your favourite text processor. - -Next read the contents of Makefile.m32. It includes instructions on its use. - -Method I - DOS Command Line ---------------------------- - -Note - The only reason I have included this method is that Method II which is -the preferred method for compiling does not allow for the setting of option -switches (e.g. SSL = 1 or SSL =0). At least that's what they tell me at the -Dev-Cpp forum. - -1 - Make a copy of (D:\Dev-Cpp\bin) bin folder and name it "bin Original" -place it in the Dev-Cpp installed directory (D:\Dev-Cpp\ for this example) - -2 - Copy the entire contents of the LIB folder of curl-7.14.0.tar.gz or zip -version into the bin folder above (D:\Dev-Cpp\bin). The reason being is that -the make.exe file resides in this folder. Make.exe will use - Makefile.m32, -Makefile.inc, and the source code included in the lib folder to compile the -source code. There is a PATH issue with make.exe that remains unresolved at -least for me. Unless the entire source code to be compiled is placed entirely -within the directory of make.exe an error message will be generated - "file -xxxx.yyy not available". - -3- Go to Dev-Cpp\bin and double click on make .exe. You will see a DOS window -quickly pop up and close very quickly. Not to worry! Please do not skip this -step. - -4- Click on the start button\Programs\MS-DOS Prompt.Once the DOS Window is up -Type the disk drive letter (e.g. E: ) engage the enter button. The path should -automatically take you to the directory of the make.exe file. - -5- To compile the source code simply type at the DOS prompt make -f -Makefile.m32 as per instructions contained in the Makefile.m32 file (use any -text processor to read instructions). I don't believe that this makefile -allows for the option of non SSL. Ignore any warnings. - -6- Collect and make copies of libcurl.a, libcurl.dll, libcurldll.a and any *.o -compilations you might need in another directory outside of the bin directory -as you will need this files shortly to set up libcurl for use with -Dev-cpp. For most apps *.o is not required. Later on we will show what to do -with these files. - -7- You are finished but before closing we need to do cleanup - erase the bin -folder and rename the "bin Original" folder created in step 1 to bin. - -Note to compile a curl executable the process is probably similar but instead -of using the LIB folder contents use the SRC folder contents and Makefiles in -curl-7.14.0.tar.gz. File directories relative placements must be respected for -compiling to take place successfully. This may not be possible with the PATH -problem that make.exe experiences. If anyone has solved this PATH issue and -please make sure it actually works on Win 9x/2000/XP before letting me -know. Then please let me or Daniel in on the solution so that it can be -included with these instructions. Thanks. - -or - -Method II - Dev-Cpp GUI ------------------------ - -1- Copy the entire contents of the LIB folder of curl-7.14.0.tar.gz or zip -version into any folder outside of (Dev-Cpp\bin). - -2- Drop the File/New/click on Project. - -3- New Project Dialogue box appears. Double click on the Static Library. - -4- Create Project Dialogue box appears. Select the LIB folder location to -place and locate your Project File Name. Placing the Project File Name -elsewhere may cause problems (PATH issue problem again). - -5- Drop down the Project/Project Options. Project Options Dialogue box -appears. - -6- Select the Makefile tab in the Project Options Dialogue Box. Check Box - -Use Custom Makefile. Click on the Folder icon at the extreme right of the -Check Box. Select Makefile.m32 in the folder wherever you have placed the -contents of the LIB Folder. Press OK and close the Dialogue Box. - -7- Drop the Menu Project/Click on Add to Project. Open File Dialogue Box -appears. The Dialogue Box should open in the folder wherever you have placed -the contents of the LIB Folder. If not go there. - -8- Select Crtl-A to select all files in the LIB folder. Click on open to add -files and close box. Wait till all files are added. This may take 30 seconds -or longer. - -9- Drop the Menu Execute/Click on Compile. - -10- That's it. - - - The following steps must be completed if Curl is to work properly - ================================================================= - -LIB folder inclusions (*.a placement) -------------------------------------- - -1- Refer to Method I - DOS Command Line point # 6 Take libcurl.a, libcurldll.a -and install it in the directory C( or whichever drive Dev is installed) -:\Dev-Cpp\lib. - - -Include Folder --------------- - -1- Create a new folder by the name of curl (do not change the name curl to -some other name as it will cause major issues) in the directory -C:\Dev-Cpp\include. - -2- Copy the entire contents of the curl folder of curl-7.14.0.tar.gz or zip - version into the newly created curl directory - C:\Dev-Cpp\include\curl. - -Links To Include And Lib Folder -------------------------------- - -1- Drop the Menu - Tools\Compiler Options\Directories\Libraries. Make sure -that C( or whichever drive Dev is installed):\DEV-CPP\lib is included. - -2- Next select the Menu - Tools\Compiler Options\Directories\C Includes. Make -sure that C:\DEV-CPP\include and C:\Dev-Cpp\include\curl are included. - -3- Next select the Menu - Tools\Compiler Options\Directories\C++ -Includes. Make sure that C:\DEV-CPP\include and C:\Dev-Cpp\include\curl are -included. - -Linker Links ------------- - -1- Drop the Menu - Tools\Compiler Options\Directories\Compiler. - -2- Make sure that the box "Add these commands to the linker command line" is -checked. - -3- Include in the white space immediately below the box referred in 2 -lcurl --lws2_32 -lwinmm. - -SSL Files ---------- - -1- Get the latest openSSL (as of time of this writing) -openssl-0.9.7e-win32-bin.zip for the minimalist package of the openssl-0.9.7e -binaries ported to MS Windows 95/98/NT/XP using the MingW32/GCC-3.1 -development environment. The file may be downloaded at -http://curl.haxx.se/download/. - -2- Open the above zip file. You will find two files - SDL.dll, -SDL_mixer.dll. Install them in the directory C:\WINDOWS\SYSTEM32 for Win 9x -users and c:\winnt\system32 for NT-family users. - -Multithreading Files --------------------- - -To be completed - -#define -------- - -1- Make sure that your program includes the following - #define CURL_STATICLIB -must be declared FIRST before any other define functions may be -added. Otherwise you may experience link errors. - -2- Don't forget to include #include "curl/curl.h". - -e.g. - #define CURL_STATICLIB -#include - #include "curl/curl.h" -#include -#include -#include -etc... - - -Static or Dynamic Library -------------------------- - -The above steps apply for the use by a static library. Should you choose to -use a dynamic library you will be required to perform these additional steps. - -1- Refer to Method I - DOS Command Line point # 6. Install libcurl.dll in the -directory C:\WINDOWS\SYSTEM32 for Win 9x users and c:\winnt\system32 for -NT-family users. - -2- Refer to Linker Links point 3 - Replace -lcurl with -lcurldll. - -Voila you're done. - -The non-SSL static Library build may not be possible to use at least as of the -time of this writing - v7.14. Check reference emails - Phillipe and I found it -impossible to fully compile as certain files were missing for linking. No big -loss as SSL is a major plus. - -Hope this Helps - -Tom diff --git a/libs/curl/docs/INTERNALS b/libs/curl/docs/INTERNALS deleted file mode 100644 index 42ac4508bb..0000000000 --- a/libs/curl/docs/INTERNALS +++ /dev/null @@ -1,381 +0,0 @@ - Updated for curl 7.9.1 on November 2, 2001 - _ _ ____ _ - ___| | | | _ \| | - / __| | | | |_) | | - | (__| |_| | _ <| |___ - \___|\___/|_| \_\_____| - -INTERNALS - - The project is split in two. The library and the client. The client part uses - the library, but the library is designed to allow other applications to use - it. - - The largest amount of code and complexity is in the library part. - -CVS -=== - All changes to the sources are committed to the CVS repository as soon as - they're somewhat verified to work. Changes shall be commited as independently - as possible so that individual changes can be easier spotted and tracked - afterwards. - - Tagging shall be used extensively, and by the time we release new archives we - should tag the sources with a name similar to the released version number. - -Windows vs Unix -=============== - - There are a few differences in how to program curl the unix way compared to - the Windows way. The four perhaps most notable details are: - - 1. Different function names for socket operations. - - In curl, this is solved with defines and macros, so that the source looks - the same at all places except for the header file that defines them. The - macros in use are sclose(), sread() and swrite(). - - 2. Windows requires a couple of init calls for the socket stuff. - - Those must be made by the application that uses libcurl, in curl that means - src/main.c has some code #ifdef'ed to do just that. - - 3. The file descriptors for network communication and file operations are - not easily interchangable as in unix. - - We avoid this by not trying any funny tricks on file descriptors. - - 4. When writing data to stdout, Windows makes end-of-lines the DOS way, thus - destroying binary data, although you do want that conversion if it is - text coming through... (sigh) - - We set stdout to binary under windows - - 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 lib/ and one in src/) that are - supposed to look exactly as a config.h file would have looked like on a - Windows machine! - - Generally speaking: always remember that this will be compiled on dozens of - operating systems. Don't walk on the edge. - -Library -======= - - There are plenty of entry points to the library, namely each publicly defined - function that libcurl offers to applications. All of those functions are - rather small and easy-to-follow. All the ones prefixed with 'curl_easy' are - put in the lib/easy.c file. - - 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. - - curl_easy_init() allocates an internal struct and makes some initializations. - The returned handle does not reveal internals. This is the 'SessionHandle' - struct which works as an "anchor" struct for all curl_easy functions. All - connections performed will get connect-specific data allocated that should be - used for things related to particular connections/requests. - - curl_easy_setopt() takes three arguments, where the option stuff must be - passed in pairs: the parameter-ID and the parameter-value. The list of - options is documented in the man page. This function mainly sets things in - the 'SessionHandle' struct. - - curl_easy_perform() does a whole lot of things: - - It starts off in the lib/easy.c file by calling Curl_perform() and the main - work then continues in lib/url.c. The flow continues with a call to - Curl_connect() to connect to the remote site. - - o Curl_connect() - - ... analyzes the URL, it separates the different components and connects to - the remote host. This may involve using a proxy and/or using SSL. The - Curl_gethost() function in lib/hostip.c is used for looking up host names. - - When Curl_connect is done, we are connected to the remote site. Then it is - time to tell the server to get a document/file. Curl_do() arranges this. - - This function makes sure there's an allocated and initiated 'connectdata' - struct that is used for this particular connection only (although there may - be several requests performed on the same connect). A bunch of things are - inited/inherited from the SessionHandle struct. - - o Curl_do() - - Curl_do() makes sure the proper protocol-specific function is called. The - functions are named after the protocols they handle. Curl_ftp(), - Curl_http(), Curl_dict(), etc. They all reside in their respective files - (ftp.c, http.c and dict.c). HTTPS is handled by Curl_http() and FTPS by - Curl_ftp(). - - The protocol-specific functions of course deal with protocol-specific - negotiations and setup. They have access to the Curl_sendf() (from - lib/sendf.c) function to send printf-style formatted data to the remote - host and when they're ready to make the actual file transfer they call the - Curl_Transfer() function (in lib/transfer.c) to setup the transfer and - returns. - - Starting in 7.9.1, if this DO function fails and the connection is being - re-used, libcurl will then close this connection, setup a new connection - and re-issue the DO request on that. This is because there is no way to be - perfectly sure that we have discovered a dead connection before the DO - function and thus we might wrongly be re-using a connection that was closed - by the remote peer. - - o Transfer() - - Curl_perform() then calls Transfer() in lib/transfer.c that performs - the entire file transfer. - - During transfer, the progress functions in lib/progress.c are called at a - frequent interval (or at the user's choice, a specified callback might get - called). The speedcheck functions in lib/speedcheck.c are also used to - verify that the transfer is as fast as required. - - o Curl_done() - - Called after a transfer is done. This function takes care of everything - that has to be done after a transfer. This function attempts to leave - matters in a state so that Curl_do() should be possible to call again on - the same connection (in a persistent connection case). It might also soon - be closed with Curl_disconnect(). - - o Curl_disconnect() - - When doing normal connections and transfers, no one ever tries to close any - connections so this is not normally called when curl_easy_perform() is - used. This function is only used when we are certain that no more transfers - is going to be made on the connection. It can be also closed by force, or - it can be called to make sure that libcurl doesn't keep too many - connections alive at the same time (there's a default amount of 5 but that - can be changed with the CURLOPT_MAXCONNECTS option). - - This function cleans up all resources that are associated with a single - connection. - - Curl_perform() is the function that does the main "connect - do - transfer - - done" loop. It loops if there's a Location: to follow. - - When completed, the curl_easy_cleanup() should be called to free up used - resources. It runs Curl_disconnect() on all open connectons. - - A quick roundup on internal function sequences (many of these call - protocol-specific function-pointers): - - curl_connect - connects to a remote site and does initial connect fluff - This also checks for an existing connection to the requested site and uses - that one if it is possible. - - curl_do - starts a transfer - curl_transfer() - transfers data - curl_done - ends a transfer - - curl_disconnect - disconnects from a remote site. This is called when the - disconnect is really requested, which doesn't necessarily have to be - exactly after curl_done in case we want to keep the connection open for - a while. - - HTTP(S) - - HTTP offers a lot and is the protocol in curl that uses the most lines of - code. There is a special file (lib/formdata.c) that offers all the multipart - post functions. - - base64-functions for user+password stuff (and more) is in (lib/base64.c) and - all functions for parsing and sending cookies are found in (lib/cookie.c). - - HTTPS uses in almost every means the same procedure as HTTP, with only two - exceptions: the connect procedure is different and the function used to read - or write from the socket is different, although the latter fact is hidden in - the source by the use of curl_read() for reading and curl_write() for writing - data to the remote server. - - http_chunks.c contains functions that understands HTTP 1.1 chunked transfer - encoding. - - An interesting detail with the HTTP(S) request, is the add_buffer() series of - functions we use. They append data to one single buffer, and when the - building is done the entire request is sent off in one single write. This is - done this way to overcome problems with flawed firewalls and lame servers. - - FTP - - The Curl_if2ip() function can be used for getting the IP number of a - specified network interface, and it resides in lib/if2ip.c. - - Curl_ftpsendf() is used for sending FTP commands to the remote server. It was - made a separate function to prevent us programmers from forgetting that they - must be CRLF terminated. They must also be sent in one single write() to make - firewalls and similar happy. - - Kerberos - - The kerberos support is mainly in lib/krb4.c and lib/security.c. - - TELNET - - Telnet is implemented in lib/telnet.c. - - FILE - - The file:// protocol is dealt with in lib/file.c. - - LDAP - - Everything LDAP is in lib/ldap.c. - - GENERAL - - URL encoding and decoding, called escaping and unescaping in the source code, - is found in lib/escape.c. - - While transfering data in Transfer() a few functions might get - used. curl_getdate() in lib/getdate.c is for HTTP date comparisons (and - more). - - lib/getenv.c offers curl_getenv() which is for reading environment variables - in a neat platform independent way. That's used in the client, but also in - lib/url.c when checking the proxy environment variables. Note that contrary - to the normal unix getenv(), this returns an allocated buffer that must be - free()ed after use. - - lib/netrc.c holds the .netrc parser - - lib/timeval.c features replacement functions for systems that don't have - gettimeofday() and a few support functions for timeval convertions. - - A function named curl_version() that returns the full curl version string is - found in lib/version.c. - - If authentication is requested but no password is given, a getpass_r() clone - exists in lib/getpass.c. libcurl offers a custom callback that can be used - instead of this, but it doesn't change much to us. - -Persistent Connections -====================== - - The persistent connection support in libcurl requires some considerations on - how to do things inside of the library. - - o The 'SessionHandle' struct returned in the curl_easy_init() call must never - hold connection-oriented data. It is meant to hold the root data as well as - all the options etc that the library-user may choose. - o The 'SessionHandle' struct holds the "connection cache" (an array of - pointers to 'connectdata' structs). There's one connectdata struct - allocated for each connection that libcurl knows about. - o This also enables the 'curl handle' to be reused on subsequent transfers, - something that was illegal before libcurl 7.7. - o When we are about to perform a transfer with curl_easy_perform(), we first - check for an already existing connection in the cache that we can use, - otherwise we create a new one and add to the cache. If the cache is full - already when we add a new connection, we close one of the present ones. We - select which one to close dependent on the close policy that may have been - previously set. - o When the transfer operation is complete, we try to leave the connection - open. Particular options may tell us not to, and protocols may signal - closure on connections and then we don't keep it open of course. - o When curl_easy_cleanup() is called, we close all still opened connections. - - You do realize that the curl handle must be re-used in order for the - persistent connections to work. - -Library Symbols -=============== - - All symbols used internally in libcurl must use a 'Curl_' prefix if they're - used in more than a single file. Single-file symbols must be made static. - Public ("exported") symbols must use a 'curl_' prefix. (There are exceptions, - but they are to be changed to follow this pattern in future versions.) - -Return Codes and Informationals -=============================== - - I've made things simple. Almost every function in libcurl returns a CURLcode, - that must be CURLE_OK if everything is OK or otherwise a suitable error code - as the curl/curl.h include file defines. The very spot that detects an error - must use the Curl_failf() function to set the human-readable error - description. - - In aiding the user to understand what's happening and to debug curl usage, we - must supply a fair amount of informational messages by using the Curl_infof() - function. Those messages are only displayed when the user explicitly asks for - them. They are best used when revealing information that isn't otherwise - obvious. - -Client -====== - - main() resides in src/main.c together with most of the client code. - - src/hugehelp.c is automatically generated by the mkhelp.pl perl script to - display the complete "manual" and the src/urlglob.c file holds the functions - used for the URL-"globbing" support. Globbing in the sense that the {} and [] - expansion stuff is there. - - The client mostly messes around to setup its 'config' struct properly, then - it calls the curl_easy_*() functions of the library and when it gets back - control after the curl_easy_perform() it cleans up the library, checks status - and exits. - - When the operation is done, the ourWriteOut() function in src/writeout.c may - be called to report about the operation. That function is using the - curl_easy_getinfo() function to extract useful information from the curl - session. - - Recent versions may loop and do all this several times if many URLs were - specified on the command line or config file. - -Memory Debugging -================ - - The file lib/memdebug.c contains debug-versions of a few functions. Functions - such as malloc, free, fopen, fclose, etc that somehow deal with resources - that might give us problems if we "leak" them. The functions in the memdebug - system do nothing fancy, they do their normal function and then log - information about what they just did. The logged data can then be analyzed - after a complete session, - - memanalyze.pl is the perl script present only present in CVS (not part of the - release archives) that analyzes a log file generated by the memdebug - system. It detects if resources are allocated but never freed and other kinds - of errors related to resource management. - - Use -DMALLOCDEBUG when compiling to enable memory debugging, this is also - switched on by running configure with --enable-debug. - -Test Suite -========== - - Since November 2000, a test suite has evolved. It is placed in its own - subdirectory directly off the root in the curl archive tree, and it contains - a bunch of scripts and a lot of test case data. - - The main test script is runtests.pl that will invoke the two servers - httpserver.pl and ftpserver.pl before all the test cases are performed. The - test suite currently only runs on unix-like platforms. - - You'll find a complete description of the test case data files in the - tests/README file. - - The test suite automatically detects if curl was built with the memory - debugging enabled, and if it was it will detect memory leaks too. - -Building Releases -================= - - There's no magic to this. When you consider everything stable enough to be - released, run the 'maketgz' script (using 'make distcheck' will give you a - pretty good view on the status of the current sources). maketgz prompts for - version number of the client and the library before it creates a release - archive. maketgz uses 'make dist' for the actual archive building, why you - need to fill in the Makefile.am files properly for which files that should - be included in the release archives. - diff --git a/libs/curl/docs/KNOWN_BUGS b/libs/curl/docs/KNOWN_BUGS deleted file mode 100644 index 713c4515c0..0000000000 --- a/libs/curl/docs/KNOWN_BUGS +++ /dev/null @@ -1,136 +0,0 @@ -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! - -35. Both SOCKS5 and SOCKS4 proxy connections are done blocking, which is very - bad when used with the multi interface. - -34. The SOCKS4 connection codes don't properly acknowledge (connect) timeouts. - Also see #12. According to bug #1556528, even the SOCKS5 connect code does - not do it right: http://curl.haxx.se/bug/view.cgi?id=1556528, - -33. Doing multi-pass HTTP authentication on a non-default port does not work. - This happens because the multi-pass code abuses the redirect following code - for doing multiple requests, and when we following redirects to an absolute - URL we must use the newly specified port and not the one specified in the - original URL. A proper fix to this would need to separate the negotiation - "redirect" from an actual redirect. - -32. (At least on Windows) If libcurl is built with c-ares and there's no DNS - server configured in the system, the ares_init() call fails and thus - curl_easy_init() fails as well. This causes weird effects for people who use - numerical IP addresses only. - -31. "curl-config --libs" will include details set in LDFLAGS when configure is - run that might be needed only for building libcurl. Similarly, it might - include options that perhaps aren't suitable both for static and dynamic - linking. Further, curl-config --cflags suffers from the same effects with - CFLAGS/CPPFLAGS. - -30. You need to use -g to the command line tool in order to use RFC2732-style - IPv6 numerical addresses in URLs. - -29. IPv6 URLs with zone ID is not supported. - http://www.ietf.org/internet-drafts/draft-fenner-literal-zone-02.txt - specifies the use of a plus sign instead of a percent when specifying zone - IDs in URLs to get around the problem of percent signs being - special. According to the reporter, Firefox deals with the URL _with_ a - percent letter (which seems like a blatant URL spec violation). - - See http://curl.haxx.se/bug/view.cgi?id=1371118 - -26. NTLM authentication using SSPI (on Windows) when (lib)curl is running in - "system context" will make it use wrong(?) user name - at least when compared - to what winhttp does. See http://curl.haxx.se/bug/view.cgi?id=1281867 - -25. When doing a CONNECT request with curl it doesn't properly handle if the - proxy closes the connection within the authentication "negotiation phase". - Like if you do HTTPS or similar over a proxy and you use perhaps - --proxy-anyauth. - -23. We don't support SOCKS for IPv6. We don't support FTPS over a SOCKS proxy. - We don't have any test cases for SOCKS proxy. We probably have even more - bugs and lack of features when a SOCKS proxy is used. And there seem to be a - problem with SOCKS when doing FTP: See - http://curl.haxx.se/bug/view.cgi?id=1371540 - -22. Sending files to a FTP server using curl on VMS, might lead to curl - complaining on "unaligned file size" on completion. The problem is related - to VMS file structures and the perceived file sizes stat() returns. A - possible fix would involve sending a "STRU VMS" command. - http://curl.haxx.se/bug/view.cgi?id=1156287 - -21. FTP ASCII transfers do not follow RFC959. They don't convert the data - accordingly (not for sending nor for receiving). RFC 959 section 3.1.1.1 - clearly describes how this should be done: - - The sender converts the data from an internal character representation to - the standard 8-bit NVT-ASCII representation (see the Telnet - specification). The receiver will convert the data from the standard - form to his own internal form. - - Since 7.15.4 at least line endings are converted. - -16. FTP URLs passed to curl may contain NUL (0x00) in the RFC 1738 , - , and components, encoded as "%00". The problem is that - curl_unescape does not detect this, but instead returns a shortened C - string. From a strict FTP protocol standpoint, NUL is a valid character - within RFC 959 , so the way to handle this correctly in curl would - be to use a data structure other than a plain C string, one that can handle - embedded NUL characters. From a practical standpoint, most FTP servers - would not meaningfully support NUL characters within RFC 959 , - anyway (e.g., UNIX pathnames may not contain NUL). - -14. Test case 165 might fail on system which has libidn present, but with an - old iconv version (2.1.3 is a known bad version), since it doesn't recognize - the charset when named ISO8859-1. Changing the name to ISO-8859-1 makes the - test pass, but instead makes it fail on Solaris hosts that use its native - iconv. - -13. curl version 7.12.2 fails on AIX if compiled with --enable-ares. - The workaround is to combine --enable-ares with --disable-shared - -12. When connecting to a SOCKS proxy, the (connect) timeout is not properly - acknowledged after the actual TCP connect (during the SOCKS "negotiate" - phase). - -11. Using configure --disable-[protocol] may cause 'make test' to fail for - tests using the disabled protocol(s). - -10. To get HTTP Negotiate authentication to work fine, you need to provide a - (fake) user name (this concerns both curl and the lib) because the code - wrongly only considers authentication if there's a user name provided. - http://curl.haxx.se/bug/view.cgi?id=1004841. How? - http://curl.haxx.se/mail/lib-2004-08/0182.html - -8. Doing resumed upload over HTTP does not work with '-C -', because curl - doesn't do a HEAD first to get the initial size. This needs to be done - manually for HTTP PUT resume to work, and then '-C [index]'. - -7. CURLOPT_USERPWD and CURLOPT_PROXYUSERPWD have no way of providing user names - that contain a colon. This can't be fixed easily in a backwards compatible - way without adding new options (and then, they should most probably allow - setting user name and password separately). - -6. libcurl ignores empty path parts in FTP URLs, whereas RFC1738 states that - such parts should be sent to the server as 'CWD ' (without an argument). - The only exception to this rule, is that we knowingly break this if the - empty part is first in the path, as then we use the double slashes to - indicate that the user wants to reach the root dir (this exception SHALL - remain even when this bug is fixed). - -5. libcurl doesn't treat the content-length of compressed data properly, as - it seems HTTP servers send the *uncompressed* length in that header and - libcurl thinks of it as the *compressed* length. Some explanations are here: - http://curl.haxx.se/mail/lib-2003-06/0146.html - -2. If a HTTP server responds to a HEAD request and includes a body (thus - violating the RFC2616), curl won't wait to read the response but just stop - reading and return back. If a second request (let's assume a GET) is then - immediately made to the same server again, the connection will be re-used - fine of course, and the second request will be sent off but when the - response is to get read, the previous response-body is what curl will read - and havoc is what happens. - More details on this is found in this libcurl mailing list thread: - http://curl.haxx.se/mail/lib-2002-08/0000.html diff --git a/libs/curl/docs/LICENSE-MIXING b/libs/curl/docs/LICENSE-MIXING deleted file mode 100644 index 60f5f934c2..0000000000 --- a/libs/curl/docs/LICENSE-MIXING +++ /dev/null @@ -1,112 +0,0 @@ - License Mixing with apps, libcurl and Third Party Libraries - =========================================================== - -libcurl can be built to use a fair amount of various third party libraries, -libraries that are written and provided by other parties that are distributed -using their own licenses. Even libcurl itself contains code that may cause -problems to some. This document attempts to describe what licenses libcurl and -the other libraries use and what possible dilemmas linking and mixing them all -can lead to for end users. - -I am not a lawyer and this is not legal advice! - -One common dilemma is that GPL[1]-licensed code is not allowed to be linked -with code licensed under the Original BSD license (with the announcement -clause). You may still build your own copies that use them all, but -distributing them as binaries would be to violate the GPL license - unless you -accompany your license with an exception[2]. This particular problem was -addressed when the Modified BSD license was created, which does not have the -annoncement clause that collides with GPL. - -libcurl http://curl.haxx.se/docs/copyright.html - - Uses an MIT (or Modified BSD)-style license that is as liberal as - possible. Some of the source files that deal with KRB4 have Original - BSD-style announce-clause licenses. You may not distribute binaries - with krb4-enabled libcurl that also link with GPL-licensed code! - -OpenSSL http://www.openssl.org/source/license.html - - (May be used for SSL/TLS support) Uses an Original BSD-style license - with an announement clause that makes it "incompatible" with GPL. You - are not allowed to ship binaries that link with OpenSSL that includes - GPL code (unless that specific GPL code includes an exception for - OpenSSL - a habit that is growing more and more common). If OpenSSL's - licensing is a problem for you, consider using GnuTLS or yassl - instead. - -GnuTLS http://www.gnutls.org/ - - (May be used for SSL/TLS support) Uses the LGPL[3] license. If this is - a problem for you, consider using OpenSSL instead. Also note that - GnuTLS itself depends on and uses other libs (libgcrypt and - libgpg-error) and they too are LGPL- or GPL-licensed. - -yassl http://www.yassl.com/ - - (May be used for SSL/TLS support) Uses the GPL[1] license. If this is - a problem for you, consider using OpenSSL or GnuTLS instead. - -c-ares http://daniel.haxx.se/projects/c-ares/license.html - - (Used for asynchronous name resolves) Uses an MIT license that is very - liberal and imposes no restrictions on any other library or part you - may link with. - -zlib http://www.gzip.org/zlib/zlib_license.html - - (Used for compressed Transfer-Encoding support) Uses an MIT-style - license that shouldn't collide with any other library. - -krb4 - - While nothing in particular says that a Kerberos4 library must use any - particular license, the one I've tried and used successfully so far - (kth-krb4) is partly Original BSD-licensed with the announcement - clause. Some of the code in libcurl that is written to deal with - Kerberos4 is Modified BSD-licensed. - -MIT Kerberos http://web.mit.edu/kerberos/www/dist/ - - (May be used for GSS support) MIT licensed, that shouldn't collide - with any other parts. - -Heimdal http://www.pdc.kth.se/heimdal/ - - (May be used for GSS support) Heimdal is Original BSD licensed with - the announcement clause. - -GNU GSS http://www.gnu.org/software/gss/ - - (May be used for GSS support) GNU GSS is GPL licensed. Note that you - may not distribute binary curl packages that uses this if you build - curl to also link and use any Original BSD licensed libraries! - -fbopenssl - - (Used for SPNEGO support) Unclear license. Based on its name, I assume - that it uses the OpenSSL license and thus shares the same issues as - described for OpenSSL above. - -libidn http://www.gnu.org/licenses/lgpl.html - - (Used for IDNA support) Uses the GNU Lesser General Public - License. LGPL is a variation of GPL with slightly less aggressive - "copyleft". This license requires more requirements to be met when - distributing binaries, see the license for details. Also note that if - you distribute a binary that includes this library, you must also - include the full LGPL license text. Please properly point out what - parts of the distributed package that the license addresses. - -OpenLDAP http://www.openldap.org/software/release/license.html - - (Used for LDAP support) Uses a Modified BSD-style license. Since - libcurl uses OpenLDAP as a shared library only, I have not heard of - anyone that ships OpenLDAP linked with libcurl in an app. - - -[1] = GPL - GNU General Public License: http://www.gnu.org/licenses/gpl.html -[2] = http://www.fsf.org/licenses/gpl-faq.html#GPLIncompatibleLibs details on - how to write such an exception to the GPL -[3] = LGPL - GNU Lesser General Public License: - http://www.gnu.org/licenses/lgpl.html diff --git a/libs/curl/docs/MANUAL b/libs/curl/docs/MANUAL deleted file mode 100644 index 221464ed96..0000000000 --- a/libs/curl/docs/MANUAL +++ /dev/null @@ -1,912 +0,0 @@ -LATEST VERSION - - You always find news about what's going on as well as the latest versions - from the curl web pages, located at: - - http://curl.haxx.se - -SIMPLE USAGE - - Get the main page from netscape's web-server: - - curl http://www.netscape.com/ - - Get the README file the user's home directory at funet's ftp-server: - - curl ftp://ftp.funet.fi/README - - Get a web page from a server using port 8000: - - curl http://www.weirdserver.com:8000/ - - Get a list of a directory of an FTP site: - - curl ftp://cool.haxx.se/ - - Get the definition of curl from a dictionary: - - curl dict://dict.org/m:curl - - Fetch two documents at once: - - curl ftp://cool.haxx.se/ http://www.weirdserver.com:8000/ - - Get a file off an FTPS server: - - curl ftps://files.are.secure.com/secrets.txt - - or use the more appropriate FTPS way to get the same file: - - curl --ftp-ssl ftp://files.are.secure.com/secrets.txt - - -DOWNLOAD TO A FILE - - Get a web page and store in a local file: - - curl -o thatpage.html http://www.netscape.com/ - - Get a web page and store in a local file, make the local file get the name - of the remote document (if no file name part is specified in the URL, this - will fail): - - curl -O http://www.netscape.com/index.html - - Fetch two files and store them with their remote names: - - curl -O www.haxx.se/index.html -O curl.haxx.se/download.html - -USING PASSWORDS - - FTP - - To ftp files using name+passwd, include them in the URL like: - - curl ftp://name:passwd@machine.domain:port/full/path/to/file - - or specify them with the -u flag like - - curl -u name:passwd ftp://machine.domain:port/full/path/to/file - - FTPS - - It is just like for FTP, but you may also want to specify and use - SSL-specific options for certificates etc. - - Note that using FTPS:// as prefix is the "implicit" way as described in the - standards while the recommended "explicit" way is done by using FTP:// and - the --ftp-ssl option. - - HTTP - - The HTTP URL doesn't support user and password in the URL string. Curl - does support that anyway to provide a ftp-style interface and thus you can - pick a file like: - - curl http://name:passwd@machine.domain/full/path/to/file - - or specify user and password separately like in - - curl -u name:passwd http://machine.domain/full/path/to/file - - HTTP offers many different methods of authentication and curl supports - several: Basic, Digest, NTLM and Negotiate. Without telling which method to - use, curl defaults to Basic. You can also ask curl to pick the most secure - ones out of the ones that the server accepts for the given URL, by using - --anyauth. - - NOTE! Since HTTP URLs don't support user and password, you can't use that - style when using Curl via a proxy. You _must_ use the -u style fetch - during such circumstances. - - HTTPS - - Probably most commonly used with private certificates, as explained below. - -PROXY - - Get an ftp file using a proxy named my-proxy that uses port 888: - - curl -x my-proxy:888 ftp://ftp.leachsite.com/README - - Get a file from a HTTP server that requires user and password, using the - same proxy as above: - - curl -u user:passwd -x my-proxy:888 http://www.get.this/ - - Some proxies require special authentication. Specify by using -U as above: - - curl -U user:passwd -x my-proxy:888 http://www.get.this/ - - curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5. - - See also the environment variables Curl support that offer further proxy - control. - -RANGES - - With HTTP 1.1 byte-ranges were introduced. Using this, a client can request - to get only one or more subparts of a specified document. Curl supports - this with the -r flag. - - Get the first 100 bytes of a document: - - curl -r 0-99 http://www.get.this/ - - Get the last 500 bytes of a document: - - curl -r -500 http://www.get.this/ - - Curl also supports simple ranges for FTP files as well. Then you can only - specify start and stop position. - - Get the first 100 bytes of a document using FTP: - - curl -r 0-99 ftp://www.get.this/README - -UPLOADING - - FTP - - Upload all data on stdin to a specified ftp site: - - curl -T - ftp://ftp.upload.com/myfile - - Upload data from a specified file, login with user and password: - - curl -T uploadfile -u user:passwd ftp://ftp.upload.com/myfile - - Upload a local file to the remote site, and use the local file name remote - too: - - curl -T uploadfile -u user:passwd ftp://ftp.upload.com/ - - Upload a local file to get appended to the remote file using ftp: - - curl -T localfile -a ftp://ftp.upload.com/remotefile - - Curl also supports ftp upload through a proxy, but only if the proxy is - configured to allow that kind of tunneling. If it does, you can run curl in - a fashion similar to: - - curl --proxytunnel -x proxy:port -T localfile ftp.upload.com - - HTTP - - Upload all data on stdin to a specified http site: - - curl -T - http://www.upload.com/myfile - - Note that the http server must have been configured to accept PUT before - this can be done successfully. - - For other ways to do http data upload, see the POST section below. - -VERBOSE / DEBUG - - If curl fails where it isn't supposed to, if the servers don't let you in, - if you can't understand the responses: use the -v flag to get verbose - fetching. Curl will output lots of info and what it sends and receives in - order to let the user see all client-server interaction (but it won't show - you the actual data). - - curl -v ftp://ftp.upload.com/ - - To get even more details and information on what curl does, try using the - --trace or --trace-ascii options with a given file name to log to, like - this: - - curl --trace trace.txt www.haxx.se - - -DETAILED INFORMATION - - Different protocols provide different ways of getting detailed information - about specific files/documents. To get curl to show detailed information - about a single file, you should use -I/--head option. It displays all - available info on a single file for HTTP and FTP. The HTTP information is a - lot more extensive. - - For HTTP, you can get the header information (the same as -I would show) - shown before the data by using -i/--include. Curl understands the - -D/--dump-header option when getting files from both FTP and HTTP, and it - will then store the headers in the specified file. - - Store the HTTP headers in a separate file (headers.txt in the example): - - curl --dump-header headers.txt curl.haxx.se - - Note that headers stored in a separate file can be very useful at a later - time if you want curl to use cookies sent by the server. More about that in - the cookies section. - -POST (HTTP) - - It's easy to post data using curl. This is done using the -d - option. The post data must be urlencoded. - - Post a simple "name" and "phone" guestbook. - - curl -d "name=Rafael%20Sagula&phone=3320780" \ - http://www.where.com/guest.cgi - - How to post a form with curl, lesson #1: - - Dig out all the tags in the form that you want to fill in. (There's - a perl program called formfind.pl on the curl site that helps with this). - - If there's a "normal" post, you use -d to post. -d takes a full "post - string", which is in the format - - =&=&... - - The 'variable' names are the names set with "name=" in the tags, and - the data is the contents you want to fill in for the inputs. The data *must* - be properly URL encoded. That means you replace space with + and that you - write weird letters with %XX where XX is the hexadecimal representation of - the letter's ASCII code. - - Example: - - (page located at http://www.formpost.com/getthis/ - -
- - - - -
- - We want to enter user 'foobar' with password '12345'. - - To post to this, you enter a curl command line like: - - curl -d "user=foobar&pass=12345&id=blablabla&ding=submit" (continues) - http://www.formpost.com/getthis/post.cgi - - - While -d uses the application/x-www-form-urlencoded mime-type, generally - understood by CGI's and similar, curl also supports the more capable - multipart/form-data type. This latter type supports things like file upload. - - -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=' - 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'. - - 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'. - - curl -F "file=@cooltext.txt" -F "yourname=Daniel" \ - -F "filedescription=Cool text file with cool text inside" \ - http://www.post.com/postit.cgi - - To send two files in one post you can do it in two ways: - - 1. Send multiple files in a single "field" with a single field name: - - curl -F "pictures=@dog.gif,cat.gif" - - 2. Send two fields with two field names: - - curl -F "docpicture=@dog.gif" -F "catpicture=@cat.gif" - - To send a field value literally without interpreting a leading '@' - or '<', or an embedded ';type=', use --form-string instead of - -F. This is recommended when the value is obtained from a user or - some other unpredictable source. Under these circumstances, using - -F instead of --form-string would allow a user to trick curl into - uploading a file. - -REFERRER - - A HTTP request has the option to include information about which address - that referred to actual page. Curl allows you to specify the - referrer to be used on the command line. It is especially useful to - fool or trick stupid servers or CGI scripts that rely on that information - being available or contain certain data. - - curl -e www.coolsite.com http://www.showme.com/ - - NOTE: The referer field is defined in the HTTP spec to be a full URL. - -USER AGENT - - A HTTP request has the option to include information about the browser - that generated the request. Curl allows it to be specified on the command - line. It is especially useful to fool or trick stupid servers or CGI - scripts that only accept certain browsers. - - Example: - - curl -A 'Mozilla/3.0 (Win95; I)' http://www.nationsbank.com/ - - Other common strings: - 'Mozilla/3.0 (Win95; I)' Netscape Version 3 for Windows 95 - 'Mozilla/3.04 (Win95; U)' Netscape Version 3 for Windows 95 - 'Mozilla/2.02 (OS/2; U)' Netscape Version 2 for OS/2 - 'Mozilla/4.04 [en] (X11; U; AIX 4.2; Nav)' NS for AIX - 'Mozilla/4.05 [en] (X11; U; Linux 2.0.32 i586)' NS for Linux - - Note that Internet Explorer tries hard to be compatible in every way: - 'Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)' MSIE for W95 - - Mozilla is not the only possible User-Agent name: - 'Konqueror/1.0' KDE File Manager desktop client - 'Lynx/2.7.1 libwww-FM/2.14' Lynx command line browser - -COOKIES - - Cookies are generally used by web servers to keep state information at the - client's side. The server sets cookies by sending a response line in the - headers that looks like 'Set-Cookie: ' where the data part then - typically contains a set of NAME=VALUE pairs (separated by semicolons ';' - like "NAME1=VALUE1; NAME2=VALUE2;"). The server can also specify for what - path the "cookie" should be used for (by specifying "path=value"), when the - cookie should expire ("expire=DATE"), for what domain to use it - ("domain=NAME") and if it should be used on secure connections only - ("secure"). - - If you've received a page from a server that contains a header like: - Set-Cookie: sessionid=boo123; path="/foo"; - - it means the server wants that first pair passed on when we get anything in - a path beginning with "/foo". - - Example, get a page that wants my name passed in a cookie: - - curl -b "name=Daniel" www.sillypage.com - - Curl also has the ability to use previously received cookies in following - sessions. If you get cookies from a server and store them in a file in a - manner similar to: - - curl --dump-header headers www.example.com - - ... you can then in a second connect to that (or another) site, use the - cookies from the 'headers' file like: - - curl -b headers www.example.com - - While saving headers to a file is a working way to store cookies, it is - however error-prone and not the preferred way to do this. Instead, make curl - save the incoming cookies using the well-known netscape cookie format like - this: - - curl -c cookies.txt www.example.com - - Note that by specifying -b you enable the "cookie awareness" and with -L - you can make curl follow a location: (which often is used in combination - with cookies). So that if a site sends cookies and a location, you can - use a non-existing file to trigger the cookie awareness like: - - curl -L -b empty.txt www.example.com - - The file to read cookies from must be formatted using plain HTTP headers OR - as netscape's cookie file. Curl will determine what kind it is based on the - file contents. In the above command, curl will parse the header and store - the cookies received from www.example.com. curl will send to the server the - stored cookies which match the request as it follows the location. The - file "empty.txt" may be a nonexistent file. - - Alas, to both read and write cookies from a netscape cookie file, you can - set both -b and -c to use the same file: - - curl -b cookies.txt -c cookies.txt www.example.com - -PROGRESS METER - - The progress meter exists to show a user that something actually is - happening. The different fields in the output have the following meaning: - - % Total % Received % Xferd Average Speed Time Curr. - Dload Upload Total Current Left Speed - 0 151M 0 38608 0 0 9406 0 4:41:43 0:00:04 4:41:39 9287 - - From left-to-right: - % - percentage completed of the whole transfer - Total - total size of the whole expected transfer - % - percentage completed of the download - Received - currently downloaded amount of bytes - % - percentage completed of the upload - Xferd - currently uploaded amount of bytes - Average Speed - Dload - the average transfer speed of the download - Average Speed - Upload - the average transfer speed of the upload - Time Total - expected time to complete the operation - Time Current - time passed since the invoke - Time Left - expected time left to completion - Curr.Speed - the average transfer speed the last 5 seconds (the first - 5 seconds of a transfer is based on less time of course.) - - The -# option will display a totally different progress bar that doesn't - need much explanation! - -SPEED LIMIT - - Curl allows the user to set the transfer speed conditions that must be met - to let the transfer keep going. By using the switch -y and -Y you - can make curl abort transfers if the transfer speed is below the specified - lowest limit for a specified time. - - To have curl abort the download if the speed is slower than 3000 bytes per - second for 1 minute, run: - - curl -Y 3000 -y 60 www.far-away-site.com - - This can very well be used in combination with the overall time limit, so - that the above operation must be completed in whole within 30 minutes: - - curl -m 1800 -Y 3000 -y 60 www.far-away-site.com - - Forcing curl not to transfer data faster than a given rate is also possible, - which might be useful if you're using a limited bandwidth connection and you - don't want your transfer to use all of it (sometimes referred to as - "bandwidth throttle"). - - Make curl transfer data no faster than 10 kilobytes per second: - - curl --limit-rate 10K www.far-away-site.com - - or - - curl --limit-rate 10240 www.far-away-site.com - - Or prevent curl from uploading data faster than 1 megabyte per second: - - curl -T upload --limit-rate 1M ftp://uploadshereplease.com - - When using the --limit-rate option, the transfer rate is regulated on a - per-second basis, which will cause the total transfer speed to become lower - than the given number. Sometimes of course substantially lower, if your - transfer stalls during periods. - -CONFIG FILE - - Curl automatically tries to read the .curlrc file (or _curlrc file on win32 - systems) from the user's home dir on startup. - - The config file could be made up with normal command line switches, but you - can also specify the long options without the dashes to make it more - readable. You can separate the options and the parameter with spaces, or - with = or :. Comments can be used within the file. If the first letter on a - line is a '#'-letter the rest of the line is treated as a comment. - - If you want the parameter to contain spaces, you must inclose the entire - parameter within double quotes ("). Within those quotes, you specify a - quote as \". - - NOTE: You must specify options and their arguments on the same line. - - Example, set default time out and proxy in a config file: - - # We want a 30 minute timeout: - -m 1800 - # ... and we use a proxy for all accesses: - proxy = proxy.our.domain.com:8080 - - White spaces ARE significant at the end of lines, but all white spaces - leading up to the first characters of each line are ignored. - - Prevent curl from reading the default file by using -q as the first command - line parameter, like: - - curl -q www.thatsite.com - - Force curl to get and display a local help page in case it is invoked - without URL by making a config file similar to: - - # default url to get - url = "http://help.with.curl.com/curlhelp.html" - - You can specify another config file to be read by using the -K/--config - flag. If you set config file name to "-" it'll read the config from stdin, - which can be handy if you want to hide options from being visible in process - tables etc: - - echo "user = user:passwd" | curl -K - http://that.secret.site.com - -EXTRA HEADERS - - When using curl in your own very special programs, you may end up needing - to pass on your own custom headers when getting a web page. You can do - this by using the -H flag. - - Example, send the header "X-you-and-me: yes" to the server when getting a - page: - - curl -H "X-you-and-me: yes" www.love.com - - This can also be useful in case you want curl to send a different text in a - header than it normally does. The -H header you specify then replaces the - header curl would normally send. If you replace an internal header with an - empty one, you prevent that header from being sent. To prevent the Host: - header from being used: - - curl -H "Host:" www.server.com - -FTP and PATH NAMES - - Do note that when getting files with the ftp:// URL, the given path is - relative the directory you enter. To get the file 'README' from your home - directory at your ftp site, do: - - curl ftp://user:passwd@my.site.com/README - - But if you want the README file from the root directory of that very same - site, you need to specify the absolute file name: - - curl ftp://user:passwd@my.site.com//README - - (I.e with an extra slash in front of the file name.) - -FTP and firewalls - - The FTP protocol requires one of the involved parties to open a second - connction as soon as data is about to get transfered. There are two ways to - do this. - - The default way for curl is to issue the PASV command which causes the - server to open another port and await another connection performed by the - client. This is good if the client is behind a firewall that don't allow - incoming connections. - - curl ftp.download.com - - If the server for example, is behind a firewall that don't allow connections - on other ports than 21 (or if it just doesn't support the PASV command), the - other way to do it is to use the PORT command and instruct the server to - connect to the client on the given (as parameters to the PORT command) IP - number and port. - - The -P flag to curl supports a few different options. Your machine may have - several IP-addresses and/or network interfaces and curl allows you to select - which of them to use. Default address can also be used: - - curl -P - ftp.download.com - - Download with PORT but use the IP address of our 'le0' interface (this does - not work on windows): - - curl -P le0 ftp.download.com - - Download with PORT but use 192.168.0.10 as our IP address to use: - - curl -P 192.168.0.10 ftp.download.com - -NETWORK INTERFACE - - Get a web page from a server using a specified port for the interface: - - curl --interface eth0:1 http://www.netscape.com/ - - or - - curl --interface 192.168.1.10 http://www.netscape.com/ - -HTTPS - - Secure HTTP requires SSL libraries to be installed and used when curl is - built. If that is done, curl is capable of retrieving and posting documents - using the HTTPS protocol. - - Example: - - curl https://www.secure-site.com - - Curl is also capable of using your personal certificates to get/post files - from sites that require valid certificates. The only drawback is that the - certificate needs to be in PEM-format. PEM is a standard and open format to - store certificates with, but it is not used by the most commonly used - browsers (Netscape and MSIE both use the so called PKCS#12 format). If you - want curl to use the certificates you use with your (favourite) browser, you - may need to download/compile a converter that can convert your browser's - formatted certificates to PEM formatted ones. This kind of converter is - included in recent versions of OpenSSL, and for older versions Dr Stephen - N. Henson has written a patch for SSLeay that adds this functionality. You - can get his patch (that requires an SSLeay installation) from his site at: - http://www.drh-consultancy.demon.co.uk/ - - Example on how to automatically retrieve a document using a certificate with - a personal password: - - curl -E /path/to/cert.pem:password https://secure.site.com/ - - If you neglect to specify the password on the command line, you will be - prompted for the correct password before any data can be received. - - Many older SSL-servers have problems with SSLv3 or TLS, that newer versions - of OpenSSL etc is using, therefore it is sometimes useful to specify what - SSL-version curl should use. Use -3, -2 or -1 to specify that exact SSL - version to use (for SSLv3, SSLv2 or TLSv1 respectively): - - curl -2 https://secure.site.com/ - - Otherwise, curl will first attempt to use v3 and then v2. - - To use OpenSSL to convert your favourite browser's certificate into a PEM - formatted one that curl can use, do something like this (assuming netscape, - but IE is likely to work similarly): - - You start with hitting the 'security' menu button in netscape. - - Select 'certificates->yours' and then pick a certificate in the list - - Press the 'export' button - - enter your PIN code for the certs - - select a proper place to save it - - Run the 'openssl' application to convert the certificate. If you cd to the - openssl installation, you can do it like: - - # ./apps/openssl pkcs12 -in [file you saved] -clcerts -out [PEMfile] - - -RESUMING FILE TRANSFERS - - To continue a file transfer where it was previously aborted, curl supports - resume on http(s) downloads as well as ftp uploads and downloads. - - Continue downloading a document: - - curl -C - -o file ftp://ftp.server.com/path/file - - Continue uploading a document(*1): - - curl -C - -T file ftp://ftp.server.com/path/file - - Continue downloading a document from a web server(*2): - - curl -C - -o file http://www.server.com/ - - (*1) = This requires that the ftp server supports the non-standard command - SIZE. If it doesn't, curl will say so. - - (*2) = This requires that the web server supports at least HTTP/1.1. If it - doesn't, curl will say so. - -TIME CONDITIONS - - HTTP allows a client to specify a time condition for the document it - requests. It is If-Modified-Since or If-Unmodified-Since. Curl allow you to - specify them with the -z/--time-cond flag. - - For example, you can easily make a download that only gets performed if the - remote file is newer than a local copy. It would be made like: - - curl -z local.html http://remote.server.com/remote.html - - Or you can download a file only if the local file is newer than the remote - one. Do this by prepending the date string with a '-', as in: - - curl -z -local.html http://remote.server.com/remote.html - - You can specify a "free text" date as condition. Tell curl to only download - the file if it was updated since yesterday: - - curl -z yesterday http://remote.server.com/remote.html - - Curl will then accept a wide range of date formats. You always make the date - check the other way around by prepending it with a dash '-'. - -DICT - - For fun try - - curl dict://dict.org/m:curl - curl dict://dict.org/d:heisenbug:jargon - curl dict://dict.org/d:daniel:web1913 - - Aliases for 'm' are 'match' and 'find', and aliases for 'd' are 'define' - and 'lookup'. For example, - - curl dict://dict.org/find:curl - - Commands that break the URL description of the RFC (but not the DICT - protocol) are - - curl dict://dict.org/show:db - curl dict://dict.org/show:strat - - Authentication is still missing (but this is not required by the RFC) - -LDAP - - If you have installed the OpenLDAP library, curl can take advantage of it - 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. 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://curl.haxx.se/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: - - curl -B "ldap://ldap.frontec.se/o=frontec??sub?mail=*sth.frontec.se" - - If I want the same info in HTML format, I can get it by not using the -B - (enforce ASCII) flag. - -ENVIRONMENT VARIABLES - - Curl reads and understands the following environment variables: - - http_proxy, HTTPS_PROXY, FTP_PROXY - - They should be set for protocol-specific proxies. General proxy should be - set with - - ALL_PROXY - - A comma-separated list of host names that shouldn't go through any proxy is - set in (only an asterisk, '*' matches all hosts) - - NO_PROXY - - If a tail substring of the domain-path for a host matches one of these - strings, transactions with that node will not be proxied. - - - The usage of the -x/--proxy flag overrides the environment variables. - -NETRC - - Unix introduced the .netrc concept a long time ago. It is a way for a user - to specify name and password for commonly visited ftp sites in a file so - that you don't have to type them in each time you visit those sites. You - realize this is a big security risk if someone else gets hold of your - passwords, so therefore most unix programs won't read this file unless it is - only readable by yourself (curl doesn't care though). - - Curl supports .netrc files if told so (using the -n/--netrc and - --netrc-optional options). This is not restricted to only ftp, - but curl can use it for all protocols where authentication is used. - - A very simple .netrc file could look something like: - - machine curl.haxx.se login iamdaniel password mysecret - -CUSTOM OUTPUT - - To better allow script programmers to get to know about the progress of - curl, the -w/--write-out option was introduced. Using this, you can specify - what information from the previous transfer you want to extract. - - To display the amount of bytes downloaded together with some text and an - ending newline: - - curl -w 'We downloaded %{size_download} bytes\n' www.download.com - -KERBEROS4 FTP TRANSFER - - Curl supports kerberos4 for FTP transfers. You need the kerberos package - installed and used at curl build time for it to be used. - - First, get the krb-ticket the normal way, like with the kauth tool. Then use - curl in way similar to: - - curl --krb4 private ftp://krb4site.com -u username:fakepwd - - There's no use for a password on the -u switch, but a blank one will make - curl ask for one and you already entered the real password to kauth. - -TELNET - - The curl telnet support is basic and very easy to use. Curl passes all data - passed to it on stdin to the remote server. Connect to a remote telnet - server using a command line similar to: - - curl telnet://remote.server.com - - And enter the data to pass to the server on stdin. The result will be sent - to stdout or to the file you specify with -o. - - You might want the -N/--no-buffer option to switch off the buffered output - for slow connections or similar. - - Pass options to the telnet protocol negotiation, by using the -t option. To - tell the server we use a vt100 terminal, try something like: - - curl -tTTYPE=vt100 telnet://remote.server.com - - Other interesting options for it -t include: - - - XDISPLOC= Sets the X display location. - - - NEW_ENV= Sets an environment variable. - - NOTE: the telnet protocol does not specify any way to login with a specified - user and password so curl can't do that automatically. To do that, you need - to track when the login prompt is received and send the username and - password accordingly. - -PERSISTENT CONNECTIONS - - Specifying multiple files on a single command line will make curl transfer - all of them, one after the other in the specified order. - - libcurl will attempt to use persistent connections for the transfers so that - the second transfer to the same host can use the same connection that was - already initiated and was left open in the previous transfer. This greatly - decreases connection time for all but the first transfer and it makes a far - better use of the network. - - Note that curl cannot use persistent connections for transfers that are used - in subsequence curl invokes. Try to stuff as many URLs as possible on the - same command line if they are using the same host, as that'll make the - transfers faster. If you use a http proxy for file transfers, practically - all transfers will be persistent. - -MULTIPLE TRANSFERS WITH A SINGLE COMMAND LINE - - As is mentioned above, you can download multiple files with one command line - by simply adding more URLs. If you want those to get saved to a local file - instead of just printed to stdout, you need to add one save option for each - URL you specify. Note that this also goes for the -O option. - - For example: get two files and use -O for the first and a custom file - name for the second: - - curl -O http://url.com/file.txt ftp://ftp.com/moo.exe -o moo.jpg - - You can also upload multiple files in a similar fashion: - - curl -T local1 ftp://ftp.com/moo.exe -T local2 ftp://ftp.com/moo2.txt - -MAILING LISTS - - For your convenience, we have several open mailing lists to discuss curl, - its development and things relevant to this. Get all info at - http://curl.haxx.se/mail/. Some of the lists available are: - - curl-users - - Users of the command line tool. How to use it, what doesn't work, new - features, related tools, questions, news, installations, compilations, - running, porting etc. - - curl-library - - Developers using or developing libcurl. Bugs, extensions, improvements. - - curl-announce - - Low-traffic. Only receives announcements of new public versions. At worst, - that makes something like one or two mails per month, but usually only one - mail every second month. - - curl-and-php - - Using the curl functions in PHP. Everything curl with a PHP angle. Or PHP - with a curl angle. - - curl-and-python - - Python hackers using curl with or without the python binding pycurl. - - Please direct curl questions, feature requests and trouble reports to one of - these mailing lists instead of mailing any individual. diff --git a/libs/curl/docs/Makefile.am b/libs/curl/docs/Makefile.am deleted file mode 100644 index 345e0218dc..0000000000 --- a/libs/curl/docs/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -# -# $Id: Makefile.am,v 1.36 2005/10/28 21:34:51 bagder Exp $ -# - -AUTOMAKE_OPTIONS = foreign no-dependencies - -man_MANS = curl.1 curl-config.1 -GENHTMLPAGES = curl.html curl-config.html -PDFPAGES = curl.pdf curl-config.pdf - -HTMLPAGES = $(GENHTMLPAGES) index.html - -SUBDIRS = examples libcurl - -CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES) - -EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS \ - README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS \ - KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) HISTORY INSTALL \ - $(PDFPAGES) LICENSE-MIXING README.netware DISTRO-DILEMMA INSTALL.devcpp - -MAN2HTML= roffit < $< >$@ - -SUFFIXES = .1 .html .pdf - -html: $(HTMLPAGES) - cd libcurl; make html - -pdf: $(PDFPAGES) - cd libcurl; make pdf - -.1.html: - $(MAN2HTML) - -.1.pdf: - @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \ - groff -Tps -man $< >$$foo.ps; \ - ps2pdf $$foo.ps $@; \ - rm $$foo.ps; \ - echo "converted $< to $@") - diff --git a/libs/curl/docs/README.netware b/libs/curl/docs/README.netware deleted file mode 100644 index 00a241ecf4..0000000000 --- a/libs/curl/docs/README.netware +++ /dev/null @@ -1,27 +0,0 @@ - _ _ ____ _ - ___| | | | _ \| | - / __| | | | |_) | | - | (__| |_| | _ <| |___ - \___|\___/|_| \_\_____| - -README.netware - - Read the README file first. - - Curl has been successfully compiled with gcc / nlmconv on different flavours - of Linux as well as with the official Metrowerks CodeWarrior compiler. - While not being the main development target, a continously growing share of - curl users are NetWare-based, specially also consuming the lib from PHP. - - The unix-style man pages are tricky to read on windows, so therefore are all - those pages converted to HTML as well as pdf, and included in the release - archives. - - The main curl.1 man page is also "built-in" in the command line tool. Use a - command line similar to this in order to extract a separate text file: - - curl -M >manual.txt - - Read the INSTALL file for instructions how to compile curl self. - - diff --git a/libs/curl/docs/README.win32 b/libs/curl/docs/README.win32 deleted file mode 100644 index 110af3c72d..0000000000 --- a/libs/curl/docs/README.win32 +++ /dev/null @@ -1,22 +0,0 @@ - _ _ ____ _ - ___| | | | _ \| | - / __| | | | |_) | | - | (__| |_| | _ <| |___ - \___|\___/|_| \_\_____| - -README.win32 - - Read the README file first. - - Curl has been compiled, built and run on all sorts of Windows and win32 - systems. While not being the main develop target, a fair share of curl users - are win32-based. - - The unix-style man pages are tricky to read on windows, so therefore are all - those pages converted to HTML as well as pdf, and included in the release - archives. - - The main curl.1 man page is also "built-in" in the command line tool. Use a - command line similar to this in order to extract a separate text file: - - curl -M >manual.txt diff --git a/libs/curl/docs/RESOURCES b/libs/curl/docs/RESOURCES deleted file mode 100644 index 408efe1824..0000000000 --- a/libs/curl/docs/RESOURCES +++ /dev/null @@ -1,72 +0,0 @@ - _ _ ____ _ - Project ___| | | | _ \| | - / __| | | | |_) | | - | (__| |_| | _ <| |___ - \___|\___/|_| \_\_____| - - -This document lists documents and standards used by curl. - - RFC 959 - The FTP protocol - - RFC 1635 - How to Use Anonymous FTP - - RFC 1738 - Uniform Resource Locators - - RFC 1777 - defines the LDAP protocol - - RFC 1808 - Relative Uniform Resource Locators - - RFC 1867 - Form-based File Upload in HTML - - RFC 1950 - ZLIB Compressed Data Format Specification - - RFC 1951 - DEFLATE Compressed Data Format Specification - - RFC 1952 - gzip compression format - - RFC 1959 - LDAP URL syntax - - RFC 2045-2049 - Everything you need to know about MIME! (needed for form - based upload) - - RFC 2068 - HTTP 1.1 (obsoleted by RFC 2616) - - RFC 2109 - HTTP State Management Mechanism (cookie stuff) - - Also, read Netscape's specification at - http://curl.haxx.se/rfc/cookie_spec.html - - RFC 2183 - The Content-Disposition Header Field - - RFC 2229 - A Dictionary Server Protocol - - RFC 2255 - Newer LDAP URL syntax document. - - RFC 2231 - MIME Parameter Value and Encoded Word Extensions: - Character Sets, Languages, and Continuations - - RFC 2388 - "Returning Values from Forms: multipart/form-data" - Use this as an addition to the RFC1867 - - RFC 2396 - "Uniform Resource Identifiers: Generic Syntax and Semantics" This - one obsoletes RFC 1738, but since RFC 1738 is often mentioned - I've left it in this list. - - RFC 2428 - FTP Extensions for IPv6 and NATs - - RFC 2577 - FTP Security Considerations - - RFC 2616 - HTTP 1.1, the latest - - RFC 2617 - HTTP Authentication - - RFC 2718 - Guidelines for new URL Schemes - - RFC 2732 - Format for Literal IPv6 Addresses in URL's - - RFC 2818 - HTTP Over TLS (TLS is the successor to SSL) - - RFC 2964 - Use of HTTP State Management - - RFC 2965 - HTTP State Management Mechanism. Cookies. Obsoletes RFC2109 - diff --git a/libs/curl/docs/SSLCERTS b/libs/curl/docs/SSLCERTS deleted file mode 100644 index 3109cdd068..0000000000 --- a/libs/curl/docs/SSLCERTS +++ /dev/null @@ -1,92 +0,0 @@ - Peer SSL Certificate Verification - ================================= - -libcurl performs peer SSL certificate verification by default. This is done by -installing a default CA cert bundle on 'make install' (or similar), that CA -bundle package is used by default on operations against SSL servers. - -If you communicate with HTTPS or FTPS servers using certificates that are -signed by CAs present in the bundle, you can be sure that the remote server -really is the one it claims to be. - -If the remote server uses a self-signed certificate, if you don't install -curl's CA cert bundle, if the server uses a certificate signed by a CA that -isn't included in the bundle or if the remote host is an impostor -impersonating your favorite site, and you want to transfer files from this -server, do one of the following: - - 1. Tell libcurl to *not* verify the peer. With libcurl you disable with with - curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE); - - With the curl command line tool, you disable this with -k/--insecure. - - 2. Get a CA certificate that can verify the remote server and use the proper - option to point out this CA cert for verification when connecting. For - libcurl hackers: curl_easy_setopt(curl, CURLOPT_CAPATH, capath); - - With the curl command line tool: --cacert [file] - - 3. Add the CA cert for your server to the existing default CA cert bundle. - The default path of the CA bundle installed with the curl package is: - /usr/local/share/curl/curl-ca-bundle.crt, which can be changed by running - configure with the --with-ca-bundle option pointing out the path of your - choice. - - To do this, you need to get the CA cert for your server in PEM format and - then append that to your CA cert bundle. - - If you use Internet Explorer, this is one way to get extract the CA cert - for a particular server: - - o View the certificate by double-clicking the padlock - o Find out where the CA certificate is kept (Certificate> - Authority Information Access>URL) - o Get a copy of the crt file using curl - o Convert it from crt to PEM using the openssl tool: - openssl x509 -inform DES -in yourdownloaded.crt \ - -out outcert.pem -text - o Append the 'outcert.pem' to the CA cert bundle or use it stand-alone - as described below. - - (Thanks to Frankie V for this description) - - If you use the 'openssl' tool, this is one way to get extract the CA cert - for a particular server: - - o openssl s_client -connect xxxxx.com:443 |tee logfile - o type "QUIT", followed by the "ENTER" key - o The certificate will have "BEGIN CERTIFICATE" and "END CERTIFICATE" - markers. - o If you want to see the data in the certificate, you can do: "openssl - x509 -inform PEM -in certfile -text -out certdata" where certfile is - the cert you extracted from logfile. Look in certdata. - o If you want to trust the certificate, you can append it to your - cert_bundle or use it stand-alone as described. Just remember that the - security is no better than the way you obtained the certificate. - - (Thanks to Doug Kaufman for this description) - - 4. If you're using the curl command line tool, you can specify your own CA - cert path by setting the environment variable CURL_CA_BUNDLE to the path - of your choice. - - If you're using the curl command line tool on Windows, curl will search - for a CA cert file named "curl-ca-bundle.crt" in these directories and in - this order: - 1. application's directory - 2. current working directory - 3. Windows System directory (e.g. C:\windows\system32) - 4. Windows Directory (e.g. C:\windows) - 5. all directories along %PATH% - - 5. Get a better/different/newer CA cert bundle! One option is to extract the - one a recent Mozilla browser uses, by following the instruction found - here: - - http://curl.haxx.se/docs/caextract.html - -Neglecting to use one of the above methods when dealing with a server using a -certificate that isn't signed by one of the certificates in the installed CA -cert bundle, will cause SSL to report an error ("certificate verify failed") -during the handshake and SSL will then refuse further communication with that -server. diff --git a/libs/curl/docs/THANKS b/libs/curl/docs/THANKS deleted file mode 100644 index dcd4650ae2..0000000000 --- a/libs/curl/docs/THANKS +++ /dev/null @@ -1,521 +0,0 @@ - This project has been alive for many years. Countless people have provided - feedback that have improved curl. Here follows a list of people that have - contributed (a-z order). - - If you have contributed but are missing here, please let us know! - -Adrian Schuur -Alan Pinstein -Albert Chin-A-Young -Albert Choy -Ale Vesely -Aleksandar Milivojevic -Alex Neblett -Alex Suykov -Alex aka WindEagle -Alexander Kourakos -Alexander Krasnostavsky -Alexander Lazic -Alexander Zhuravlev -Alexis Carvalho -Amol Pattekar -Andi Jahja -Andreas Damm -Andreas Ntaflos -Andreas Olsson -Andreas Rieke -Andres Garcia -Andrew Benham -Andrew Bushnell -Andrew Francis -Andrew Fuller -Andrés García -Andy Cedilnik -Andy Serpa -Angus Mackay -Antoine Calando -Anton Kalmykov -Arkadiusz Miskiewicz -Arve Knudsen -Ates Goral -Augustus Saunders -Avery Fay -Ben Greear -Ben Madsen -Benjamin Gerard -Bertrand Demiddelaer -Bjorn Reese -Björn Stenberg -Bob Schader -Brad Burdick -Bradford Bruce -Brent Beardsley -Brian Akins -Brian Dessent -Brian R Duffy -Bruce Mitchener -Bryan Henderson -Bryan Kemp -Caolan McNamara -Casey O'Donnell -Chih-Chung Chang -Chris "Bob Bob" -Chris Combes -Chris Gaukroger -Chris Maltby -Christian Kurz -Christian Robottom Reis -Christophe Demory -Christophe Legry -Christopher R. Palmer -Clarence Gardner -Clifford Wolf -Cody Jones -Colin Watson -Colm Buckley -Cory Nelson -Craig Davison -Craig Markwardt -Cris Bailiff -Cyrill Osterwalder -Damien Adant -Dan Becker -Dan C -Dan Fandrich -Dan Nelson -Dan Torop -Dan Zitter -Daniel Stenberg -Daniel at touchtunes -Darryl House -Dave Dribin -Dave Halbakken -Dave Hamilton -Dave May -David Byron -David Cohen -David Eriksson -David Houlder -David Hull -David J Meyer -David James -David Kimdon -David Lang -David LeBlanc -David McCreedy -David Odin -David Phillips -David Shaw -David Tarendash -David Thiel -David Yan -Detlef Schmier -Diego Casorran -Dima Barsky -Dimitris Sarris -Dinar -Dirk Eddelbuettel -Dirk Manske -Dmitry Bartsevich -Dolbneff A.V -Domenico Andreoli -Dominick Meglio -Doug Kaufman -Doug Porter -Douglas E. Wegscheid -Douglas R. Horner -Dov Murik -Duane Cathey -Dustin Boswell -Dylan Ellicott -Dylan Salisbury -Early Ehlinger -Edin Kadribasic -Ellis Pritchard -Emiliano Ida -Enrico Scholz -Enrik Berkhan -Eric Cooper -Eric Lavigne -Eric Melville -Eric Rautman -Eric Thelin -Eric Vergnaud -Eric Young -Erick Nuwendam -Erwan Legrand -Erwin Authried -Eugene Kotlyarov -Evan Jordan -Fabrizio Ammollo -Fedor Karpelevitch -Felix von Leitner -Florian Schoppmann -Forrest Cahoon -Frank Keeney -Frank Ticheler -Fred New -Fred Noz -Frederic Lepied -Gautam Mani -Gaz Iqbal -Georg Horn -Georg Huettenegger -Georg Wicherski -Gerd v. Egidy -Gerhard Herre -Giaslas Georgios -Gilad -Gilbert Ramirez Jr. -Gisle Vanem -Giuseppe Attardi -Giuseppe D'Ambrosio -Glen Nakamura -Glen Scott -Greg Hewgill -Greg Onufer -Grigory Entin -Guenole Bescon -Guillaume Arluison -Gustaf Hui -Gwenole Beauchesne -Götz Babin-Ebell -Günter Knauf -Hamish Mackenzie -Hanno Kranzhoff -Hans Steegers -Hardeep Singh -Harshal Pradhan -Heikki Korpela -Henrik Storner -Hzhijun -Ian Ford -Ian Gulliver -Ian Wilkes -Ignacio Vazquez-Abrams -Igor Polyakov -Ilguiz Latypov -Ilja van Sprundel -Ingmar Runge -Ingo Ralf Blum -Ingo Wilken -Jacky Lam -Jacob Meuser -James Bursa -James Clancy -James Cone -James Gallagher -James Griffiths -James MacMillan -Jamie Lokier -Jamie Newton -Jamie Wilkinson -Jan Kunder -Jari Sundell -Jason S. Priebe -Jaz Fresh -Jean Jacques Drouin -Jean-Claude Chauve -Jean-Louis Lemaire -Jean-Marc Ranger -Jean-Philippe Barrette-LaPierre -Jeff Lawson -Jeff Phillips -Jeff Pohlmeyer -Jeffrey Pohlmeyer -Jeremy Friesner -Jesper Jensen -Jesse Noller -Jim Drash -Joe Halpin -Joel Chen -Johan Anderson -Johan Nilsson -John Crow -John Janssen -John Kelly -John Lask -John McGowan -Jon Grubbs -Jon Travis -Jon Turner -Jonas Forsman -Jonatan Lander -Jonathan Hseu -Jongki Suwandi -Josh Kapell -Juan F. Codagnone -Juan Ignacio Hervás -Juergen Wilke -Jukka Pihl -Julian Noble -Jun-ichiro itojun Hagino -Jurij Smakov -Jörg Mueller-Tolk -Jörn Hartroth -Kai Sommerfeld -Kai-Uwe Rommel -Kang-Jin Lee -Karl Moerder -Karol Pietrzak -Katie Wang -Keith MacDonald -Keith McGuigan -Ken Hirsch -Ken Rastatter -Kent Boortz -Kevin Fisk -Kevin Lussier -Kevin Roth -Kimmo Kinnunen -Kjell Ericson -Kjetil Jacobsen -Klevtsov Vadim -Kris Kennaway -Krishnendu Majumdar -Kristian Köhntopp -Kyle Sallee -Lachlan O'Dea -Larry Campbell -Larry Fahnoe -Lars Gustafsson -Lars J. Aas -Lars Nilsson -Lars Torben Wilson -Legoff Vincent -Lehel Bernadt -Len Krause -Linas Vepstas -Ling Thio -Linus Nielsen Feltzing -Loic Dachary -Loren Kirkby -Luca Altea -Luca Alteas -Lucas Adamski -Lukasz Czekierda -Luke Call -Luong Dinh Dung -Maciej Karpiuk -Maciej W. Rozycki -Marc Boucher -Marcelo Juchem -Marcin Konicki -Marco G. Salvagno -Marcus Webster -Mario Schroeder -Mark Butler -Mark Eichin -Mark Lentczner -Markus Koetter -Markus Moeller -Markus Oberhumer -Martijn Koster -Martin C. Martin -Martin Hedenfalk -Marty Kuhrt -Maruko -Massimiliano Ziccardi -Mathias Axelsson -Mats Lidell -Matt Veenstra -Matthew Blain -Matthew Clarke -Maurice Barnum -Mekonikum -Mettgut Jamalla -Michael Benedict -Michael Curtis -Michael Jahn -Michael Jerris -Michael Mealling -Michael Wallner -Michal Bonino -Michal Marek -Michele Bini -Mihai Ionescu -Mikael Sennerholm -Mike Bytnar -Mike Dobbs -Miklos Nemeth -Mitz Wark -Mohamed Lrhazi -Mohun Biswas -Moonesamy -Nathan O'Sullivan -Naveen Noel -Neil Dunbar -Neil Spring -Nic Roets -Nick Gimbrone -Nick Humfrey -Nico Baggus -Nicolas Berloquin -Nicolas Croiset -Nicolas François -Niels van Tongeren -Nikita Schmidt -Nis Jorgensen -Nodak Sodak -Norbert Novotny -Ofer -Olaf Stüben -Oren Tirosh -P R Schaffner -Patrick Bihan-Faou -Patrick Smith -Paul Harrington -Paul Marquis -Paul Moore -Paul Nolan -Paul Querna -Pavel Cenek -Pavel Orehov -Pawel A. Gajda -Pedro Neves -Pete Su -Peter Bray -Peter Forret -Peter Heuchert -Peter Pentchev -Peter Silva -Peter Su -Peter Sylvester -Peter Todd -Peter Verhas -Peter Wullinger -Peteris Krumins -Phil Karn -Philip Gladstone -Philippe Hameau -Philippe Raoult -Philippe Vaucher -Pierre -Puneet Pawaia -Quagmire -Rafael Sagula -Ralph Beckmann -Ralph Mitchell -Ramana Mokkapati -Randy McMurchy -Reinout van Schouwen -Renaud Chaillat -Renaud Duhaut -Rene Bernhardt -Rene Rebe -Ricardo Cadime -Rich Gray -Richard Archer -Richard Atterer -Richard Bramante -Richard Clayton -Richard Cooper -Richard Gorton -Richard Prescott -Rick Jones -Rick Richardson -Rob Stanzel -Robert D. Young -Robert Olson -Robert Weaver -Robin Kay -Robson Braga Araujo -Rodney Simmons -Roland Blom -Roland Krikava -Roland Zimmermann -Roman Koifman -Ron Zapp -Rosimildo da Silva -Roy Shan -Rune Kleveland -Ryan Nelson -S. Moonesamy -Salvador Dávila -Salvatore Sorrentino -Sampo Kellomaki -Samuel Díaz García -Samuel Listopad -Sander Gates -Saul good -Scott Davis -Sebastien Willemijns -Sergio Ballestrero -Seshubabu Pasam -Shard -Shawn Poulson -Shmulik Regev -Siddhartha Prakash Jain -Simon Dick -Simon Josefsson -Simon Liu -Spiridonoff A.V -Stadler Stephan -Stefan Esser -Stefan Ulrich -Stephan Bergmann -Stephen Kick -Stephen More -Sterling Hughes -Steve Green -Steve Lhomme -Steve Marx -Steve Oliphant -Steven Bazyl -Steven G. Johnson -Stoned Elipot -Sven Neuhaus -Sébastien Willemijns -T. Bharath -T. Yamada -Temprimus -Thomas Klausner -Thomas Schwinge -Thomas Tonino -Tim Baker -Tim Bartley -Tim Costello -Tim Sneddon -Toby Peterson -Todd Kulesza -Todd Vierling -Tom Benoist -Tom Lee -Tom Mattison -Tom Moers -Tom Zerucha -Tomas Pospisek -Tomas Szepe -Tomasz Lacki -Tommy Tam -Ton Voon -Tor Arntsen -Torsten Foertsch -Toshiyuki Maezawa -Traian Nicolescu -Troels Walsted Hansen -Troy Engel -Tupone Alfredo -Ulf Härnhammar -Ulrich Zadow -Vilmos Nebehaj -Vincent Bronner -Vincent Penquerc'h -Vincent Sanders -Vojtech Janota -Vojtech Minarik -Walter J. Mack -Wayne Haigh -Werner Koch -Wesley Laxton -Wez Furlong -Wilfredo Sanchez -Wojciech Zwiefka -Xavier Bouchoux -Yang Tse -Yarram Sunil -Yves Lejeune -Zvi Har'El -nk -swalkaus at yahoo.com -tommink[at]post.pl diff --git a/libs/curl/docs/TODO b/libs/curl/docs/TODO deleted file mode 100644 index 80d12538cc..0000000000 --- a/libs/curl/docs/TODO +++ /dev/null @@ -1,307 +0,0 @@ - _ _ ____ _ - ___| | | | _ \| | - / __| | | | |_) | | - | (__| |_| | _ <| |___ - \___|\___/|_| \_\_____| - -TODO - - Things to do in project cURL. Please tell us what you think, contribute and - send us patches that improve things! Also check the http://curl.haxx.se/dev - web section for various technical development notes. - - All bugs documented in the KNOWN_BUGS document are subject for fixing! - - LIBCURL - - * Introduce another callback interface for upload/download that makes one - less copy of data and thus a faster operation. - [http://curl.haxx.se/dev/no_copy_callbacks.txt] - - * More data sharing. curl_share_* functions already exist and work, and they - can be extended to share more. For example, enable sharing of the ares - channel and the connection cache. - - * Introduce a new error code indicating authentication problems (for proxy - CONNECT error 407 for example). This cannot be an error code, we must not - return informational stuff as errors, consider a new info returned by - curl_easy_getinfo() http://curl.haxx.se/bug/view.cgi?id=845941 - - * Use 'struct lifreq' and SIOCGLIFADDR instead of 'struct ifreq' and - SIOCGIFADDR on newer Solaris versions as they claim the latter is obsolete. - To support ipv6 interface addresses properly. - - * Add the following to curl_easy_getinfo(): GET_HTTP_IP, GET_FTP_IP and - GET_FTP_DATA_IP. Return a string with the used IP. Suggested by Alan. - - * Add option that changes the interval in which the progress callback is - called at most. - - * Make libcurl built with c-ares use c-ares' IPv6 abilities. They weren't - present when we first added c-ares support but they have been added since! - When this is done and works, we can actually start considering making c-ares - powered libcurl the default build (which of course would require that we'd - bundle the c-ares source code in the libcurl source code releases). - - * Support CONNECT 407 responses that kill the connection and expect the - client to reconnect to complete the authentication. Currently libcurl - assumes that a proxy connection will be kept alive. - - * Make the curl/*.h headers include the proper system includes based on what - was present at the time when configure was run. Currently, the sys/select.h - header is for example included by curl/multi.h only on specific platforms - we know MUST have it. This is error-prone. We therefore want the header - files to adapt to configure results. Those results must be stored in a new - header and they must use a curl name space, i.e not be HAVE_* prefix (as - that would risk collide with other apps that use libcurl and that runs - configure). - - LIBCURL - multi interface - - * Make sure we don't ever loop because of non-blocking sockets return - EWOULDBLOCK or similar. The GnuTLS connection etc. - - * Make transfers treated more carefully. We need a way to tell libcurl we - have data to write, as the current system expects us to upload data each - time the socket is writable and there is no way to say that we want to - upload data soon just not right now, without that aborting the upload. The - opposite situation should be possible as well, that we tell libcurl we're - ready to accept read data. Today libcurl feeds the data as soon as it is - available for reading, no matter what. - - * Make curl_easy_perform() a wrapper-function that simply creates a multi - handle, adds the easy handle to it, runs curl_multi_perform() until the - transfer is done, then detach the easy handle, destroy the multi handle and - return the easy handle's return code. This will thus make everything - internally use and assume the multi interface. The select()-loop should use - curl_multi_socket(). - - DOCUMENTATION - - * More and better - - FTP - - * Make the detection of (bad) %0d and %0a codes in FTP url parts earlier in - the process to avoid doing a resolve and connect in vain. - - * Support GSS/Kerberos 5 for ftp file transfer. This will allow user - authentication and file encryption. Possible libraries and example clients - are available from MIT or Heimdal. Requested by Markus Moeller. - - * REST fix for servers not behaving well on >2GB requests. This should fail - if the server doesn't set the pointer to the requested index. The tricky - (impossible?) part is to figure out if the server did the right thing or - not. - - * Support the most common FTP proxies, Philip Newton provided a list - allegedly from ncftp: - http://curl.haxx.se/mail/archive-2003-04/0126.html - - * Make CURLOPT_FTPPORT support an additional port number on the IP/if/name, - like "blabla:[port]" or possibly even "blabla:[portfirst]-[portsecond]". - - * FTP ASCII transfers do not follow RFC959. They don't convert the data - accordingly. - - * Since USERPWD always override the user and password specified in URLs, we - might need another way to specify user+password for anonymous ftp logins. - - * The FTP code should get a way of returning errors that is known to still - have the control connection alive and sound. Currently, a returned error - from within ftp-functions does not tell if the control connection is still - OK to use or not. This causes libcurl to fail to re-use connections - slightly too often. - - HTTP - - * When doing CONNECT to a HTTP proxy, libcurl always uses HTTP/1.0. This has - never been reported as causing trouble to anyone, but should be considered - to use the HTTP version the user has chosen. - - TELNET - - * Reading input (to send to the remote server) on stdin is a crappy solution - for library purposes. We need to invent a good way for the application to - be able to provide the data to send. - - * Move the telnet support's network select() loop go away and merge the code - into the main transfer loop. Until this is done, the multi interface won't - work for telnet. - - SSL - - * Provide a libcurl API for setting mutex callbacks in the underlying SSL - library, so that the same application code can use mutex-locking - independently of OpenSSL or GnutTLS being used. - - * Anton Fedorov's "dumpcert" patch: - http://curl.haxx.se/mail/lib-2004-03/0088.html - - * Evaluate/apply Gertjan van Wingerde's SSL patches: - http://curl.haxx.se/mail/lib-2004-03/0087.html - - * "Look at SSL cafile - 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)". The major improvement we can rather easily do is to - make sure we don't create and kill a new SSL "context" for every request, - but instead make one for every connection and re-use that SSL context in - the same style connections are re-used. It will make us use slightly more - memory but it will libcurl do less creations and deletions of SSL contexts. - - * 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 - recover/reset the state from such a buffer at a later date - this is used - by mod_ssl for apache to implement and SSL session ID cache". - - * 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 capable of using other free SSL libraries. Such as - Mozilla Security Services - (http://www.mozilla.org/projects/security/pki/nss/), MatrixSSL - (http://www.matrixssl.org/) or yaSSL (http://yassl.com/). At least the - latter two could be alternatives for those looking to reduce the footprint - of libcurl built with OpenSSL or GnuTLS. - - * Peter Sylvester's patch for SRP on the TLS layer. - Awaits OpenSSL support for this, no need to support this in libcurl before - there's an OpenSSL release that does it. - - * make the configure --with-ssl option first check for OpenSSL and then for - GnuTLS if OpenSSL wasn't detected. - - GnuTLS - - * Get NTLM working using the functions provided by libgcrypt, since GnuTLS - already depends on that to function. Not strictly SSL/TLS related, but - hey... Another option is to get available DES and MD4 source code from the - cryptopp library. They are fine license-wise, but are C++. - - * SSL engine stuff? - - * Work out a common method with Peter Sylvester's OpenSSL-patch for SRP - on the TLS to provide name and password - - * Fix the connection phase to be non-blocking when multi interface is used - - * Add a way to check if the connection seems to be alive, to corrspond to the - SSL_peak() way we use with OpenSSL. - - LDAP - - * Look over the implementation. The looping will have to "go away" from the - lib/ldap.c source file and get moved to the main network code so that the - multi interface and friends will work for LDAP as well. - - NEW PROTOCOLS - - * RTSP - RFC2326 (protocol - very HTTP-like, also contains URL description) - - * SFTP/SCP/SSH (no RFCs for protocol nor URI/URL format). An implementation - should most probably use an existing ssh library, such as OpenSSH. or - libssh2.org - - * RSYNC (no RFCs for protocol nor URI/URL format). An implementation should - most probably use an existing rsync library, such as librsync. - - CLIENT - - * "curl --sync http://example.com/feed[1-100].rss" or - "curl --sync http://example.net/{index,calendar,history}.html" - - Downloads a range or set of URLs using the remote name, but only if the - remote file is newer than the local file. A Last-Modified HTTP date header - should also be used to set the mod date on the downloaded file. - (idea from "Brianiac") - - * Globbing support for -d and -F, as in 'curl -d "name=foo[0-9]" URL'. - Requested by Dane Jensen and others. This is easily scripted though. - - * Add an option that prevents cURL from overwriting existing local files. When - used, and there already is an existing file with the target file name - (either -O or -o), a number should be appended (and increased if already - existing). So that index.html becomes first index.html.1 and then - index.html.2 etc. Jeff Pohlmeyer suggested. - - * "curl ftp://site.com/*.txt" - - * The client could be told to use maximum N simultaneous transfers and then - just make sure that happens. It should of course not make more than one - connection to the same remote host. This would require the client to use - the multi interface. - - * 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) - - * ability to specify the classic computing suffixes on the range - specifications. For example, to download the first 500 Kilobytes of a file, - be able to specify the following for the -r option: "-r 0-500K" or for the - first 2 Megabytes of a file: "-r 0-2M". (Mark Smith suggested) - - * --data-encode that URL encodes the data before posting - http://curl.haxx.se/mail/archive-2003-11/0091.html (Kevin Roth suggested) - - * Provide a way to make options bound to a specific URL among several on the - command line. Possibly by letting ':' separate options between URLs, - similar to this: - - curl --data foo --url url.com : \ - --url url2.com : \ - --url url3.com --data foo3 - - (More details: http://curl.haxx.se/mail/archive-2004-07/0133.html) - - The example would do a POST-GET-POST combination on a single command line. - - BUILD - - * Consider extending 'roffit' to produce decent ASCII output, and use that - instead of (g)nroff when building src/hugehelp.c - - TEST SUITE - - * Make the test servers able to serve multiple running test suites. Like if - two users run 'make test' at once. - - * If perl wasn't found by the configure script, don't attempt to run the - tests but explain something nice why it doesn't. - - * Extend the test suite to include more protocols. The telnet could just do - ftp or http operations (for which we have test servers). - - * Make the test suite work on more platforms. OpenBSD and Mac OS. Remove - fork()s and it should become even more portable. - - NEXT MAJOR RELEASE - - * curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a - CURLMcode. These should be changed to be the same. - - * remove obsolete defines from curl/curl.h - - * make several functions use size_t instead of int in their APIs - - * remove the following functions from the public API: - curl_getenv - curl_mprintf (and variations) - curl_strequal - curl_strnequal - - They will instead become curlx_ - alternatives. That makes the curl app - still capable of building with them from source. - - * Remove support for CURLOPT_FAILONERROR, it has gotten too kludgy and weird - internally. Let the app judge success or not for itself. diff --git a/libs/curl/docs/TheArtOfHttpScripting b/libs/curl/docs/TheArtOfHttpScripting deleted file mode 100644 index f3357d4748..0000000000 --- a/libs/curl/docs/TheArtOfHttpScripting +++ /dev/null @@ -1,453 +0,0 @@ -Online: http://curl.haxx.se/docs/httpscripting.html -Date: December 9, 2004 - - The Art Of Scripting HTTP Requests Using Curl - ============================================= - - This document will assume that you're familiar with HTML and general - networking. - - The possibility to write scripts is essential to make a good computer - system. Unix' capability to be extended by shell scripts and various tools to - run various automated commands and scripts is one reason why it has succeeded - so well. - - The increasing amount of applications moving to the web has made "HTTP - Scripting" more frequently requested and wanted. To be able to automatically - extract information from the web, to fake users, to post or upload data to - web servers are all important tasks today. - - Curl is a command line tool for doing all sorts of URL manipulations and - transfers, but this particular document will focus on how to use it when - doing HTTP requests for fun and profit. I'll assume that you know how to - invoke 'curl --help' or 'curl --manual' to get basic information about it. - - Curl is not written to do everything for you. It makes the requests, it gets - the data, it sends data and it retrieves the information. You probably need - to glue everything together using some kind of script language or repeated - manual invokes. - -1. The HTTP Protocol - - HTTP is the protocol used to fetch data from web servers. It is a very simple - protocol that is built upon TCP/IP. The protocol also allows information to - get sent to the server from the client using a few different methods, as will - be shown here. - - HTTP is plain ASCII text lines being sent by the client to a server to - request a particular action, and then the server replies a few text lines - before the actual requested content is sent to the client. - - Using curl's option -v will display what kind of commands curl sends to the - server, as well as a few other informational texts. -v is the single most - useful option when it comes to debug or even understand the curl<->server - interaction. - -2. URL - - The Uniform Resource Locator format is how you specify the address of a - particular resource on the Internet. You know these, you've seen URLs like - http://curl.haxx.se or https://yourbank.com a million times. - -3. GET a page - - The simplest and most common request/operation made using HTTP is to get a - URL. The URL could itself refer to a web page, an image or a file. The client - issues a GET request to the server and receives the document it asked for. - If you issue the command line - - curl http://curl.haxx.se - - you get a web page returned in your terminal window. The entire HTML document - that that URL holds. - - All HTTP replies contain a set of headers that are normally hidden, use - curl's -i option to display them as well as the rest of the document. You can - also ask the remote server for ONLY the headers by using the -I option (which - will make curl issue a HEAD request). - -4. Forms - - Forms are the general way a web site can present a HTML page with fields for - the user to enter data in, and then press some kind of 'OK' or 'submit' - button to get that data sent to the server. The server then typically uses - the posted data to decide how to act. Like using the entered words to search - in a database, or to add the info in a bug track system, display the entered - address on a map or using the info as a login-prompt verifying that the user - is allowed to see what it is about to see. - - Of course there has to be some kind of program in the server end to receive - the data you send. You cannot just invent something out of the air. - - 4.1 GET - - A GET-form uses the method GET, as specified in HTML like: - -
- - -
- - In your favorite browser, this form will appear with a text box to fill in - and a press-button labeled "OK". If you fill in '1905' and press the OK - button, your browser will then create a new URL to get for you. The URL will - get "junk.cgi?birthyear=1905&press=OK" appended to the path part of the - previous URL. - - If the original form was seen on the page "www.hotmail.com/when/birth.html", - the second page you'll get will become - "www.hotmail.com/when/junk.cgi?birthyear=1905&press=OK". - - Most search engines work this way. - - To make curl do the GET form post for you, just enter the expected created - URL: - - curl "www.hotmail.com/when/junk.cgi?birthyear=1905&press=OK" - - 4.2 POST - - The GET method makes all input field names get displayed in the URL field of - your browser. That's generally a good thing when you want to be able to - bookmark that page with your given data, but it is an obvious disadvantage - if you entered secret information in one of the fields or if there are a - large amount of fields creating a very long and unreadable URL. - - The HTTP protocol then offers the POST method. This way the client sends the - data separated from the URL and thus you won't see any of it in the URL - address field. - - The form would look very similar to the previous one: - -
- - -
- - And to use curl to post this form with the same data filled in as before, we - could do it like: - - curl -d "birthyear=1905&press=%20OK%20" www.hotmail.com/when/junk.cgi - - This kind of POST will use the Content-Type - application/x-www-form-urlencoded and is the most widely used POST kind. - - The data you send to the server MUST already be properly encoded, curl will - not do that for you. For example, if you want the data to contain a space, - you need to replace that space with %20 etc. Failing to comply with this - will most likely cause your data to be received wrongly and messed up. - - 4.3 File Upload POST - - Back in late 1995 they defined an additional way to post data over HTTP. It - is documented in the RFC 1867, why this method sometimes is referred to as - RFC1867-posting. - - This method is mainly designed to better support file uploads. A form that - allows a user to upload a file could be written like this in HTML: - -
- - -
- - This clearly shows that the Content-Type about to be sent is - multipart/form-data. - - To post to a form like this with curl, you enter a command line like: - - curl -F upload=@localfilename -F press=OK [URL] - - 4.4 Hidden Fields - - A very common way for HTML based application to pass state information - between pages is to add hidden fields to the forms. Hidden fields are - already filled in, they aren't displayed to the user and they get passed - along just as all the other fields. - - A similar example form with one visible field, one hidden field and one - submit button could look like: - -
- - - -
- - To post this with curl, you won't have to think about if the fields are - hidden or not. To curl they're all the same: - - curl -d "birthyear=1905&press=OK&person=daniel" [URL] - - 4.5 Figure Out What A POST Looks Like - - When you're about fill in a form and send to a server by using curl instead - of a browser, you're of course very interested in sending a POST exactly the - way your browser does. - - An easy way to get to see this, is to save the HTML page with the form on - your local disk, modify the 'method' to a GET, and press the submit button - (you could also change the action URL if you want to). - - You will then clearly see the data get appended to the URL, separated with a - '?'-letter as GET forms are supposed to. - -5. PUT - - The perhaps best way to upload data to a HTTP server is to use PUT. Then - again, this of course requires that someone put a program or script on the - server end that knows how to receive a HTTP PUT stream. - - Put a file to a HTTP server with curl: - - curl -T uploadfile www.uploadhttp.com/receive.cgi - -6. Authentication - - Authentication is the ability to tell the server your username and password - so that it can verify that you're allowed to do the request you're doing. The - Basic authentication used in HTTP (which is the type curl uses by default) is - *plain* *text* based, which means it sends username and password only - slightly obfuscated, but still fully readable by anyone that sniffs on the - network between you and the remote server. - - To tell curl to use a user and password for authentication: - - curl -u name:password www.secrets.com - - The site might require a different authentication method (check the headers - returned by the server), and then --ntlm, --digest, --negotiate or even - --anyauth might be options that suit you. - - Sometimes your HTTP access is only available through the use of a HTTP - proxy. This seems to be especially common at various companies. A HTTP proxy - may require its own user and password to allow the client to get through to - the Internet. To specify those with curl, run something like: - - curl -U proxyuser:proxypassword curl.haxx.se - - If your proxy requires the authentication to be done using the NTLM method, - use --proxy-ntlm, if it requires Digest use --proxy-digest. - - If you use any one these user+password options but leave out the password - part, curl will prompt for the password interactively. - - Do note that when a program is run, its parameters might be possible to see - when listing the running processes of the system. Thus, other users may be - able to watch your passwords if you pass them as plain command line - options. There are ways to circumvent this. - -7. Referer - - A HTTP request may include a 'referer' field (yes it is misspelled), which - can be used to tell from which URL the client got to this particular - resource. Some programs/scripts check the referer field of requests to verify - that this wasn't arriving from an external site or an unknown page. While - this is a stupid way to check something so easily forged, many scripts still - do it. Using curl, you can put anything you want in the referer-field and - thus more easily be able to fool the server into serving your request. - - Use curl to set the referer field with: - - curl -e http://curl.haxx.se daniel.haxx.se - -8. User Agent - - Very similar to the referer field, all HTTP requests may set the User-Agent - field. It names what user agent (client) that is being used. Many - applications use this information to decide how to display pages. Silly web - programmers try to make different pages for users of different browsers to - make them look the best possible for their particular browsers. They usually - also do different kinds of javascript, vbscript etc. - - At times, you will see that getting a page with curl will not return the same - page that you see when getting the page with your browser. Then you know it - is time to set the User Agent field to fool the server into thinking you're - one of those browsers. - - To make curl look like Internet Explorer on a Windows 2000 box: - - curl -A "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" [URL] - - Or why not look like you're using Netscape 4.73 on a Linux (PIII) box: - - curl -A "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" [URL] - -9. Redirects - - When a resource is requested from a server, the reply from the server may - include a hint about where the browser should go next to find this page, or a - new page keeping newly generated output. The header that tells the browser - to redirect is Location:. - - Curl does not follow Location: headers by default, but will simply display - such pages in the same manner it display all HTTP replies. It does however - feature an option that will make it attempt to follow the Location: pointers. - - To tell curl to follow a Location: - - curl -L www.sitethatredirects.com - - If you use curl to POST to a site that immediately redirects you to another - page, you can safely use -L and -d/-F together. Curl will only use POST in - the first request, and then revert to GET in the following operations. - -10. Cookies - - The way the web browsers do "client side state control" is by using - cookies. Cookies are just names with associated contents. The cookies are - sent to the client by the server. The server tells the client for what path - and host name it wants the cookie sent back, and it also sends an expiration - date and a few more properties. - - When a client communicates with a server with a name and path as previously - specified in a received cookie, the client sends back the cookies and their - contents to the server, unless of course they are expired. - - Many applications and servers use this method to connect a series of requests - into a single logical session. To be able to use curl in such occasions, we - must be able to record and send back cookies the way the web application - expects them. The same way browsers deal with them. - - The simplest way to send a few cookies to the server when getting a page with - curl is to add them on the command line like: - - curl -b "name=Daniel" www.cookiesite.com - - Cookies are sent as common HTTP headers. This is practical as it allows curl - to record cookies simply by recording headers. Record cookies with curl by - using the -D option like: - - curl -D headers_and_cookies www.cookiesite.com - - (Take note that the -c option described below is a better way to store - cookies.) - - Curl has a full blown cookie parsing engine built-in that comes to use if you - want to reconnect to a server and use cookies that were stored from a - previous connection (or handicrafted manually to fool the server into - believing you had a previous connection). To use previously stored cookies, - you run curl like: - - curl -b stored_cookies_in_file www.cookiesite.com - - Curl's "cookie engine" gets enabled when you use the -b option. If you only - want curl to understand received cookies, use -b with a file that doesn't - exist. Example, if you want to let curl understand cookies from a page and - follow a location (and thus possibly send back cookies it received), you can - invoke it like: - - curl -b nada -L www.cookiesite.com - - Curl has the ability to read and write cookie files that use the same file - format that Netscape and Mozilla do. It is a convenient way to share cookies - between browsers and automatic scripts. The -b switch automatically detects - if a given file is such a cookie file and parses it, and by using the - -c/--cookie-jar option you'll make curl write a new cookie file at the end of - an operation: - - curl -b cookies.txt -c newcookies.txt www.cookiesite.com - -11. HTTPS - - There are a few ways to do secure HTTP transfers. The by far most common - protocol for doing this is what is generally known as HTTPS, HTTP over - SSL. SSL encrypts all the data that is sent and received over the network and - thus makes it harder for attackers to spy on sensitive information. - - SSL (or TLS as the latest version of the standard is called) offers a - truckload of advanced features to allow all those encryptions and key - infrastructure mechanisms encrypted HTTP requires. - - Curl supports encrypted fetches thanks to the freely available OpenSSL - libraries. To get a page from a HTTPS server, simply run curl like: - - curl https://that.secure.server.com - - 11.1 Certificates - - In the HTTPS world, you use certificates to validate that you are the one - you you claim to be, as an addition to normal passwords. Curl supports - client-side certificates. All certificates are locked with a pass phrase, - which you need to enter before the certificate can be used by curl. The pass - phrase can be specified on the command line or if not, entered interactively - when curl queries for it. Use a certificate with curl on a HTTPS server - like: - - curl -E mycert.pem https://that.secure.server.com - - curl also tries to verify that the server is who it claims to be, by - verifying the server's certificate against a locally stored CA cert - bundle. Failing the verification will cause curl to deny the connection. You - must then use -k in case you want to tell curl to ignore that the server - can't be verified. - - More about server certificate verification and ca cert bundles can be read - in the SSLCERTS document, available online here: - - http://curl.haxx.se/docs/sslcerts.html - -12. Custom Request Elements - - Doing fancy stuff, you may need to add or change elements of a single curl - request. - - For example, you can change the POST request to a PROPFIND and send the data - as "Content-Type: text/xml" (instead of the default Content-Type) like this: - - curl -d "" -H "Content-Type: text/xml" -X PROPFIND url.com - - You can delete a default header by providing one without content. Like you - can ruin the request by chopping off the Host: header: - - curl -H "Host:" http://mysite.com - - You can add headers the same way. Your server may want a "Destination:" - header, and you can add it: - - curl -H "Destination: http://moo.com/nowhere" http://url.com - -13. Debug - - Many times when you run curl on a site, you'll notice that the site doesn't - seem to respond the same way to your curl requests as it does to your - browser's. - - Then you need to start making your curl requests more similar to your - browser's requests: - - * Use the --trace-ascii option to store fully detailed logs of the requests - for easier analyzing and better understanding - - * Make sure you check for and use cookies when needed (both reading with -b - and writing with -c) - - * Set user-agent to one like a recent popular browser does - - * Set referer like it is set by the browser - - * If you use POST, make sure you send all the fields and in the same order as - the browser does it. (See chapter 4.5 above) - - A very good helper to make sure you do this right, is the LiveHTTPHeader tool - that lets you view all headers you send and receive with Mozilla/Firefox - (even when using HTTPS). - - A more raw approach is to capture the HTTP traffic on the network with tools - such as ethereal or tcpdump and check what headers that were sent and - received by the browser. (HTTPS makes this technique inefficient.) - -14. References - - RFC 2616 is a must to read if you want in-depth understanding of the HTTP - protocol. - - RFC 2396 explains the URL syntax. - - RFC 2109 defines how cookies are supposed to work. - - RFC 1867 defines the HTTP post upload format. - - http://www.openssl.org is the home of the OpenSSL project - - http://curl.haxx.se is the home of the cURL project diff --git a/libs/curl/docs/VERSIONS b/libs/curl/docs/VERSIONS deleted file mode 100644 index cc11c1bbd5..0000000000 --- a/libs/curl/docs/VERSIONS +++ /dev/null @@ -1,67 +0,0 @@ - _ _ ____ _ - ___| | | | _ \| | - / __| | | | |_) | | - | (__| |_| | _ <| |___ - \___|\___/|_| \_\_____| - -Version Numbers and Releases - - Curl is not only curl. Curl is also libcurl. They're actually individually - versioned, but they mostly follow each other rather closely. - - The version numbering is always built up using the same system: - - X.Y[.Z][-preN] - - Where - X is main version number - Y is release number - Z is patch number - N is pre-release number - - One of these numbers will get bumped in each new release. The numbers to the - right of a bumped number will be reset to zero. If Z is zero, it may not be - included in the version number. The pre release number is only included in - pre releases (they're never used in public, official, releases). - - The main version number will get bumped when *really* big, world colliding - changes are made. The release number is bumped when big changes are - performed. The patch number is bumped when the changes are mere bugfixes and - only minor feature changes. The pre-release is a counter, to identify which - pre-release a certain release is. - - When reaching the end of a pre-release period, the version without the - pre-release part will be released as a public release. - - It means that after release 1.2.3, we can release 2.0 if something really big - has been made, 1.3 if not that big changes were made or 1.2.4 if mostly bugs - were fixed. Before 1.2.4 is released, we might release a 1.2.4-pre1 release - for the brave people to try before the actual release. - - Bumping, as in increasing the number with 1, is unconditionally only - affecting one of the numbers (except the ones to the right of it, that may be - set to zero). 1 becomes 2, 3 becomes 4, 9 becomes 10, 88 becomes 89 and 99 - becomes 100. So, after 1.2.9 comes 1.2.10. After 3.99.3, 3.100 might come. - - All original curl source release archives are named according to the libcurl - version (not according to the curl client version that, as said before, might - differ). - - As a service to any application that might want to support new libcurl - features while still being able to build with older versions, all releases - have the libcurl version stored in the curl/curlver.h file using a static - numbering scheme that can be used for comparison. The version number is - defined as: - - #define LIBCURL_VERSION_NUM 0xXXYYZZ - - Where XX, YY and ZZ are the main version, release and patch numbers in - hexadecimal. All three numbers are always represented using two digits. 1.2 - would appear as "0x010200" while version 9.11.7 appears as "0x090b07". - - This 6-digit hexadecimal number does not show pre-release number, and it is - always a greater number in a more recent release. It makes comparisons with - greater than and less than work. - - This number is also available as three separate defines: - LIBCURL_VERSION_MAJOR, LIBCURL_VERSION_MINOR and LIBCURL_VERSION_PATCH. diff --git a/libs/curl/docs/curl-config.1 b/libs/curl/docs/curl-config.1 deleted file mode 100644 index d29c30eb15..0000000000 --- a/libs/curl/docs/curl-config.1 +++ /dev/null @@ -1,95 +0,0 @@ -.\" ************************************************************************** -.\" * _ _ ____ _ -.\" * Project ___| | | | _ \| | -.\" * / __| | | | |_) | | -.\" * | (__| |_| | _ <| |___ -.\" * \___|\___/|_| \_\_____| -.\" * -.\" * Copyright (C) 1998 - 2006, Daniel Stenberg, , et al. -.\" * -.\" * This software is licensed as described in the file COPYING, which -.\" * you should have received as part of this distribution. The terms -.\" * are also available at http://curl.haxx.se/docs/copyright.html. -.\" * -.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell -.\" * copies of the Software, and permit persons to whom the Software is -.\" * furnished to do so, under the terms of the COPYING file. -.\" * -.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -.\" * KIND, either express or implied. -.\" * -.\" * $Id: curl-config.1,v 1.14 2006-05-02 22:48:22 bagder Exp $ -.\" ************************************************************************** -.\" -.TH curl-config 1 "25 Jan 2004" "Curl 7.15.4" "curl-config manual" -.SH NAME -curl-config \- Get information about a libcurl installation -.SH SYNOPSIS -.B curl-config [options] -.SH DESCRIPTION -.B curl-config -displays information about a previous curl and libcurl installation. -.SH OPTIONS -.IP "--ca" -Displays the built-in path to the CA cert bundle this libcurl uses. -.IP "--cc" -Displays the compiler used to build libcurl. -.IP "--cflags" -Set of compiler options (CFLAGS) to use when compiling files that use -libcurl. Currently that is only thw include path to the curl include files. -.IP "--checkfor [version]" -Specify the oldest possible libcurl version string you want, and this -script will return 0 if the current installation is new enough or it -returns 1 and outputs a text saying that the current version is not new -enough. (Added in 7.15.4) -.IP "--feature" -Lists what particular main features the installed libcurl was built with. At -the time of writing, this list may include SSL, KRB4 or IPv6. Do not assume -any particular order. The keywords will be separated by newlines. There may be -none, one or several keywords in the list. -.IP "--help" -Displays the available options. -.IP "--libs" -Shows the complete set of libs and other linker options you will need in order -to link your application with libcurl. -.IP "--prefix" -This is the prefix used when libcurl was installed. Libcurl is then installed -in $prefix/lib and its header files are installed in $prefix/include and so -on. The prefix is set with "configure --prefix". -.IP "--protocols" -Lists what particular protocols the installed libcurl was built to support. At -the time of writing, this list may include HTTP, HTTPS, FTP, FTPS, FILE, -TELNET, LDAP, DICT. Do not assume any particular order. The protocols will -be listed using uppercase and are separated by newlines. There may be none, -one or several protocols in the list. (Added in 7.13.0) -.IP "--version" -Outputs version information about the installed libcurl. -.IP "--vernum" -Outputs version information about the installed libcurl, in numerical mode. -This outputs the version number, in hexadecimal, with 8 bits for each part; -major, minor, patch. So that libcurl 7.7.4 would appear as 070704 and libcurl -12.13.14 would appear as 0c0d0e... Note that the initial zero might be -omitted. (This option was broken in the 7.15.0 release.) -.SH "EXAMPLES" -What linker options do I need when I link with libcurl? - - $ curl-config --libs - -What compiler options do I need when I compile using libcurl functions? - - $ curl-config --cflags - -How do I know if libcurl was built with SSL support? - - $ curl-config --feature | grep SSL - -What's the installed libcurl version? - - $ curl-config --version - -How do I build a single file with a one-line command? - - $ `curl-config --cc --cflags --libs` -o example example.c - -.SH "SEE ALSO" -.BR curl (1) diff --git a/libs/curl/docs/curl-config.html b/libs/curl/docs/curl-config.html deleted file mode 100644 index 687940fdc6..0000000000 --- a/libs/curl/docs/curl-config.html +++ /dev/null @@ -1,86 +0,0 @@ - -curl-config man page - - - - -

NAME

-

curl-config - Get information about a libcurl installation

SYNOPSIS

-

curl-config [options]

DESCRIPTION

-

curl-config displays information about a previous curl and libcurl installation.

OPTIONS

-

-

--ca -

Displays the built-in path to the CA cert bundle this libcurl uses. -

--cc -

Displays the compiler used to build libcurl. -

--cflags -

Set of compiler options (CFLAGS) to use when compiling files that use libcurl. Currently that is only thw include path to the curl include files. -

--checkfor [version] -

Specify the oldest possible libcurl version string you want, and this script will return 0 if the current installation is new enough or it returns 1 and outputs a text saying that the current version is not new enough. (Added in 7.15.4) -

--feature -

Lists what particular main features the installed libcurl was built with. At the time of writing, this list may include SSL, KRB4 or IPv6. Do not assume any particular order. The keywords will be separated by newlines. There may be none, one or several keywords in the list. -

--help -

Displays the available options. -

--libs -

Shows the complete set of libs and other linker options you will need in order to link your application with libcurl. -

--prefix -

This is the prefix used when libcurl was installed. Libcurl is then installed in $prefix/lib and its header files are installed in $prefix/include and so on. The prefix is set with "configure --prefix". -

--protocols -

Lists what particular protocols the installed libcurl was built to support. At the time of writing, this list may include HTTP, HTTPS, FTP, FTPS, FILE, TELNET, LDAP, DICT. Do not assume any particular order. The protocols will be listed using uppercase and are separated by newlines. There may be none, one or several protocols in the list. (Added in 7.13.0) -

--version -

Outputs version information about the installed libcurl. -

--vernum -

Outputs version information about the installed libcurl, in numerical mode. This outputs the version number, in hexadecimal, with 8 bits for each part; major, minor, patch. So that libcurl 7.7.4 would appear as 070704 and libcurl 12.13.14 would appear as 0c0d0e... Note that the initial zero might be omitted. (This option was broken in the 7.15.0 release.)

EXAMPLES

-

What linker options do I need when I link with libcurl? -

  $ curl-config --libs -

What compiler options do I need when I compile using libcurl functions? -

  $ curl-config --cflags -

How do I know if libcurl was built with SSL support? -

  $ curl-config --feature | grep SSL -

What's the installed libcurl version? -

  $ curl-config --version -

How do I build a single file with a one-line command? -

  $ `curl-config --cc --cflags --libs` -o example example.c -

SEE ALSO

-

curl (1)

- This HTML page was made with roffit. - diff --git a/libs/curl/docs/curl-config.pdf b/libs/curl/docs/curl-config.pdf deleted file mode 100644 index 417dbe2400..0000000000 Binary files a/libs/curl/docs/curl-config.pdf and /dev/null differ diff --git a/libs/curl/docs/curl.1 b/libs/curl/docs/curl.1 deleted file mode 100644 index 5b6a3aeafd..0000000000 --- a/libs/curl/docs/curl.1 +++ /dev/null @@ -1,1460 +0,0 @@ -.\" ************************************************************************** -.\" * _ _ ____ _ -.\" * Project ___| | | | _ \| | -.\" * / __| | | | |_) | | -.\" * | (__| |_| | _ <| |___ -.\" * \___|\___/|_| \_\_____| -.\" * -.\" * Copyright (C) 1998 - 2006, Daniel Stenberg, , et al. -.\" * -.\" * This software is licensed as described in the file COPYING, which -.\" * you should have received as part of this distribution. The terms -.\" * are also available at http://curl.haxx.se/docs/copyright.html. -.\" * -.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell -.\" * copies of the Software, and permit persons to whom the Software is -.\" * furnished to do so, under the terms of the COPYING file. -.\" * -.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -.\" * KIND, either express or implied. -.\" * -.\" * $Id: curl.1,v 1.198 2006-10-25 20:40:14 bagder Exp $ -.\" ************************************************************************** -.\" -.TH curl 1 "23 Sep 2006" "Curl 7.16.0" "Curl Manual" -.SH NAME -curl \- transfer a URL -.SH SYNOPSIS -.B curl [options] -.I [URL...] -.SH DESCRIPTION -.B curl -is a tool to transfer data from or to a server, using one of the supported -protocols (HTTP, HTTPS, FTP, FTPS, TFTP, DICT, TELNET, LDAP or FILE). -The command is designed to work without user interaction. - -curl offers a busload of useful tricks like proxy support, user -authentication, ftp upload, HTTP post, SSL connections, cookies, file transfer -resume and more. As you will see below, the amount of features will make your -head spin! - -curl is powered by libcurl for all transfer-related features. See -.BR libcurl (3) -for details. -.SH URL -The URL syntax is protocol dependent. You'll find a detailed description in -RFC 3986. - -You can specify multiple URLs or parts of URLs by writing part sets within -braces as in: - - http://site.{one,two,three}.com - -or you can get sequences of alphanumeric series by using [] as in: - - ftp://ftp.numericals.com/file[1-100].txt - ftp://ftp.numericals.com/file[001-100].txt (with leading zeros) - ftp://ftp.letters.com/file[a-z].txt - -No nesting of the sequences is supported at the moment, but you can use -several ones next to each other: - - http://any.org/archive[1996-1999]/vol[1-4]/part{a,b,c}.html - -You can specify any amount of URLs on the command line. They will be fetched -in a sequential manner in the specified order. - -Since curl 7.15.1 you can also specify step counter for the ranges, so that -you can get every Nth number or letter: - - http://www.numericals.com/file[1-100:10].txt - http://www.letters.com/file[a-z:2].txt - -If you specify URL without protocol:// prefix, curl will attempt to guess what -protocol you might want. It will then default to HTTP but try other protocols -based on often-used host name prefixes. For example, for host names starting -with "ftp." curl will assume you want to speak FTP. - -Curl will attempt to re-use connections for multiple file transfers, so that -getting many files from the same server will not do multiple connects / -handshakes. This improves speed. Of course this is only done on files -specified on a single command line and cannot be used between separate curl -invokes. -.SH "PROGRESS METER" -curl normally displays a progress meter during operations, indicating amount -of transfered data, transfer speeds and estimated time left etc. - -However, since curl displays data to the terminal by default, if you invoke -curl to do an operation and it is about to write data to the terminal, it -\fIdisables\fP the progress meter as otherwise it would mess up the output -mixing progress meter and response data. - -If you want a progress meter for HTTP POST or PUT requests, you need to -redirect the response output to a file, using shell redirect (>), -o [file] or -similar. - -It is not the same case for FTP upload as that operation is not spitting out -any response data to the terminal. - -If you prefer a progress "bar" instead of the regular meter, \fI-#\fP is your -friend. -.SH OPTIONS -.IP "-a/--append" -(FTP) When used in an FTP upload, this will tell curl to append to the target -file instead of overwriting it. If the file doesn't exist, it will be created. - -If this option is used twice, the second one will disable append mode again. -.IP "-A/--user-agent " -(HTTP) Specify the User-Agent string to send to the HTTP server. Some badly -done CGIs fail if its not set to "Mozilla/4.0". To encode blanks in the -string, surround the string with single quote marks. This can also be set -with the \fI-H/--header\fP option of course. - -If this option is set more than once, the last one will be the one that's -used. -.IP "--anyauth" -(HTTP) Tells curl to figure out authentication method by itself, and use the -most secure one the remote site claims it supports. This is done by first -doing a request and checking the response-headers, thus inducing an extra -network round-trip. This is used instead of setting a specific authentication -method, which you can do with \fI--basic\fP, \fI--digest\fP, \fI--ntlm\fP, and -\fI--negotiate\fP. - -Note that using --anyauth is not recommended if you do uploads from stdin, -since it may require data to be sent twice and then the client must be able to -rewind. If the need should arise when uploading from stdin, the upload -operation will fail. - -If this option is used several times, the following occurrences make no -difference. -.IP "-b/--cookie " -(HTTP) -Pass the data to the HTTP server as a cookie. It is supposedly the -data previously received from the server in a "Set-Cookie:" line. -The data should be in the format "NAME1=VALUE1; NAME2=VALUE2". - -If no '=' letter is used in the line, it is treated as a filename to use to -read previously stored cookie lines from, which should be used in this session -if they match. Using this method also activates the "cookie parser" which will -make curl record incoming cookies too, which may be handy if you're using this -in combination with the \fI-L/--location\fP option. The file format of the -file to read cookies from should be plain HTTP headers or the Netscape/Mozilla -cookie file format. - -\fBNOTE\fP that the file specified with \fI-b/--cookie\fP is only used as -input. No cookies will be stored in the file. To store cookies, use the -\fI-c/--cookie-jar\fP option or you could even save the HTTP headers to a file -using \fI-D/--dump-header\fP! - -If this option is set more than once, the last one will be the one that's -used. -.IP "-B/--use-ascii" -Enable ASCII transfer when using FTP or LDAP. For FTP, this can also be -enforced by using an URL that ends with ";type=A". This option causes data -sent to stdout to be in text mode for win32 systems. - -If this option is used twice, the second one will disable ASCII usage. -.IP "--basic" -(HTTP) Tells curl to use HTTP Basic authentication. This is the default and -this option is usually pointless, unless you use it to override a previously -set option that sets a different authentication method (such as \fI--ntlm\fP, -\fI--digest\fP and \fI--negotiate\fP). - -If this option is used several times, the following occurrences make no -difference. -.IP "--ciphers " -(SSL) Specifies which ciphers to use in the connection. The list of ciphers -must be using valid ciphers. Read up on SSL cipher list details on this URL: -\fIhttp://www.openssl.org/docs/apps/ciphers.html\fP - -If this option is used several times, the last one will override the others. -.IP "--compressed" -(HTTP) Request a compressed response using one of the algorithms libcurl -supports, and return the uncompressed document. If this option is used and -the server sends an unsupported encoding, Curl will report an error. - -If this option is used several times, each occurrence will toggle it on/off. -.IP "--connect-timeout " -Maximum time in seconds that you allow the connection to the server to take. -This only limits the connection phase, once curl has connected this option is -of no more use. See also the \fI-m/--max-time\fP option. - -If this option is used several times, the last one will be used. -.IP "-c/--cookie-jar " -Specify to which file you want curl to write all cookies after a completed -operation. Curl writes all cookies previously read from a specified file as -well as all cookies received from remote server(s). If no cookies are known, -no file will be written. The file will be written using the Netscape cookie -file format. If you set the file name to a single dash, "-", the cookies will -be written to stdout. - -.B NOTE -If the cookie jar can't be created or written to, the whole curl operation -won't fail or even report an error clearly. Using -v will get a warning -displayed, but that is the only visible feedback you get about this possibly -lethal situation. - -If this option is used several times, the last specified file name will be -used. -.IP "-C/--continue-at " -Continue/Resume a previous file transfer at the given offset. The given offset -is the exact number of bytes that will be skipped counted from the beginning -of the source file before it is transferred to the destination. If used with -uploads, the ftp server command SIZE will not be used by curl. - -Use "-C -" to tell curl to automatically find out where/how to resume the -transfer. It then uses the given output/input files to figure that out. - -If this option is used several times, the last one will be used. -.IP "--create-dirs" -When used in conjunction with the -o option, curl will create the necessary -local directory hierarchy as needed. This option creates the dirs mentioned -with the -o option, nothing else. If the -o file name uses no dir or if the -dirs it mentions already exist, no dir will be created. - -To create remote directories when using FTP, try \fI--ftp-create-dirs\fP. -.IP "--crlf" -(FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390). - -If this option is used several times, the following occurrences make no -difference. -.IP "-d/--data " -(HTTP) Sends the specified data in a POST request to the HTTP server, in a way -that can emulate as if a user has filled in a HTML form and pressed the submit -button. Note that the data is sent exactly as specified with no extra -processing (with all newlines cut off). The data is expected to be -\&"url-encoded". This will cause curl to pass the data to the server using the -content-type application/x-www-form-urlencoded. Compare to \fI-F/--form\fP. If -this option is used more than once on the same command line, the data pieces -specified will be merged together with a separating &-letter. Thus, using '-d -name=daniel -d skill=lousy' would generate a post chunk that looks like -\&'name=daniel&skill=lousy'. - -If you start the data with the letter @, the rest should be a file name to -read the data from, or - if you want curl to read the data from stdin. The -contents of the file must already be url-encoded. Multiple files can also be -specified. Posting data from a file named 'foobar' would thus be done with -\fI--data\fP @foobar". - -To post data purely binary, you should instead use the \fI--data-binary\fP -option. - -\fI-d/--data\fP is the same as \fI--data-ascii\fP. - -If this option is used several times, the ones following the first will -append data. -.IP "--data-ascii " -(HTTP) This is an alias for the \fI-d/--data\fP option. - -If this option is used several times, the ones following the first will -append data. -.IP "--data-binary " -(HTTP) This posts data in a similar manner as \fI--data-ascii\fP does, -although when using this option the entire context of the posted data is kept -as-is. If you want to post a binary file without the strip-newlines feature of -the \fI--data-ascii\fP option, this is for you. - -If this option is used several times, the ones following the first will -append data. -.IP "--digest" -(HTTP) Enables HTTP Digest authentication. This is a authentication that -prevents the password from being sent over the wire in clear text. Use this in -combination with the normal \fI-u/--user\fP option to set user name and -password. See also \fI--ntlm\fP, \fI--negotiate\fP and \fI--anyauth\fP for -related options. - -If this option is used several times, the following occurrences make no -difference. -.IP "--disable-eprt" -(FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing -active FTP transfers. Curl will normally always first attempt to use EPRT, -then LPRT before using PORT, but with this option, it will use PORT right -away. EPRT and LPRT are extensions to the original FTP protocol, may not work -on all servers but enable more functionality in a better way than the -traditional PORT command. - -If this option is used several times, each occurrence will toggle this on/off. -.IP "--disable-epsv" -(FTP) Tell curl to disable the use of the EPSV command when doing passive FTP -transfers. Curl will normally always first attempt to use EPSV before PASV, -but with this option, it will not try using EPSV. - -If this option is used several times, each occurrence will toggle this on/off. -.IP "-D/--dump-header " -Write the protocol headers to the specified file. - -This option is handy to use when you want to store the headers that a HTTP -site sends to you. Cookies from the headers could then be read in a second -curl invoke by using the \fI-b/--cookie\fP option! The \fI-c/--cookie-jar\fP -option is however a better way to store cookies. - -When used on FTP, the ftp server response lines are considered being "headers" -and thus are saved there. - -If this option is used several times, the last one will be used. -.IP "-e/--referer " -(HTTP) Sends the "Referer Page" information to the HTTP server. This can also -be set with the \fI-H/--header\fP flag of course. When used with -\fI-L/--location\fP you can append ";auto" to the --referer URL to make curl -automatically set the previous URL when it follows a Location: header. The -\&";auto" string can be used alone, even if you don't set an initial --referer. - -If this option is used several times, the last one will be used. -.IP "--engine " -Select the OpenSSL crypto engine to use for cipher -operations. Use \fI--engine list\fP to print a list of build-time supported -engines. Note that not all (or none) of the engines may be available at -run-time. -.IP "--environment" -(RISC OS ONLY) Sets a range of environment variables, using the names the -w -option supports, to easier allow extraction of useful information after having -run curl. - -If this option is used several times, each occurrence will toggle this on/off. -.IP "--egd-file " -(SSL) Specify the path name to the Entropy Gathering Daemon socket. The socket -is used to seed the random engine for SSL connections. See also the -\fI--random-file\fP option. -.IP "-E/--cert " -(SSL) Tells curl to use the specified certificate file when getting a file -with HTTPS or FTPS. The certificate must be in PEM format. If the optional -password isn't specified, it will be queried for on the terminal. Note that -this option assumes a \&"certificate" file that is the private key and the -private certificate concatenated! See \fI--cert\P and \fI--key\fP to specify -them independently. - -If this option is used several times, the last one will be used. -.IP "--cert-type " -(SSL) Tells curl what certificate type the provided certificate is in. PEM, -DER and ENG are recognized types. If not specified, PEM is assumed. - -If this option is used several times, the last one will be used. -.IP "--cacert " -(SSL) Tells curl to use the specified certificate file to verify the -peer. The file may contain multiple CA certificates. The certificate(s) must -be in PEM format. - -curl recognizes the environment variable named 'CURL_CA_BUNDLE' if that is -set, and uses the given path as a path to a CA cert bundle. This option -overrides that variable. - -The windows version of curl will automatically look for a CA certs file named -\'curl-ca-bundle.crt\', either in the same directory as curl.exe, or in the -Current Working Directory, or in any folder along your PATH. - -If this option is used several times, the last one will be used. -.IP "--capath " -(SSL) Tells curl to use the specified certificate directory to verify the -peer. The certificates must be in PEM format, and the directory must have been -processed using the c_rehash utility supplied with openssl. Using -\fI--capath\fP can allow curl to make SSL-connections much more efficiently -than using \fI--cacert\fP if the \fI--cacert\fP file contains many CA -certificates. - -If this option is used several times, the last one will be used. -.IP "-f/--fail" -(HTTP) Fail silently (no output at all) on server errors. This is mostly done -like this to better enable scripts etc to better deal with failed attempts. In -normal cases when a HTTP server fails to deliver a document, it returns an -HTML document stating so (which often also describes why and more). This flag -will prevent curl from outputting that and return error 22. - -This method is not fail-safe and there are occasions where non-succesful -response codes will slip through, especially when authentication is involved -(response codes 401 and 407). - -If this option is used twice, the second will again disable silent failure. -.IP "--ftp-account [data]" -(FTP) When an FTP server asks for "account data" after user name and password -has been provided, this data is sent off using the ACCT command. (Added in -7.13.0) - -If this option is used twice, the second will override the previous use. -.IP "--ftp-create-dirs" -(FTP) When an FTP URL/operation uses a path that doesn't currently exist on -the server, the standard behavior of curl is to fail. Using this option, curl -will instead attempt to create missing directories. - -If this option is used twice, the second will again disable directory creation. -.IP "--ftp-method [method]" -(FTP) Control what method curl should use to reach a file on a FTP(S) -server. The method argument should be one of the following alternatives: -.RS -.IP multicwd -curl does a single CWD operation for each path part in the given URL. For deep -hierarchies this means very many commands. This is how RFC1738 says it should -be done. This is the default but the slowest behavior. -.IP nocwd -curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full -path to the server for all these commands. This is the fastest behavior. -.IP singlecwd -curl does one CWD with the full target directory and then operates on the file -\&"normally" (like in the multicwd case). This is somewhat more standards -compliant than 'nocwd' but without the full penalty of 'multicwd'. -.RE -.IP "--ftp-pasv" -(FTP) Use PASV when transferring. PASV is the internal default behavior, but -using this option can be used to override a previous --ftp-port option. (Added -in 7.11.0) - -If this option is used several times, the following occurrences make no -difference. -.IP "--ftp-alternative-to-user " -(FTP) If authenticating with the USER and PASS commands fails, send this -command. When connecting to Tumbleweed's Secure Transport server over FTPS -using a client certificate, using "SITE AUTH" will tell the server to retrieve -the username from the certificate. (Added in 7.15.5) -.IP "--ftp-skip-pasv-ip" -(FTP) Tell curl to not use the IP address the server suggests in its response -to curl's PASV command when curl connects the data connection. Instead curl -will re-use the same IP address it already uses for the control -connection. (Added in 7.14.2) - -This option has no effect if PORT, EPRT or EPSV is used instead of PASV. - -If this option is used twice, the second will again use the server's suggested -address. -.IP "--ftp-ssl" -(FTP) Try to use SSL/TLS for the FTP connection. Reverts to a non-secure -connection if the server doesn't support SSL/TLS. See also -\fI--ftp-ssl-control\fP and \fI--ftp-ssl-reqd\fP for different levels of -encryption required. (Added in 7.11.0) - -If this option is used twice, the second will again disable this. -.IP "--ftp-ssl-control" -(FTP) Require SSL/TLS for the ftp login, clear for transfer. Allows secure -authentication, but non-encrypted data transfers for efficiency. Fails the -transfer if the server doesn't support SSL/TLS. (Added in 7.16.0) - -If this option is used twice, the second will again disable this. -.IP "--ftp-ssl-reqd" -(FTP) Require SSL/TLS for the FTP connection. -Terminates the connection if the server doesn't support SSL/TLS. -(Added in 7.15.5) - -If this option is used twice, the second will again disable this. -.IP "-F/--form " -(HTTP) This lets curl emulate a filled in form in which a user has pressed the -submit button. This causes curl to POST data using the Content-Type -multipart/form-data according to RFC1867. This enables uploading of binary -files etc. To force the 'content' part to be a file, prefix the file name -with an @ sign. To just get the content part from a file, prefix the file name -with the letter <. The difference between @ and < is then that @ makes a file -get attached in the post as a file upload, while the < makes a text field and -just get the contents for that text field from a file. - -Example, to send your password file to the server, where -\&'password' is the name of the form-field to which /etc/passwd will be the -input: - -\fBcurl\fP -F password=@/etc/passwd www.mypasswords.com - -To read the file's content from stdin instead of a file, use - where the file -name should've been. This goes for both @ and < constructs. - -You can also tell curl what Content-Type to use by using 'type=', in a manner -similar to: - -\fBcurl\fP -F "web=@index.html;type=text/html" url.com - -or - -\fBcurl\fP -F "name=daniel;type=text/foo" url.com - -You can also explicitly change the name field of an file upload part by -setting filename=, like this: - -\fBcurl\fP -F "file=@localfile;filename=nameinpost" url.com - -See further examples and details in the MANUAL. - -This option can be used multiple times. -.IP "--form-string " -(HTTP) Similar to \fI--form\fP except that the value string for the named -parameter is used literally. Leading \&'@' and \&'<' characters, and the -\&';type=' string in the value have no special meaning. Use this in preference -to \fI--form\fP if there's any possibility that the string value may -accidentally trigger the \&'@' or \&'<' features of \fI--form\fP. -.IP "-g/--globoff" -This option switches off the "URL globbing parser". When you set this option, -you can specify URLs that contain the letters {}[] without having them being -interpreted by curl itself. Note that these letters are not normal legal URL -contents but they should be encoded according to the URI standard. -.IP "-G/--get" -When used, this option will make all data specified with \fI-d/--data\fP or -\fI--data-binary\fP to be used in a HTTP GET request instead of the POST -request that otherwise would be used. The data will be appended to the URL -with a '?' separator. - -If used in combination with -I, the POST data will instead be appended to the -URL with a HEAD request. - -If this option is used several times, the following occurrences make no -difference. -.IP "-h/--help" -Usage help. -.IP "-H/--header

" -(HTTP) Extra header to use when getting a web page. You may specify any number -of extra headers. Note that if you should add a custom header that has the -same name as one of the internal ones curl would use, your externally set -header will be used instead of the internal one. This allows you to make even -trickier stuff than curl would normally do. You should not replace internally -set headers without knowing perfectly well what you're doing. Remove an -internal header by giving a replacement without content on the right side of -the colon, as in: -H \&"Host:". - -curl will make sure that each header you add/replace get sent with the proper -end of line marker, you should thus \fBnot\fP add that as a part of the header -content: do not add newlines or carriage returns they will only mess things up -for you. - -See also the \fI-A/--user-agent\fP and \fI-e/--referer\fP options. - -This option can be used multiple times to add/replace/remove multiple headers. -.IP "--ignore-content-length" -(HTTP) -Ignore the Content-Length header. This is particularly useful for servers -running Apache 1.x, which will report incorrect Content-Length for files -larger than 2 gigabytes. -.IP "-i/--include" -(HTTP) -Include the HTTP-header in the output. The HTTP-header includes things -like server-name, date of the document, HTTP-version and more... - -If this option is used twice, the second will again disable header include. -.IP "--interface " -Perform an operation using a specified interface. You can enter interface -name, IP address or host name. An example could look like: - - curl --interface eth0:1 http://www.netscape.com/ - -If this option is used several times, the last one will be used. -.IP "-I/--head" -(HTTP/FTP/FILE) -Fetch the HTTP-header only! HTTP-servers feature the command HEAD -which this uses to get nothing but the header of a document. When used -on a FTP or FILE file, curl displays the file size and last modification -time only. - -If this option is used twice, the second will again disable header only. -.IP "-j/--junk-session-cookies" -(HTTP) When curl is told to read cookies from a given file, this option will -make it discard all "session cookies". This will basically have the same effect -as if a new session is started. Typical browsers always discard session -cookies when they're closed down. - -If this option is used several times, each occurrence will toggle this on/off. -.IP "-k/--insecure" -(SSL) This option explicitly allows curl to perform "insecure" SSL connections -and transfers. All SSL connections are attempted to be made secure by using -the CA certificate bundle installed by default. This makes all connections -considered "insecure" to fail unless \fI-k/--insecure\fP is used. - -See this online resource for further details: -\fBhttp://curl.haxx.se/docs/sslcerts.html\fP - -If this option is used twice, the second time will again disable it. -.IP "--key " -(SSL) Private key file name. Allows you to provide your private key in this -separate file. - -If this option is used several times, the last one will be used. -.IP "--key-type " -(SSL) Private key file type. Specify which type your \fI--key\fP provided -private key is. DER, PEM and ENG are supported. If not specified, PEM is -assumed. - -If this option is used several times, the last one will be used. -.IP "--krb4 " -(FTP) Enable kerberos4 authentication and use. The level must be entered and -should be one of 'clear', 'safe', 'confidential' or 'private'. Should you use -a level that is not one of these, 'private' will instead be used. - -This option requires that the library was built with kerberos4 support. This -is not very common. Use \fI-V/--version\fP to see if your curl supports it. - -If this option is used several times, the last one will be used. -.IP "-K/--config " -Specify which config file to read curl arguments from. The config file is a -text file in which command line arguments can be written which then will be -used as if they were written on the actual command line. Options and their -parameters must be specified on the same config file line. If the parameter is -to contain white spaces, the parameter must be enclosed within quotes. If the -first column of a config line is a '#' character, the rest of the line will be -treated as a comment. - -Specify the filename as '-' to make curl read the file from stdin. - -Note that to be able to specify a URL in the config file, you need to specify -it using the \fI--url\fP option, and not by simply writing the URL on its own -line. So, it could look similar to this: - -url = "http://curl.haxx.se/docs/" - -This option can be used multiple times. - -When curl is invoked, it always (unless \fI-q\fP is used) checks for a default -config file and uses it if found. The default config file is checked for in -the following places in this order: - -1) curl tries to find the "home dir": It first checks for the CURL_HOME and -then the HOME environment variables. Failing that, it uses getpwuid() on -unix-like systems (which returns the home dir given the current user in your -system). On Windows, it then checks for the APPDATA variable, or as a last -resort the '%USERPROFILE%\Application Data'. - -2) On windows, if there is no _curlrc file in the home dir, it checks for one -in the same dir the executable curl is placed. On unix-like systems, it will -simply try to load .curlrc from the determined home dir. -.IP "--limit-rate " -Specify the maximum transfer rate you want curl to use. This feature is useful -if you have a limited pipe and you'd like your transfer not use your entire -bandwidth. - -The given speed is measured in bytes/second, unless a suffix is appended. -Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it -megabytes while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G. - -If you are also using the \fI-Y/--speed-limit\fP option, that option will take -precedence and might cripple the rate-limiting slightly, to help keeping the -speed-limit logic working. - -If this option is used several times, the last one will be used. -.IP "-l/--list-only" -(FTP) -When listing an FTP directory, this switch forces a name-only view. -Especially useful if you want to machine-parse the contents of an FTP -directory since the normal directory view doesn't use a standard look -or format. - -This option causes an FTP NLST command to be sent. Some FTP servers -list only files in their response to NLST; they do not include -subdirectories and symbolic links. - -If this option is used twice, the second will again disable list only. -.IP "--local-port [-num]" -Set a prefered number or range of local port numbers to use for the -connection(s). Note that port numbers by nature is a scarce resource that -will be busy at times so setting this range to something too narrow might -cause unnecessary connection setup failures. (Added in 7.15.2) -.IP "-L/--location" -(HTTP/HTTPS) If the server reports that the requested page has moved to a -different location (indicated with a Location: header and a 3XX response code) -this option will make curl redo the request on the new place. If used together -with \fI-i/--include\fP or \fI-I/--head\fP, headers from all requested pages -will be shown. When authentication is used, curl only sends its credentials to -the initial host. If a redirect takes curl to a different host, it won't be -able to intercept the user+password. See also \fI--location-trusted\fP on how -to change this. You can limit the amount of redirects to follow by using the -\fI--max-redirs\fP option. - -If this option is used twice, the second will again disable location following. -.IP "--location-trusted" -(HTTP/HTTPS) Like \fI-L/--location\fP, but will allow sending the name + -password to all hosts that the site may redirect to. This may or may not -introduce a security breach if the site redirects you do a site to which -you'll send your authentication info (which is plaintext in the case of HTTP -Basic authentication). - -If this option is used twice, the second will again disable location following. -.IP "--max-filesize " -Specify the maximum size (in bytes) of a file to download. If the file -requested is larger than this value, the transfer will not start and curl will -return with exit code 63. - -NOTE: The file size is not always known prior to download, and for such files -this option has no effect even if the file transfer ends up being larger than -this given limit. This concerns both FTP and HTTP transfers. -.IP "-m/--max-time " -Maximum time in seconds that you allow the whole operation to take. This is -useful for preventing your batch jobs from hanging for hours due to slow -networks or links going down. See also the \fI--connect-timeout\fP option. - -If this option is used several times, the last one will be used. -.IP "-M/--manual" -Manual. Display the huge help text. -.IP "-n/--netrc" -Makes curl scan the \fI.netrc\fP file in the user's home directory for login -name and password. This is typically used for ftp on unix. If used with http, -curl will enable user authentication. See -.BR netrc(4) -or -.BR ftp(1) -for details on the file format. Curl will not complain if that file -hasn't the right permissions (it should not be world nor group -readable). The environment variable "HOME" is used to find the home -directory. - -A quick and very simple example of how to setup a \fI.netrc\fP to allow curl -to ftp to the machine host.domain.com with user name \&'myself' and password -\&'secret' should look similar to: - -.B "machine host.domain.com login myself password secret" - -If this option is used twice, the second will again disable netrc usage. -.IP "--netrc-optional" -Very similar to \fI--netrc\fP, but this option makes the .netrc usage -\fBoptional\fP and not mandatory as the \fI--netrc\fP does. -.IP "--negotiate" -(HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate method was -designed by Microsoft and is used in their web applications. It is primarily -meant as a support for Kerberos5 authentication but may be also used along -with another authentication methods. For more information see IETF draft -draft-brezak-spnego-http-04.txt. - -This option requires that the library was built with GSSAPI support. This is -not very common. Use \fI-V/--version\fP to see if your version supports -GSS-Negotiate. - -When using this option, you must also provide a fake -u/--user option to -activate the authentication code properly. Sending a '-u :' is enough as the -user name and password from the -u option aren't actually used. - -If this option is used several times, the following occurrences make no -difference. -.IP "-N/--no-buffer" -Disables the buffering of the output stream. In normal work situations, curl -will use a standard buffered output stream that will have the effect that it -will output the data in chunks, not necessarily exactly when the data arrives. -Using this option will disable that buffering. - -If this option is used twice, the second will again switch on buffering. -.IP "--no-sessionid" -(SSL) Disable curl's use of SSL session-ID caching. By default all transfers -are done using the cache. Note that while nothing ever should get hurt by -attempting to reuse SSL session-IDs, there seem to be broken SSL -implementations in the wild that may require you to disable this in order for -you to succeed. (Added in 7.16.0) - -If this option is used twice, the second will again switch on use of the -session cache. -.IP "--ntlm" -(HTTP) Enables NTLM authentication. The NTLM authentication method was -designed by Microsoft and is used by IIS web servers. It is a proprietary -protocol, reversed engineered by clever people and implemented in curl based -on their efforts. This kind of behavior should not be endorsed, you should -encourage everyone who uses NTLM to switch to a public and documented -authentication method instead. Such as Digest. - -If you want to enable NTLM for your proxy authentication, then use -\fI--proxy-ntlm\fP. - -This option requires that the library was built with SSL support. Use -\fI-V/--version\fP to see if your curl supports NTLM. - -If this option is used several times, the following occurrences make no -difference. -.IP "-o/--output " -Write output to instead of stdout. If you are using {} or [] to fetch -multiple documents, you can use '#' followed by a number in the -specifier. That variable will be replaced with the current string for the URL -being fetched. Like in: - - curl http://{one,two}.site.com -o "file_#1.txt" - -or use several variables like: - - curl http://{site,host}.host[1-5].com -o "#1_#2" - -You may use this option as many times as you have number of URLs. - -See also the \fI--create-dirs\fP option to create the local directories -dynamically. -.IP "-O/--remote-name" -Write output to a local file named like the remote file we get. (Only the file -part of the remote file is used, the path is cut off.) - -The remote file name to use for saving is extracted from the given URL, -nothing else. - -You may use this option as many times as you have number of URLs. -.IP "--pass " -(SSL) Pass phrase for the private key - -If this option is used several times, the last one will be used. -.IP "--proxy-anyauth" -Tells curl to pick a suitable authentication method when communicating with -the given proxy. This will cause an extra request/response round-trip. (Added -in 7.13.2) - -If this option is used twice, the second will again disable the proxy use-any -authentication. -.IP "--proxy-basic" -Tells curl to use HTTP Basic authentication when communicating with the given -proxy. Use \fI--basic\fP for enabling HTTP Basic with a remote host. Basic is -the default authentication method curl uses with proxies. - -If this option is used twice, the second will again disable proxy HTTP Basic -authentication. -.IP "--proxy-digest" -Tells curl to use HTTP Digest authentication when communicating with the given -proxy. Use \fI--digest\fP for enabling HTTP Digest with a remote host. - -If this option is used twice, the second will again disable proxy HTTP Digest. -.IP "--proxy-ntlm" -Tells curl to use HTTP NTLM authentication when communicating with the given -proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host. - -If this option is used twice, the second will again disable proxy HTTP NTLM. -.IP "-p/--proxytunnel" -When an HTTP proxy is used (\fI-x/--proxy\fP), this option will cause non-HTTP -protocols to attempt to tunnel through the proxy instead of merely using it to -do HTTP-like operations. The tunnel approach is made with the HTTP proxy -CONNECT request and requires that the proxy allows direct connect to the -remote port number curl wants to tunnel through to. - -If this option is used twice, the second will again disable proxy tunnel. -.IP "-P/--ftp-port
" -(FTP) Reverses the initiator/listener roles when connecting with ftp. This -switch makes Curl use the PORT command instead of PASV. In practice, PORT -tells the server to connect to the client's specified address and port, while -PASV asks the server for an ip address and port to connect to.
-should be one of: -.RS -.IP interface -i.e "eth0" to specify which interface's IP address you want to use (Unix only) -.IP "IP address" -i.e "192.168.10.1" to specify exact IP number -.IP "host name" -i.e "my.host.domain" to specify machine -.IP "-" -make curl pick the same IP address that is already used for the control -connection -.RE - -If this option is used several times, the last one will be used. Disable the -use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command -instead of PORT by using \fI--disable-eprt\fP. EPRT is really PORT++. -.IP "-q" -If used as the first parameter on the command line, the \fIcurlrc\fP config -file will not be read and used. See the \fI-K/--config\fP for details on the -default config file search path. -.IP "-Q/--quote " -(FTP) Send an arbitrary command to the remote FTP server. Quote commands are -sent BEFORE the transfer is taking place (just after the initial PWD command -to be exact). To make commands take place after a successful transfer, prefix -them with a dash '-'. To make commands get sent after libcurl has changed -working directory, just before the transfer command(s), prefix the command -with '+'. You may specify any amount of commands. If the server returns -failure for one of the commands, the entire operation will be aborted. You -must send syntactically correct FTP commands as RFC959 defines. - -This option can be used multiple times. -.IP "--random-file " -(SSL) Specify the path name to file containing what will be considered as -random data. The data is used to seed the random engine for SSL connections. -See also the \fI--egd-file\fP option. -.IP "-r/--range " -(HTTP/FTP) -Retrieve a byte range (i.e a partial document) from a HTTP/1.1 or FTP -server. Ranges can be specified in a number of ways. -.RS -.TP 10 -.B 0-499 -specifies the first 500 bytes -.TP -.B 500-999 -specifies the second 500 bytes -.TP -.B -500 -specifies the last 500 bytes -.TP -.B 9500- -specifies the bytes from offset 9500 and forward -.TP -.B 0-0,-1 -specifies the first and last byte only(*)(H) -.TP -.B 500-700,600-799 -specifies 300 bytes from offset 500(H) -.TP -.B 100-199,500-599 -specifies two separate 100 bytes ranges(*)(H) -.RE - -(*) = NOTE that this will cause the server to reply with a multipart -response! - -You should also be aware that many HTTP/1.1 servers do not have this feature -enabled, so that when you attempt to get a range, you'll instead get the whole -document. - -FTP range downloads only support the simple syntax 'start-stop' (optionally -with one of the numbers omitted). It depends on the non-RFC command SIZE. - -If this option is used several times, the last one will be used. -.IP "-R/--remote-time" -When used, this will make libcurl attempt to figure out the timestamp of the -remote file, and if that is available make the local file get that same -timestamp. - -If this option is used twice, the second time disables this again. -.IP "--retry " -If a transient error is returned when curl tries to perform a transfer, it -will retry this number of times before giving up. Setting the number to 0 -makes curl do no retries (which is the default). Transient error means either: -a timeout, an FTP 5xx response code or an HTTP 5xx response code. - -When curl is about to retry a transfer, it will first wait one second and then -for all forthcoming retries it will double the waiting time until it reaches -10 minutes which then will be the delay between the rest of the retries. By -using \fI--retry-delay\fP you disable this exponential backoff algorithm. See -also \fI--retry-max-time\fP to limit the total time allowed for -retries. (Added in 7.12.3) - -If this option is used multiple times, the last occurrence decide the amount. -.IP "--retry-delay " -Make curl sleep this amount of time between each retry when a transfer has -failed with a transient error (it changes the default backoff time algorithm -between retries). This option is only interesting if \fI--retry\fP is also -used. Setting this delay to zero will make curl use the default backoff time. -(Added in 7.12.3) - -If this option is used multiple times, the last occurrence decide the amount. -.IP "--retry-max-time " -The retry timer is reset before the first transfer attempt. Retries will be -done as usual (see \fI--retry\fP) as long as the timer hasn't reached this -given limit. Notice that if the timer hasn't reached the limit, the request -will be made and while performing, it may take longer than this given time -period. To limit a single request\'s maximum time, use \fI-m/--max-time\fP. -Set this option to zero to not timeout retries. (Added in 7.12.3) - -If this option is used multiple times, the last occurrence decide the amount. -.IP "-s/--silent" -Silent mode. Don't show progress meter or error messages. Makes -Curl mute. - -If this option is used twice, the second will again disable silent mode. -.IP "-S/--show-error" -When used with -s it makes curl show error message if it fails. - -If this option is used twice, the second will again disable show error. -.IP "--socks4 " -Use the specified SOCKS4 proxy. If the port number is not specified, it is -assumed at port 1080. (Added in 7.15.2) - -This option overrides any previous use of \fI-x/--proxy\fP, as they are -mutually exclusive. - -If this option is used several times, the last one will be used. -.IP "--socks5 " -Use the specified SOCKS5 proxy. If the port number is not specified, it is -assumed at port 1080. (Added in 7.11.1) - -This option overrides any previous use of \fI-x/--proxy\fP, as they are -mutually exclusive. - -If this option is used several times, the last one will be used. (This option -was previously wrongly documented and used as --socks without the number -appended.) -.IP "--stderr " -Redirect all writes to stderr to the specified file instead. If the file name -is a plain '-', it is instead written to stdout. This option has no point when -you're using a shell with decent redirecting capabilities. - -If this option is used several times, the last one will be used. -.IP "--tcp-nodelay" -Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for -details about this option. (Added in 7.11.2) - -If this option is used several times, each occurrence toggles this on/off. -.IP "-t/--telnet-option " -Pass options to the telnet protocol. Supported options are: - -TTYPE= Sets the terminal type. - -XDISPLOC= Sets the X display location. - -NEW_ENV= Sets an environment variable. -.IP "-T/--upload-file " -This transfers the specified local file to the remote URL. If there is no file -part in the specified URL, Curl will append the local file name. NOTE that you -must use a trailing / on the last directory to really prove to Curl that there -is no file name or curl will think that your last directory name is the remote -file name to use. That will most likely cause the upload operation to fail. If -this is used on a http(s) server, the PUT command will be used. - -Use the file name "-" (a single dash) to use stdin instead of a given file. - -You can specify one -T for each URL on the command line. Each -T + URL pair -specifies what to upload and to where. curl also supports "globbing" of the -T -argument, meaning that you can upload multiple files to a single URL by using -the same URL globbing style supported in the URL, like this: - -curl -T "{file1,file2}" http://www.uploadtothissite.com - -or even - -curl -T "img[1-1000].png" ftp://ftp.picturemania.com/upload/ -.IP "--trace " -Enables a full trace dump of all incoming and outgoing data, including -descriptive information, to the given output file. Use "-" as filename to have -the output sent to stdout. - -If this option is used several times, the last one will be used. -.IP "--trace-ascii " -Enables a full trace dump of all incoming and outgoing data, including -descriptive information, to the given output file. Use "-" as filename to have -the output sent to stdout. - -This is very similar to \fI--trace\fP, but leaves out the hex part and only -shows the ASCII part of the dump. It makes smaller output that might be easier -to read for untrained humans. - -If this option is used several times, the last one will be used. -.IP "--trace-time" -Prepends a time stamp to each trace or verbose line that curl displays. -(Added in 7.14.0) - -If this option is used several times, each occurrence will toggle it on/off. -.IP "-u/--user " -Specify user and password to use for server authentication. Overrides -\fI-n/--netrc\fP and \fI--netrc-optional\fP. - -If you use an SSPI-enabled curl binary and do NTLM autentication, you can -force curl to pick up the user name and password from your environment by -simply specifying a single colon with this option: "-u :". - -If this option is used several times, the last one will be used. -.IP "-U/--proxy-user " -Specify user and password to use for proxy authentication. - -If you use an SSPI-enabled curl binary and do NTLM autentication, you can -force curl to pick up the user name and password from your environment by -simply specifying a single colon with this option: "-U :". - -If this option is used several times, the last one will be used. -.IP "--url " -Specify a URL to fetch. This option is mostly handy when you want to specify -URL(s) in a config file. - -This option may be used any number of times. To control where this URL is -written, use the \fI-o/--output\fP or the \fI-O/--remote-name\fP options. -.IP "-v/--verbose" -Makes the fetching more verbose/talkative. Mostly usable for debugging. Lines -starting with '>' means "header data" sent by curl, '<' means "header data" -received by curl that is hidden in normal cases and lines starting with '*' -means additional info provided by curl. - -Note that if you only want HTTP headers in the output, \fI-i/--include\fP -might be option you're looking for. - -If you think this option still doesn't give you enough details, consider using -\fI--trace\fP or \fI--trace-ascii\fP instead. - -If this option is used twice, the second will again disable verbose. -.IP "-V/--version" -Displays information about curl and the libcurl version it uses. - -The first line includes the full version of curl, libcurl and other 3rd party -libraries linked with the executable. - -The second line (starts with "Protocols:") shows all protocols that libcurl -reports to support. - -The third line (starts with "Features:") shows specific features libcurl -reports to offer. Available features include: -.RS -.IP "IPv6" -You can use IPv6 with this. -.IP "krb4" -Krb4 for ftp is supported. -.IP "SSL" -HTTPS and FTPS are supported. -.IP "libz" -Automatic decompression of compressed files over HTTP is supported. -.IP "NTLM" -NTLM authentication is supported. -.IP "GSS-Negotiate" -Negotiate authentication is supported. -.IP "Debug" -This curl uses a libcurl built with Debug. This enables more error-tracking -and memory debugging etc. For curl-developers only! -.IP "AsynchDNS" -This curl uses asynchronous name resolves. -.IP "SPNEGO" -SPNEGO Negotiate authentication is supported. -.IP "Largefile" -This curl supports transfers of large files, files larger than 2GB. -.IP "IDN" -This curl supports IDN - international domain names. -.IP "SSPI" -SSPI is supported. If you use NTLM and set a blank user name, curl will -authenticate with your current user and password. -.RE -.IP "-w/--write-out " -Defines what to display on stdout after a completed and successful -operation. The format is a string that may contain plain text mixed with any -number of variables. The string can be specified as "string", to get read from -a particular file you specify it "@filename" and to tell curl to read the -format from stdin you write "@-". - -The variables present in the output format will be substituted by the value or -text that curl thinks fit, as described below. All variables are specified -like %{variable_name} and to output a normal % you just write them like -%%. You can output a newline by using \\n, a carriage return with \\r and a tab -space with \\t. - -.B NOTE: -The %-letter is a special letter in the win32-environment, where all -occurrences of % must be doubled when using this option. - -Available variables are at this point: -.RS -.TP 15 -.B url_effective -The URL that was fetched last. This is mostly meaningful if you've told curl -to follow location: headers. -.TP -.B http_code -The numerical code that was found in the last retrieved HTTP(S) page. -.TP -.B http_connect -The numerical code that was found in the last response (from a proxy) to a -curl CONNECT request. (Added in 7.12.4) -.TP -.B time_total -The total time, in seconds, that the full operation lasted. The time will be -displayed with millisecond resolution. -.TP -.B time_namelookup -The time, in seconds, it took from the start until the name resolving was -completed. -.TP -.B time_connect -The time, in seconds, it took from the start until the connect to the remote -host (or proxy) was completed. -.TP -.B time_pretransfer -The time, in seconds, it took from the start until the file transfer is just -about to begin. This includes all pre-transfer commands and negotiations that -are specific to the particular protocol(s) involved. -.TP -.B time_redirect -The time, in seconds, it took for all redirection steps include name lookup, -connect, pretransfer and transfer before final transaction was -started. time_redirect shows the complete execution time for multiple -redirections. (Added in 7.12.3) -.TP -.B time_starttransfer -The time, in seconds, it took from the start until the first byte is just about -to be transferred. This includes time_pretransfer and also the time the -server needs to calculate the result. -.TP -.B size_download -The total amount of bytes that were downloaded. -.TP -.B size_upload -The total amount of bytes that were uploaded. -.TP -.B size_header -The total amount of bytes of the downloaded headers. -.TP -.B size_request -The total amount of bytes that were sent in the HTTP request. -.TP -.B speed_download -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. -.TP -.B num_connects -Number of new connects made in the recent transfer. (Added in 7.12.3) -.TP -.B num_redirects -Number of redirects that were followed in the request. (Added in 7.12.3) -.TP -.B ftp_entry_path -The initial path libcurl ended up in when logging on to the remote FTP -server. (Added in 7.15.4) -.RE - -If this option is used several times, the last one will be used. -.IP "-x/--proxy " -Use specified HTTP proxy. If the port number is not specified, it is assumed -at port 1080. - -This option overrides existing environment variables that sets proxy to -use. If there's an environment variable setting a proxy, you can set proxy to -\&"" to override it. - -\fBNote\fP that all operations that are performed over a HTTP proxy will -transparently be converted to HTTP. It means that certain protocol specific -operations might not be available. This is not the case if you can tunnel -through the proxy, as done with the \fI-p/--proxytunnel\fP option. - -Starting with 7.14.1, the proxy host can be specified the exact same way as -the proxy environment variables, include protocol prefix (http://) and -embedded user + password. - -If this option is used several times, the last one will be used. -.IP "-X/--request " -(HTTP) Specifies a custom request method to use when communicating with the -HTTP server. The specified request will be used instead of the method -otherwise used (which defaults to GET). Read the HTTP 1.1 specification for -details and explanations. - -(FTP) -Specifies a custom FTP command to use instead of LIST when doing file lists -with ftp. - -If this option is used several times, the last one will be used. -.IP "-y/--speed-time