Backed out updated libcurl.

This commit is contained in:
Asher Baker
2013-03-18 00:55:59 +00:00
parent 9b65900df0
commit e84f6e4afd
1511 changed files with 161513 additions and 213368 deletions
+61 -89
View File
@@ -1,7 +1,7 @@
_ _ ____ _
___| | | | _ \| |
/ __| | | | |_) | |
| (__| |_| | _ <| |___
_ _ ____ _
___| | | | _ \| |
/ __| | | | |_) | |
| (__| |_| | _ <| |___
\___|\___/|_| \_\_____|
INTERNALS
@@ -12,10 +12,10 @@ INTERNALS
The largest amount of code and complexity is in the library part.
GIT
CVS
===
All changes to the sources are committed to the git repository as soon as
they're somewhat verified to work. Changes shall be committed as independently
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.
@@ -37,16 +37,18 @@ Portability
GnuTLS 1.2
zlib 1.1.4
libssh2 0.16
c-ares 1.6.0
c-ares 1.5.0
libidn 0.4.1
cyassl 2.0.0
*yassl 1.4.0 (http://curl.haxx.se/mail/lib-2008-02/0093.html)
openldap 2.0
MIT krb5 lib 1.2.4
qsossl V5R2M0
NSS 3.12.x
axTLS 1.2.7
NSS 3.11.x
Heimdal ?
* = only partly functional, but that's due to bugs in the third party lib, not
because of libcurl code
On systems where configure runs, we aim at working on them all - if they have
a suitable C compiler. On systems that don't run configure, we strive to keep
curl running fine on:
@@ -65,7 +67,7 @@ Portability
GNU Autoconf 2.57
GNU Automake 1.7 (we currently avoid 1.10 due to Solaris-related bugs)
GNU M4 1.4
perl 5.004
perl 4
roffit 0.5
groff ? (any version that supports "groff -Tps -man [in] [out]")
ps2pdf (gs) ?
@@ -88,7 +90,7 @@ Windows vs Unix
do it etc there might be reasons for applications to alter that behaviour.
3. The file descriptors for network communication and file operations are
not easily interchangeable as in unix.
not easily interchangable as in unix.
We avoid this by not trying any funny tricks on file descriptors.
@@ -101,9 +103,9 @@ Windows vs Unix
Inside the source code, We make an effort to avoid '#ifdef [Your OS]'. All
conditionals that deal with features *should* instead be in the format
'#ifdef HAVE_THAT_WEIRD_FUNCTION'. Since Windows can't run configure scripts,
we maintain a curl_config-win32.h file in lib directory that is supposed to
look exactly as a curl_config.h file would have looked like on a Windows
machine!
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.
@@ -180,7 +182,7 @@ Library
Some time during the DO function, the Curl_setup_transfer() function must
be called with some basic info about the upcoming transfer: what socket(s)
to read/write and the expected file transfer sizes (if known).
to read/write and the expected file tranfer sizes (if known).
o Transfer()
@@ -217,20 +219,20 @@ Library
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 connections.
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
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_handler::do_it() - transfers data
Curl_done - ends a transfer
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
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.
@@ -247,16 +249,16 @@ Library
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
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 Curl_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.
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
@@ -282,14 +284,14 @@ Library
LDAP
Everything LDAP is in lib/ldap.c and lib/openldap.c
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 transferring data in Transfer() a few functions might get used.
While transfering data in Transfer() a few functions might get used.
curl_getdate() in lib/parsedate.c is for HTTP date comparisons (and more).
lib/getenv.c offers curl_getenv() which is for reading environment variables
@@ -301,8 +303,8 @@ Library
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 conversions.
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.
@@ -354,10 +356,8 @@ multi interface/non-blocking
The FTP and the SFTP/SCP protocols are thus perfect examples of how we adapt
and adjust the code to allow non-blocking operations even on multi-stage
protocols. They are built around state machines that return when they could
block waiting for data. The DICT, LDAP and TELNET protocols are crappy
examples and they are subject for rewrite in the future to better fit the
libcurl protocol family.
protocols. The DICT, TELNET and TFTP are crappy examples and they are subject
for rewrite in the future to better fit the libcurl protocol family.
SSL libraries
=============
@@ -375,13 +375,11 @@ SSL libraries
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.) Public
API functions are marked with CURL_EXTERN in the public header files so that
all others can be hidden on platforms where this is possible.
but they are to be changed to follow this pattern in future versions.)
Return Codes and Informationals
===============================
@@ -410,10 +408,10 @@ Client
main() resides in src/main.c together with most of the client code.
src/tool_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.
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
@@ -438,65 +436,39 @@ Memory Debugging
information about what they just did. The logged data can then be analyzed
after a complete session,
memanalyze.pl is the perl script present in tests/ that analyzes a log file
generated by the memory tracking system. It detects if resources are
allocated but never freed and other kinds of errors related to resource
management.
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.
Internally, definition of preprocessor symbol DEBUGBUILD restricts code which
is only compiled for debug enabled builds. And symbol CURLDEBUG is used to
differentiate code which is _only_ used for memory tracking/debugging.
Use -DCURLDEBUG when compiling to enable memory debugging, this is also
switched on by running configure with --enable-curldebug. Use -DDEBUGBUILD
when compiling to enable a debug build or run configure with --enable-debug.
curl --version will list 'Debug' feature for debug enabled builds, and
will list 'TrackMemory' feature for curl debug memory tracking capable
builds. These features are independent and can be controlled when running
the configure script. When --enable-debug is given both features will be
enabled, unless some restriction prevents memory tracking from being used.
Use -DMALLOCDEBUG when compiling to enable memory debugging, this is also
switched on by running configure with --enable-debug.
Test Suite
==========
The test suite 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.
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 test servers like
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 description of the test suite in the tests/README file, and the
test case data files in the tests/FILEFORMAT file.
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.
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, do this:
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.
1. Tag the source code accordingly.
2. run the 'maketgz' script (using 'make distcheck' will give you a pretty
good view on the status of the current sources). maketgz requires a
version number and creates the 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.
3. When that's complete, sign the output files.
4. Upload
5. Update web site and changelog on site
6. Send announcement to the mailing lists
NOTE: you must have curl checked out from git to be able to do a proper
release build. The release tarballs do not have everything setup in order to
do releases properly.