Compare commits
55 Commits
curl-7_5
...
curl-7_5_2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9f9cac7402 | ||
![]() |
06730bc905 | ||
![]() |
0d181b596b | ||
![]() |
b60f1b1d17 | ||
![]() |
4d1706798f | ||
![]() |
4ac48317cf | ||
![]() |
ed8dbf4ac2 | ||
![]() |
97f43e98e7 | ||
![]() |
f76ef1fb67 | ||
![]() |
3bcdfd5cb4 | ||
![]() |
7ce518701b | ||
![]() |
10272550b6 | ||
![]() |
784f57f9eb | ||
![]() |
24dee483e9 | ||
![]() |
887e728b7d | ||
![]() |
c03e0074c6 | ||
![]() |
0d12c56738 | ||
![]() |
880208c5b2 | ||
![]() |
f4acbed214 | ||
![]() |
910fc8522a | ||
![]() |
6d90be0757 | ||
![]() |
3d8bb1c27a | ||
![]() |
1c8121a89e | ||
![]() |
0db48a8109 | ||
![]() |
5594741acb | ||
![]() |
cbaeed7232 | ||
![]() |
6d7587d327 | ||
![]() |
9ee94b3d84 | ||
![]() |
2c100371d2 | ||
![]() |
184ad46a27 | ||
![]() |
74d35416a2 | ||
![]() |
2fff6a4b0e | ||
![]() |
bf43b49a20 | ||
![]() |
6ad9bd8022 | ||
![]() |
ec5ac82cfe | ||
![]() |
76ac228e44 | ||
![]() |
b0828267bc | ||
![]() |
9c10cb4684 | ||
![]() |
3d8c4ce526 | ||
![]() |
ec420c62d9 | ||
![]() |
5d44f00201 | ||
![]() |
cddeb939ed | ||
![]() |
45cf0cf3ec | ||
![]() |
ff7729e2bc | ||
![]() |
7dcda6a370 | ||
![]() |
dde277d86a | ||
![]() |
a5146c7297 | ||
![]() |
69abefc936 | ||
![]() |
dad2317e6e | ||
![]() |
22d8aa37e0 | ||
![]() |
160d2a30db | ||
![]() |
cb1842cb52 | ||
![]() |
6ced1ba615 | ||
![]() |
54e46e199c | ||
![]() |
ca8196a4dc |
20
CVS-INFO
Normal file
20
CVS-INFO
Normal file
@@ -0,0 +1,20 @@
|
||||
This file is only present in the CVS - never in release archives.
|
||||
|
||||
This contains information about other files and things that the CVS repository
|
||||
keeps in its inner sanctum.
|
||||
|
||||
CHANGES.0 contains ancient changes.
|
||||
|
||||
memanalyze.pl is for analyzing the output generated by curl if -DMALLOCDEBUG
|
||||
is used when compiling
|
||||
|
||||
Makefile.dist is included as the root Makefile in distribution archives
|
||||
|
||||
perl/ is a subdirectory with various perl scripts
|
||||
|
||||
To build after having extracted everything from CVS, do this:
|
||||
|
||||
% automake
|
||||
% autoconf
|
||||
% ./configure
|
||||
% make
|
8
FILES
8
FILES
@@ -1,7 +1,8 @@
|
||||
CHANGES
|
||||
FILES
|
||||
LEGAL
|
||||
MPL-1.0.txt
|
||||
MPL-1.1.txt
|
||||
MITX.txt
|
||||
README
|
||||
docs/BUGS
|
||||
docs/CONTRIBUTE
|
||||
@@ -11,7 +12,7 @@ docs/INSTALL
|
||||
docs/INTERNALS
|
||||
docs/MANUAL
|
||||
docs/README.win32
|
||||
docs/README.libcurl
|
||||
docs/LIBCURL
|
||||
docs/RESOURCES
|
||||
docs/TODO
|
||||
docs/curl.1
|
||||
@@ -53,6 +54,7 @@ src/*.in
|
||||
src/*.am
|
||||
src/mkhelp.pl
|
||||
src/Makefile.vc6
|
||||
src/Makefile.b32
|
||||
src/*m32
|
||||
lib/getdate.y
|
||||
lib/*.[ch]
|
||||
@@ -60,6 +62,8 @@ lib/*in
|
||||
lib/*am
|
||||
lib/Makefile.vc6
|
||||
lib/*m32
|
||||
lib/Makefile.b32
|
||||
lib/Makefile.b32.resp
|
||||
lib/libcurl.def
|
||||
include/README
|
||||
include/Makefile.in
|
||||
|
34
LEGAL
34
LEGAL
@@ -1,21 +1,25 @@
|
||||
Part of this software is distributed under the Mozilla Public License
|
||||
version 1.0, which is part of this distribution (MPL-1.0.txt) and
|
||||
available on-line at http://www.mozilla.org/MPL/
|
||||
Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
|
||||
The terminology used here is described in the Mozilla Public License.
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license
|
||||
document, but changing it is not allowed.
|
||||
|
||||
In accordance with section "4. Inability to Comply Due to Statute or
|
||||
Regulation" the following exemptions apply to this software:
|
||||
In order to be useful for every potential user, the curl and libcurl are
|
||||
dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
|
||||
* The Initial Developer has the right, regardless of the citizenship
|
||||
of any involved party, to choose the location for settling disputes
|
||||
as refered to under section "11. Miscellaneous" of the Mozilla Public
|
||||
License.
|
||||
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 MPL or the MIT/X-derivate licenses. You may
|
||||
pick one of these licenses. The files MITX.txt and MPL-1.1.txt contain the
|
||||
license texts.
|
||||
|
||||
Initial Developers of this software are:
|
||||
As a courtesy to the open-source and free software community, we ask you to
|
||||
dual-license any modifications that you make as well, under the terms of this
|
||||
document.
|
||||
|
||||
Daniel Stenberg <daniel@haxx.se>
|
||||
Please remember to always keep the licensing information included in
|
||||
individual source files up-to-date, so as to avoid misleading anyone as to
|
||||
the status of these files.
|
||||
|
||||
Curl is Copyright (C) 1996-2000 Daniel Stenberg
|
||||
|
||||
|
||||
I will use a submission policy according to which I will only enter
|
||||
contributions into the CVS tree if the contributor agrees to both licenses
|
||||
and this dual-license approach.
|
||||
|
28
MITX.txt
Normal file
28
MITX.txt
Normal file
@@ -0,0 +1,28 @@
|
||||
COPYRIGHT AND PERMISSION NOTICE
|
||||
|
||||
Copyright (c) 2000, Daniel Stenberg, <daniel@haxx.se>.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, and/or sell copies of the
|
||||
Software, and to permit persons to whom the Software is furnished to do so,
|
||||
provided that the above copyright notice(s) and this permission notice appear
|
||||
in all copies of the Software and that both the above copyright notice(s) and
|
||||
this permission notice appear in supporting documentation.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
|
||||
NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE
|
||||
LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
|
||||
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of a copyright holder shall not
|
||||
be used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization of the copyright holder.
|
||||
|
360
MPL-1.0.txt
360
MPL-1.0.txt
@@ -1,360 +0,0 @@
|
||||
MOZILLA PUBLIC LICENSE
|
||||
Version 1.0
|
||||
|
||||
----------------
|
||||
|
||||
1. Definitions.
|
||||
|
||||
1.1. ``Contributor'' means each entity that creates or contributes to
|
||||
the creation of Modifications.
|
||||
|
||||
1.2. ``Contributor Version'' means the combination of the Original
|
||||
Code, prior Modifications used by a Contributor, and the Modifications
|
||||
made by that particular Contributor.
|
||||
|
||||
1.3. ``Covered Code'' means the Original Code or Modifications or the
|
||||
combination of the Original Code and Modifications, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.4. ``Electronic Distribution Mechanism'' means a mechanism generally
|
||||
accepted in the software development community for the electronic
|
||||
transfer of data.
|
||||
|
||||
1.5. ``Executable'' means Covered Code in any form other than Source
|
||||
Code.
|
||||
|
||||
1.6. ``Initial Developer'' means the individual or entity identified as
|
||||
the Initial Developer in the Source Code notice required by Exhibit A.
|
||||
|
||||
1.7. ``Larger Work'' means a work which combines Covered Code or
|
||||
portions thereof with code not governed by the terms of this License.
|
||||
|
||||
1.8. ``License'' means this document.
|
||||
|
||||
1.9. ``Modifications'' means any addition to or deletion from the
|
||||
substance or structure of either the Original Code or any previous
|
||||
Modifications. When Covered Code is released as a series of files, a
|
||||
Modification is:
|
||||
|
||||
A. Any addition to or deletion from the contents of a file
|
||||
containing Original Code or previous Modifications.
|
||||
|
||||
B. Any new file that contains any part of the Original Code or
|
||||
previous Modifications.
|
||||
|
||||
1.10. ``Original Code'' means Source Code of computer software code
|
||||
which is described in the Source Code notice required by Exhibit A as
|
||||
Original Code, and which, at the time of its release under this License
|
||||
is not already Covered Code governed by this License.
|
||||
|
||||
1.11. ``Source Code'' means the preferred form of the Covered Code for
|
||||
making modifications to it, including all modules it contains, plus any
|
||||
associated interface definition files, scripts used to control
|
||||
compilation and installation of an Executable, or a list of source code
|
||||
differential comparisons against either the Original Code or another
|
||||
well known, available Covered Code of the Contributor's choice. The
|
||||
Source Code can be in a compressed or archival form, provided the
|
||||
appropriate decompression or de-archiving software is widely available
|
||||
for no charge.
|
||||
|
||||
1.12. ``You'' means an individual or a legal entity exercising rights
|
||||
under, and complying with all of the terms of, this License or a future
|
||||
version of this License issued under Section 6.1. For legal entities,
|
||||
``You'' includes any entity which controls, is controlled by, or is
|
||||
under common control with You. For purposes of this definition,
|
||||
``control'' means (a) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (b) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares or beneficial ownership of such entity.
|
||||
|
||||
2. Source Code License.
|
||||
|
||||
2.1. The Initial Developer Grant.
|
||||
The Initial Developer hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license, subject to third party intellectual property
|
||||
claims:
|
||||
|
||||
(a) to use, reproduce, modify, display, perform, sublicense and
|
||||
distribute the Original Code (or portions thereof) with or without
|
||||
Modifications, or as part of a Larger Work; and
|
||||
|
||||
(b) under patents now or hereafter owned or controlled by Initial
|
||||
Developer, to make, have made, use and sell (``Utilize'') the
|
||||
Original Code (or portions thereof), but solely to the extent that
|
||||
any such patent is reasonably necessary to enable You to Utilize
|
||||
the Original Code (or portions thereof) and not to any greater
|
||||
extent that may be necessary to Utilize further Modifications or
|
||||
combinations.
|
||||
|
||||
2.2. Contributor Grant.
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license, subject to third party intellectual property
|
||||
claims:
|
||||
|
||||
(a) to use, reproduce, modify, display, perform, sublicense and
|
||||
distribute the Modifications created by such Contributor (or
|
||||
portions thereof) either on an unmodified basis, with other
|
||||
Modifications, as Covered Code or as part of a Larger Work; and
|
||||
|
||||
(b) under patents now or hereafter owned or controlled by
|
||||
Contributor, to Utilize the Contributor Version (or portions
|
||||
thereof), but solely to the extent that any such patent is
|
||||
reasonably necessary to enable You to Utilize the Contributor
|
||||
Version (or portions thereof), and not to any greater extent that
|
||||
may be necessary to Utilize further Modifications or combinations.
|
||||
|
||||
3. Distribution Obligations.
|
||||
|
||||
3.1. Application of License.
|
||||
The Modifications which You create or to which You contribute are
|
||||
governed by the terms of this License, including without limitation
|
||||
Section 2.2. The Source Code version of Covered Code may be distributed
|
||||
only under the terms of this License or a future version of this
|
||||
License released under Section 6.1, and You must include a copy of this
|
||||
License with every copy of the Source Code You distribute. You may not
|
||||
offer or impose any terms on any Source Code version that alters or
|
||||
restricts the applicable version of this License or the recipients'
|
||||
rights hereunder. However, You may include an additional document
|
||||
offering the additional rights described in Section 3.5.
|
||||
|
||||
3.2. Availability of Source Code.
|
||||
Any Modification which You create or to which You contribute must be
|
||||
made available in Source Code form under the terms of this License
|
||||
either on the same media as an Executable version or via an accepted
|
||||
Electronic Distribution Mechanism to anyone to whom you made an
|
||||
Executable version available; and if made available via Electronic
|
||||
Distribution Mechanism, must remain available for at least twelve (12)
|
||||
months after the date it initially became available, or at least six
|
||||
(6) months after a subsequent version of that particular Modification
|
||||
has been made available to such recipients. You are responsible for
|
||||
ensuring that the Source Code version remains available even if the
|
||||
Electronic Distribution Mechanism is maintained by a third party.
|
||||
|
||||
3.3. Description of Modifications.
|
||||
You must cause all Covered Code to which you contribute to contain a
|
||||
file documenting the changes You made to create that Covered Code and
|
||||
the date of any change. You must include a prominent statement that the
|
||||
Modification is derived, directly or indirectly, from Original Code
|
||||
provided by the Initial Developer and including the name of the Initial
|
||||
Developer in (a) the Source Code, and (b) in any notice in an
|
||||
Executable version or related documentation in which You describe the
|
||||
origin or ownership of the Covered Code.
|
||||
|
||||
3.4. Intellectual Property Matters
|
||||
|
||||
(a) Third Party Claims.
|
||||
If You have knowledge that a party claims an intellectual property
|
||||
right in particular functionality or code (or its utilization
|
||||
under this License), you must include a text file with the source
|
||||
code distribution titled ``LEGAL'' which describes the claim and
|
||||
the party making the claim in sufficient detail that a recipient
|
||||
will know whom to contact. If you obtain such knowledge after You
|
||||
make Your Modification available as described in Section 3.2, You
|
||||
shall promptly modify the LEGAL file in all copies You make
|
||||
available thereafter and shall take other steps (such as notifying
|
||||
appropriate mailing lists or newsgroups) reasonably calculated to
|
||||
inform those who received the Covered Code that new knowledge has
|
||||
been obtained.
|
||||
|
||||
(b) Contributor APIs.
|
||||
If Your Modification is an application programming interface and
|
||||
You own or control patents which are reasonably necessary to
|
||||
implement that API, you must also include this information in the
|
||||
LEGAL file.
|
||||
|
||||
3.5. Required Notices.
|
||||
You must duplicate the notice in Exhibit A in each file of the Source
|
||||
Code, and this License in any documentation for the Source Code, where
|
||||
You describe recipients' rights relating to Covered Code. If You
|
||||
created one or more Modification(s), You may add your name as a
|
||||
Contributor to the notice described in Exhibit A. If it is not possible
|
||||
to put such notice in a particular Source Code file due to its
|
||||
structure, then you must include such notice in a location (such as a
|
||||
relevant directory file) where a user would be likely to look for such
|
||||
a notice. You may choose to offer, and to charge a fee for, warranty,
|
||||
support, indemnity or liability obligations to one or more recipients
|
||||
of Covered Code. However, You may do so only on Your own behalf, and
|
||||
not on behalf of the Initial Developer or any Contributor. You must
|
||||
make it absolutely clear than any such warranty, support, indemnity or
|
||||
liability obligation is offered by You alone, and You hereby agree to
|
||||
indemnify the Initial Developer and every Contributor for any liability
|
||||
incurred by the Initial Developer or such Contributor as a result of
|
||||
warranty, support, indemnity or liability terms You offer.
|
||||
|
||||
3.6. Distribution of Executable Versions.
|
||||
You may distribute Covered Code in Executable form only if the
|
||||
requirements of Section 3.1-3.5 have been met for that Covered Code,
|
||||
and if You include a notice stating that the Source Code version of the
|
||||
Covered Code is available under the terms of this License, including a
|
||||
description of how and where You have fulfilled the obligations of
|
||||
Section 3.2. The notice must be conspicuously included in any notice in
|
||||
an Executable version, related documentation or collateral in which You
|
||||
describe recipients' rights relating to the Covered Code. You may
|
||||
distribute the Executable version of Covered Code under a license of
|
||||
Your choice, which may contain terms different from this License,
|
||||
provided that You are in compliance with the terms of this License and
|
||||
that the license for the Executable version does not attempt to limit
|
||||
or alter the recipient's rights in the Source Code version from the
|
||||
rights set forth in this License. If You distribute the Executable
|
||||
version under a different license You must make it absolutely clear
|
||||
that any terms which differ from this License are offered by You alone,
|
||||
not by the Initial Developer or any Contributor. You hereby agree to
|
||||
indemnify the Initial Developer and every Contributor for any liability
|
||||
incurred by the Initial Developer or such Contributor as a result of
|
||||
any such terms You offer.
|
||||
|
||||
3.7. Larger Works.
|
||||
You may create a Larger Work by combining Covered Code with other code
|
||||
not governed by the terms of this License and distribute the Larger
|
||||
Work as a single product. In such a case, You must make sure the
|
||||
requirements of this License are fulfilled for the Covered Code.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation.
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Code due to statute
|
||||
or regulation then You must: (a) comply with the terms of this License
|
||||
to the maximum extent possible; and (b) describe the limitations and
|
||||
the code they affect. Such description must be included in the LEGAL
|
||||
file described in Section 3.4 and must be included with all
|
||||
distributions of the Source Code. Except to the extent prohibited by
|
||||
statute or regulation, such description must be sufficiently detailed
|
||||
for a recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Application of this License.
|
||||
|
||||
This License applies to code to which the Initial Developer has
|
||||
attached the notice in Exhibit A, and to related Covered Code.
|
||||
|
||||
6. Versions of the License.
|
||||
|
||||
6.1. New Versions.
|
||||
Netscape Communications Corporation (``Netscape'') may publish revised
|
||||
and/or new versions of the License from time to time. Each version will
|
||||
be given a distinguishing version number.
|
||||
|
||||
6.2. Effect of New Versions.
|
||||
Once Covered Code has been published under a particular version of the
|
||||
License, You may always continue to use it under the terms of that
|
||||
version. You may also choose to use such Covered Code under the terms
|
||||
of any subsequent version of the License published by Netscape. No one
|
||||
other than Netscape has the right to modify the terms applicable to
|
||||
Covered Code created under this License.
|
||||
|
||||
6.3. Derivative Works.
|
||||
If you create or use a modified version of this License (which you may
|
||||
only do in order to apply it to code which is not already Covered Code
|
||||
governed by this License), you must (a) rename Your license so that the
|
||||
phrases ``Mozilla'', ``MOZILLAPL'', ``MOZPL'', ``Netscape'', ``NPL'' or
|
||||
any confusingly similar phrase do not appear anywhere in your license
|
||||
and (b) otherwise make it clear that your version of the license
|
||||
contains terms which differ from the Mozilla Public License and
|
||||
Netscape Public License. (Filling in the name of the Initial Developer,
|
||||
Original Code or Contributor in the notice described in Exhibit A shall
|
||||
not of themselves be deemed to be modifications of this License.)
|
||||
|
||||
7. DISCLAIMER OF WARRANTY.
|
||||
|
||||
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN ``AS IS'' BASIS,
|
||||
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
|
||||
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
|
||||
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
|
||||
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
|
||||
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
|
||||
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
|
||||
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
|
||||
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
|
||||
|
||||
8. TERMINATION.
|
||||
|
||||
This License and the rights granted hereunder will terminate
|
||||
automatically if You fail to comply with terms herein and fail to cure
|
||||
such breach within 30 days of becoming aware of the breach. All
|
||||
sublicenses to the Covered Code which are properly granted shall
|
||||
survive any termination of this License. Provisions which, by their
|
||||
nature, must remain in effect beyond the termination of this License
|
||||
shall survive.
|
||||
|
||||
9. LIMITATION OF LIABILITY.
|
||||
|
||||
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
|
||||
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL
|
||||
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
|
||||
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER
|
||||
PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
||||
OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF
|
||||
GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND
|
||||
ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE
|
||||
BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
|
||||
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
|
||||
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
|
||||
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
|
||||
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT
|
||||
EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
10. U.S. GOVERNMENT END USERS.
|
||||
|
||||
The Covered Code is a ``commercial item,'' as that term is defined in
|
||||
48 C.F.R. 2.101 (Oct. 1995), consisting of ``commercial computer
|
||||
software'' and ``commercial computer software documentation,'' as such
|
||||
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
|
||||
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
|
||||
all U.S. Government End Users acquire Covered Code with only those
|
||||
rights set forth herein.
|
||||
|
||||
11. MISCELLANEOUS.
|
||||
|
||||
This License represents the complete agreement concerning subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. This License shall be governed by
|
||||
California law provisions (except to the extent applicable law, if any,
|
||||
provides otherwise), excluding its conflict-of-law provisions. With
|
||||
respect to disputes in which at least one party is a citizen of, or an
|
||||
entity chartered or registered to do business in, the United States of
|
||||
America: (a) unless otherwise agreed in writing, all disputes relating
|
||||
to this License (excepting any dispute relating to intellectual
|
||||
property rights) shall be subject to final and binding arbitration,
|
||||
with the losing party paying all costs of arbitration; (b) any
|
||||
arbitration relating to this Agreement shall be held in Santa Clara
|
||||
County, California, under the auspices of JAMS/EndDispute; and (c) any
|
||||
litigation relating to this Agreement shall be subject to the
|
||||
jurisdiction of the Federal Courts of the Northern District of
|
||||
California, with venue lying in Santa Clara County, California, with
|
||||
the losing party responsible for costs, including without limitation,
|
||||
court costs and reasonable attorneys fees and expenses. The application
|
||||
of the United Nations Convention on Contracts for the International
|
||||
Sale of Goods is expressly excluded. Any law or regulation which
|
||||
provides that the language of a contract shall be construed against the
|
||||
drafter shall not apply to this License.
|
||||
|
||||
12. RESPONSIBILITY FOR CLAIMS.
|
||||
|
||||
Except in cases where another Contributor has failed to comply with
|
||||
Section 3.4, You are responsible for damages arising, directly or
|
||||
indirectly, out of Your utilization of rights under this License, based
|
||||
on the number of copies of Covered Code you made available, the
|
||||
revenues you received from utilizing such rights, and other relevant
|
||||
factors. You agree to work with affected parties to distribute
|
||||
responsibility on an equitable basis.
|
||||
|
||||
EXHIBIT A.
|
||||
|
||||
``The contents of this file are subject to the Mozilla Public License
|
||||
Version 1.0 (the "License"); you may not use this file except in
|
||||
compliance with the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS"
|
||||
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
License for the specific language governing rights and limitations
|
||||
under the License.
|
||||
|
||||
The Original Code is ______________________________________.
|
||||
|
||||
The Initial Developer of the Original Code is ________________________.
|
||||
Portions created by ______________________ are Copyright (C) ______
|
||||
_______________________. All Rights Reserved.
|
||||
|
||||
Contributor(s): ______________________________________.''
|
470
MPL-1.1.txt
Normal file
470
MPL-1.1.txt
Normal file
@@ -0,0 +1,470 @@
|
||||
MOZILLA PUBLIC LICENSE
|
||||
Version 1.1
|
||||
|
||||
---------------
|
||||
|
||||
1. Definitions.
|
||||
|
||||
1.0.1. "Commercial Use" means distribution or otherwise making the
|
||||
Covered Code available to a third party.
|
||||
|
||||
1.1. "Contributor" means each entity that creates or contributes to
|
||||
the creation of Modifications.
|
||||
|
||||
1.2. "Contributor Version" means the combination of the Original
|
||||
Code, prior Modifications used by a Contributor, and the Modifications
|
||||
made by that particular Contributor.
|
||||
|
||||
1.3. "Covered Code" means the Original Code or Modifications or the
|
||||
combination of the Original Code and Modifications, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.4. "Electronic Distribution Mechanism" means a mechanism generally
|
||||
accepted in the software development community for the electronic
|
||||
transfer of data.
|
||||
|
||||
1.5. "Executable" means Covered Code in any form other than Source
|
||||
Code.
|
||||
|
||||
1.6. "Initial Developer" means the individual or entity identified
|
||||
as the Initial Developer in the Source Code notice required by Exhibit
|
||||
A.
|
||||
|
||||
1.7. "Larger Work" means a work which combines Covered Code or
|
||||
portions thereof with code not governed by the terms of this License.
|
||||
|
||||
1.8. "License" means this document.
|
||||
|
||||
1.8.1. "Licensable" means having the right to grant, to the maximum
|
||||
extent possible, whether at the time of the initial grant or
|
||||
subsequently acquired, any and all of the rights conveyed herein.
|
||||
|
||||
1.9. "Modifications" means any addition to or deletion from the
|
||||
substance or structure of either the Original Code or any previous
|
||||
Modifications. When Covered Code is released as a series of files, a
|
||||
Modification is:
|
||||
A. Any addition to or deletion from the contents of a file
|
||||
containing Original Code or previous Modifications.
|
||||
|
||||
B. Any new file that contains any part of the Original Code or
|
||||
previous Modifications.
|
||||
|
||||
1.10. "Original Code" means Source Code of computer software code
|
||||
which is described in the Source Code notice required by Exhibit A as
|
||||
Original Code, and which, at the time of its release under this
|
||||
License is not already Covered Code governed by this License.
|
||||
|
||||
1.10.1. "Patent Claims" means any patent claim(s), now owned or
|
||||
hereafter acquired, including without limitation, method, process,
|
||||
and apparatus claims, in any patent Licensable by grantor.
|
||||
|
||||
1.11. "Source Code" means the preferred form of the Covered Code for
|
||||
making modifications to it, including all modules it contains, plus
|
||||
any associated interface definition files, scripts used to control
|
||||
compilation and installation of an Executable, or source code
|
||||
differential comparisons against either the Original Code or another
|
||||
well known, available Covered Code of the Contributor's choice. The
|
||||
Source Code can be in a compressed or archival form, provided the
|
||||
appropriate decompression or de-archiving software is widely available
|
||||
for no charge.
|
||||
|
||||
1.12. "You" (or "Your") means an individual or a legal entity
|
||||
exercising rights under, and complying with all of the terms of, this
|
||||
License or a future version of this License issued under Section 6.1.
|
||||
For legal entities, "You" includes any entity which controls, is
|
||||
controlled by, or is under common control with You. For purposes of
|
||||
this definition, "control" means (a) the power, direct or indirect,
|
||||
to cause the direction or management of such entity, whether by
|
||||
contract or otherwise, or (b) ownership of more than fifty percent
|
||||
(50%) of the outstanding shares or beneficial ownership of such
|
||||
entity.
|
||||
|
||||
2. Source Code License.
|
||||
|
||||
2.1. The Initial Developer Grant.
|
||||
The Initial Developer hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license, subject to third party intellectual property
|
||||
claims:
|
||||
(a) under intellectual property rights (other than patent or
|
||||
trademark) Licensable by Initial Developer to use, reproduce,
|
||||
modify, display, perform, sublicense and distribute the Original
|
||||
Code (or portions thereof) with or without Modifications, and/or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patents Claims infringed by the making, using or
|
||||
selling of Original Code, to make, have made, use, practice,
|
||||
sell, and offer for sale, and/or otherwise dispose of the
|
||||
Original Code (or portions thereof).
|
||||
|
||||
(c) the licenses granted in this Section 2.1(a) and (b) are
|
||||
effective on the date Initial Developer first distributes
|
||||
Original Code under the terms of this License.
|
||||
|
||||
(d) Notwithstanding Section 2.1(b) above, no patent license is
|
||||
granted: 1) for code that You delete from the Original Code; 2)
|
||||
separate from the Original Code; or 3) for infringements caused
|
||||
by: i) the modification of the Original Code or ii) the
|
||||
combination of the Original Code with other software or devices.
|
||||
|
||||
2.2. Contributor Grant.
|
||||
Subject to third party intellectual property claims, each Contributor
|
||||
hereby grants You a world-wide, royalty-free, non-exclusive license
|
||||
|
||||
(a) under intellectual property rights (other than patent or
|
||||
trademark) Licensable by Contributor, to use, reproduce, modify,
|
||||
display, perform, sublicense and distribute the Modifications
|
||||
created by such Contributor (or portions thereof) either on an
|
||||
unmodified basis, with other Modifications, as Covered Code
|
||||
and/or as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims infringed by the making, using, or
|
||||
selling of Modifications made by that Contributor either alone
|
||||
and/or in combination with its Contributor Version (or portions
|
||||
of such combination), to make, use, sell, offer for sale, have
|
||||
made, and/or otherwise dispose of: 1) Modifications made by that
|
||||
Contributor (or portions thereof); and 2) the combination of
|
||||
Modifications made by that Contributor with its Contributor
|
||||
Version (or portions of such combination).
|
||||
|
||||
(c) the licenses granted in Sections 2.2(a) and 2.2(b) are
|
||||
effective on the date Contributor first makes Commercial Use of
|
||||
the Covered Code.
|
||||
|
||||
(d) Notwithstanding Section 2.2(b) above, no patent license is
|
||||
granted: 1) for any code that Contributor has deleted from the
|
||||
Contributor Version; 2) separate from the Contributor Version;
|
||||
3) for infringements caused by: i) third party modifications of
|
||||
Contributor Version or ii) the combination of Modifications made
|
||||
by that Contributor with other software (except as part of the
|
||||
Contributor Version) or other devices; or 4) under Patent Claims
|
||||
infringed by Covered Code in the absence of Modifications made by
|
||||
that Contributor.
|
||||
|
||||
3. Distribution Obligations.
|
||||
|
||||
3.1. Application of License.
|
||||
The Modifications which You create or to which You contribute are
|
||||
governed by the terms of this License, including without limitation
|
||||
Section 2.2. The Source Code version of Covered Code may be
|
||||
distributed only under the terms of this License or a future version
|
||||
of this License released under Section 6.1, and You must include a
|
||||
copy of this License with every copy of the Source Code You
|
||||
distribute. You may not offer or impose any terms on any Source Code
|
||||
version that alters or restricts the applicable version of this
|
||||
License or the recipients' rights hereunder. However, You may include
|
||||
an additional document offering the additional rights described in
|
||||
Section 3.5.
|
||||
|
||||
3.2. Availability of Source Code.
|
||||
Any Modification which You create or to which You contribute must be
|
||||
made available in Source Code form under the terms of this License
|
||||
either on the same media as an Executable version or via an accepted
|
||||
Electronic Distribution Mechanism to anyone to whom you made an
|
||||
Executable version available; and if made available via Electronic
|
||||
Distribution Mechanism, must remain available for at least twelve (12)
|
||||
months after the date it initially became available, or at least six
|
||||
(6) months after a subsequent version of that particular Modification
|
||||
has been made available to such recipients. You are responsible for
|
||||
ensuring that the Source Code version remains available even if the
|
||||
Electronic Distribution Mechanism is maintained by a third party.
|
||||
|
||||
3.3. Description of Modifications.
|
||||
You must cause all Covered Code to which You contribute to contain a
|
||||
file documenting the changes You made to create that Covered Code and
|
||||
the date of any change. You must include a prominent statement that
|
||||
the Modification is derived, directly or indirectly, from Original
|
||||
Code provided by the Initial Developer and including the name of the
|
||||
Initial Developer in (a) the Source Code, and (b) in any notice in an
|
||||
Executable version or related documentation in which You describe the
|
||||
origin or ownership of the Covered Code.
|
||||
|
||||
3.4. Intellectual Property Matters
|
||||
(a) Third Party Claims.
|
||||
If Contributor has knowledge that a license under a third party's
|
||||
intellectual property rights is required to exercise the rights
|
||||
granted by such Contributor under Sections 2.1 or 2.2,
|
||||
Contributor must include a text file with the Source Code
|
||||
distribution titled "LEGAL" which describes the claim and the
|
||||
party making the claim in sufficient detail that a recipient will
|
||||
know whom to contact. If Contributor obtains such knowledge after
|
||||
the Modification is made available as described in Section 3.2,
|
||||
Contributor shall promptly modify the LEGAL file in all copies
|
||||
Contributor makes available thereafter and shall take other steps
|
||||
(such as notifying appropriate mailing lists or newsgroups)
|
||||
reasonably calculated to inform those who received the Covered
|
||||
Code that new knowledge has been obtained.
|
||||
|
||||
(b) Contributor APIs.
|
||||
If Contributor's Modifications include an application programming
|
||||
interface and Contributor has knowledge of patent licenses which
|
||||
are reasonably necessary to implement that API, Contributor must
|
||||
also include this information in the LEGAL file.
|
||||
|
||||
(c) Representations.
|
||||
Contributor represents that, except as disclosed pursuant to
|
||||
Section 3.4(a) above, Contributor believes that Contributor's
|
||||
Modifications are Contributor's original creation(s) and/or
|
||||
Contributor has sufficient rights to grant the rights conveyed by
|
||||
this License.
|
||||
|
||||
3.5. Required Notices.
|
||||
You must duplicate the notice in Exhibit A in each file of the Source
|
||||
Code. If it is not possible to put such notice in a particular Source
|
||||
Code file due to its structure, then You must include such notice in a
|
||||
location (such as a relevant directory) where a user would be likely
|
||||
to look for such a notice. If You created one or more Modification(s)
|
||||
You may add your name as a Contributor to the notice described in
|
||||
Exhibit A. You must also duplicate this License in any documentation
|
||||
for the Source Code where You describe recipients' rights or ownership
|
||||
rights relating to Covered Code. You may choose to offer, and to
|
||||
charge a fee for, warranty, support, indemnity or liability
|
||||
obligations to one or more recipients of Covered Code. However, You
|
||||
may do so only on Your own behalf, and not on behalf of the Initial
|
||||
Developer or any Contributor. You must make it absolutely clear than
|
||||
any such warranty, support, indemnity or liability obligation is
|
||||
offered by You alone, and You hereby agree to indemnify the Initial
|
||||
Developer and every Contributor for any liability incurred by the
|
||||
Initial Developer or such Contributor as a result of warranty,
|
||||
support, indemnity or liability terms You offer.
|
||||
|
||||
3.6. Distribution of Executable Versions.
|
||||
You may distribute Covered Code in Executable form only if the
|
||||
requirements of Section 3.1-3.5 have been met for that Covered Code,
|
||||
and if You include a notice stating that the Source Code version of
|
||||
the Covered Code is available under the terms of this License,
|
||||
including a description of how and where You have fulfilled the
|
||||
obligations of Section 3.2. The notice must be conspicuously included
|
||||
in any notice in an Executable version, related documentation or
|
||||
collateral in which You describe recipients' rights relating to the
|
||||
Covered Code. You may distribute the Executable version of Covered
|
||||
Code or ownership rights under a license of Your choice, which may
|
||||
contain terms different from this License, provided that You are in
|
||||
compliance with the terms of this License and that the license for the
|
||||
Executable version does not attempt to limit or alter the recipient's
|
||||
rights in the Source Code version from the rights set forth in this
|
||||
License. If You distribute the Executable version under a different
|
||||
license You must make it absolutely clear that any terms which differ
|
||||
from this License are offered by You alone, not by the Initial
|
||||
Developer or any Contributor. You hereby agree to indemnify the
|
||||
Initial Developer and every Contributor for any liability incurred by
|
||||
the Initial Developer or such Contributor as a result of any such
|
||||
terms You offer.
|
||||
|
||||
3.7. Larger Works.
|
||||
You may create a Larger Work by combining Covered Code with other code
|
||||
not governed by the terms of this License and distribute the Larger
|
||||
Work as a single product. In such a case, You must make sure the
|
||||
requirements of this License are fulfilled for the Covered Code.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation.
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Code due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description
|
||||
must be included in the LEGAL file described in Section 3.4 and must
|
||||
be included with all distributions of the Source Code. Except to the
|
||||
extent prohibited by statute or regulation, such description must be
|
||||
sufficiently detailed for a recipient of ordinary skill to be able to
|
||||
understand it.
|
||||
|
||||
5. Application of this License.
|
||||
|
||||
This License applies to code to which the Initial Developer has
|
||||
attached the notice in Exhibit A and to related Covered Code.
|
||||
|
||||
6. Versions of the License.
|
||||
|
||||
6.1. New Versions.
|
||||
Netscape Communications Corporation ("Netscape") may publish revised
|
||||
and/or new versions of the License from time to time. Each version
|
||||
will be given a distinguishing version number.
|
||||
|
||||
6.2. Effect of New Versions.
|
||||
Once Covered Code has been published under a particular version of the
|
||||
License, You may always continue to use it under the terms of that
|
||||
version. You may also choose to use such Covered Code under the terms
|
||||
of any subsequent version of the License published by Netscape. No one
|
||||
other than Netscape has the right to modify the terms applicable to
|
||||
Covered Code created under this License.
|
||||
|
||||
6.3. Derivative Works.
|
||||
If You create or use a modified version of this License (which you may
|
||||
only do in order to apply it to code which is not already Covered Code
|
||||
governed by this License), You must (a) rename Your license so that
|
||||
the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
|
||||
"MPL", "NPL" or any confusingly similar phrase do not appear in your
|
||||
license (except to note that your license differs from this License)
|
||||
and (b) otherwise make it clear that Your version of the license
|
||||
contains terms which differ from the Mozilla Public License and
|
||||
Netscape Public License. (Filling in the name of the Initial
|
||||
Developer, Original Code or Contributor in the notice described in
|
||||
Exhibit A shall not of themselves be deemed to be modifications of
|
||||
this License.)
|
||||
|
||||
7. DISCLAIMER OF WARRANTY.
|
||||
|
||||
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
|
||||
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
|
||||
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
|
||||
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
|
||||
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
|
||||
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
|
||||
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
|
||||
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
|
||||
|
||||
8. TERMINATION.
|
||||
|
||||
8.1. This License and the rights granted hereunder will terminate
|
||||
automatically if You fail to comply with terms herein and fail to cure
|
||||
such breach within 30 days of becoming aware of the breach. All
|
||||
sublicenses to the Covered Code which are properly granted shall
|
||||
survive any termination of this License. Provisions which, by their
|
||||
nature, must remain in effect beyond the termination of this License
|
||||
shall survive.
|
||||
|
||||
8.2. If You initiate litigation by asserting a patent infringement
|
||||
claim (excluding declatory judgment actions) against Initial Developer
|
||||
or a Contributor (the Initial Developer or Contributor against whom
|
||||
You file such action is referred to as "Participant") alleging that:
|
||||
|
||||
(a) such Participant's Contributor Version directly or indirectly
|
||||
infringes any patent, then any and all rights granted by such
|
||||
Participant to You under Sections 2.1 and/or 2.2 of this License
|
||||
shall, upon 60 days notice from Participant terminate prospectively,
|
||||
unless if within 60 days after receipt of notice You either: (i)
|
||||
agree in writing to pay Participant a mutually agreeable reasonable
|
||||
royalty for Your past and future use of Modifications made by such
|
||||
Participant, or (ii) withdraw Your litigation claim with respect to
|
||||
the Contributor Version against such Participant. If within 60 days
|
||||
of notice, a reasonable royalty and payment arrangement are not
|
||||
mutually agreed upon in writing by the parties or the litigation claim
|
||||
is not withdrawn, the rights granted by Participant to You under
|
||||
Sections 2.1 and/or 2.2 automatically terminate at the expiration of
|
||||
the 60 day notice period specified above.
|
||||
|
||||
(b) any software, hardware, or device, other than such Participant's
|
||||
Contributor Version, directly or indirectly infringes any patent, then
|
||||
any rights granted to You by such Participant under Sections 2.1(b)
|
||||
and 2.2(b) are revoked effective as of the date You first made, used,
|
||||
sold, distributed, or had made, Modifications made by that
|
||||
Participant.
|
||||
|
||||
8.3. If You assert a patent infringement claim against Participant
|
||||
alleging that such Participant's Contributor Version directly or
|
||||
indirectly infringes any patent where such claim is resolved (such as
|
||||
by license or settlement) prior to the initiation of patent
|
||||
infringement litigation, then the reasonable value of the licenses
|
||||
granted by such Participant under Sections 2.1 or 2.2 shall be taken
|
||||
into account in determining the amount or value of any payment or
|
||||
license.
|
||||
|
||||
8.4. In the event of termination under Sections 8.1 or 8.2 above,
|
||||
all end user license agreements (excluding distributors and resellers)
|
||||
which have been validly granted by You or any distributor hereunder
|
||||
prior to termination shall survive termination.
|
||||
|
||||
9. LIMITATION OF LIABILITY.
|
||||
|
||||
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
|
||||
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
|
||||
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
|
||||
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
|
||||
ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
|
||||
CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
|
||||
WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
|
||||
COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
|
||||
INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
|
||||
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
|
||||
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
|
||||
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
|
||||
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
|
||||
THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
10. U.S. GOVERNMENT END USERS.
|
||||
|
||||
The Covered Code is a "commercial item," as that term is defined in
|
||||
48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
|
||||
software" and "commercial computer software documentation," as such
|
||||
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
|
||||
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
|
||||
all U.S. Government End Users acquire Covered Code with only those
|
||||
rights set forth herein.
|
||||
|
||||
11. MISCELLANEOUS.
|
||||
|
||||
This License represents the complete agreement concerning subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. This License shall be governed by
|
||||
California law provisions (except to the extent applicable law, if
|
||||
any, provides otherwise), excluding its conflict-of-law provisions.
|
||||
With respect to disputes in which at least one party is a citizen of,
|
||||
or an entity chartered or registered to do business in the United
|
||||
States of America, any litigation relating to this License shall be
|
||||
subject to the jurisdiction of the Federal Courts of the Northern
|
||||
District of California, with venue lying in Santa Clara County,
|
||||
California, with the losing party responsible for costs, including
|
||||
without limitation, court costs and reasonable attorneys' fees and
|
||||
expenses. The application of the United Nations Convention on
|
||||
Contracts for the International Sale of Goods is expressly excluded.
|
||||
Any law or regulation which provides that the language of a contract
|
||||
shall be construed against the drafter shall not apply to this
|
||||
License.
|
||||
|
||||
12. RESPONSIBILITY FOR CLAIMS.
|
||||
|
||||
As between Initial Developer and the Contributors, each party is
|
||||
responsible for claims and damages arising, directly or indirectly,
|
||||
out of its utilization of rights under this License and You agree to
|
||||
work with Initial Developer and Contributors to distribute such
|
||||
responsibility on an equitable basis. Nothing herein is intended or
|
||||
shall be deemed to constitute any admission of liability.
|
||||
|
||||
13. MULTIPLE-LICENSED CODE.
|
||||
|
||||
Initial Developer may designate portions of the Covered Code as
|
||||
"Multiple-Licensed". "Multiple-Licensed" means that the Initial
|
||||
Developer permits you to utilize portions of the Covered Code under
|
||||
Your choice of the NPL or the alternative licenses, if any, specified
|
||||
by the Initial Developer in the file described in Exhibit A.
|
||||
|
||||
EXHIBIT A -Mozilla Public License.
|
||||
|
||||
``The contents of this file are subject to the Mozilla Public License
|
||||
Version 1.1 (the "License"); you may not use this file except in
|
||||
compliance with the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS"
|
||||
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
License for the specific language governing rights and limitations
|
||||
under the License.
|
||||
|
||||
The Original Code is ______________________________________.
|
||||
|
||||
The Initial Developer of the Original Code is ________________________.
|
||||
Portions created by ______________________ are Copyright (C) ______
|
||||
_______________________. All Rights Reserved.
|
||||
|
||||
Contributor(s): ______________________________________.
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms
|
||||
of the _____ license (the "[___] License"), in which case the
|
||||
provisions of [______] License are applicable instead of those
|
||||
above. If you wish to allow use of your version of this file only
|
||||
under the terms of the [____] License and not to allow others to use
|
||||
your version of this file under the MPL, indicate your decision by
|
||||
deleting the provisions above and replace them with the notice and
|
||||
other provisions required by the [___] License. If you do not delete
|
||||
the provisions above, a recipient may use your version of this file
|
||||
under either the MPL or the [___] License."
|
||||
|
||||
[NOTE: The text of this Exhibit A may differ slightly from the text of
|
||||
the notices in the Source Code files of the Original Code. You should
|
||||
use the text of this Exhibit A rather than the text found in the
|
||||
Original Code Source Code for Your Modifications.]
|
||||
|
@@ -1,54 +1,38 @@
|
||||
############################################################################
|
||||
#############################################################################
|
||||
# _ _ ____ _
|
||||
# Project ___| | | | _ \| |
|
||||
# / __| | | | |_) | |
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License
|
||||
# Version 1.0 (the "License"); you may not use this file except in
|
||||
# compliance with the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
# Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS"
|
||||
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing rights and limitations
|
||||
# under the License.
|
||||
# In order to be useful for every potential user, curl and libcurl are
|
||||
# dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
#
|
||||
# The Original Code is Curl.
|
||||
# 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 MPL or the MIT/X-derivate
|
||||
# licenses. You may pick one of these licenses.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
# KIND, either express or implied.
|
||||
#
|
||||
# Portions created by the Initial Developer are Copyright (C) 1999.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# ------------------------------------------------------------
|
||||
# Main author:
|
||||
# - Daniel Stenberg <daniel@haxx.se>
|
||||
#
|
||||
# http://curl.haxx.se
|
||||
#
|
||||
# $Source$
|
||||
# $Revision$
|
||||
# $Date$
|
||||
# $Author$
|
||||
# $State$
|
||||
# $Locker$
|
||||
#
|
||||
# ------------------------------------------------------------
|
||||
#
|
||||
# In a normal unix-setup, this file will become overwritten.
|
||||
#
|
||||
############################################################################
|
||||
# $Id$
|
||||
#############################################################################
|
||||
|
||||
all:
|
||||
./configure
|
||||
./configure
|
||||
make
|
||||
|
||||
ssl:
|
||||
./configure --with-ssl
|
||||
make
|
||||
|
||||
borland:
|
||||
cd lib; make -f Makefile.b32
|
||||
cd src; make -f Makefile.b32
|
||||
|
||||
mingw32:
|
||||
cd lib; make -f Makefile.m32
|
||||
cd src; make -f Makefile.m32
|
||||
@@ -58,17 +42,17 @@ mingw32-ssl:
|
||||
cd src; make -f Makefile.m32 SSL=1
|
||||
|
||||
vc:
|
||||
cd lib
|
||||
cd lib
|
||||
nmake -f Makefile.vc6
|
||||
cd ..\src
|
||||
cd ..\src
|
||||
nmake -f Makefile.vc6
|
||||
|
||||
vc-ssl:
|
||||
cd lib
|
||||
nmake -f Makefile.vc6 release-ssl
|
||||
cd ..\src
|
||||
nmake -f Makefile.vc6
|
||||
|
||||
vc-ssl:
|
||||
cd lib
|
||||
nmake -f Makefile.vc6 release-ssl
|
||||
cd ..\src
|
||||
nmake -f Makefile.vc6
|
||||
|
||||
cygwin:
|
||||
./configure
|
||||
make
|
||||
|
4
README
4
README
@@ -12,11 +12,13 @@ README
|
||||
document.
|
||||
|
||||
libcurl is a library that Curl is using to do its job. It is readily
|
||||
available to be used by your software. Read the README.libcurl document to
|
||||
available to be used by your software. Read the LIBCURL document to
|
||||
find out how!
|
||||
|
||||
You find answers to the most frequent questions we get in the FAQ document.
|
||||
|
||||
Study the LEGAL file for distribution terms and similar.
|
||||
|
||||
Always try the Curl web site for the latest news:
|
||||
|
||||
http://curl.haxx.se
|
||||
|
@@ -3,7 +3,7 @@ dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(lib/urldata.h)
|
||||
AM_CONFIG_HEADER(config.h src/config.h)
|
||||
|
||||
VERSION=`sed -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' include/curl/curl.h`
|
||||
VERSION=`sed -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curl.h`
|
||||
AM_INIT_AUTOMAKE(curl,$VERSION)
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
@@ -397,7 +397,8 @@ else
|
||||
AC_MSG_RESULT([defaults (or given in environment)])
|
||||
else
|
||||
test X"$OPT_SSL" = Xyes && OPT_SSL=/usr/local/ssl
|
||||
LIBS="$LIBS -L$OPT_SSL/lib"
|
||||
dnl LIBS="$LIBS -L$OPT_SSL/lib"
|
||||
LDFLAGS="$LDFLAGS -L$OPT_SSL/lib"
|
||||
CPPFLAGS="$CPPFLAGS -I$OPT_SSL/include/openssl -I$OPT_SSL/include"
|
||||
AC_MSG_RESULT([$OPT_SSL])
|
||||
fi
|
||||
|
@@ -4,8 +4,6 @@
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
CONTRIBUTE
|
||||
|
||||
To Think About When Contributing Source Code
|
||||
|
||||
This document is intended to offer some guidelines that can be useful to keep
|
||||
@@ -15,15 +13,13 @@ To Think About When Contributing Source Code
|
||||
The License Issue
|
||||
|
||||
When contributing with code, you agree to put your changes and new code under
|
||||
the same license curl and libcurl is already using. Curl uses the MozPL, the
|
||||
Mozilla Public License, which is *NOT* compatible with the well known GPL,
|
||||
GNU Public License. We can never re-use sources from a GPL program in curl.
|
||||
the same license curl and libcurl is already using.
|
||||
|
||||
If you add a larger piece of code, you can opt to make that file or set of
|
||||
files to use a different license as long as they don't enfore any changes to
|
||||
the rest of the package and they make sense. Such "separate parts" can not be
|
||||
GPL either (although they should use "GPL compatible" licenses).
|
||||
|
||||
Curl and libcurl will soon become dual licensed, MozPL/MITX!
|
||||
GPL (as we don't want the FPL virus to attack users of libcurl) but they must
|
||||
use "GPL compatible" licenses.
|
||||
|
||||
Naming
|
||||
|
||||
@@ -72,6 +68,13 @@ Separate Patches Doing Different Things
|
||||
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 my life 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
|
||||
|
115
docs/FAQ
115
docs/FAQ
@@ -1,4 +1,4 @@
|
||||
Updated: November 22, 2000 (http://curl.haxx.se/docs/faq.shtml)
|
||||
Updated: January 4, 2001 (http://curl.haxx.se/docs/faq.shtml)
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
@@ -45,10 +45,13 @@ FAQ
|
||||
4.6 Can you tell me what error code 142 means?
|
||||
4.7 How do I keep usernames 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?
|
||||
|
||||
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?
|
||||
|
||||
6. License Issues
|
||||
6.1 I have a GPL program, can I use the libcurl library?
|
||||
@@ -72,6 +75,8 @@ FAQ
|
||||
Curl supports a range of common internet protocols, currently including
|
||||
HTTP, HTTPS, FTP, GOPHER, LDAP, DICT and FILE.
|
||||
|
||||
Please spell it cURL or just curl.
|
||||
|
||||
1.2 What is libcurl?
|
||||
|
||||
libcurl is the engine inside curl that does all the work. curl is more or
|
||||
@@ -219,7 +224,7 @@ FAQ
|
||||
|
||||
Curl supports resume both ways on FTP, download ways on HTTP.
|
||||
|
||||
Try the -c and -C options.
|
||||
Try the -C option.
|
||||
|
||||
3.3. Why doesn't my posting using -F work?
|
||||
|
||||
@@ -356,9 +361,9 @@ FAQ
|
||||
4.6. Can you tell me what error code 142 means?
|
||||
|
||||
All error codes that are larger than the highest documented error code means
|
||||
that curl has existed due to a timeout. There is currently no nice way for
|
||||
curl to abort from such a condition and that's why it gets this undocumented
|
||||
error. This should be changed in releases after 7.4.1.
|
||||
that curl has existed due to a timeout. There was no nice way for curl to
|
||||
abort from such a condition and that's why it got this undocumented
|
||||
error. This should not occur in releases after 7.4.1.
|
||||
|
||||
4.7. How do I keep usernames and passwords secret in Curl command lines?
|
||||
|
||||
@@ -374,6 +379,10 @@ FAQ
|
||||
at least hide them from being read by human eyes, but that is not what
|
||||
anyone would call security.
|
||||
|
||||
Also note that regular HTTP and FTP passwords are sent in clear across the
|
||||
network. All it takes for anyone to fetch them is to listen on the network.
|
||||
Evesdropping is very easy.
|
||||
|
||||
4.8 I found a bug!
|
||||
|
||||
It is not a bug if the behaviour is documented. Read the docs first.
|
||||
@@ -390,6 +399,10 @@ FAQ
|
||||
operating system name and version and complete instructions how to repeat
|
||||
the bug.
|
||||
|
||||
4.9. Curl can't authenticate to the server that requires NTLM?
|
||||
|
||||
NTLM is a Microsoft proprietary protocol. Unfortunately, curl does not
|
||||
currently support that.
|
||||
|
||||
5. libcurl Issues
|
||||
|
||||
@@ -436,77 +449,73 @@ FAQ
|
||||
return realsize;
|
||||
}
|
||||
|
||||
5.3 How do I fetch multiple files with libcurl?
|
||||
|
||||
The easy interface of libcurl does not support multiple requests using the
|
||||
same connection. The only available way to do multiple requests is to
|
||||
init/perform/cleanup for each request.
|
||||
|
||||
5.4 Does libcurl do Winsock initing on win32 systems?
|
||||
|
||||
No.
|
||||
|
||||
On win32 systems, you need to init the winsock stuff manually, libcurl will
|
||||
not do that for you. WSAStartup() and WSACleanup() should be used
|
||||
accordingly. The reason for this is of course that a single application may
|
||||
use several different libraries and parts, and there's no reason for every
|
||||
single library to do this.
|
||||
|
||||
6. License Issues
|
||||
|
||||
Curl and libcurl are released under the MPL, the Mozilla Public License. To
|
||||
get a really good answer to your license conflict questions, you should
|
||||
study the MPL license and the license you are about to use and check for
|
||||
clashes yourself. 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.)
|
||||
NOTE: This section is now updated to concern curl 7.5.2 or later!
|
||||
|
||||
Curl and libcurl are released under a MIT/X derivate license *or* the MPL,
|
||||
the Mozilla Public License. To get a really good answer to your license
|
||||
conflict questions, you should study the MPL and MIT/X licenses and the
|
||||
license you are about to use and check for clashes yourself. 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.)
|
||||
|
||||
6.1. I have a GPL program, can I use the libcurl library?
|
||||
|
||||
No, unfortunately you cannot distribute the (lib)curl code with your code.
|
||||
According to both the Free Software Foundation and the Mozilla
|
||||
Organization, MPL and GPL are not compatible, because GPL requires of
|
||||
other licenses that they do "not impose any further restrictions on the
|
||||
recipients' exercise of the rights granted herein" [GPL paragraph 6] (One
|
||||
could argue about which license that actually imposes restrictions, but
|
||||
that'll be left for you to ponder about.)
|
||||
Yes!
|
||||
|
||||
However, you have two alternative options:
|
||||
|
||||
1) Nothing prevents you from distributing your program separately from
|
||||
curl and libcurl, and request that the user receives it separately.
|
||||
The incompability issues between MPL and GPL only applies to the
|
||||
distribution.
|
||||
|
||||
2) Add the following exception to your distribution (you must have the
|
||||
consent of all the copyright holders of the source code in your
|
||||
project in order to do this)
|
||||
|
||||
As a special exception, you have permission to link this program
|
||||
with the curl library and distribute executables, as long as you
|
||||
follow the requirements of the GNU GPL in regard to all of the
|
||||
software in the executable aside from curl.
|
||||
|
||||
This exception must be added to your GPL covered source code files
|
||||
immediately after the notification mentioned in the appendix of GPL.
|
||||
The wording was originally suggested by the Free Software Foundation
|
||||
in relationship with the Qt library. We have changed the wording to
|
||||
apply to curl.
|
||||
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. If you end up doing changes to the library, only those changes must
|
||||
be made available, not the ones to your program.
|
||||
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. If you end up doing changes to the library, only those changes must
|
||||
be made available, not the ones to your program.
|
||||
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 you can. LGPL libraries don't spread to other libraries the same way GPL
|
||||
ones do.
|
||||
Yes.
|
||||
|
||||
However, when you read paragraph (3) of the LGPL license, you'll see that
|
||||
anyone - at will - may at any time convert that LGPL program into GPL. And
|
||||
GPL programs can't be distributed together with MPL programs, neither with
|
||||
(lib)curl source code and not as a binary.
|
||||
The LGPL license don't clash with other licenses.
|
||||
|
||||
6.5. Can I modify curl/libcurl for my program and keep the changes secret?
|
||||
|
||||
No, you're not allowed to do that.
|
||||
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 carefully picked this license years ago and a large amount of people
|
||||
have contributed with source code knowing that this is the license we
|
||||
use. This license puts the restrictions we want on curl/libcurl and it does
|
||||
not spread to other programs or libraries that use it.
|
||||
not spread to other programs or libraries that use it. The recent dual
|
||||
license modification should make it possible for everyone to use libcurl or
|
||||
curl in their projects, no matter what license they already have in use.
|
||||
|
@@ -15,9 +15,11 @@ Misc
|
||||
- guesses protocol from host name unless specified
|
||||
- uses .netrc
|
||||
- progress bar/time specs while downloading
|
||||
- PROXY environment variables support
|
||||
- "standard" proxy environment variables support
|
||||
- config file support
|
||||
- compiles on win32
|
||||
- redirectable stderr
|
||||
- use selected network interface for outgoing traffic
|
||||
|
||||
HTTP
|
||||
- GET
|
||||
@@ -28,8 +30,9 @@ HTTP
|
||||
- authentication
|
||||
- resume
|
||||
- follow redirects
|
||||
- maximum amount of redirects to follow
|
||||
- custom HTTP request
|
||||
- cookie get/send
|
||||
- cookie get/send fully parsed
|
||||
- understands the netscape cookie file format
|
||||
- custom headers (that can replace/remove internally generated headers)
|
||||
- custom user-agent string
|
||||
@@ -38,11 +41,12 @@ HTTP
|
||||
- proxy authentication
|
||||
- time conditions
|
||||
- via http-proxy
|
||||
- specify interface device/port
|
||||
- retrieve file modification date
|
||||
|
||||
HTTPS (*1)
|
||||
- (all the HTTP features)
|
||||
- using certificates
|
||||
- verify server certificate
|
||||
- via http-proxy
|
||||
|
||||
FTP
|
||||
@@ -63,6 +67,7 @@ FTP
|
||||
- simple "range" support
|
||||
- via http-proxy
|
||||
- all operations can be tunneled through a http-proxy
|
||||
- customizable to retrieve file modification date
|
||||
|
||||
TELNET
|
||||
- connection negotiation
|
||||
|
@@ -15,6 +15,8 @@ Standards
|
||||
|
||||
RFC 959 - Defines how FTP works
|
||||
|
||||
RFC 1635 - How to Use Anonymous FTP
|
||||
|
||||
RFC 1738 - Uniform Resource Locators
|
||||
|
||||
RFC 1777 - defines the LDAP protocol
|
||||
@@ -38,51 +40,59 @@ Standards
|
||||
|
||||
RFC 2109 - HTTP State Management Mechanism (cookie stuff)
|
||||
- Also, read Netscape's specification at
|
||||
http://www.netscape.com/newsref/std/cookie_spec.html
|
||||
http://curl.haxx.se/rfc/cookie_spec.html
|
||||
|
||||
RFC 2183 - "The Content-Disposition Header Field"
|
||||
RFC 2183 - The Content-Disposition Header Field
|
||||
|
||||
RFC 2229 - "A Dictionary Server Protocol"
|
||||
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 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 1867
|
||||
Use this as an addition to the RFC1867
|
||||
|
||||
RFC 2396 - "Uniform Resource Identifiers: Generic Syntax and Semantics" This
|
||||
one obsoletes 1738, but since 1738 is often mentioned I've left
|
||||
it in this list.
|
||||
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 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 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
|
||||
|
||||
Compilers
|
||||
---------
|
||||
MingW32 - http://www.mingw.org
|
||||
MingW32 - http://www.mingw.org/
|
||||
|
||||
gcc - http://www.gnu.org/software/gcc/gcc.html
|
||||
|
||||
Software
|
||||
--------
|
||||
OpenSSL - http://www.openssl.org
|
||||
OpenSSL - http://www.openssl.org/
|
||||
|
||||
OpenLDAP - http://www.openldap.org
|
||||
OpenLDAP - http://www.openldap.org/
|
||||
|
||||
zlib - http://www.cdrom.com/pub/infozip/zlib/
|
||||
|
||||
Similar Tools
|
||||
-------------
|
||||
wget - http://www.gnu.org/software/wget/wget.html
|
||||
wget - http://sunsite.dk/wget/
|
||||
|
||||
snarf - http://www.xach.com/snarf/
|
||||
|
||||
@@ -90,6 +100,8 @@ Similar Tools
|
||||
|
||||
swebget - http://www.uni-hildesheim.de/~smol0075/swebget/
|
||||
|
||||
Kermit - http://www.columbia.edu/kermit/ftpclient
|
||||
|
||||
Related Software
|
||||
----------------
|
||||
ftpparse - http://cr.yp.to/ftpparse.html parses FTP LIST responses
|
||||
|
41
docs/TODO
41
docs/TODO
@@ -13,6 +13,9 @@ For the future
|
||||
product! (Yes, you may add things not mentioned here, these are just a
|
||||
few teasers...)
|
||||
|
||||
* Make SSL session ids get used if multiple HTTPS documents from the same
|
||||
host is requested.
|
||||
|
||||
* Improve the command line option parser to accept '-m300' as well as the '-m
|
||||
300' convention. It should be able to work if '-m300' is considered to be
|
||||
space separated to the next option.
|
||||
@@ -42,6 +45,9 @@ For the future
|
||||
* Make sure the low-level interface works. highlevel.c should basically be
|
||||
possible to write using that interface. Document the low-level interface
|
||||
|
||||
* Make the easy-interface support multiple file transfers. If they're done
|
||||
to the same host, they should use persistant connections or similar.
|
||||
|
||||
* Add asynchronous name resolving, as this enables full timeout support for
|
||||
fork() systems.
|
||||
|
||||
@@ -52,39 +58,6 @@ For the future
|
||||
something being worked on in this area) and perl (we have seen the first
|
||||
versions of this!) comes to mind. Python anyone?
|
||||
|
||||
* Improve the -K config file parser (the parameter following the flag should
|
||||
be possible to get specified *exactly* as it is done on a shell command
|
||||
line).
|
||||
|
||||
Alternatively, and preferably, we rewrite the entire config file to become
|
||||
a true config file that uses its own format instead of the currently
|
||||
crippled and stupid format:
|
||||
|
||||
[option] = [value]
|
||||
|
||||
Where [option] would be the same as the --long-option and [value] would
|
||||
either be 'on/off/true/false' for booleans or a plain value for [option]s
|
||||
that accept variable input (such as -d, -o, -H, -d, -F etc).
|
||||
|
||||
[value] could be written as plain text, and then the initial and trailing
|
||||
white spaces would be stripped off, or it can be specified within quotes
|
||||
and then all white spaces within the quotes will count.
|
||||
|
||||
[value] could then be made to accept some format to specify an environment
|
||||
variable. I could even think of supporting
|
||||
|
||||
[option] += [value]
|
||||
|
||||
for appending stuff to an option.
|
||||
|
||||
As has been suggested, ${name} could be used to read environment variables
|
||||
and possibly other options. That could then be used instead of += operators
|
||||
like:
|
||||
|
||||
bar = "foo ${bar}"
|
||||
|
||||
* rtsp:// support -- "Real Time Streaming Protocol" (RFC 2326)
|
||||
|
||||
* "Content-Encoding: compress/gzip/zlib"
|
||||
|
||||
HTTP 1.1 clearly defines how to get and decode compressed documents. There
|
||||
@@ -98,7 +71,7 @@ For the future
|
||||
sniffing. This should however be a library-based functionality. There are a
|
||||
few different efforts "out there" to make open source HTTP clients support
|
||||
this and it should be possible to take advantage of other people's hard
|
||||
work.
|
||||
work. http://modntlm.sourceforge.net/ is one.
|
||||
|
||||
* RFC2617 compliance, "Digest Access Authentication"
|
||||
A valid test page seem to exist at:
|
||||
|
109
docs/curl.1
109
docs/curl.1
@@ -2,7 +2,7 @@
|
||||
.\" nroff -man curl.1
|
||||
.\" Written by Daniel Stenberg
|
||||
.\"
|
||||
.TH curl 1 "22 November 2000" "Curl 7.5" "Curl Manual"
|
||||
.TH curl 1 "4 January 2001" "Curl 7.5.2" "Curl Manual"
|
||||
.SH NAME
|
||||
curl \- get a URL with FTP, TELNET, LDAP, GOPHER, DICT, FILE, HTTP or
|
||||
HTTPS syntax.
|
||||
@@ -43,12 +43,17 @@ supported at the moment:
|
||||
When used in a 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 <agent string>"
|
||||
(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
|
||||
-H/--header flag of course.
|
||||
|
||||
If this option is used more than once, the last one will be the one to be
|
||||
used.
|
||||
.IP "-b/--cookie <name=data>"
|
||||
(HTTP)
|
||||
Pass the data to the HTTP server as a cookie. It is supposedly the
|
||||
@@ -67,10 +72,15 @@ format.
|
||||
that the file specified with -b/--cookie is only used as input. No cookies
|
||||
will be stored in the file. To store cookies, save the HTTP headers to a file
|
||||
using -D/--dump-header!
|
||||
|
||||
If this option is used more than once, the last one will be the one to be
|
||||
used.
|
||||
.IP "-B/--use-ascii"
|
||||
Use ASCII transfer when getting an FTP file or LDAP info. 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 "-c/--continue"
|
||||
.B Deprecated. Use '-C -' instead.
|
||||
Continue/Resume a previous file transfer. This instructs curl to
|
||||
@@ -88,6 +98,8 @@ to the destination.
|
||||
If used with uploads, the ftp server command SIZE will not be used by
|
||||
curl. Upload resume is for FTP only.
|
||||
HTTP resume is only possible with HTTP/1.1 or later servers.
|
||||
|
||||
If this option is used serveral times, the last one will be used.
|
||||
.IP "-d/--data <data>"
|
||||
(HTTP) Sends the specified data in a POST request to the HTTP server. Note
|
||||
that the data is sent exactly as specified with no extra processing (with all
|
||||
@@ -107,13 +119,19 @@ specified.
|
||||
To post data purely binary, you should instead use the --data-binary option.
|
||||
|
||||
-d/--data is the same as --data-ascii.
|
||||
|
||||
If this option is used serveral times, the last one will be used.
|
||||
.IP "--data-ascii <data>"
|
||||
(HTTP) This is an alias for the -d/--data option.
|
||||
|
||||
If this option is used serveral times, the last one will be used.
|
||||
.IP "--data-binary <data>"
|
||||
(HTTP) This posts data in a similar manner as --data-ascii 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
|
||||
--data-ascii option, this is for you.
|
||||
|
||||
If this option is used serveral times, the last one will be used.
|
||||
.IP "-D/--dump-header <file>"
|
||||
(HTTP/FTP)
|
||||
Write the HTTP headers to this file. Write the FTP file info to this
|
||||
@@ -122,6 +140,8 @@ file if -I/--head is used.
|
||||
This option is handy to use when you want to store the cookies that a HTTP
|
||||
site sends to you. The cookies could then be read in a second curl invoke by
|
||||
using the -b/--cookie option!
|
||||
|
||||
If this option is used serveral times, the last one will be used.
|
||||
.IP "-e/--referer <URL>"
|
||||
(HTTP) Sends the "Referer Page" information to the HTTP server. This can also
|
||||
be set with the -H/--header flag of course. When used with
|
||||
@@ -129,6 +149,8 @@ be set with the -H/--header flag of course. When used with
|
||||
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 serveral times, the last one will be used.
|
||||
.IP "-E/--cert <certificate[:password]>"
|
||||
(HTTPS)
|
||||
Tells curl to use the specified certificate file when getting a file
|
||||
@@ -136,9 +158,13 @@ with HTTPS. 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 certificate is the private key and the private
|
||||
certificate concatenated!
|
||||
|
||||
If this option is used serveral times, the last one will be used.
|
||||
.IP "--cacert <CA certificate>"
|
||||
(HTTPS) Tells curl to use the specified certificate file to verify the
|
||||
peer. The certificate must be in PEM format.
|
||||
|
||||
If this option is used serveral times, the last one will be used.
|
||||
.IP "-f/--fail"
|
||||
(HTTP)
|
||||
Fail silently (no output at all) on server errors. This is mostly done
|
||||
@@ -147,6 +173,8 @@ attempts. In normal cases when a HTTP server fails to deliver a
|
||||
document, it returns a HTML document stating so (which often also
|
||||
describes why and more). This flag will prevent curl from
|
||||
outputting that and fail silently instead.
|
||||
|
||||
If this option is used twice, the second will again disable silent failure.
|
||||
.IP "-F/--form <name=content>"
|
||||
(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
|
||||
@@ -166,6 +194,8 @@ input:
|
||||
|
||||
To read the file's content from stdin insted of a file, use - where the file
|
||||
name should've been. This goes for both @ and < constructs.
|
||||
|
||||
This option can be used multiple times.
|
||||
.IP "-h/--help"
|
||||
Usage help.
|
||||
.IP "-H/--header <header>"
|
||||
@@ -177,38 +207,54 @@ trickier stuff than curl would normally do. You should not replace internally
|
||||
set headers without knowing perfectly well what you're doing. Replacing an
|
||||
internal header with one without content on the right side of the colon will
|
||||
prevent that header from appearing.
|
||||
|
||||
This option can be used multiple times.
|
||||
.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 <name>"
|
||||
Perform an operation using a specified interface. You can enter interface
|
||||
name, IP address or host name. An example could look like:
|
||||
|
||||
.B "curl --interface eth0:1 http://www.netscape.com/"
|
||||
|
||||
If this option is used serveral times, the last one will be used.
|
||||
.IP "-I/--head"
|
||||
(HTTP/FTP)
|
||||
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 file, curl displays the file size only.
|
||||
|
||||
If this option is used twice, the second will again disable header only.
|
||||
.IP "--krb4 <level>"
|
||||
(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.
|
||||
|
||||
If this option is used serveral times, the last one will be used.
|
||||
.IP "-K/--config <config file>"
|
||||
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. If the first column of a config line is a '#' character, the
|
||||
rest of the line will be treated as a comment.
|
||||
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 inclosed 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.
|
||||
|
||||
This option can be used multiple times.
|
||||
.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.
|
||||
|
||||
If this option is used twice, the second will again disable list only.
|
||||
.IP "-L/--location"
|
||||
(HTTP/HTTPS) If the server reports that the requested page has a different
|
||||
location (indicated with the header line Location:) this flag will let curl
|
||||
@@ -216,10 +262,14 @@ attempt to reattempt the get on the new place. If used together with -i or -I,
|
||||
headers from all requested pages will be shown. If this flag is used when
|
||||
making a HTTP POST, curl will automatically switch to GET after the initial
|
||||
POST has been done.
|
||||
|
||||
If this option is used twice, the second will again disable location following.
|
||||
.IP "-m/--max-time <seconds>"
|
||||
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. This doesn't work fully in win32 systems.
|
||||
|
||||
If this option is used serveral times, the last one will be used.
|
||||
.IP "-M/--manual"
|
||||
Manual. Display the huge help text.
|
||||
.IP "-n/--netrc"
|
||||
@@ -240,11 +290,15 @@ 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 "-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 "-o/--output <file>"
|
||||
Write output to <file> instead of stdout. If you are using {} or [] to fetch
|
||||
multiple documents, you can use '#' followed by a number in the <file>
|
||||
@@ -256,15 +310,20 @@ being fetched. Like in:
|
||||
or use several variables like:
|
||||
|
||||
curl http://{site,host}.host[1-5].com -o "#1_#2"
|
||||
|
||||
If this option is used serveral times, the last one will be used.
|
||||
.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.)
|
||||
|
||||
.IP "-p/--proxytunnel"
|
||||
When an HTTP proxy is used, 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/--ftpport <address>"
|
||||
(FTP)
|
||||
Reverses the initiator/listener roles when connecting with ftp. This
|
||||
@@ -286,6 +345,8 @@ i.e "my.host.domain" to specify machine
|
||||
.B "-"
|
||||
(any single-letter string) to make it pick the machine's default
|
||||
.RE
|
||||
|
||||
If this option is used serveral times, the last one will be used.
|
||||
.IP "-q"
|
||||
If used as the first parameter on the command line, the
|
||||
.I $HOME/.curlrc
|
||||
@@ -298,6 +359,8 @@ transfer is taking place. To make commands take place after a successful
|
||||
transfer, prefix them with a dash '-'. You may specify any amount of commands
|
||||
to be run before and after the transfer. If the server returns failure for one
|
||||
of the commands, the entire operation will be aborted.
|
||||
|
||||
This option can be used multiple times.
|
||||
.IP "-r/--range <range>"
|
||||
(HTTP/FTP)
|
||||
Retrieve a byte range (i.e a partial document) from a HTTP/1.1 or FTP
|
||||
@@ -335,11 +398,17 @@ 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 serveral times, the last one will be used.
|
||||
.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 mute.
|
||||
.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 "-t/--upload"
|
||||
.B Deprecated. Use '-T -' instead.
|
||||
Transfer the stdin data to the specified file. Curl will read
|
||||
@@ -353,21 +422,31 @@ 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.
|
||||
|
||||
If this option is used serveral times, the last one will be used.
|
||||
.IP "-u/--user <user:password>"
|
||||
Specify user and password to use when fetching. See README.curl for detailed
|
||||
examples of how to use this. If no password is specified, curl will
|
||||
ask for it interactively.
|
||||
|
||||
If this option is used serveral times, the last one will be used.
|
||||
.IP "-U/--proxy-user <user:password>"
|
||||
Specify user and password to use for Proxy authentication. If no
|
||||
password is specified, curl will ask for it interactively.
|
||||
|
||||
If this option is used serveral times, the last one will be used.
|
||||
.IP "--url <URL>"
|
||||
Set the URL to fetch. This option is mostly handy when you wanna specify URL
|
||||
in a config file.
|
||||
|
||||
If this option is used serveral times, the last one will be used.
|
||||
.IP "-v/--verbose"
|
||||
Makes the fetching more verbose/talkative. Mostly usable for
|
||||
debugging. Lines starting with '>' means data sent by curl, '<'
|
||||
means data received by curl that is hidden in normal cases and lines
|
||||
starting with '*' means additional info provided by curl.
|
||||
|
||||
If this option is used twice, the second will again disable verbose.
|
||||
.IP "-V/--version"
|
||||
Displays the full version of curl, libcurl and other 3rd party libraries
|
||||
linked with the executable.
|
||||
@@ -433,9 +512,13 @@ The average download speed that curl measured for the complete download.
|
||||
.B speed_upload
|
||||
The average upload speed that curl measured for the complete upload.
|
||||
.RE
|
||||
|
||||
If this option is used serveral times, the last one will be used.
|
||||
.IP "-x/--proxy <proxyhost[:port]>"
|
||||
Use specified proxy. If the port number is not specified, it is assumed at
|
||||
port 1080.
|
||||
|
||||
If this option is used serveral times, the last one will be used.
|
||||
.IP "-X/--request <command>"
|
||||
(HTTP)
|
||||
Specifies a custom request to use when communicating with the HTTP server.
|
||||
@@ -445,14 +528,20 @@ 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 serveral times, the last one will be used.
|
||||
.IP "-y/--speed-time <time>"
|
||||
If a download is slower than speed-limit bytes per second during a speed-time
|
||||
period, the download gets aborted. If speed-time is used, the default
|
||||
speed-limit will be 1 unless set with -y.
|
||||
|
||||
If this option is used serveral times, the last one will be used.
|
||||
.IP "-Y/--speed-limit <speed>"
|
||||
If a download is slower than this given speed, in bytes per second, for
|
||||
speed-time seconds it gets aborted. speed-time is set with -Y and is 30 if
|
||||
not set.
|
||||
|
||||
If this option is used serveral times, the last one will be used.
|
||||
.IP "-z/--time-cond <date expression>"
|
||||
(HTTP)
|
||||
Request to get a file that has been modified later than the given time and
|
||||
@@ -467,6 +556,8 @@ man pages for date expression details.
|
||||
Start the date expression with a dash (-) to make it request for a document
|
||||
that is older than the given date/time, default is a document that is newer
|
||||
than the specified date/time.
|
||||
|
||||
If this option is used serveral times, the last one will be used.
|
||||
.IP "-3/--sslv3"
|
||||
(HTTPS)
|
||||
Forces curl to use SSL version 3 when negotiating with a remote SSL server.
|
||||
@@ -476,12 +567,18 @@ Forces curl to use SSL version 2 when negotiating with a remote SSL server.
|
||||
.IP "-#/--progress-bar"
|
||||
Make curl display progress information as a progress bar instead of the
|
||||
default statistics.
|
||||
|
||||
If this option is used twice, the second will again disable the progress bar.
|
||||
.IP "--crlf"
|
||||
(FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).
|
||||
|
||||
If this option is used twice, the second will again disable crlf converting.
|
||||
.IP "--stderr <file>"
|
||||
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 serveral times, the last one will be used.
|
||||
.SH FILES
|
||||
.I ~/.curlrc
|
||||
.RS
|
||||
|
@@ -237,7 +237,7 @@ want the transfer to start from.
|
||||
.B CURLOPT_COOKIE
|
||||
Pass a pointer to a zero terminated string as parameter. It will be used to
|
||||
set a cookie in the http request. The format of the string should be
|
||||
'[NAME]=[CONTENTS];' Where NAME is the cookie name.
|
||||
[NAME]=[CONTENTS]; Where NAME is the cookie name.
|
||||
.TP
|
||||
.B CURLOPT_HTTPHEADER
|
||||
Pass a pointer to a linked list of HTTP headers to pass to the server in your
|
||||
@@ -267,7 +267,7 @@ the password required to use the CURLOPT_SSLCERT certificate. If the password
|
||||
is not supplied, you will be prompted for it.
|
||||
.TP
|
||||
.B CURLOPT_CRLF
|
||||
TBD.
|
||||
Convert unix newlines to CRLF newlines on FTP uploads.
|
||||
.TP
|
||||
.B CURLOPT_QUOTE
|
||||
Pass a pointer to a linked list of FTP commands to pass to the server prior to
|
||||
|
@@ -7,39 +7,23 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <Daniel.Stenberg@haxx.nu>
|
||||
*
|
||||
* http://curl.haxx.nu
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
/* The include stuff here is mainly for time_t! */
|
||||
#ifdef vms
|
||||
# include <types.h>
|
||||
@@ -470,8 +454,8 @@ char *curl_getenv(char *variable);
|
||||
char *curl_version(void);
|
||||
|
||||
/* This is the version number */
|
||||
#define LIBCURL_VERSION "7.5"
|
||||
#define LIBCURL_VERSION_NUM 0x070500
|
||||
#define LIBCURL_VERSION "7.5.2"
|
||||
#define LIBCURL_VERSION_NUM 0x070502
|
||||
|
||||
/* linked-list structure for the CURLOPT_QUOTE option (and other) */
|
||||
struct curl_slist {
|
||||
|
@@ -7,38 +7,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <Daniel.Stenberg@haxx.nu>
|
||||
*
|
||||
* http://curl.haxx.nu
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@@ -2,27 +2,14 @@
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
|
||||
* the License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
*
|
||||
* The Original Code is Triacle.
|
||||
*
|
||||
* The Initial Developers of the Original Code are Bjorn Reese and
|
||||
* Daniel Stenberg.
|
||||
*
|
||||
* Portions created by Initial Developers are
|
||||
*
|
||||
* Copyright (C) 1998 Bjorn Reese and Daniel Stenberg.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
|
||||
* CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
|
||||
*
|
||||
*************************************************************************
|
||||
*
|
||||
|
@@ -7,38 +7,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <Daniel.Stenberg@haxx.nu>
|
||||
*
|
||||
* http://curl.haxx.nu
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
|
@@ -7,38 +7,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <Daniel.Stenberg@haxx.nu>
|
||||
*
|
||||
* http://curl.haxx.nu
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
typedef void CURL;
|
||||
typedef void CURLconnect;
|
||||
|
||||
|
75
lib/Makefile.b32
Normal file
75
lib/Makefile.b32
Normal file
@@ -0,0 +1,75 @@
|
||||
############################################################
|
||||
# Makefile.b32 - Borland's C++ Compiler 5.X
|
||||
#
|
||||
# 'lib' directory
|
||||
#
|
||||
# Requires 'Makefile.b32.resp'
|
||||
#
|
||||
# Written by Jaepil Kim, pit@paradise.net.nz
|
||||
############################################################
|
||||
|
||||
# Setup environment
|
||||
CXX = bcc32
|
||||
RM = del
|
||||
LIB = tlib
|
||||
TOPDIR = ..
|
||||
CURNTDIR = .
|
||||
CXXFLAGS = -5 -O2 -w-aus -w-ccc -w-csu -w-par -w-pia -w-rch -w-inl -w-ngu -w-pro
|
||||
DEFINES = -DLIBCURL_BIGENDIAN=0 -DNDEBUG -DWIN32 -DCONSOLE -DMBCS
|
||||
INCDIRS = -I$(CURNTDIR);$(TOPDIR)/include/
|
||||
|
||||
# 'BCCDIR' has to be set up in your c:\autoexec.bat
|
||||
# i.e. SET BCCDIR = c:\Borland\BCC55
|
||||
# where c:\Borland\BCC55 is the compiler is installed
|
||||
LINKLIB = $(BCCDIR)/lib/psdk/wsock32.lib
|
||||
LIBCURLLIB = libcurl.lib
|
||||
|
||||
.SUFFIXES: .c
|
||||
|
||||
SOURCES = \
|
||||
base64.c \
|
||||
cookie.c \
|
||||
download.c \
|
||||
escape.c \
|
||||
formdata.c \
|
||||
ftp.c \
|
||||
http.c \
|
||||
ldap.c \
|
||||
dict.c \
|
||||
telnet.c \
|
||||
getdate.c \
|
||||
getenv.c \
|
||||
getpass.c \
|
||||
hostip.c \
|
||||
if2ip.c \
|
||||
mprintf.c \
|
||||
netrc.c \
|
||||
progress.c \
|
||||
sendf.c \
|
||||
speedcheck.c \
|
||||
ssluse.c \
|
||||
timeval.c \
|
||||
url.c \
|
||||
file.c \
|
||||
getinfo.c \
|
||||
version.c \
|
||||
easy.c \
|
||||
highlevel.c \
|
||||
strequal.c
|
||||
|
||||
OBJECTS = $(SOURCES:.c=.obj)
|
||||
|
||||
.c.obj:
|
||||
$(CXX) -c $(INCDIRS) $(CXXFLAGS) $(DEFINES) $<
|
||||
|
||||
all: $(LIBCURLLIB)
|
||||
|
||||
clean:
|
||||
$(RM) $(LIBCURLLIB)
|
||||
$(RM) *.obj
|
||||
|
||||
$(LIBCURLLIB): $(LINKLIB) $(OBJECTS) Makefile.b32.resp
|
||||
$(RM) $(LIBCURLLIB)
|
||||
$(LIB) $(LIBCURLLIB) @Makefile.b32.resp
|
||||
|
||||
|
29
lib/Makefile.b32.resp
Normal file
29
lib/Makefile.b32.resp
Normal file
@@ -0,0 +1,29 @@
|
||||
+base64.obj &
|
||||
+cookie.obj &
|
||||
+download.obj &
|
||||
+escape.obj &
|
||||
+formdata.obj &
|
||||
+ftp.obj &
|
||||
+http.obj &
|
||||
+ldap.obj &
|
||||
+dict.obj &
|
||||
+telnet.obj &
|
||||
+getdate.obj &
|
||||
+getenv.obj &
|
||||
+getpass.obj &
|
||||
+hostip.obj &
|
||||
+if2ip.obj &
|
||||
+mprintf.obj &
|
||||
+netrc.obj &
|
||||
+progress.obj &
|
||||
+sendf.obj &
|
||||
+speedcheck.obj &
|
||||
+ssluse.obj &
|
||||
+timeval.obj &
|
||||
+url.obj &
|
||||
+file.obj &
|
||||
+getinfo.obj &
|
||||
+version.obj &
|
||||
+easy.obj &
|
||||
+highlevel.obj &
|
||||
+strequal.obj
|
@@ -4,9 +4,9 @@
|
||||
## (default is release)
|
||||
##
|
||||
## Comments to: Troy Engel <tengel@sonic.net>
|
||||
## Updated by: Craig Davison <cd@securityfocus.com>
|
||||
## Updated by: Craig Davison <cd@securityfocus.com>
|
||||
|
||||
PROGRAM_NAME = libcurl.lib
|
||||
PROGRAM_NAME = libcurl.lib
|
||||
PROGRAM_NAME_DEBUG = libcurld.lib
|
||||
OPENSSL_PATH = ../../openssl-0.9.6
|
||||
|
||||
@@ -122,7 +122,7 @@ RELEASE_SSL_OBJS= \
|
||||
easyrs.obj \
|
||||
highlevelrs.obj \
|
||||
strequalrs.obj
|
||||
|
||||
|
||||
LINK_OBJS= \
|
||||
base64.obj \
|
||||
cookie.obj \
|
||||
@@ -345,8 +345,8 @@ highlevelrs.obj: highlevel.c
|
||||
$(CCRS) $(CFLAGS) highlevel.c
|
||||
strequalrs.obj: strequal.c
|
||||
$(CCRS) $(CFLAGS) strequal.c
|
||||
|
||||
|
||||
|
||||
|
||||
clean:
|
||||
-@erase *.obj
|
||||
-@erase vc60.idb
|
||||
|
22
lib/cookie.c
22
lib/cookie.c
@@ -1,3 +1,25 @@
|
||||
/*****************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
/***
|
||||
|
||||
|
22
lib/cookie.h
22
lib/cookie.h
@@ -1,5 +1,27 @@
|
||||
#ifndef __COOKIE_H
|
||||
#define __COOKIE_H
|
||||
/*****************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef WIN32
|
||||
|
39
lib/dict.c
39
lib/dict.c
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
|
39
lib/dict.h
39
lib/dict.h
@@ -8,38 +8,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
CURLcode dict(struct connectdata *conn);
|
||||
CURLcode dict_done(struct connectdata *conn);
|
||||
|
||||
|
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
|
@@ -7,38 +7,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
CURLcode
|
||||
Transfer (struct connectdata *data,
|
||||
int sockfd, /* socket to read from or -1 */
|
||||
|
39
lib/easy.c
39
lib/easy.c
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
|
39
lib/escape.c
39
lib/escape.c
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
/* Escape and unescape URL encoding in strings. The functions return a new
|
||||
* allocated string or NULL if an error occurred. */
|
||||
|
39
lib/escape.h
39
lib/escape.h
@@ -8,38 +8,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
/* Escape and unescape URL encoding in strings. The functions return a new
|
||||
* allocated string or NULL if an error occurred. */
|
||||
|
||||
|
39
lib/file.c
39
lib/file.c
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1999.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
|
39
lib/file.h
39
lib/file.h
@@ -8,38 +8,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
CURLcode file(struct connectdata *conn);
|
||||
|
||||
#endif
|
||||
|
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
Debug the form generator stand-alone by compiling this source file with:
|
||||
|
@@ -8,69 +8,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Rafael Sagula <sagula@inf.ufrgs.br>
|
||||
* Sampo Kellomaki <sampo@iki.fi>
|
||||
* Linas Vepstas <linas@linas.org>
|
||||
* Bjorn Reese <breese@imada.ou.dk>
|
||||
* Johan Anderson <johan@homemail.com>
|
||||
* Kjell Ericson <Kjell.Ericson@haxx.se>
|
||||
* Troy Engel <tengel@palladium.net>
|
||||
* Ryan Nelson <ryan@inch.com>
|
||||
* Bjorn Stenberg <Bjorn.Stenberg@haxx.se>
|
||||
* Angus Mackay <amackay@gus.ml.org>
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* $Log$
|
||||
* Revision 1.3 2000-06-20 15:31:26 bagder
|
||||
* haxx.nu => haxx.se
|
||||
*
|
||||
* Revision 1.2 2000/01/10 23:36:14 bagder
|
||||
* syncing with local edit
|
||||
*
|
||||
* Revision 1.4 1999/09/06 06:59:40 dast
|
||||
* Changed email info
|
||||
*
|
||||
* Revision 1.3 1999/08/13 07:34:47 dast
|
||||
* Changed the URL in the header
|
||||
*
|
||||
* Revision 1.2 1999/07/30 12:59:47 dast
|
||||
* FormFree() was added to properly cleanup after a form was posted.
|
||||
*
|
||||
* Revision 1.1.1.1 1999/03/11 22:23:34 dast
|
||||
* Imported sources
|
||||
*
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
/* plain and simple linked list with lines to send */
|
||||
struct FormData {
|
||||
struct FormData *next;
|
||||
|
51
lib/ftp.c
51
lib/ftp.c
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
@@ -197,6 +180,8 @@ static CURLcode AllowServerConnect(struct UrlData *data,
|
||||
getsockname(sock, (struct sockaddr *) &add, (int *)&size);
|
||||
s=accept(sock, (struct sockaddr *) &add, (int *)&size);
|
||||
|
||||
sclose(sock); /* close the first socket */
|
||||
|
||||
if( -1 == s) {
|
||||
/* DIE! */
|
||||
failf(data, "Error accept()ing server connect");
|
||||
@@ -535,7 +520,7 @@ CURLcode ftp_done(struct connectdata *conn)
|
||||
if(nread < 0)
|
||||
return CURLE_OPERATION_TIMEOUTED;
|
||||
|
||||
if (buf[0] != '2') {
|
||||
if (ftpcode >= 400) {
|
||||
failf(data, "QUOT string not accepted: %s",
|
||||
qitem->data);
|
||||
return CURLE_FTP_QUOTE_ERROR;
|
||||
@@ -589,7 +574,7 @@ CURLcode _ftp(struct connectdata *conn)
|
||||
if(nread < 0)
|
||||
return CURLE_OPERATION_TIMEOUTED;
|
||||
|
||||
if (buf[0] != '2') {
|
||||
if (ftpcode >= 400) {
|
||||
failf(data, "QUOT string not accepted: %s",
|
||||
qitem->data);
|
||||
return CURLE_FTP_QUOTE_ERROR;
|
||||
@@ -731,6 +716,12 @@ CURLcode _ftp(struct connectdata *conn)
|
||||
|
||||
if ( h ) {
|
||||
if( (portsock = socket(AF_INET, SOCK_STREAM, 0)) >= 0 ) {
|
||||
|
||||
/* we set the secondary socket variable to this for now, it
|
||||
is only so that the cleanup function will close it in case
|
||||
we fail before the true secondary stuff is made */
|
||||
data->secondarysocket = portsock;
|
||||
|
||||
memset((char *)&sa, 0, sizeof(sa));
|
||||
memcpy((char *)&sa.sin_addr,
|
||||
h->h_addr,
|
||||
|
39
lib/ftp.h
39
lib/ftp.h
@@ -8,38 +8,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
CURLcode ftp(struct connectdata *conn);
|
||||
CURLcode ftp_done(struct connectdata *conn);
|
||||
CURLcode ftp_connect(struct connectdata *conn);
|
||||
|
38
lib/getenv.c
38
lib/getenv.c
@@ -5,37 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
67
lib/getenv.h
67
lib/getenv.h
@@ -7,66 +7,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Rafael Sagula <sagula@inf.ufrgs.br>
|
||||
* Sampo Kellomaki <sampo@iki.fi>
|
||||
* Linas Vepstas <linas@linas.org>
|
||||
* Bjorn Reese <breese@imada.ou.dk>
|
||||
* Johan Anderson <johan@homemail.com>
|
||||
* Kjell Ericson <Kjell.Ericson@haxx.se>
|
||||
* Troy Engel <tengel@palladium.net>
|
||||
* Ryan Nelson <ryan@inch.com>
|
||||
* Bjorn Stenberg <Bjorn.Stenberg@haxx.se>
|
||||
* Angus Mackay <amackay@gus.ml.org>
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* $Log$
|
||||
* Revision 1.3 2000-06-20 15:31:26 bagder
|
||||
* haxx.nu => haxx.se
|
||||
*
|
||||
* Revision 1.2 2000/01/10 23:36:14 bagder
|
||||
* syncing with local edit
|
||||
*
|
||||
* Revision 1.3 1999/09/06 06:59:40 dast
|
||||
* Changed email info
|
||||
*
|
||||
* Revision 1.2 1999/08/13 07:34:48 dast
|
||||
* Changed the URL in the header
|
||||
*
|
||||
* Revision 1.1.1.1 1999/03/11 22:23:34 dast
|
||||
* Imported sources
|
||||
*
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
/* Unix and Win32 getenv function call */
|
||||
char *GetEnv(char *variable);
|
||||
|
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1999.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
|
@@ -71,7 +71,7 @@
|
||||
# define perror(x) fprintf(stderr, "Error in: %s\n", x)
|
||||
#endif
|
||||
|
||||
char *getpass_r(const char *prompt, char *buffer, int buflen)
|
||||
char *getpass_r(const char *prompt, char *buffer, size_t buflen)
|
||||
{
|
||||
FILE *infp;
|
||||
FILE *outfp;
|
||||
|
@@ -3,6 +3,6 @@
|
||||
/*
|
||||
* Returning NULL will abort the continued operation!
|
||||
*/
|
||||
char* getpass_r(char *prompt, char* buffer, int buflen );
|
||||
char* getpass_r(char *prompt, char* buffer, size_t buflen );
|
||||
|
||||
#endif
|
||||
|
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
|
@@ -7,37 +7,20 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
CURLcode curl_transfer(CURL *curl);
|
||||
#endif
|
||||
|
39
lib/hostip.c
39
lib/hostip.c
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
|
39
lib/hostip.h
39
lib/hostip.h
@@ -7,38 +7,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
struct hostent *GetHost(struct UrlData *data, char *hostname, char **bufp );
|
||||
|
||||
|
39
lib/http.c
39
lib/http.c
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
|
39
lib/http.h
39
lib/http.h
@@ -8,38 +8,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
/* ftp can use this as well */
|
||||
CURLcode GetHTTPProxyTunnel(struct UrlData *data, int tunnelsocket,
|
||||
|
39
lib/if2ip.c
39
lib/if2ip.c
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
|
39
lib/if2ip.h
39
lib/if2ip.h
@@ -7,38 +7,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
#include "setup.h"
|
||||
|
||||
#if ! defined(WIN32) && ! defined(__BEOS__)
|
||||
|
39
lib/ldap.c
39
lib/ldap.c
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Contributor(s):
|
||||
* Bj<42>rn Reese <breese@mail1.stofanet.dk>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
|
39
lib/ldap.h
39
lib/ldap.h
@@ -8,38 +8,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://www.fts.frontec.se/~dast/curl/
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
CURLcode ldap(struct connectdata *conn);
|
||||
CURLcode ldap_done(struct connectdata *conn);
|
||||
|
||||
|
@@ -6,43 +6,34 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1999.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
|
||||
#include <winsock.h>
|
||||
#else /* some kind of unix */
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define _MPRINTF_REPLACE
|
||||
#include <curl/mprintf.h>
|
||||
#include "urldata.h"
|
||||
@@ -50,6 +41,12 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
/* DONT include memdebug.h here! */
|
||||
|
||||
/*
|
||||
* Note that these debug functions are very simple and they are meant to
|
||||
* remain so. For advanced analysis, record a log file and write perl scripts
|
||||
@@ -115,4 +112,46 @@ void curl_dofree(void *ptr, int line, char *source)
|
||||
source, line, ptr);
|
||||
}
|
||||
|
||||
int curl_socket(int domain, int type, int protocol, int line, char *source)
|
||||
{
|
||||
int sockfd=(socket)(domain, type, protocol);
|
||||
fprintf(logfile?logfile:stderr, "FD %s:%d socket() = %d\n",
|
||||
source, line, sockfd);
|
||||
return sockfd;
|
||||
}
|
||||
|
||||
int curl_accept(int s, struct sockaddr *addr, int *addrlen,
|
||||
int line, char *source)
|
||||
{
|
||||
int sockfd=(accept)(s, addr, addrlen);
|
||||
fprintf(logfile?logfile:stderr, "FD %s:%d accept() = %d\n",
|
||||
source, line, sockfd);
|
||||
return sockfd;
|
||||
}
|
||||
|
||||
/* this is our own defined way to close sockets on *ALL* platforms */
|
||||
int curl_sclose(int sockfd, int line, char *source)
|
||||
{
|
||||
int res=sclose(sockfd);
|
||||
fprintf(logfile?logfile:stderr, "FD %s:%d sclose(%d)\n",
|
||||
source, line, sockfd);
|
||||
return sockfd;
|
||||
}
|
||||
|
||||
FILE *curl_fopen(char *file, char *mode, int line, char *source)
|
||||
{
|
||||
FILE *res=(fopen)(file, mode);
|
||||
fprintf(logfile?logfile:stderr, "FILE %s:%d fopen(\"%s\") = %p\n",
|
||||
source, line, file, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
int curl_fclose(FILE *file, int line, char *source)
|
||||
{
|
||||
int res=(fclose)(file);
|
||||
fprintf(logfile?logfile:stderr, "FILE %s:%d fclose(%p)\n",
|
||||
source, line, file);
|
||||
return res;
|
||||
}
|
||||
|
||||
#endif /* MALLOCDEBUG */
|
||||
|
@@ -1,13 +1,42 @@
|
||||
#ifdef MALLOCDEBUG
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/* memory functions */
|
||||
void *curl_domalloc(size_t size, int line, char *source);
|
||||
void *curl_dorealloc(void *ptr, size_t size, int line, char *source);
|
||||
void curl_dofree(void *ptr, int line, char *source);
|
||||
char *curl_dostrdup(char *str, int line, char *source);
|
||||
void curl_memdebug(char *logname);
|
||||
|
||||
/* file descriptor manipulators */
|
||||
int curl_socket(int domain, int type, int protocol, int, char *);
|
||||
int curl_sclose(int sockfd, int, char *);
|
||||
int curl_accept(int s, struct sockaddr *addr, int *addrlen,
|
||||
int line, char *source);
|
||||
|
||||
/* FILE functions */
|
||||
FILE *curl_fopen(char *file, char *mode, int line, char *source);
|
||||
int curl_fclose(FILE *file, int line, char *source);
|
||||
|
||||
/* Set this symbol on the command-line, recompile all lib-sources */
|
||||
#define strdup(ptr) curl_dostrdup(ptr, __LINE__, __FILE__)
|
||||
#define malloc(size) curl_domalloc(size, __LINE__, __FILE__)
|
||||
#define realloc(ptr,size) curl_dorealloc(ptr, size, __LINE__, __FILE__)
|
||||
#define free(ptr) curl_dofree(ptr, __LINE__, __FILE__)
|
||||
|
||||
#define socket(domain,type,protocol)\
|
||||
curl_socket(domain,type,protocol,__LINE__,__FILE__)
|
||||
#define accept(sock,addr,len)\
|
||||
curl_accept(sock,addr,len,__LINE__,__FILE__)
|
||||
|
||||
/* sclose is probably already defined, redefine it! */
|
||||
#undef sclose
|
||||
#define sclose(sockfd) curl_sclose(sockfd,__LINE__,__FILE__)
|
||||
|
||||
#undef fopen
|
||||
#define fopen(file,mode) curl_fopen(file,mode,__LINE__,__FILE__)
|
||||
#define fclose(file) curl_fclose(file,__LINE__,__FILE__)
|
||||
|
||||
#endif
|
||||
|
@@ -4,6 +4,15 @@
|
||||
*
|
||||
*************************************************************************
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
|
||||
* CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
|
||||
*
|
||||
* Purpose:
|
||||
* A merge of Bjorn Reese's format() function and Daniel's dsprintf()
|
||||
* 1.0. A full blooded printf() clone with full support for <num>$
|
||||
|
51
lib/netrc.c
51
lib/netrc.c
@@ -5,50 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Rafael Sagula <sagula@inf.ufrgs.br>
|
||||
* Sampo Kellomaki <sampo@iki.fi>
|
||||
* Linas Vepstas <linas@linas.org>
|
||||
* Bjorn Reese <breese@imada.ou.dk>
|
||||
* Johan Anderson <johan@homemail.com>
|
||||
* Kjell Ericson <Kjell.Ericson@haxx.se>
|
||||
* Troy Engel <tengel@palladium.net>
|
||||
* Ryan Nelson <ryan@inch.com>
|
||||
* Bjorn Stenberg <Bjorn.Stenberg@haxx.se>
|
||||
* Angus Mackay <amackay@gus.ml.org>
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
|
67
lib/netrc.h
67
lib/netrc.h
@@ -7,66 +7,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Rafael Sagula <sagula@inf.ufrgs.br>
|
||||
* Sampo Kellomaki <sampo@iki.fi>
|
||||
* Linas Vepstas <linas@linas.org>
|
||||
* Bjorn Reese <breese@imada.ou.dk>
|
||||
* Johan Anderson <johan@homemail.com>
|
||||
* Kjell Ericson <Kjell.Ericson@haxx.se>
|
||||
* Troy Engel <tengel@palladium.net>
|
||||
* Ryan Nelson <ryan@inch.com>
|
||||
* Bjorn Stenberg <Bjorn.Stenberg@haxx.se>
|
||||
* Angus Mackay <amackay@gus.ml.org>
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* $Log$
|
||||
* Revision 1.3 2000-06-20 15:31:26 bagder
|
||||
* haxx.nu => haxx.se
|
||||
*
|
||||
* Revision 1.2 2000/01/10 23:36:15 bagder
|
||||
* syncing with local edit
|
||||
*
|
||||
* Revision 1.3 1999/09/06 06:59:41 dast
|
||||
* Changed email info
|
||||
*
|
||||
* Revision 1.2 1999/08/13 07:34:48 dast
|
||||
* Changed the URL in the header
|
||||
*
|
||||
* Revision 1.1.1.1 1999/03/11 22:23:34 dast
|
||||
* Imported sources
|
||||
*
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
int ParseNetrc(char *host,
|
||||
char *login,
|
||||
char *password);
|
||||
|
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
|
@@ -7,38 +7,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include "timeval.h"
|
||||
|
||||
|
59
lib/sendf.c
59
lib/sendf.c
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
@@ -60,8 +43,8 @@
|
||||
|
||||
#ifdef KRB4
|
||||
#include "security.h"
|
||||
#include <string.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
/* The last #include file should be: */
|
||||
#ifdef MALLOCDEBUG
|
||||
#include "memdebug.h"
|
||||
@@ -123,37 +106,39 @@ size_t sendf(int fd, struct UrlData *data, char *fmt, ...)
|
||||
|
||||
/*
|
||||
* ftpsendf() sends the formated string as a ftp command to a ftp server
|
||||
*
|
||||
* NOTE: we build the command in a fixed-length buffer, which sets length
|
||||
* restrictions on the command!
|
||||
*
|
||||
*/
|
||||
size_t ftpsendf(int fd, struct connectdata *conn, char *fmt, ...)
|
||||
{
|
||||
size_t bytes_written;
|
||||
char *s;
|
||||
char s[256];
|
||||
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
s = mvaprintf(fmt, ap);
|
||||
vsnprintf(s, 250, fmt, ap);
|
||||
va_end(ap);
|
||||
if(!s)
|
||||
return 0; /* failure */
|
||||
|
||||
if(conn->data->bits.verbose)
|
||||
fprintf(conn->data->err, "> %s\n", s);
|
||||
|
||||
strcat(s, "\r\n"); /* append a trailing CRLF */
|
||||
|
||||
#ifdef KRB4
|
||||
if(conn->sec_complete && conn->data->cmdchannel) {
|
||||
bytes_written = sec_fprintf(conn, conn->data->cmdchannel, s);
|
||||
bytes_written += fprintf(conn->data->cmdchannel, "\r\n");
|
||||
fflush(conn->data->cmdchannel);
|
||||
}
|
||||
else
|
||||
#endif /* KRB4 */
|
||||
{
|
||||
bytes_written = swrite(fd, s, strlen(s));
|
||||
bytes_written += swrite(fd, "\r\n", 2);
|
||||
}
|
||||
free(s); /* free the output string */
|
||||
return(bytes_written);
|
||||
}
|
||||
|
||||
|
||||
/* ssend() sends plain (binary) data to the server */
|
||||
size_t ssend(int fd, struct connectdata *conn, void *mem, size_t len)
|
||||
{
|
||||
|
39
lib/sendf.h
39
lib/sendf.h
@@ -7,38 +7,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
size_t ftpsendf(int fd, struct connectdata *, char *fmt, ...);
|
||||
size_t sendf(int fd, struct UrlData *, char *fmt, ...);
|
||||
|
39
lib/setup.h
39
lib/setup.h
@@ -7,38 +7,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
|
@@ -7,38 +7,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
|
39
lib/ssluse.c
39
lib/ssluse.c
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* The original SSL code was written by
|
||||
|
39
lib/ssluse.h
39
lib/ssluse.h
@@ -7,38 +7,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
int SSL_cert_stuff(struct UrlData *data,
|
||||
char *cert_file,
|
||||
char *key_file);
|
||||
|
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 2000.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
|
@@ -7,38 +7,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 2000.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
int strequal(const char *first, const char *second);
|
||||
int strnequal(const char *first, const char *second, size_t max);
|
||||
|
||||
|
47
lib/telnet.c
47
lib/telnet.c
@@ -5,46 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
*
|
||||
* This implementation of the TELNET protocol is written by
|
||||
* Linus Nielsen <Linus.Nielsen@haxx.se>,
|
||||
* with some code snippets stolen from the BSD Telnet client.
|
||||
*
|
||||
* The negotiation is performed according to RFC 1143 (D. Bernstein,
|
||||
* "The Q Method of Implementing TELNET Option Negotiation")
|
||||
*
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
|
39
lib/telnet.h
39
lib/telnet.h
@@ -8,38 +8,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
CURLcode telnet(struct connectdata *conn);
|
||||
CURLcode telnet_done(struct connectdata *conn);
|
||||
|
||||
|
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
|
@@ -7,38 +7,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
|
42
lib/url.c
42
lib/url.c
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
/* -- WIN32 approved -- */
|
||||
|
||||
@@ -723,7 +706,10 @@ static CURLcode _connect(CURL *curl, CURLconnect **in_connect)
|
||||
#ifdef HAVE_SIGACTION
|
||||
sigaction(SIGALRM, NULL, &sigact);
|
||||
sigact.sa_handler = alarmfunc;
|
||||
#ifdef SA_RESTART
|
||||
/* HPUX doesn't have SA_RESTART but defaults to that behaviour! */
|
||||
sigact.sa_flags &= ~SA_RESTART;
|
||||
#endif
|
||||
sigaction(SIGALRM, &sigact, NULL);
|
||||
#else
|
||||
/* no sigaction(), revert to the much lamer signal() */
|
||||
|
39
lib/url.h
39
lib/url.h
@@ -7,38 +7,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
int GetLine(int sockfd, char *buf, struct UrlData *data);
|
||||
|
||||
#endif
|
||||
|
@@ -7,38 +7,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
/* This file is for lib internal stuff */
|
||||
|
||||
|
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
|
@@ -72,6 +72,61 @@ while(<STDIN>) {
|
||||
print "Not recognized input line: $function\n";
|
||||
}
|
||||
}
|
||||
# FD url.c:1282 socket() = 5
|
||||
elsif($_ =~ /^FD ([^:]*):(\d*) (.*)/) {
|
||||
# generic match for the filename+linenumber
|
||||
$source = $1;
|
||||
$linenum = $2;
|
||||
$function = $3;
|
||||
|
||||
if($function =~ /socket\(\) = (\d*)/) {
|
||||
$filedes{$1}=1;
|
||||
$getfile{$1}="$source:$linenum";
|
||||
$openfile++;
|
||||
}
|
||||
elsif($function =~ /accept\(\) = (\d*)/) {
|
||||
$filedes{$1}=1;
|
||||
$getfile{$1}="$source:$linenum";
|
||||
$openfile++;
|
||||
}
|
||||
elsif($function =~ /sclose\((\d*)\)/) {
|
||||
if($filedes{$1} != 1) {
|
||||
print "Close without open: $line\n";
|
||||
}
|
||||
else {
|
||||
$filedes{$1}=0; # closed now
|
||||
$openfile--;
|
||||
}
|
||||
}
|
||||
}
|
||||
# FILE url.c:1282 fopen("blabla") = 0x5ddd
|
||||
elsif($_ =~ /^FILE ([^:]*):(\d*) (.*)/) {
|
||||
# generic match for the filename+linenumber
|
||||
$source = $1;
|
||||
$linenum = $2;
|
||||
$function = $3;
|
||||
|
||||
if($function =~ /fopen\(\"([^\"]*)\"\) = (\(nil\)|0x([0-9a-f]*))/) {
|
||||
if($2 eq "(nil)") {
|
||||
;
|
||||
}
|
||||
else {
|
||||
$fopen{$3}=1;
|
||||
$fopenfile{$3}="$source:$linenum";
|
||||
$fopens++;
|
||||
}
|
||||
}
|
||||
# fclose(0x1026c8)
|
||||
elsif($function =~ /fclose\(0x([0-9a-f]*)\)/) {
|
||||
if(!$fopen{$1}) {
|
||||
print "fclose() without fopen(): $line\n";
|
||||
}
|
||||
else {
|
||||
$fopen{$1}=0;
|
||||
$fopens--;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
print "Not recognized prefix line: $line\n";
|
||||
}
|
||||
@@ -93,3 +148,19 @@ if($totalmem) {
|
||||
}
|
||||
}
|
||||
|
||||
if($openfile) {
|
||||
for(keys %filedes) {
|
||||
if($filedes{$_} == 1) {
|
||||
print "Open file descriptor created at ".$getfile{$_}."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($fopens) {
|
||||
print "Open FILE handles left at:\n";
|
||||
for(keys %fopen) {
|
||||
if($fopen{$_} == 1) {
|
||||
print "fopen() called at ".$fopenfile{$_}."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -31,7 +31,7 @@ Authors:
|
||||
|
||||
|
||||
%prep
|
||||
%setup -n curl-7.4.2
|
||||
%setup -n %{name}-%{version}
|
||||
|
||||
|
||||
%build
|
||||
|
443
perl/crawlink.pl
Executable file
443
perl/crawlink.pl
Executable file
@@ -0,0 +1,443 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# crawlink.pl
|
||||
#
|
||||
# This script crawls across all found links below the given "root" URL.
|
||||
# It reports all good and bad links to stdout. This code was based on the
|
||||
# checklink.pl script I wrote ages ago.
|
||||
#
|
||||
# Written to use 'curl' for URL checking.
|
||||
#
|
||||
# Author: Daniel Stenberg <daniel@haxx.se>
|
||||
# Version: 0.3 Jan 3, 2001
|
||||
#
|
||||
# HISTORY
|
||||
#
|
||||
# 0.3 - The -i now adds regexes that if a full URL link matches one of those,
|
||||
# it is not followed. This can then be used to prevent this script from
|
||||
# following '.*\.cgi', specific pages or whatever.
|
||||
#
|
||||
# 0.2 - Made it only HEAD non html files (i.e skip the GET). Makes it a lot
|
||||
# faster to skip large non HTML files such as pdfs or big RFCs! ;-)
|
||||
# Added a -c option that allows me to pass options to curl.
|
||||
#
|
||||
# 0.1 - The given url works as the root. This script will only continue
|
||||
# and check other URLs if the leftmost part of the new URL is identical
|
||||
# to the root URL.
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
my $in="";
|
||||
my $verbose=0;
|
||||
my $usestdin;
|
||||
my $linenumber;
|
||||
my $help;
|
||||
my $external;
|
||||
my $curlopts;
|
||||
|
||||
my @ignorelist;
|
||||
|
||||
argv:
|
||||
if($ARGV[0] eq "-v" ) {
|
||||
$verbose++;
|
||||
shift @ARGV;
|
||||
goto argv;
|
||||
}
|
||||
elsif($ARGV[0] eq "-c" ) {
|
||||
$curlopts=$ARGV[1];
|
||||
shift @ARGV;
|
||||
shift @ARGV;
|
||||
goto argv;
|
||||
}
|
||||
elsif($ARGV[0] eq "-i" ) {
|
||||
push @ignorelist, $ARGV[1];
|
||||
shift @ARGV;
|
||||
shift @ARGV;
|
||||
goto argv;
|
||||
}
|
||||
elsif($ARGV[0] eq "-l" ) {
|
||||
$linenumber = 1;
|
||||
shift @ARGV;
|
||||
goto argv;
|
||||
}
|
||||
elsif($ARGV[0] eq "-h" ) {
|
||||
$help = 1;
|
||||
shift @ARGV;
|
||||
goto argv;
|
||||
}
|
||||
elsif($ARGV[0] eq "-x" ) {
|
||||
$external = 1;
|
||||
shift @ARGV;
|
||||
goto argv;
|
||||
}
|
||||
|
||||
my $geturl = $ARGV[0];
|
||||
my $firsturl= $geturl;
|
||||
|
||||
#
|
||||
# Define a hash array to hold all root URLs to visit/we have visited
|
||||
#
|
||||
my %rooturls;
|
||||
$rooturls{$ARGV[0]}=1;
|
||||
|
||||
if(($geturl eq "") || $help) {
|
||||
print "Usage: $0 [-hilvx] <full URL>\n",
|
||||
" Use a traling slash for directory URLs!\n",
|
||||
" -c [data] Pass [data] as argument to every curl invoke\n",
|
||||
" -h This help text\n",
|
||||
" -i [regex] Ignore root links that match this pattern\n",
|
||||
" -l Line number report for BAD links\n",
|
||||
" -v Verbose mode\n",
|
||||
" -x Check non-local (external?) links only\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
my $proxy;
|
||||
if($curlopts ne "") {
|
||||
$proxy=" $curlopts";
|
||||
#$proxy =" -x 194.237.142.41:80";
|
||||
}
|
||||
|
||||
# linkchecker, URL will be appended to the right of this command line
|
||||
# this is the one using HEAD:
|
||||
my $linkcheck = "curl -s -m 20 -I$proxy";
|
||||
|
||||
# as a second attempt, this will be used. This is not using HEAD but will
|
||||
# get the whole frigging document!
|
||||
my $linkcheckfull = "curl -s -m 20 -i$proxy";
|
||||
|
||||
# htmlget, URL will be appended to the right of this command line
|
||||
my $htmlget = "curl -s$proxy";
|
||||
|
||||
# Parse the input URL and split it into the relevant parts:
|
||||
|
||||
my $getprotocol;
|
||||
my $getserver;
|
||||
my $getpath;
|
||||
my $getdocument;
|
||||
|
||||
my %done;
|
||||
my %tagtype;
|
||||
my $allcount=0;
|
||||
my $badlinks=0;
|
||||
|
||||
sub SplitURL {
|
||||
my $inurl = $_[0];
|
||||
if($inurl=~ /^([^:]+):\/\/([^\/]*)\/(.*)\/(.*)/ ) {
|
||||
$getprotocol = $1;
|
||||
$getserver = $2;
|
||||
$getpath = $3;
|
||||
$getdocument = $4;
|
||||
}
|
||||
elsif ($inurl=~ /^([^:]+):\/\/([^\/]*)\/(.*)/ ) {
|
||||
$getprotocol = $1;
|
||||
$getserver = $2;
|
||||
$getpath = $3;
|
||||
$getdocument = "";
|
||||
|
||||
if($getpath !~ /\//) {
|
||||
$getpath ="";
|
||||
$getdocument = $3;
|
||||
}
|
||||
|
||||
}
|
||||
elsif ($inurl=~ /^([^:]+):\/\/(.*)/ ) {
|
||||
$getprotocol = $1;
|
||||
$getserver = $2;
|
||||
$getpath = "";
|
||||
$getdocument = "";
|
||||
}
|
||||
else {
|
||||
print "Couldn't parse the specified URL, retry please!\n";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
my @indoc;
|
||||
|
||||
sub GetRootPage {
|
||||
my $geturl = $_[0];
|
||||
my $in="";
|
||||
my $code=200;
|
||||
my $type="text/plain";
|
||||
|
||||
my $pagemoved=0;
|
||||
open(HEADGET, "$linkcheck $geturl|") ||
|
||||
die "Couldn't get web page for some reason";
|
||||
|
||||
while(<HEADGET>) {
|
||||
#print STDERR $_;
|
||||
if($_ =~ /HTTP\/1\.[01] (\d\d\d) /) {
|
||||
$code=$1;
|
||||
if($code =~ /^3/) {
|
||||
$pagemoved=1;
|
||||
}
|
||||
}
|
||||
elsif($_ =~ /^Content-Type: ([\/a-zA-Z]+)/) {
|
||||
$type=$1;
|
||||
}
|
||||
elsif($pagemoved &&
|
||||
($_ =~ /^Location: (.*)/)) {
|
||||
$geturl = $1;
|
||||
|
||||
&SplitURL($geturl);
|
||||
|
||||
$pagemoved++;
|
||||
last;
|
||||
}
|
||||
}
|
||||
close(HEADGET);
|
||||
|
||||
if($pagemoved == 1) {
|
||||
print "Page is moved but we don't know where. Did you forget the ",
|
||||
"traling slash?\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
if($type ne "text/html") {
|
||||
# there no point in getting anything but HTML
|
||||
$in="";
|
||||
}
|
||||
else {
|
||||
open(WEBGET, "$htmlget $geturl|") ||
|
||||
die "Couldn't get web page for some reason";
|
||||
while(<WEBGET>) {
|
||||
my $line = $_;
|
||||
push @indoc, $line;
|
||||
$line=~ s/\n/ /g;
|
||||
$line=~ s/\r//g;
|
||||
$in=$in.$line;
|
||||
}
|
||||
close(WEBGET);
|
||||
}
|
||||
return ($in, $code, $type);
|
||||
}
|
||||
|
||||
sub LinkWorks {
|
||||
my $check = $_[0];
|
||||
|
||||
# URL encode:
|
||||
# $check =~s/([^a-zA-Z0-9_:\/.-])/uc sprintf("%%%02x",ord($1))/eg;
|
||||
|
||||
my @doc = `$linkcheck \"$check\"`;
|
||||
|
||||
my $head = 1;
|
||||
|
||||
# print "COMMAND: $linkcheck \"$check\"\n";
|
||||
# print $doc[0]."\n";
|
||||
|
||||
boo:
|
||||
if( $doc[0] =~ /^HTTP[^ ]+ (\d+)/ ) {
|
||||
my $error = $1;
|
||||
|
||||
if($error < 400 ) {
|
||||
return "GOOD";
|
||||
}
|
||||
else {
|
||||
|
||||
if($head && ($error >= 500)) {
|
||||
# This server doesn't like HEAD!
|
||||
@doc = `$linkcheckfull \"$check\"`;
|
||||
$head = 0;
|
||||
goto boo;
|
||||
}
|
||||
return "BAD";
|
||||
}
|
||||
}
|
||||
return "BAD";
|
||||
}
|
||||
|
||||
|
||||
sub GetLinks {
|
||||
my $in = $_[0];
|
||||
my @result;
|
||||
|
||||
while($in =~ /[^<]*(<[^>]+>)/g ) {
|
||||
# we have a tag in $1
|
||||
my $tag = $1;
|
||||
|
||||
if($tag =~ /^<!--/) {
|
||||
# this is a comment tag, ignore it
|
||||
}
|
||||
else {
|
||||
if($tag =~ /(src|href|background|archive) *= *(\"[^\"]\"|[^ \)>]*)/i) {
|
||||
my $url=$2;
|
||||
if($url =~ /^\"(.*)\"$/) {
|
||||
# this was a "string" now $1 has removed the quotes:
|
||||
$url=$1;
|
||||
}
|
||||
|
||||
|
||||
$url =~ s/([^\#]*)\#.*/$1/g;
|
||||
|
||||
if($url eq "") {
|
||||
# if the link was nothing than a #-link it may now have
|
||||
# been emptied completely so then we skip the rest
|
||||
next;
|
||||
}
|
||||
|
||||
if($done{$url}) {
|
||||
# if this url already is done, do next
|
||||
$done{$url}++;
|
||||
if($verbose) {
|
||||
print " FOUND $url but that is already checked\n";
|
||||
}
|
||||
next;
|
||||
}
|
||||
|
||||
$done{$url} = 1; # this is "done"
|
||||
|
||||
push @result, $url;
|
||||
if($tag =~ /< *([^ ]+)/) {
|
||||
$tagtype{$url}=$1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return @result;
|
||||
}
|
||||
|
||||
|
||||
while(1) {
|
||||
$geturl=-1;
|
||||
for(keys %rooturls) {
|
||||
if($rooturls{$_} == 1) {
|
||||
if($_ !~ /^$firsturl/) {
|
||||
$rooturls{$_} += 1000; # don't do this, outside our scope
|
||||
if($verbose) {
|
||||
print "SKIP: $_\n";
|
||||
}
|
||||
next;
|
||||
}
|
||||
$geturl=$_;
|
||||
last;
|
||||
}
|
||||
}
|
||||
if($geturl == -1) {
|
||||
last;
|
||||
}
|
||||
|
||||
#
|
||||
# Splits the URL in its different parts
|
||||
#
|
||||
&SplitURL($geturl);
|
||||
|
||||
#
|
||||
# Returns the full HTML of the root page
|
||||
#
|
||||
my ($in, $error, $ctype) = &GetRootPage($geturl);
|
||||
|
||||
$rooturls{$geturl}++; # increase to prove we have already got it
|
||||
|
||||
if($ctype ne "text/html") {
|
||||
# this is not HTML, we skip this
|
||||
if($verbose == 2) {
|
||||
print "Non-HTML link, skipping\n";
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
||||
if($error >= 400) {
|
||||
print "ROOT page $geturl returned $error\n";
|
||||
next;
|
||||
}
|
||||
|
||||
print " ==== $geturl ====\n";
|
||||
|
||||
if($verbose == 2) {
|
||||
printf("Error code $error, Content-Type: $ctype, got %d bytes\n",
|
||||
length($in));
|
||||
}
|
||||
|
||||
#print "protocol = $getprotocol\n";
|
||||
#print "server = $getserver\n";
|
||||
#print "path = $getpath\n";
|
||||
#print "document = $getdocument\n";
|
||||
#exit;
|
||||
|
||||
#
|
||||
# Extracts all links from the given HTML buffer
|
||||
#
|
||||
my @links = &GetLinks($in);
|
||||
|
||||
for(@links) {
|
||||
my $url = $_;
|
||||
my $link;
|
||||
|
||||
if($url =~ /^([^:]+):/) {
|
||||
my $prot = $1;
|
||||
if($prot !~ /http/i) {
|
||||
# this is an unsupported protocol, we ignore this
|
||||
next;
|
||||
}
|
||||
$link = $url;
|
||||
}
|
||||
else {
|
||||
if($external) {
|
||||
next;
|
||||
}
|
||||
|
||||
# this is a link on the same server:
|
||||
if($url =~ /^\//) {
|
||||
# from root
|
||||
$link = "$getprotocol://$getserver$url";
|
||||
}
|
||||
else {
|
||||
# from the scanned page's dir
|
||||
my $nyurl=$url;
|
||||
|
||||
if(length($getpath) &&
|
||||
($getpath !~ /\/$/) &&
|
||||
($nyurl !~ /^\//)) {
|
||||
# lacks ending slash, add one to the document part:
|
||||
$nyurl = "/".$nyurl;
|
||||
}
|
||||
$link = "$getprotocol://$getserver/$getpath$nyurl";
|
||||
}
|
||||
}
|
||||
|
||||
my $success = &LinkWorks($link);
|
||||
|
||||
my $count = $done{$url};
|
||||
|
||||
$allcount += $count;
|
||||
|
||||
print "$success $count <".$tagtype{$url}."> $link $url\n";
|
||||
|
||||
if("BAD" eq $success) {
|
||||
$badlinks++;
|
||||
if($linenumber) {
|
||||
my $line =1;
|
||||
for(@indoc) {
|
||||
if($_ =~ /$url/) {
|
||||
print " line $line\n";
|
||||
}
|
||||
$line++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
# the link works, add it if it isn't in the ingore list
|
||||
my $ignore=0;
|
||||
for(@ignorelist) {
|
||||
if($link =~ /$_/) {
|
||||
$ignore=1;
|
||||
}
|
||||
}
|
||||
if(!$ignore) {
|
||||
# not ignored, add
|
||||
$rooturls{$link}++; # check this if not checked already
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if($verbose) {
|
||||
print "$allcount links were checked";
|
||||
if($badlinks > 0) {
|
||||
print ", $badlinks were found bad";
|
||||
}
|
||||
print "\n";
|
||||
}
|
43
src/Makefile.b32
Normal file
43
src/Makefile.b32
Normal file
@@ -0,0 +1,43 @@
|
||||
############################################################
|
||||
# Makefile.b32 - Borland's C++ Compiler 5.X
|
||||
#
|
||||
# 'src' directory
|
||||
#
|
||||
# Written by Jaepil Kim, pit@paradise.net.nz
|
||||
############################################################
|
||||
|
||||
# Set program's name
|
||||
PROGNAME = curl.exe
|
||||
|
||||
# Setup environment
|
||||
CXX = bcc32
|
||||
CXXFLAGS = -5 -O2 -WC -w-par -w-csu -w-aus
|
||||
RM = del
|
||||
TOPDIR = ..
|
||||
DEFINES = -DNDEBUG -DLIBCURL_BIGENDIAN=0 -DWIN32 -D_CONSOLE -D_MBCS
|
||||
LD = bcc32
|
||||
LDFLAGS = -lap -e$(PROGNAME)
|
||||
INCDIRS = -I$(TOPDIR)/include
|
||||
LIBCURLLIB= $(TOPDIR)/lib/libcurl.lib
|
||||
|
||||
# 'BCCDIR' has to be set up in your c:\autoexec.bat
|
||||
# i.e. SET BCCDIR = c:\Borland\BCC55
|
||||
# where c:\Borland\BCC55 is the compiler is installed
|
||||
LINKLIB = $(BCCDIR)/lib/psdk/wsock32.lib
|
||||
|
||||
|
||||
PROGRAMS = \
|
||||
curl.exe
|
||||
|
||||
.c.obj:
|
||||
$(CXX) -c $(INCDIRS) $(CXXFLAGS) $(DEFINES) $*.c
|
||||
|
||||
all: $(PROGRAMS)
|
||||
|
||||
curl.exe: $(LIBCURLLIB) $(LINKLIB) hugehelp.obj writeout.obj urlglob.obj main.obj
|
||||
$(LD) $(LDFLAGS) hugehelp.obj writeout.obj urlglob.obj main.obj $(LIBCURLLIB) $(LINKLIB)
|
||||
|
||||
clean:
|
||||
$(RM) *.obj
|
||||
$(RM) *.exe
|
||||
$(RM) *.tds
|
168
src/Makefile.vc6
168
src/Makefile.vc6
@@ -1,84 +1,84 @@
|
||||
########################################################
|
||||
## Makefile for building curl.exe with MSVC6
|
||||
## Use: nmake -f makefile.vc6 [release | debug]
|
||||
## (default is release)
|
||||
##
|
||||
## Comments to: Troy Engel <tengel@sonic.net>
|
||||
## Updated by: Craig Davison <cd@securityfocus.com>
|
||||
|
||||
PROGRAM_NAME = curl.exe
|
||||
|
||||
########################################################
|
||||
## Nothing more to do below this line!
|
||||
|
||||
## Release
|
||||
CCR = cl.exe /MD /O2 /D "NDEBUG"
|
||||
LINKR = link.exe /incremental:no /libpath:"../lib"
|
||||
|
||||
## Debug
|
||||
CCD = cl.exe /MDd /Gm /ZI /Od /D "_DEBUG" /GZ
|
||||
LINKD = link.exe /incremental:yes /debug
|
||||
|
||||
CFLAGS = /I "../include" /nologo /W3 /GX /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
LFLAGS = /nologo /out:$(PROGRAM_NAME) /subsystem:console /machine:I386
|
||||
LINKLIBS = wsock32.lib libcurl.lib
|
||||
LINKLIBS_DEBUG = wsock32.lib libcurld.lib
|
||||
|
||||
RELEASE_OBJS= \
|
||||
hugehelpr.obj \
|
||||
writeoutr.obj \
|
||||
urlglobr.obj \
|
||||
mainr.obj
|
||||
|
||||
DEBUG_OBJS= \
|
||||
hugehelpd.obj \
|
||||
writeoutd.obj \
|
||||
urlglobd.obj \
|
||||
maind.obj
|
||||
|
||||
LINK_OBJS= \
|
||||
hugehelp.obj \
|
||||
writeout.obj \
|
||||
urlglob.obj \
|
||||
main.obj
|
||||
|
||||
all : release
|
||||
|
||||
release: $(RELEASE_OBJS)
|
||||
$(LINKR) $(LFLAGS) $(LINKLIBS) $(LINK_OBJS)
|
||||
|
||||
debug: $(DEBUG_OBJS)
|
||||
$(LINKD) $(LFLAGS) $(LINKLIBS_DEBUG) $(LINK_OBJS)
|
||||
|
||||
## Release
|
||||
hugehelpr.obj: hugehelp.c
|
||||
$(CCR) $(CFLAGS) /Zm200 hugehelp.c
|
||||
writeoutr.obj: writeout.c
|
||||
$(CCR) $(CFLAGS) writeout.c
|
||||
urlglobr.obj: urlglob.c
|
||||
$(CCR) $(CFLAGS) urlglob.c
|
||||
mainr.obj: main.c
|
||||
$(CCR) $(CFLAGS) main.c
|
||||
|
||||
## Debug
|
||||
hugehelpd.obj: hugehelp.c
|
||||
$(CCD) $(CFLAGS) /Zm200 hugehelp.c
|
||||
writeoutd.obj: writeout.c
|
||||
$(CCD) $(CFLAGS) writeout.c
|
||||
urlglobd.obj: urlglob.c
|
||||
$(CCD) $(CFLAGS) urlglob.c
|
||||
maind.obj: main.c
|
||||
$(CCD) $(CFLAGS) main.c
|
||||
|
||||
clean:
|
||||
-@erase hugehelp.obj
|
||||
-@erase main.obj
|
||||
-@erase vc60.idb
|
||||
-@erase vc60.pdb
|
||||
-@erase vc60.pch
|
||||
-@erase curl.ilk
|
||||
-@erase curl.pdb
|
||||
|
||||
distrib: clean
|
||||
-@erase $(PROGRAM_NAME)
|
||||
|
||||
########################################################
|
||||
## Makefile for building curl.exe with MSVC6
|
||||
## Use: nmake -f makefile.vc6 [release | debug]
|
||||
## (default is release)
|
||||
##
|
||||
## Comments to: Troy Engel <tengel@sonic.net>
|
||||
## Updated by: Craig Davison <cd@securityfocus.com>
|
||||
|
||||
PROGRAM_NAME = curl.exe
|
||||
|
||||
########################################################
|
||||
## Nothing more to do below this line!
|
||||
|
||||
## Release
|
||||
CCR = cl.exe /MD /O2 /D "NDEBUG"
|
||||
LINKR = link.exe /incremental:no /libpath:"../lib"
|
||||
|
||||
## Debug
|
||||
CCD = cl.exe /MDd /Gm /ZI /Od /D "_DEBUG" /GZ
|
||||
LINKD = link.exe /incremental:yes /debug
|
||||
|
||||
CFLAGS = /I "../include" /nologo /W3 /GX /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
LFLAGS = /nologo /out:$(PROGRAM_NAME) /subsystem:console /machine:I386
|
||||
LINKLIBS = wsock32.lib libcurl.lib
|
||||
LINKLIBS_DEBUG = wsock32.lib libcurld.lib
|
||||
|
||||
RELEASE_OBJS= \
|
||||
hugehelpr.obj \
|
||||
writeoutr.obj \
|
||||
urlglobr.obj \
|
||||
mainr.obj
|
||||
|
||||
DEBUG_OBJS= \
|
||||
hugehelpd.obj \
|
||||
writeoutd.obj \
|
||||
urlglobd.obj \
|
||||
maind.obj
|
||||
|
||||
LINK_OBJS= \
|
||||
hugehelp.obj \
|
||||
writeout.obj \
|
||||
urlglob.obj \
|
||||
main.obj
|
||||
|
||||
all : release
|
||||
|
||||
release: $(RELEASE_OBJS)
|
||||
$(LINKR) $(LFLAGS) $(LINKLIBS) $(LINK_OBJS)
|
||||
|
||||
debug: $(DEBUG_OBJS)
|
||||
$(LINKD) $(LFLAGS) $(LINKLIBS_DEBUG) $(LINK_OBJS)
|
||||
|
||||
## Release
|
||||
hugehelpr.obj: hugehelp.c
|
||||
$(CCR) $(CFLAGS) /Zm200 hugehelp.c
|
||||
writeoutr.obj: writeout.c
|
||||
$(CCR) $(CFLAGS) writeout.c
|
||||
urlglobr.obj: urlglob.c
|
||||
$(CCR) $(CFLAGS) urlglob.c
|
||||
mainr.obj: main.c
|
||||
$(CCR) $(CFLAGS) main.c
|
||||
|
||||
## Debug
|
||||
hugehelpd.obj: hugehelp.c
|
||||
$(CCD) $(CFLAGS) /Zm200 hugehelp.c
|
||||
writeoutd.obj: writeout.c
|
||||
$(CCD) $(CFLAGS) writeout.c
|
||||
urlglobd.obj: urlglob.c
|
||||
$(CCD) $(CFLAGS) urlglob.c
|
||||
maind.obj: main.c
|
||||
$(CCD) $(CFLAGS) main.c
|
||||
|
||||
clean:
|
||||
-@erase hugehelp.obj
|
||||
-@erase main.obj
|
||||
-@erase vc60.idb
|
||||
-@erase vc60.pdb
|
||||
-@erase vc60.pch
|
||||
-@erase curl.ilk
|
||||
-@erase curl.pdb
|
||||
|
||||
distrib: clean
|
||||
-@erase $(PROGRAM_NAME)
|
||||
|
||||
|
214
src/hugehelp.c
214
src/hugehelp.c
@@ -53,12 +53,19 @@ puts (
|
||||
" append to the target file instead of overwriting it. If\n"
|
||||
" the file doesn't exist, it will be created.\n"
|
||||
"\n"
|
||||
" If this option is used twice, the second one will dis<69>\n"
|
||||
" able append mode again.\n"
|
||||
"\n"
|
||||
" -A/--user-agent <agent string>\n"
|
||||
" (HTTP) Specify the User-Agent string to send to the\n"
|
||||
" HTTP server. Some badly done CGIs fail if its not set\n"
|
||||
" to \"Mozilla/4.0\". To encode blanks in the string, sur<75>\n"
|
||||
" round the string with single quote marks. This can\n"
|
||||
" (HTTP) Specify the User-Agent string to send to the\n"
|
||||
" HTTP server. Some badly done CGIs fail if its not set\n"
|
||||
" to \"Mozilla/4.0\". To encode blanks in the string,\n"
|
||||
" surround the string with single quote marks. This can\n"
|
||||
" also be set with the -H/--header flag of course.\n"
|
||||
"\n"
|
||||
" If this option is used more than once, the last one\n"
|
||||
" will be the one to be used.\n"
|
||||
"\n"
|
||||
" -b/--cookie <name=data>\n"
|
||||
" (HTTP) Pass the data to the HTTP server as a cookie. It\n"
|
||||
" is supposedly the data previously received from the\n"
|
||||
@@ -80,12 +87,18 @@ puts (
|
||||
" To store cookies, save the HTTP headers to a file using\n"
|
||||
" -D/--dump-header!\n"
|
||||
"\n"
|
||||
" If this option is used more than once, the last one\n"
|
||||
" will be the one to be used.\n"
|
||||
"\n"
|
||||
" -B/--use-ascii\n"
|
||||
" Use ASCII transfer when getting an FTP file or LDAP\n"
|
||||
" info. For FTP, this can also be enforced by using an\n"
|
||||
" URL that ends with \";type=A\". This option causes data\n"
|
||||
" Use ASCII transfer when getting an FTP file or LDAP\n"
|
||||
" info. For FTP, this can also be enforced by using an\n"
|
||||
" URL that ends with \";type=A\". This option causes data\n"
|
||||
" sent to stdout to be in text mode for win32 systems.\n"
|
||||
"\n"
|
||||
" If this option is used twice, the second one will dis<69>\n"
|
||||
" able ASCII usage.\n"
|
||||
"\n"
|
||||
" -c/--continue\n"
|
||||
" Deprecated. Use '-C -' instead. Continue/Resume a pre<72>\n"
|
||||
" vious file transfer. This instructs curl to continue\n"
|
||||
@@ -107,17 +120,20 @@ puts (
|
||||
" HTTP resume is only possible with HTTP/1.1 or later\n"
|
||||
" servers.\n"
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one\n"
|
||||
" will be used.\n"
|
||||
"\n"
|
||||
" -d/--data <data>\n"
|
||||
" (HTTP) Sends the specified data in a POST request to\n"
|
||||
" the HTTP server. Note that the data is sent exactly as\n"
|
||||
" specified with no extra processing (with all newlines\n"
|
||||
" cut off). The data is expected to be \"url-encoded\".\n"
|
||||
" This will cause curl to pass the data to the server\n"
|
||||
" (HTTP) Sends the specified data in a POST request to\n"
|
||||
" the HTTP server. Note that the data is sent exactly as\n"
|
||||
" specified with no extra processing (with all newlines\n"
|
||||
" cut off). The data is expected to be \"url-encoded\".\n"
|
||||
" This will cause curl to pass the data to the server\n"
|
||||
" using the content-type application/x-www-form-urlen<65>\n"
|
||||
" coded. Compare to -F. If more than one -d/--data option\n"
|
||||
" is used on the same command line, the data pieces spec<65>\n"
|
||||
" ified will be merged together with a separating &-let<65>\n"
|
||||
" ter. Thus, using '-d name=daniel -d skill=lousy' would\n"
|
||||
" ified will be merged together with a separating &-let<65>\n"
|
||||
" ter. Thus, using '-d name=daniel -d skill=lousy' would\n"
|
||||
" generate a post chunk that looks like\n"
|
||||
"\n"
|
||||
" If you start the data with the letter @, the rest\n"
|
||||
@@ -131,9 +147,15 @@ puts (
|
||||
"\n"
|
||||
" -d/--data is the same as --data-ascii.\n"
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one\n"
|
||||
" will be used.\n"
|
||||
"\n"
|
||||
" --data-ascii <data>\n"
|
||||
" (HTTP) This is an alias for the -d/--data option.\n"
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one\n"
|
||||
" will be used.\n"
|
||||
"\n"
|
||||
" --data-binary <data>\n"
|
||||
" (HTTP) This posts data in a similar manner as --data-\n"
|
||||
" ascii does, although when using this option the entire\n"
|
||||
@@ -141,6 +163,9 @@ puts (
|
||||
" to post a binary file without the strip-newlines fea<65>\n"
|
||||
" ture of the --data-ascii option, this is for you.\n"
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one\n"
|
||||
" will be used.\n"
|
||||
"\n"
|
||||
" -D/--dump-header <file>\n"
|
||||
" (HTTP/FTP) Write the HTTP headers to this file. Write\n"
|
||||
" the FTP file info to this file if -I/--head is used.\n"
|
||||
@@ -150,6 +175,9 @@ puts (
|
||||
" could then be read in a second curl invoke by using the\n"
|
||||
" -b/--cookie option!\n"
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one\n"
|
||||
" will be used.\n"
|
||||
"\n"
|
||||
" -e/--referer <URL>\n"
|
||||
" (HTTP) Sends the \"Referer Page\" information to the HTTP\n"
|
||||
" server. This can also be set with the -H/--header flag\n"
|
||||
@@ -159,6 +187,9 @@ puts (
|
||||
" header. The \";auto\" string can be used alone, even if\n"
|
||||
" you don't set an initial referer.\n"
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one\n"
|
||||
" will be used.\n"
|
||||
"\n"
|
||||
" -E/--cert <certificate[:password]>\n"
|
||||
" (HTTPS) Tells curl to use the specified certificate\n"
|
||||
" file when getting a file with HTTPS. The certificate\n"
|
||||
@@ -167,21 +198,30 @@ puts (
|
||||
" that this certificate is the private key and the pri<72>\n"
|
||||
" vate certificate concatenated!\n"
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one\n"
|
||||
" will be used.\n"
|
||||
"\n"
|
||||
" --cacert <CA certificate>\n"
|
||||
" (HTTPS) Tells curl to use the specified certificate\n"
|
||||
" file to verify the peer. The certificate must be in PEM\n"
|
||||
" format.\n"
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one\n"
|
||||
" will be used.\n"
|
||||
"\n"
|
||||
" -f/--fail\n"
|
||||
" (HTTP) Fail silently (no output at all) on server\n"
|
||||
" errors. This is mostly done like this to better enable\n"
|
||||
" scripts etc to better deal with failed attempts. In\n"
|
||||
" normal cases when a HTTP server fails to deliver a doc<6F>\n"
|
||||
" ument, it returns a HTML document stating so (which\n"
|
||||
" often also describes why and more). This flag will pre<72>\n"
|
||||
" vent curl from outputting that and fail silently\n"
|
||||
" often also describes why and more). This flag will\n"
|
||||
" prevent curl from outputting that and fail silently\n"
|
||||
" instead.\n"
|
||||
"\n"
|
||||
" If this option is used twice, the second will again\n"
|
||||
" disable silent failure.\n"
|
||||
"\n"
|
||||
" -F/--form <name=content>\n"
|
||||
" (HTTP) This lets curl emulate a filled in form in which\n"
|
||||
" a user has pressed the submit button. This causes curl\n"
|
||||
@@ -202,8 +242,12 @@ puts (
|
||||
"\n"
|
||||
" To read the file's content from stdin insted of a file,\n"
|
||||
" use - where the file name should've been. This goes for\n"
|
||||
);
|
||||
puts(
|
||||
" both @ and < constructs.\n"
|
||||
"\n"
|
||||
" This option can be used multiple times.\n"
|
||||
"\n"
|
||||
" -h/--help\n"
|
||||
" Usage help.\n"
|
||||
"\n"
|
||||
@@ -214,16 +258,20 @@ puts (
|
||||
" as one of the internal ones curl would use, your exter<65>\n"
|
||||
" nally set header will be used instead of the internal\n"
|
||||
" one. This allows you to make even trickier stuff than\n"
|
||||
" curl would normally do. You should not replace\n"
|
||||
" internally set headers without knowing perfectly well\n"
|
||||
" what you're doing. Replacing an internal header with\n"
|
||||
" one without content on the right side of the colon will\n"
|
||||
" curl would normally do. You should not replace inter<65>\n"
|
||||
" nally set headers without knowing perfectly well what\n"
|
||||
" you're doing. Replacing an internal header with one\n"
|
||||
" without content on the right side of the colon will\n"
|
||||
" prevent that header from appearing.\n"
|
||||
"\n"
|
||||
" This option can be used multiple times.\n"
|
||||
"\n"
|
||||
" -i/--include\n"
|
||||
" (HTTP) Include the HTTP-header in the output. The HTTP-\n"
|
||||
" header includes things like server-name, date of the\n"
|
||||
" document, HTTP-version and more...\n"
|
||||
" If this option is used twice, the second will again\n"
|
||||
" disable header include.\n"
|
||||
"\n"
|
||||
" --interface <name>\n"
|
||||
" Perform an operation using a specified interface. You\n"
|
||||
@@ -231,8 +279,9 @@ puts (
|
||||
" example could look like:\n"
|
||||
"\n"
|
||||
" curl --interface eth0:1 http://www.netscape.com/\n"
|
||||
);
|
||||
puts(
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one\n"
|
||||
" will be used.\n"
|
||||
"\n"
|
||||
" -I/--head\n"
|
||||
" (HTTP/FTP) Fetch the HTTP-header only! HTTP-servers\n"
|
||||
@@ -240,6 +289,9 @@ puts (
|
||||
" but the header of a document. When used on a FTP file,\n"
|
||||
" curl displays the file size only.\n"
|
||||
"\n"
|
||||
" If this option is used twice, the second will again\n"
|
||||
" disable header only.\n"
|
||||
"\n"
|
||||
" --krb4 <level>\n"
|
||||
" (FTP) Enable kerberos4 authentication and use. The\n"
|
||||
" level must be entered and should be one of 'clear',\n"
|
||||
@@ -247,17 +299,25 @@ puts (
|
||||
" level that is not one of these, 'private' will instead\n"
|
||||
" be used.\n"
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one\n"
|
||||
" will be used.\n"
|
||||
"\n"
|
||||
" -K/--config <config file>\n"
|
||||
" Specify which config file to read curl arguments from.\n"
|
||||
" The config file is a text file in which command line\n"
|
||||
" arguments can be written which then will be used as if\n"
|
||||
" they were written on the actual command line. If the\n"
|
||||
" first column of a config line is a '#' character, the\n"
|
||||
" rest of the line will be treated as a comment.\n"
|
||||
" they were written on the actual command line. Options\n"
|
||||
" and their parameters must be specified on the same con<6F>\n"
|
||||
" fig file line. If the parameter is to contain white\n"
|
||||
" spaces, the parameter must be inclosed within quotes.\n"
|
||||
" If the first column of a config line is a '#' charac<61>\n"
|
||||
" ter, the rest of the line will be treated as a comment.\n"
|
||||
"\n"
|
||||
" Specify the filename as '-' to make curl read the file\n"
|
||||
" from stdin.\n"
|
||||
"\n"
|
||||
" This option can be used multiple times.\n"
|
||||
"\n"
|
||||
" -l/--list-only\n"
|
||||
" (FTP) When listing an FTP directory, this switch forces\n"
|
||||
" a name-only view. Especially useful if you want to\n"
|
||||
@@ -265,6 +325,9 @@ puts (
|
||||
" the normal directory view doesn't use a standard look\n"
|
||||
" or format.\n"
|
||||
"\n"
|
||||
" If this option is used twice, the second will again\n"
|
||||
" disable list only.\n"
|
||||
"\n"
|
||||
" -L/--location\n"
|
||||
" (HTTP/HTTPS) If the server reports that the requested\n"
|
||||
" page has a different location (indicated with the\n"
|
||||
@@ -275,6 +338,9 @@ puts (
|
||||
" curl will automatically switch to GET after the initial\n"
|
||||
" POST has been done.\n"
|
||||
"\n"
|
||||
" If this option is used twice, the second will again\n"
|
||||
" disable location following.\n"
|
||||
"\n"
|
||||
" -m/--max-time <seconds>\n"
|
||||
" Maximum time in seconds that you allow the whole opera<72>\n"
|
||||
" tion to take. This is useful for preventing your batch\n"
|
||||
@@ -282,6 +348,9 @@ puts (
|
||||
" links going down. This doesn't work fully in win32\n"
|
||||
" systems.\n"
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one\n"
|
||||
" will be used.\n"
|
||||
"\n"
|
||||
" -M/--manual\n"
|
||||
" Manual. Display the huge help text.\n"
|
||||
"\n"
|
||||
@@ -301,6 +370,9 @@ puts (
|
||||
"\n"
|
||||
" machine host.domain.com login myself password secret\n"
|
||||
"\n"
|
||||
" If this option is used twice, the second will again\n"
|
||||
" disable netrc usage.\n"
|
||||
"\n"
|
||||
" -N/--no-buffer\n"
|
||||
" Disables the buffering of the output stream. In normal\n"
|
||||
" work situations, curl will use a standard buffered out<75>\n"
|
||||
@@ -309,6 +381,9 @@ puts (
|
||||
" the data arrives. Using this option will disable that\n"
|
||||
" buffering.\n"
|
||||
"\n"
|
||||
" If this option is used twice, the second will again\n"
|
||||
" switch on buffering.\n"
|
||||
"\n"
|
||||
" -o/--output <file>\n"
|
||||
" Write output to <file> instead of stdout. If you are\n"
|
||||
" using {} or [] to fetch multiple documents, you can use\n"
|
||||
@@ -321,6 +396,10 @@ puts (
|
||||
" or use several variables like:\n"
|
||||
"\n"
|
||||
" curl http://{site,host}.host[1-5].com -o \"#1_#2\"\n"
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one\n"
|
||||
" will be used.\n"
|
||||
"\n"
|
||||
" -O/--remote-name\n"
|
||||
" Write output to a local file named like the remote file\n"
|
||||
" we get. (Only the file part of the remote file is used,\n"
|
||||
@@ -335,6 +414,9 @@ puts (
|
||||
" nect to the remote port number curl wants to tunnel\n"
|
||||
" through to.\n"
|
||||
"\n"
|
||||
" If this option is used twice, the second will again\n"
|
||||
" disable proxy tunnel.\n"
|
||||
"\n"
|
||||
" -P/--ftpport <address>\n"
|
||||
" (FTP) Reverses the initiator/listener roles when con<6F>\n"
|
||||
" necting with ftp. This switch makes Curl use the PORT\n"
|
||||
@@ -342,7 +424,6 @@ puts (
|
||||
" server to connect to the client's specified address and\n"
|
||||
" port, while PASV asks the server for an ip address and\n"
|
||||
" port to connect to. <address> should be one of:\n"
|
||||
"\n"
|
||||
" interface i.e \"eth0\" to specify which interface's IP\n"
|
||||
" address you want to use (Unix only)\n"
|
||||
"\n"
|
||||
@@ -354,6 +435,9 @@ puts (
|
||||
" - (any single-letter string) to make it pick\n"
|
||||
" the machine's default\n"
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one will be\n"
|
||||
" used.\n"
|
||||
"\n"
|
||||
" -q If used as the first parameter on the command line, the\n"
|
||||
" $HOME/.curlrc file will not be read and used as a con<6F>\n"
|
||||
" fig file.\n"
|
||||
@@ -370,6 +454,8 @@ puts (
|
||||
" returns failure for one of the commands, the entire\n"
|
||||
" operation will be aborted.\n"
|
||||
"\n"
|
||||
" This option can be used multiple times.\n"
|
||||
"\n"
|
||||
" -r/--range <range>\n"
|
||||
" (HTTP/FTP) Retrieve a byte range (i.e a partial docu<63>\n"
|
||||
" ment) from a HTTP/1.1 or FTP server. Ranges can be\n"
|
||||
@@ -403,14 +489,25 @@ puts (
|
||||
" stop' (optionally with one of the numbers omitted). It\n"
|
||||
" depends on the non-RFC command SIZE.\n"
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one will be\n"
|
||||
" used.\n"
|
||||
"\n"
|
||||
" -s/--silent\n"
|
||||
" Silent mode. Don't show progress meter or error mes<65>\n"
|
||||
" sages. Makes Curl mute.\n"
|
||||
"\n"
|
||||
" If this option is used twice, the second will again\n"
|
||||
" disable mute.\n"
|
||||
"\n"
|
||||
" -S/--show-error\n"
|
||||
" When used with -s it makes curl show error message if\n"
|
||||
" it fails.\n"
|
||||
"\n"
|
||||
" If this option is used twice, the second will again\n"
|
||||
);
|
||||
puts(
|
||||
" disable show error.\n"
|
||||
"\n"
|
||||
" -t/--upload\n"
|
||||
" Deprecated. Use '-T -' instead. Transfer the stdin\n"
|
||||
" data to the specified file. Curl will read everything\n"
|
||||
@@ -429,21 +526,33 @@ puts (
|
||||
" to fail. If this is used on a http(s) server, the PUT\n"
|
||||
" command will be used.\n"
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one\n"
|
||||
" will be used.\n"
|
||||
"\n"
|
||||
" -u/--user <user:password>\n"
|
||||
" Specify user and password to use when fetching. See\n"
|
||||
" README.curl for detailed examples of how to use this.\n"
|
||||
" If no password is specified, curl will ask for it\n"
|
||||
" interactively.\n"
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one\n"
|
||||
" will be used.\n"
|
||||
"\n"
|
||||
" -U/--proxy-user <user:password>\n"
|
||||
" Specify user and password to use for Proxy authentica<63>\n"
|
||||
" tion. If no password is specified, curl will ask for it\n"
|
||||
" interactively.\n"
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one\n"
|
||||
" will be used.\n"
|
||||
"\n"
|
||||
" --url <URL>\n"
|
||||
" Set the URL to fetch. This option is mostly handy when\n"
|
||||
" you wanna specify URL in a config file.\n"
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one\n"
|
||||
" will be used.\n"
|
||||
"\n"
|
||||
" -v/--verbose\n"
|
||||
" Makes the fetching more verbose/talkative. Mostly\n"
|
||||
" usable for debugging. Lines starting with '>' means\n"
|
||||
@@ -451,6 +560,9 @@ puts (
|
||||
" is hidden in normal cases and lines starting with '*'\n"
|
||||
" means additional info provided by curl.\n"
|
||||
"\n"
|
||||
" If this option is used twice, the second will again\n"
|
||||
" disable verbose.\n"
|
||||
"\n"
|
||||
" -V/--version\n"
|
||||
" Displays the full version of curl, libcurl and other\n"
|
||||
" 3rd party libraries linked with the executable.\n"
|
||||
@@ -469,14 +581,11 @@ puts (
|
||||
" %{variable_name} and to output a normal % you just\n"
|
||||
" write them like %%. You can output a newline by using\n"
|
||||
" \\n, a carrige return with \\r and a tab space with \\t.\n"
|
||||
"\n"
|
||||
" NOTE: The %-letter is a special letter in the\n"
|
||||
" win32-environment, where all occurrences of % must be\n"
|
||||
" doubled when using this option.\n"
|
||||
"\n"
|
||||
" Available variables are at this point:\n"
|
||||
);
|
||||
puts(
|
||||
"\n"
|
||||
" url_effective The URL that was fetched last. This is\n"
|
||||
" mostly meaningful if you've told curl to\n"
|
||||
@@ -523,11 +632,16 @@ puts (
|
||||
"\n"
|
||||
" speed_upload The average upload speed that curl mea<65>\n"
|
||||
" sured for the complete upload.\n"
|
||||
" If this option is used serveral times, the last one will be\n"
|
||||
" used.\n"
|
||||
"\n"
|
||||
" -x/--proxy <proxyhost[:port]>\n"
|
||||
" Use specified proxy. If the port number is not speci<63>\n"
|
||||
" fied, it is assumed at port 1080.\n"
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one\n"
|
||||
" will be used.\n"
|
||||
"\n"
|
||||
" -X/--request <command>\n"
|
||||
" (HTTP) Specifies a custom request to use when communi<6E>\n"
|
||||
" cating with the HTTP server. The specified request\n"
|
||||
@@ -537,17 +651,26 @@ puts (
|
||||
" (FTP) Specifies a custom FTP command to use instead of\n"
|
||||
" LIST when doing file lists with ftp.\n"
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one\n"
|
||||
" will be used.\n"
|
||||
"\n"
|
||||
" -y/--speed-time <time>\n"
|
||||
" If a download is slower than speed-limit bytes per sec<65>\n"
|
||||
" ond during a speed-time period, the download gets\n"
|
||||
" aborted. If speed-time is used, the default speed-limit\n"
|
||||
" will be 1 unless set with -y.\n"
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one\n"
|
||||
" will be used.\n"
|
||||
"\n"
|
||||
" -Y/--speed-limit <speed>\n"
|
||||
" If a download is slower than this given speed, in bytes\n"
|
||||
" per second, for speed-time seconds it gets aborted.\n"
|
||||
" speed-time is set with -Y and is 30 if not set.\n"
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one\n"
|
||||
" will be used.\n"
|
||||
"\n"
|
||||
" -z/--time-cond <date expression>\n"
|
||||
" (HTTP) Request to get a file that has been modified\n"
|
||||
" later than the given time and date, or one that has\n"
|
||||
@@ -561,6 +684,8 @@ puts (
|
||||
" request for a document that is older than the given\n"
|
||||
" date/time, default is a document that is newer than the\n"
|
||||
" specified date/time.\n"
|
||||
" If this option is used serveral times, the last one\n"
|
||||
" will be used.\n"
|
||||
"\n"
|
||||
" -3/--sslv3\n"
|
||||
" (HTTPS) Forces curl to use SSL version 3 when negotiat<61>\n"
|
||||
@@ -574,15 +699,25 @@ puts (
|
||||
" Make curl display progress information as a progress\n"
|
||||
" bar instead of the default statistics.\n"
|
||||
"\n"
|
||||
" If this option is used twice, the second will again\n"
|
||||
" disable the progress bar.\n"
|
||||
"\n"
|
||||
" --crlf\n"
|
||||
" (FTP) Convert LF to CRLF in upload. Useful for MVS\n"
|
||||
" (OS/390).\n"
|
||||
"\n"
|
||||
" If this option is used twice, the second will again\n"
|
||||
" disable crlf converting.\n"
|
||||
"\n"
|
||||
" --stderr <file>\n"
|
||||
" Redirect all writes to stderr to the specified file\n"
|
||||
" instead. If the file name is a plain '-', it is instead\n"
|
||||
" written to stdout. This option has no point when you're\n"
|
||||
" using a shell with decent redirecting capabilities.\n"
|
||||
"\n"
|
||||
" If this option is used serveral times, the last one\n"
|
||||
" will be used.\n"
|
||||
"\n"
|
||||
"FILES\n"
|
||||
" ~/.curlrc\n"
|
||||
" Default config file.\n"
|
||||
@@ -599,7 +734,6 @@ puts (
|
||||
"\n"
|
||||
" GOPHER_PROXY [protocol://]<host>[:port]\n"
|
||||
" Sets proxy server to use for GOPHER.\n"
|
||||
"\n"
|
||||
" ALL_PROXY [protocol://]<host>[:port]\n"
|
||||
" Sets proxy server to use if no protocol-specific proxy\n"
|
||||
" is set.\n"
|
||||
@@ -634,12 +768,15 @@ puts (
|
||||
" resolved.\n"
|
||||
"\n"
|
||||
" 7 Failed to connect to host.\n"
|
||||
"\n"
|
||||
" 8 FTP weird server reply. The server sent data curl\n"
|
||||
" couldn't parse.\n"
|
||||
"\n"
|
||||
" 9 FTP access denied. The server denied login.\n"
|
||||
"\n"
|
||||
" 10 FTP user/password incorrect. Either one or both were\n"
|
||||
);
|
||||
puts(
|
||||
" not accepted by the server.\n"
|
||||
"\n"
|
||||
" 11 FTP weird PASS reply. Curl couldn't parse the reply\n"
|
||||
@@ -650,7 +787,6 @@ puts (
|
||||
"\n"
|
||||
" 13 FTP weird PASV reply, Curl couldn't parse the reply\n"
|
||||
" sent to the PASV request.\n"
|
||||
"\n"
|
||||
" 14 FTP weird 227 format. Curl couldn't parse the 227-line\n"
|
||||
" the server sent.\n"
|
||||
"\n"
|
||||
@@ -685,6 +821,7 @@ puts (
|
||||
" operation.\n"
|
||||
"\n"
|
||||
" 26 Read error. Various reading problems.\n"
|
||||
"\n"
|
||||
" 27 Out of memory. A memory allocation request failed.\n"
|
||||
"\n"
|
||||
" 28 Operation timeout. The specified time-out period was\n"
|
||||
@@ -702,7 +839,6 @@ puts (
|
||||
" 959.\n"
|
||||
"\n"
|
||||
" 33 HTTP range error. The range \"command\" didn't work.\n"
|
||||
"\n"
|
||||
" 34 HTTP post error. Internal post-request generation\n"
|
||||
" error.\n"
|
||||
"\n"
|
||||
@@ -736,6 +872,7 @@ puts (
|
||||
"\n"
|
||||
" 46 Bad password entered. An error was signalled when the\n"
|
||||
" password was entered.\n"
|
||||
"\n"
|
||||
" 47 Too many redirects. When following redirects, curl hit\n"
|
||||
" the maximum amount.\n"
|
||||
"\n"
|
||||
@@ -766,8 +903,6 @@ puts (
|
||||
" - Douglas E. Wegscheid <wegscd@whirlpool.com>\n"
|
||||
" - Mark Butler <butlerm@xmission.com>\n"
|
||||
" - Eric Thelin <eric@generation-i.com>\n"
|
||||
);
|
||||
puts(
|
||||
" - Marc Boucher <marc@mbsi.ca>\n"
|
||||
" - Greg Onufer <Greg.Onufer@Eng.Sun.COM>\n"
|
||||
" - Doug Kaufman <dkaufman@rahul.net>\n"
|
||||
@@ -807,7 +942,6 @@ puts (
|
||||
"\n"
|
||||
"WWW\n"
|
||||
" http://curl.haxx.se\n"
|
||||
"\n"
|
||||
"FTP\n"
|
||||
" ftp://ftp.sunet.se/pub/www/utilities/curl/\n"
|
||||
"\n"
|
||||
@@ -980,6 +1114,8 @@ puts (
|
||||
" receives in order to let the user see all client-server interaction.\n"
|
||||
"\n"
|
||||
" curl -v ftp://ftp.upload.com/\n"
|
||||
);
|
||||
puts(
|
||||
"\n"
|
||||
"DETAILED INFORMATION\n"
|
||||
"\n"
|
||||
@@ -1076,8 +1212,6 @@ puts (
|
||||
"\n"
|
||||
" curl -F \"file=@cooltext.txt\" -F \"yourname=Daniel\" \\\n"
|
||||
" -F \"filedescription=Cool text file with cool text inside\" \\\n"
|
||||
);
|
||||
puts(
|
||||
" http://www.post.com/postit.cgi\n"
|
||||
"\n"
|
||||
" So, to send two files in one post you can do it in two ways:\n"
|
||||
@@ -1227,6 +1361,8 @@ puts (
|
||||
" readable. You can separate the options and the parameter with spaces, or\n"
|
||||
" with = or :. Comments can be used within the file. If the first letter on a\n"
|
||||
" line is a '#'-letter the rest of the line is treated as a comment.\n"
|
||||
);
|
||||
puts(
|
||||
"\n"
|
||||
" If you want the parameter to contain spaces, you must inclose the entire\n"
|
||||
" parameter within double quotes (\"). Within those quotes, you specify a\n"
|
||||
@@ -1347,8 +1483,6 @@ puts (
|
||||
" curl https://www.secure-site.com\n"
|
||||
"\n"
|
||||
" Curl is also capable of using your personal certificates to get/post files\n"
|
||||
);
|
||||
puts(
|
||||
" from sites that require valid certificates. The only drawback is that the\n"
|
||||
" certificate needs to be in PEM-format. PEM is a standard and open format to\n"
|
||||
" store certificates with, but it is not used by the most commonly used\n"
|
||||
@@ -1519,6 +1653,8 @@ puts (
|
||||
" authentication is used.\n"
|
||||
"\n"
|
||||
" A very simple .netrc file could look something like:\n"
|
||||
);
|
||||
puts(
|
||||
"\n"
|
||||
" machine curl.haxx.se login iamdaniel password mysecret\n"
|
||||
"\n"
|
||||
|
61
src/main.c
61
src/main.c
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -1473,9 +1456,9 @@ operate(struct Configurable *config, int argc, char *argv[])
|
||||
#endif
|
||||
}
|
||||
for (i = 0; (url = next_url(urls)); ++i) {
|
||||
if (outfiles) {
|
||||
if (config->outfile) {
|
||||
free(config->outfile);
|
||||
config->outfile = outfiles;
|
||||
config->outfile = outfiles?strdup(outfiles):NULL;
|
||||
}
|
||||
|
||||
if (config->outfile || config->remotefile) {
|
||||
@@ -1486,13 +1469,14 @@ operate(struct Configurable *config, int argc, char *argv[])
|
||||
|
||||
if(!config->outfile && config->remotefile) {
|
||||
/* Find and get the remote file name */
|
||||
config->outfile=strstr(url, "://");
|
||||
if(config->outfile)
|
||||
config->outfile+=3;
|
||||
char * pc =strstr(url, "://");
|
||||
if(pc)
|
||||
pc+=3;
|
||||
else
|
||||
config->outfile=url;
|
||||
config->outfile = strdup(strrchr(config->outfile, '/'));
|
||||
if(!config->outfile || !strlen(++config->outfile)) {
|
||||
pc=url;
|
||||
pc = strrchr(pc, '/');
|
||||
config->outfile = (char *) NULL == pc ? NULL : strdup(pc+1) ;
|
||||
if(!config->outfile || !strlen(config->outfile)) {
|
||||
helpf("Remote file name has no length!\n");
|
||||
return CURLE_WRITE_ERROR;
|
||||
}
|
||||
@@ -1500,7 +1484,7 @@ operate(struct Configurable *config, int argc, char *argv[])
|
||||
else {
|
||||
/* fill '#1' ... '#9' terms from URL pattern */
|
||||
char *outfile = config->outfile;
|
||||
config->outfile = match_url(config->outfile, *urls);
|
||||
config->outfile = match_url(config->outfile, urls);
|
||||
free(outfile);
|
||||
}
|
||||
|
||||
@@ -1757,6 +1741,9 @@ operate(struct Configurable *config, int argc, char *argv[])
|
||||
free(url);
|
||||
|
||||
}
|
||||
if(outfiles)
|
||||
free(outfiles);
|
||||
|
||||
#ifdef MIME_SEPARATORS
|
||||
if (separator)
|
||||
printf("--%s--\n", MIMEseparator);
|
||||
|
39
src/setup.h
39
src/setup.h
@@ -7,38 +7,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
181
src/urlglob.c
181
src/urlglob.c
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -49,25 +32,23 @@
|
||||
#include "../lib/memdebug.h"
|
||||
#endif
|
||||
|
||||
char *glob_buffer;
|
||||
URLGlob *glob_expand;
|
||||
int glob_word(URLGlob *, char*, int);
|
||||
|
||||
int glob_word(char*, int);
|
||||
|
||||
int glob_set(char *pattern, int pos) {
|
||||
int glob_set(URLGlob *glob, char *pattern, int pos)
|
||||
{
|
||||
/* processes a set expression with the point behind the opening '{'
|
||||
','-separated elements are collected until the next closing '}'
|
||||
*/
|
||||
char* buf = glob_buffer;
|
||||
char* buf = glob->glob_buffer;
|
||||
URLPattern *pat;
|
||||
|
||||
pat = (URLPattern*)&glob_expand->pattern[glob_expand->size / 2];
|
||||
pat = (URLPattern*)&glob->pattern[glob->size / 2];
|
||||
/* patterns 0,1,2,... correspond to size=1,3,5,... */
|
||||
pat->type = UPTSet;
|
||||
pat->content.Set.size = 0;
|
||||
pat->content.Set.ptr_s = 0;
|
||||
pat->content.Set.elements = (char**)malloc(0);
|
||||
++glob_expand->size;
|
||||
++glob->size;
|
||||
|
||||
while (1) {
|
||||
switch (*pattern) {
|
||||
@@ -81,19 +62,22 @@ int glob_set(char *pattern, int pos) {
|
||||
case ',':
|
||||
case '}': /* set element completed */
|
||||
*buf = '\0';
|
||||
pat->content.Set.elements = realloc(pat->content.Set.elements, (pat->content.Set.size + 1) * sizeof(char*));
|
||||
pat->content.Set.elements =
|
||||
realloc(pat->content.Set.elements,
|
||||
(pat->content.Set.size + 1) * sizeof(char*));
|
||||
if (!pat->content.Set.elements) {
|
||||
printf("out of memory in set pattern\n");
|
||||
exit(CURLE_OUT_OF_MEMORY);
|
||||
}
|
||||
pat->content.Set.elements[pat->content.Set.size] = strdup(glob_buffer);
|
||||
pat->content.Set.elements[pat->content.Set.size] =
|
||||
strdup(glob->glob_buffer);
|
||||
++pat->content.Set.size;
|
||||
|
||||
if (*pattern == '}') /* entire set pattern completed */
|
||||
/* always check for a literal (may be "") between patterns */
|
||||
return pat->content.Set.size * glob_word(++pattern, ++pos);
|
||||
return pat->content.Set.size * glob_word(glob, ++pattern, ++pos);
|
||||
|
||||
buf = glob_buffer;
|
||||
buf = glob->glob_buffer;
|
||||
++pattern;
|
||||
++pos;
|
||||
break;
|
||||
@@ -115,7 +99,8 @@ int glob_set(char *pattern, int pos) {
|
||||
exit (CURLE_FAILED_INIT);
|
||||
}
|
||||
|
||||
int glob_range(char *pattern, int pos) {
|
||||
int glob_range(URLGlob *glob, char *pattern, int pos)
|
||||
{
|
||||
/* processes a range expression with the point behind the opening '['
|
||||
- char range: e.g. "a-z]", "B-Q]"
|
||||
- num range: e.g. "0-9]", "17-2000]"
|
||||
@@ -125,9 +110,9 @@ int glob_range(char *pattern, int pos) {
|
||||
URLPattern *pat;
|
||||
char *c;
|
||||
|
||||
pat = (URLPattern*)&glob_expand->pattern[glob_expand->size / 2];
|
||||
pat = (URLPattern*)&glob->pattern[glob->size / 2];
|
||||
/* patterns 0,1,2,... correspond to size=1,3,5,... */
|
||||
++glob_expand->size;
|
||||
++glob->size;
|
||||
|
||||
if (isalpha((int)*pattern)) { /* character range detected */
|
||||
pat->type = UPTCharRange;
|
||||
@@ -141,7 +126,7 @@ int glob_range(char *pattern, int pos) {
|
||||
pat->content.CharRange.ptr_c = pat->content.CharRange.min_c;
|
||||
/* always check for a literal (may be "") between patterns */
|
||||
return (pat->content.CharRange.max_c - pat->content.CharRange.min_c + 1) *
|
||||
glob_word(pattern + 4, pos + 4);
|
||||
glob_word(glob, pattern + 4, pos + 4);
|
||||
}
|
||||
if (isdigit((int)*pattern)) { /* numeric range detected */
|
||||
pat->type = UPTNumRange;
|
||||
@@ -162,17 +147,18 @@ int glob_range(char *pattern, int pos) {
|
||||
c = (char*)(strchr(pattern, ']') + 1); /* continue after next ']' */
|
||||
/* always check for a literal (may be "") between patterns */
|
||||
return (pat->content.NumRange.max_n - pat->content.NumRange.min_n + 1) *
|
||||
glob_word(c, pos + (c - pattern));
|
||||
glob_word(glob, c, pos + (c - pattern));
|
||||
}
|
||||
printf("error: illegal character in range specification at pos %d\n", pos);
|
||||
exit (CURLE_URL_MALFORMAT);
|
||||
}
|
||||
|
||||
int glob_word(char *pattern, int pos) {
|
||||
int glob_word(URLGlob *glob, char *pattern, int pos)
|
||||
{
|
||||
/* processes a literal string component of a URL
|
||||
special characters '{' and '[' branch to set/range processing functions
|
||||
*/
|
||||
char* buf = glob_buffer;
|
||||
char* buf = glob->glob_buffer;
|
||||
int litindex;
|
||||
|
||||
while (*pattern != '\0' && *pattern != '{' && *pattern != '[') {
|
||||
@@ -192,17 +178,17 @@ int glob_word(char *pattern, int pos) {
|
||||
++pos;
|
||||
}
|
||||
*buf = '\0';
|
||||
litindex = glob_expand->size / 2;
|
||||
litindex = glob->size / 2;
|
||||
/* literals 0,1,2,... correspond to size=0,2,4,... */
|
||||
glob_expand->literal[litindex] = strdup(glob_buffer);
|
||||
++glob_expand->size;
|
||||
glob->literal[litindex] = strdup(glob->glob_buffer);
|
||||
++glob->size;
|
||||
if (*pattern == '\0')
|
||||
return 1; /* singular URL processed */
|
||||
if (*pattern == '{') {
|
||||
return glob_set(++pattern, ++pos); /* process set pattern */
|
||||
return glob_set(glob, ++pattern, ++pos); /* process set pattern */
|
||||
}
|
||||
if (*pattern == '[') {
|
||||
return glob_range(++pattern, ++pos);/* process range pattern */
|
||||
return glob_range(glob, ++pattern, ++pos);/* process range pattern */
|
||||
}
|
||||
printf("internal error\n");
|
||||
exit (CURLE_FAILED_INIT);
|
||||
@@ -214,18 +200,26 @@ int glob_url(URLGlob** glob, char* url, int *urlnum)
|
||||
* We can deal with any-size, just make a buffer with the same length
|
||||
* as the specified URL!
|
||||
*/
|
||||
glob_buffer=(char *)malloc(strlen(url)+1);
|
||||
URLGlob *glob_expand;
|
||||
char *glob_buffer=(char *)malloc(strlen(url)+1);
|
||||
if(NULL == glob_buffer)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
||||
glob_expand = (URLGlob*)malloc(sizeof(URLGlob));
|
||||
if(NULL == glob_expand) {
|
||||
free(glob_buffer);
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
glob_expand->size = 0;
|
||||
*urlnum = glob_word(url, 1);
|
||||
glob_expand->urllen = strlen(url);
|
||||
glob_expand->glob_buffer = glob_buffer;
|
||||
*urlnum = glob_word(glob_expand, url, 1);
|
||||
*glob = glob_expand;
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
||||
void glob_cleanup(URLGlob* glob) {
|
||||
void glob_cleanup(URLGlob* glob)
|
||||
{
|
||||
int i, elem;
|
||||
|
||||
for (i = glob->size - 1; i >= 0; --i) {
|
||||
@@ -240,14 +234,14 @@ void glob_cleanup(URLGlob* glob) {
|
||||
}
|
||||
}
|
||||
}
|
||||
free(glob->glob_buffer);
|
||||
free(glob);
|
||||
free(glob_buffer);
|
||||
}
|
||||
|
||||
char *next_url(URLGlob *glob)
|
||||
{
|
||||
static int beenhere = 0;
|
||||
char *buf = glob_buffer;
|
||||
char *buf = glob->glob_buffer;
|
||||
URLPattern *pat;
|
||||
char *lit;
|
||||
signed int i;
|
||||
@@ -318,48 +312,83 @@ char *next_url(URLGlob *glob)
|
||||
}
|
||||
}
|
||||
*buf = '\0';
|
||||
return strdup(glob_buffer);
|
||||
return strdup(glob->glob_buffer);
|
||||
}
|
||||
|
||||
char *match_url(char *filename, URLGlob glob) {
|
||||
char *buf = glob_buffer;
|
||||
char *match_url(char *filename, URLGlob *glob)
|
||||
{
|
||||
char *target;
|
||||
URLPattern pat;
|
||||
int i;
|
||||
int allocsize;
|
||||
int stringlen=0;
|
||||
char numbuf[18];
|
||||
char *appendthis;
|
||||
size_t appendlen;
|
||||
|
||||
/* We cannot use the glob_buffer for storage here since the filename may
|
||||
* be longer than the URL we use. We allocate a good start size, then
|
||||
* we need to realloc in case of need.
|
||||
*/
|
||||
allocsize=strlen(filename);
|
||||
target = malloc(allocsize);
|
||||
if(NULL == target)
|
||||
return NULL; /* major failure */
|
||||
|
||||
while (*filename != '\0') {
|
||||
if (*filename == '#') {
|
||||
if (!isdigit((int)*++filename) ||
|
||||
*filename == '0') { /* only '#1' ... '#9' allowed */
|
||||
printf("illegal matching expression\n");
|
||||
exit(CURLE_URL_MALFORMAT);
|
||||
/* printf("illegal matching expression\n");
|
||||
exit(CURLE_URL_MALFORMAT);*/
|
||||
continue;
|
||||
}
|
||||
i = *filename - '1';
|
||||
if (i + 1 > glob.size / 2) {
|
||||
printf("match against nonexisting pattern\n");
|
||||
exit(CURLE_URL_MALFORMAT);
|
||||
if (i + 1 > glob->size / 2) {
|
||||
/*printf("match against nonexisting pattern\n");
|
||||
exit(CURLE_URL_MALFORMAT);*/
|
||||
continue;
|
||||
}
|
||||
pat = glob.pattern[i];
|
||||
pat = glob->pattern[i];
|
||||
switch (pat.type) {
|
||||
case UPTSet:
|
||||
strcpy(buf, pat.content.Set.elements[pat.content.Set.ptr_s]);
|
||||
buf += strlen(pat.content.Set.elements[pat.content.Set.ptr_s]);
|
||||
appendthis = pat.content.Set.elements[pat.content.Set.ptr_s];
|
||||
appendlen = strlen(pat.content.Set.elements[pat.content.Set.ptr_s]);
|
||||
break;
|
||||
case UPTCharRange:
|
||||
*buf++ = pat.content.CharRange.ptr_c;
|
||||
numbuf[0]=pat.content.CharRange.ptr_c;
|
||||
numbuf[1]=0;
|
||||
appendthis=numbuf;
|
||||
appendlen=1;
|
||||
break;
|
||||
case UPTNumRange:
|
||||
sprintf(buf, "%0*d", pat.content.NumRange.padlength, pat.content.NumRange.ptr_n);
|
||||
buf += strlen(buf);
|
||||
sprintf(numbuf, "%0*d", pat.content.NumRange.padlength, pat.content.NumRange.ptr_n);
|
||||
appendthis = numbuf;
|
||||
appendlen = strlen(numbuf);
|
||||
break;
|
||||
default:
|
||||
printf("internal error: invalid pattern type (%d)\n", pat.type);
|
||||
exit (CURLE_FAILED_INIT);
|
||||
return NULL;
|
||||
}
|
||||
++filename;
|
||||
}
|
||||
else
|
||||
*buf++ = *filename++;
|
||||
else {
|
||||
appendthis=filename++;
|
||||
appendlen=1;
|
||||
}
|
||||
if(appendlen + stringlen >= allocsize) {
|
||||
char *newstr;
|
||||
allocsize = (appendlen + stringlen)*2;
|
||||
newstr=realloc(target, allocsize);
|
||||
if(NULL ==newstr) {
|
||||
free(target);
|
||||
return NULL;
|
||||
}
|
||||
target=newstr;
|
||||
}
|
||||
memcpy(&target[stringlen], appendthis, appendlen);
|
||||
stringlen += appendlen;
|
||||
}
|
||||
*buf = '\0';
|
||||
return strdup(glob_buffer);
|
||||
target[stringlen]= '\0';
|
||||
return target;
|
||||
}
|
||||
|
@@ -7,38 +7,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
typedef enum {UPTSet=1,UPTCharRange,UPTNumRange} URLPatternType;
|
||||
|
||||
typedef struct {
|
||||
@@ -65,11 +48,13 @@ typedef struct {
|
||||
char* literal[10];
|
||||
URLPattern pattern[9];
|
||||
int size;
|
||||
int urllen;
|
||||
char *glob_buffer;
|
||||
} URLGlob;
|
||||
|
||||
int glob_url(URLGlob**, char*, int *);
|
||||
char* next_url(URLGlob*);
|
||||
char* match_url(char*, URLGlob);
|
||||
char* match_url(char*, URLGlob *);
|
||||
void glob_cleanup(URLGlob* glob);
|
||||
|
||||
#endif
|
||||
|
@@ -1,3 +1,3 @@
|
||||
#define CURL_NAME "curl"
|
||||
#define CURL_VERSION "7.5"
|
||||
#define CURL_VERSION "7.5.2"
|
||||
#define CURL_ID CURL_NAME " " CURL_VERSION " (" OS ") "
|
||||
|
@@ -5,38 +5,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1999.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@@ -7,38 +7,21 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
* In order to be useful for every potential user, curl and libcurl are
|
||||
* dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
*
|
||||
* The Original Code is Curl.
|
||||
* 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 MPL or the MIT/X-derivate
|
||||
* licenses. You may pick one of these licenses.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Daniel Stenberg.
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1999.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
* Main author:
|
||||
* - Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* http://curl.haxx.se
|
||||
*
|
||||
* $Source$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $State$
|
||||
* $Locker$
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
****************************************************************************/
|
||||
* $Id$
|
||||
*****************************************************************************/
|
||||
|
||||
void ourWriteOut(CURL *curl, char *out);
|
||||
|
||||
|
@@ -6,10 +6,10 @@ curl:
|
||||
@(cd ..; make)
|
||||
|
||||
test:
|
||||
perl runtests.pl
|
||||
$(PERL) runtests.pl
|
||||
|
||||
quiet-test:
|
||||
perl runtests.pl -s -a
|
||||
$(PERL) runtests.pl -s -a
|
||||
|
||||
clean:
|
||||
rm -rf log
|
||||
|
Reference in New Issue
Block a user