Compare commits
327 Commits
curl-7_21_
...
curl-7_21_
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a5ee8d50c3 | ||
![]() |
c91c48723a | ||
![]() |
b40c8f9249 | ||
![]() |
714215f283 | ||
![]() |
6cfbf21acf | ||
![]() |
72da921942 | ||
![]() |
6ff4ebbc80 | ||
![]() |
fa81193bf0 | ||
![]() |
fb80a0a082 | ||
![]() |
e84730948d | ||
![]() |
996630d5ed | ||
![]() |
fde795894f | ||
![]() |
6710970bce | ||
![]() |
f01df19798 | ||
![]() |
b2e06ea166 | ||
![]() |
c66b0b32fb | ||
![]() |
2064ea9612 | ||
![]() |
1a6e7da13d | ||
![]() |
23544f35fd | ||
![]() |
2f6924032a | ||
![]() |
aeb214f3e8 | ||
![]() |
89fa3b3efb | ||
![]() |
e9afbe2a65 | ||
![]() |
c48849ef97 | ||
![]() |
d54668eb00 | ||
![]() |
ee4c1206de | ||
![]() |
c22c258029 | ||
![]() |
6eb484942b | ||
![]() |
5b716b7c91 | ||
![]() |
01f05d0c75 | ||
![]() |
8321a367ee | ||
![]() |
8e9e19b0d5 | ||
![]() |
db59b6202d | ||
![]() |
e7837bfd03 | ||
![]() |
e71642003c | ||
![]() |
02dbfa2192 | ||
![]() |
9d1e914a56 | ||
![]() |
d3408d0593 | ||
![]() |
318c5c802b | ||
![]() |
c2459c4328 | ||
![]() |
c37ad9e909 | ||
![]() |
5eda4bf726 | ||
![]() |
e02c90dc19 | ||
![]() |
f1c6cd42f4 | ||
![]() |
2a0c7ea4cc | ||
![]() |
4913a08cb6 | ||
![]() |
2531cd94a5 | ||
![]() |
40256ec4d3 | ||
![]() |
11c2db2aa2 | ||
![]() |
d02f444759 | ||
![]() |
cc9e4321d3 | ||
![]() |
970587567e | ||
![]() |
3a158f30b5 | ||
![]() |
67eb679264 | ||
![]() |
9680df4807 | ||
![]() |
0addc57188 | ||
![]() |
34ef39015e | ||
![]() |
252d70a1ed | ||
![]() |
a374d8f85d | ||
![]() |
058fb33557 | ||
![]() |
0355e33b5f | ||
![]() |
e765afccb6 | ||
![]() |
8702ebff74 | ||
![]() |
0f07142509 | ||
![]() |
3a87dd8b20 | ||
![]() |
7f57fb359d | ||
![]() |
663a52c2f8 | ||
![]() |
4b51484a68 | ||
![]() |
89d412b5e7 | ||
![]() |
92774ac1f3 | ||
![]() |
0c05ee3a33 | ||
![]() |
ef1c18b952 | ||
![]() |
409867e62b | ||
![]() |
929aeed386 | ||
![]() |
42d95bcc44 | ||
![]() |
93290f69d0 | ||
![]() |
e38a7880e1 | ||
![]() |
e114648991 | ||
![]() |
b8118dd495 | ||
![]() |
025b9368f8 | ||
![]() |
521e88e009 | ||
![]() |
88e825de86 | ||
![]() |
14e8b13a45 | ||
![]() |
36cb24ec19 | ||
![]() |
806dbb022b | ||
![]() |
5a433a033f | ||
![]() |
511f491cf2 | ||
![]() |
cc228ea6f6 | ||
![]() |
211504ba8a | ||
![]() |
2bbaddb05a | ||
![]() |
13b64d7558 | ||
![]() |
8831000bc0 | ||
![]() |
ed8749e308 | ||
![]() |
7711086536 | ||
![]() |
fdaa8da75d | ||
![]() |
c40ae2cbd2 | ||
![]() |
3e00af34c8 | ||
![]() |
3eac14b43c | ||
![]() |
60406ff7f8 | ||
![]() |
6c5448d59f | ||
![]() |
ca37692bf4 | ||
![]() |
176092d760 | ||
![]() |
e649a7baae | ||
![]() |
c8fba59731 | ||
![]() |
4d1d1b8518 | ||
![]() |
05ebc6f0cc | ||
![]() |
6f0ee717c3 | ||
![]() |
0718b7e31e | ||
![]() |
60172a0446 | ||
![]() |
c042340b2a | ||
![]() |
b847818740 | ||
![]() |
bec9692a77 | ||
![]() |
a07a865d5d | ||
![]() |
cccba72920 | ||
![]() |
7612ca2a7e | ||
![]() |
029136da60 | ||
![]() |
1aeb635cdd | ||
![]() |
70cb3f204d | ||
![]() |
9da4698fd2 | ||
![]() |
08221e738d | ||
![]() |
16dcd13a2a | ||
![]() |
8a26a8d833 | ||
![]() |
a9aeedcdbe | ||
![]() |
d6b9f76943 | ||
![]() |
9e60d8fd9e | ||
![]() |
a8f30fa555 | ||
![]() |
0354cd5f77 | ||
![]() |
0d0f8084e3 | ||
![]() |
3d3735d9a1 | ||
![]() |
29f0898525 | ||
![]() |
0e74e1d8d8 | ||
![]() |
3f7b7dea1e | ||
![]() |
c9ee341bfb | ||
![]() |
c60a6153be | ||
![]() |
80225b08cd | ||
![]() |
bfc491a2d2 | ||
![]() |
fb199cd29d | ||
![]() |
a8aab6e7d4 | ||
![]() |
32aedf1d3d | ||
![]() |
8511b6436c | ||
![]() |
17de1cc382 | ||
![]() |
5719e56168 | ||
![]() |
d7846237a4 | ||
![]() |
386afdf607 | ||
![]() |
2345c1dd66 | ||
![]() |
7aa2d10e0d | ||
![]() |
10cea49a46 | ||
![]() |
073ce06379 | ||
![]() |
0b8cdc0635 | ||
![]() |
9f8e960a1a | ||
![]() |
06fc3569d2 | ||
![]() |
dd3760f2eb | ||
![]() |
45ca048f44 | ||
![]() |
c4369f34b9 | ||
![]() |
d85cae9225 | ||
![]() |
05895927f5 | ||
![]() |
d9805c5b2b | ||
![]() |
2f421f9aa1 | ||
![]() |
4c33b0a200 | ||
![]() |
1c3c0162c6 | ||
![]() |
a40f58d2ef | ||
![]() |
66582c04b1 | ||
![]() |
fae0e2f968 | ||
![]() |
a12918bc28 | ||
![]() |
827f0a318c | ||
![]() |
b66eeb8bf8 | ||
![]() |
c3a6116dc9 | ||
![]() |
f19ace8d33 | ||
![]() |
c2dff28c41 | ||
![]() |
e36c039a07 | ||
![]() |
96ea650ec7 | ||
![]() |
3bb1291fbd | ||
![]() |
61fc9044c7 | ||
![]() |
311bd4c7b1 | ||
![]() |
39d0d787d2 | ||
![]() |
3cffcba3d0 | ||
![]() |
ae7fe3b7f4 | ||
![]() |
b370fcd300 | ||
![]() |
5348e8f276 | ||
![]() |
266bcb06d7 | ||
![]() |
fe165c69de | ||
![]() |
4e2ac742c9 | ||
![]() |
0696260122 | ||
![]() |
54d9f060b4 | ||
![]() |
2cacd82661 | ||
![]() |
ec7978c512 | ||
![]() |
0e9626ba39 | ||
![]() |
73eb9965cf | ||
![]() |
08a77025c6 | ||
![]() |
7a4b5079c6 | ||
![]() |
7a53c77cb5 | ||
![]() |
b89122a2bf | ||
![]() |
99dcb11ed8 | ||
![]() |
819dfddc58 | ||
![]() |
32a050ec7e | ||
![]() |
76ac6b94ed | ||
![]() |
28c830efd8 | ||
![]() |
7ba5e88053 | ||
![]() |
ef19e30985 | ||
![]() |
2d356ba168 | ||
![]() |
dc0a7161f8 | ||
![]() |
77cbfe2274 | ||
![]() |
20690e412d | ||
![]() |
dbcaa00657 | ||
![]() |
4b837a7e15 | ||
![]() |
73b518f269 | ||
![]() |
3427bece89 | ||
![]() |
e79c1e39e9 | ||
![]() |
77f0fcae0e | ||
![]() |
03be2c99ba | ||
![]() |
b77a3b9a35 | ||
![]() |
c0a2ee65a4 | ||
![]() |
4ba3d8bd00 | ||
![]() |
511031c8d8 | ||
![]() |
59cf93ccdb | ||
![]() |
4f13340ab8 | ||
![]() |
b0940753c6 | ||
![]() |
b35622f387 | ||
![]() |
ce24fdaa2c | ||
![]() |
02c99899a2 | ||
![]() |
7fcbdd68b9 | ||
![]() |
fc77790bcd | ||
![]() |
ef46fcdd90 | ||
![]() |
0243aa9eb0 | ||
![]() |
8fa7b8cb9b | ||
![]() |
fd6b4b3e9b | ||
![]() |
1da65c3d4d | ||
![]() |
d541085407 | ||
![]() |
c73e5e839d | ||
![]() |
db2e425346 | ||
![]() |
6aa5206042 | ||
![]() |
61623b74e3 | ||
![]() |
5f7d34811a | ||
![]() |
42f5e8a0f1 | ||
![]() |
c5d9cd5c1b | ||
![]() |
b5cc77bd25 | ||
![]() |
3d81320426 | ||
![]() |
308db9d780 | ||
![]() |
03ea06b8e3 | ||
![]() |
08a65b10fb | ||
![]() |
1238edaeaf | ||
![]() |
a9cd4f4ed4 | ||
![]() |
1d28efb9d1 | ||
![]() |
9ba42a023d | ||
![]() |
ebb9c7ae04 | ||
![]() |
53014175e8 | ||
![]() |
651c0bcdf2 | ||
![]() |
d45ed0ecf5 | ||
![]() |
e21b103c3e | ||
![]() |
0029b2f042 | ||
![]() |
7c5d888ea6 | ||
![]() |
adb49ad8bb | ||
![]() |
a2c8966d50 | ||
![]() |
d8f6d1c334 | ||
![]() |
1e52ea92eb | ||
![]() |
28888a0b41 | ||
![]() |
1022e754f4 | ||
![]() |
703573c72b | ||
![]() |
7af54ef9a5 | ||
![]() |
1602ed6ba1 | ||
![]() |
9e46318a03 | ||
![]() |
c0c89cd44e | ||
![]() |
6cf35852ad | ||
![]() |
83e9fb21aa | ||
![]() |
5c42b2ceae | ||
![]() |
82aa386732 | ||
![]() |
c43ad0f972 | ||
![]() |
53640a3ce0 | ||
![]() |
35e1d6538a | ||
![]() |
45cea71968 | ||
![]() |
569202c9a4 | ||
![]() |
2b3fbc8cdb | ||
![]() |
1ad5764feb | ||
![]() |
ae29142198 | ||
![]() |
cd045e24a0 | ||
![]() |
0dc8479b89 | ||
![]() |
420eac5542 | ||
![]() |
15aeb94f3f | ||
![]() |
b6a3e2be8e | ||
![]() |
9f64bbd6d8 | ||
![]() |
879914def3 | ||
![]() |
6076549304 | ||
![]() |
49465fffdb | ||
![]() |
5825aa149d | ||
![]() |
7dc9393d3b | ||
![]() |
2dded8fedb | ||
![]() |
be16b227b7 | ||
![]() |
e6d99f4ba7 | ||
![]() |
16c4314a21 | ||
![]() |
375aa41ba1 | ||
![]() |
5f829456c1 | ||
![]() |
a834e00454 | ||
![]() |
0e944fb24e | ||
![]() |
f37d681166 | ||
![]() |
30bd7427ea | ||
![]() |
71ab0ceaa0 | ||
![]() |
9acac91960 | ||
![]() |
af54fbbcb5 | ||
![]() |
1e739e781e | ||
![]() |
8d569c7bb0 | ||
![]() |
7f3b87d878 | ||
![]() |
6b5dc72575 | ||
![]() |
8ab137b2bc | ||
![]() |
bcfb9ea34c | ||
![]() |
f0aad0089e | ||
![]() |
d2395f962d | ||
![]() |
476b1a079b | ||
![]() |
9583b4af90 | ||
![]() |
8219bc9e19 | ||
![]() |
57523e3578 | ||
![]() |
37a22d4749 | ||
![]() |
1df74d886d | ||
![]() |
76c54bd129 | ||
![]() |
8f50a404f9 | ||
![]() |
f6ebae65d6 | ||
![]() |
a0a70dc21d | ||
![]() |
5e37689a1a | ||
![]() |
c75a9fef59 | ||
![]() |
9035709e25 | ||
![]() |
b88ead62e7 | ||
![]() |
b998b04c02 | ||
![]() |
68b2a9818b | ||
![]() |
a7cf30f808 | ||
![]() |
be312336f6 | ||
![]() |
6761cf49f2 | ||
![]() |
108d7693a4 | ||
![]() |
00a5bd41be |
@@ -1,44 +0,0 @@
|
|||||||
#cmakedefine CHECK_TYPE_SIZE_TYPE @CHECK_TYPE_SIZE_TYPE@
|
|
||||||
#ifdef CHECK_TYPE_SIZE_TYPE
|
|
||||||
|
|
||||||
@CHECK_TYPE_SIZE_PREINCLUDE@
|
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
|
||||||
# include <sys/types.h>
|
|
||||||
#endif /* HAVE_SYS_TYPES_H */
|
|
||||||
|
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
|
||||||
# include <sys/socket.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
# include <winsock2.h>
|
|
||||||
# include <ws2tcpip.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_STDINT_H
|
|
||||||
# include <stdint.h>
|
|
||||||
#endif /* HAVE_STDINT_H */
|
|
||||||
|
|
||||||
#ifdef HAVE_STDDEF_H
|
|
||||||
# include <stddef.h>
|
|
||||||
#endif /* HAVE_STDDEF_H */
|
|
||||||
|
|
||||||
@CHECK_TYPE_SIZE_PREMAIN@
|
|
||||||
|
|
||||||
#ifdef __CLASSIC_C__
|
|
||||||
int main(){
|
|
||||||
int ac;
|
|
||||||
char*av[];
|
|
||||||
#else
|
|
||||||
int main(int ac, char*av[]){
|
|
||||||
#endif
|
|
||||||
if(ac > 1000){return *av[0];}
|
|
||||||
return sizeof(CHECK_TYPE_SIZE_TYPE);
|
|
||||||
}
|
|
||||||
|
|
||||||
#else /* CHECK_TYPE_SIZE_TYPE */
|
|
||||||
|
|
||||||
# error "CHECK_TYPE_SIZE_TYPE has to specify the type"
|
|
||||||
|
|
||||||
#endif /* CHECK_TYPE_SIZE_TYPE */
|
|
@@ -1,57 +0,0 @@
|
|||||||
# - Check sizeof a type
|
|
||||||
# CHECK_TYPE_SIZE(TYPE VARIABLE)
|
|
||||||
# Check if the type exists and determine size of type. if the type
|
|
||||||
# exists, the size will be stored to the variable.
|
|
||||||
#
|
|
||||||
# VARIABLE - variable to store size if the type exists.
|
|
||||||
# HAVE_${VARIABLE} - does the variable exists or not
|
|
||||||
|
|
||||||
macro(CHECK_TYPE_SIZE TYPE VARIABLE)
|
|
||||||
set(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
|
|
||||||
if(NOT DEFINED ${VARIABLE})
|
|
||||||
if("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
|
|
||||||
set(CHECK_TYPE_SIZE_TYPE "${TYPE}")
|
|
||||||
set(MACRO_CHECK_TYPE_SIZE_FLAGS
|
|
||||||
"${CMAKE_REQUIRED_FLAGS}")
|
|
||||||
foreach(def HAVE_SYS_TYPES_H
|
|
||||||
HAVE_STDINT_H HAVE_STDDEF_H HAVE_SYS_SOCKET_H)
|
|
||||||
if("${def}")
|
|
||||||
set(MACRO_CHECK_TYPE_SIZE_FLAGS
|
|
||||||
"${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
|
|
||||||
endif("${def}")
|
|
||||||
endforeach(def)
|
|
||||||
set(CHECK_TYPE_SIZE_PREMAIN)
|
|
||||||
foreach(def ${CMAKE_EXTRA_INCLUDE_FILES})
|
|
||||||
set(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
|
|
||||||
endforeach(def)
|
|
||||||
configure_file(
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/CMake/CheckTypeSize.c.in"
|
|
||||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
|
|
||||||
IMMEDIATE @ONLY)
|
|
||||||
file(READ
|
|
||||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
|
|
||||||
CHECK_TYPE_SIZE_FILE_CONTENT)
|
|
||||||
message(STATUS "Check size of ${TYPE}")
|
|
||||||
if(CMAKE_REQUIRED_LIBRARIES)
|
|
||||||
set(CHECK_TYPE_SIZE_ADD_LIBRARIES
|
|
||||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
|
||||||
endif(CMAKE_REQUIRED_LIBRARIES)
|
|
||||||
try_run(${VARIABLE} HAVE_${VARIABLE}
|
|
||||||
${CMAKE_BINARY_DIR}
|
|
||||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
|
|
||||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
|
|
||||||
"${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
|
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
|
||||||
if(HAVE_${VARIABLE})
|
|
||||||
message(STATUS "Check size of ${TYPE} - done")
|
|
||||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
|
||||||
"Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n")
|
|
||||||
else(HAVE_${VARIABLE})
|
|
||||||
message(STATUS "Check size of ${TYPE} - failed")
|
|
||||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
|
||||||
"Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\nCheckTypeSize.c:\n${CHECK_TYPE_SIZE_FILE_CONTENT}\n\n")
|
|
||||||
endif(HAVE_${VARIABLE})
|
|
||||||
endif("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
|
|
||||||
endif(NOT DEFINED ${VARIABLE})
|
|
||||||
set(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS )
|
|
||||||
endmacro(CHECK_TYPE_SIZE)
|
|
@@ -1,3 +1,24 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#ifdef TIME_WITH_SYS_TIME
|
#ifdef TIME_WITH_SYS_TIME
|
||||||
/* Time with sys/time test */
|
/* Time with sys/time test */
|
||||||
|
|
||||||
|
@@ -183,13 +183,7 @@ include (CheckIncludeFile)
|
|||||||
include (CheckIncludeFiles)
|
include (CheckIncludeFiles)
|
||||||
include (CheckLibraryExists)
|
include (CheckLibraryExists)
|
||||||
include (CheckSymbolExists)
|
include (CheckSymbolExists)
|
||||||
# if crosscompiling is on, the CHECK_TYPE_SIZE macro coming with cmake uses
|
include (CheckTypeSize)
|
||||||
# TRY_COMPILE instead of TRY_RUN which makes crosscompiling easier, Alex
|
|
||||||
if(CMAKE_CROSSCOMPILING)
|
|
||||||
include ("${CMAKE_MODULE_PATH}/CheckTypeSize.cmake")
|
|
||||||
else(CMAKE_CROSSCOMPILING)
|
|
||||||
include (CheckTypeSize)
|
|
||||||
endif(CMAKE_CROSSCOMPILING)
|
|
||||||
|
|
||||||
# On windows preload settings
|
# On windows preload settings
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
@@ -781,7 +775,13 @@ endif(CMAKE_COMPILER_IS_GNUCC AND APPLE)
|
|||||||
|
|
||||||
if(HAVE_SOCKLEN_T)
|
if(HAVE_SOCKLEN_T)
|
||||||
set(CURL_TYPEOF_CURL_SOCKLEN_T "socklen_t")
|
set(CURL_TYPEOF_CURL_SOCKLEN_T "socklen_t")
|
||||||
|
if(WIN32)
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES "winsock2.h;ws2tcpip.h")
|
||||||
|
elseif(HAVE_SYS_SOCKET_H)
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES "sys/socket.h")
|
||||||
|
endif()
|
||||||
check_type_size("socklen_t" CURL_SIZEOF_CURL_SOCKLEN_T)
|
check_type_size("socklen_t" CURL_SIZEOF_CURL_SOCKLEN_T)
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES)
|
||||||
if(NOT HAVE_CURL_SIZEOF_CURL_SOCKLEN_T)
|
if(NOT HAVE_CURL_SIZEOF_CURL_SOCKLEN_T)
|
||||||
message(FATAL_ERROR
|
message(FATAL_ERROR
|
||||||
"Check for sizeof socklen_t failed, see CMakeFiles/CMakerror.log")
|
"Check for sizeof socklen_t failed, see CMakeFiles/CMakerror.log")
|
||||||
|
2
COPYING
2
COPYING
@@ -1,6 +1,6 @@
|
|||||||
COPYRIGHT AND PERMISSION NOTICE
|
COPYRIGHT AND PERMISSION NOTICE
|
||||||
|
|
||||||
Copyright (c) 1996 - 2010, Daniel Stenberg, <daniel@haxx.se>.
|
Copyright (c) 1996 - 2011, Daniel Stenberg, <daniel@haxx.se>.
|
||||||
|
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
|
16
Makefile.am
16
Makefile.am
@@ -5,7 +5,7 @@
|
|||||||
# | (__| |_| | _ <| |___
|
# | (__| |_| | _ <| |___
|
||||||
# \___|\___/|_| \_\_____|
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
#
|
#
|
||||||
# This software is licensed as described in the file COPYING, which
|
# This software is licensed as described in the file COPYING, which
|
||||||
# you should have received as part of this distribution. The terms
|
# you should have received as part of this distribution. The terms
|
||||||
@@ -24,15 +24,19 @@ AUTOMAKE_OPTIONS = foreign
|
|||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
CMAKE_DIST = CMakeLists.txt CMake/CheckTypeSize.c.in CMake/CheckTypeSize.cmake \
|
CMAKE_DIST = CMakeLists.txt CMake/CMakeConfigurableFile.in \
|
||||||
CMake/CMakeConfigurableFile.in CMake/CurlCheckCSourceCompiles.cmake \
|
CMake/CurlCheckCSourceCompiles.cmake CMake/CurlCheckCSourceRuns.cmake \
|
||||||
CMake/CurlCheckCSourceRuns.cmake CMake/CurlTests.c CMake/FindOpenSSL.cmake \
|
CMake/CurlTests.c CMake/FindOpenSSL.cmake CMake/FindZLIB.cmake \
|
||||||
CMake/FindZLIB.cmake CMake/OtherTests.cmake CMake/Platforms/WindowsCache.cmake \
|
CMake/OtherTests.cmake CMake/Platforms/WindowsCache.cmake \
|
||||||
CMake/Utilities.cmake include/curl/curlbuild.h.cmake
|
CMake/Utilities.cmake include/curl/curlbuild.h.cmake
|
||||||
|
|
||||||
|
WINBUILD_DIST = winbuild/BUILD.WINDOWS.txt winbuild/gen_resp_file.bat \
|
||||||
|
winbuild/MakefileBuild.vc winbuild/Makefile.vc
|
||||||
|
|
||||||
EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
|
EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
|
||||||
curl-style.el sample.emacs RELEASE-NOTES buildconf \
|
curl-style.el sample.emacs RELEASE-NOTES buildconf \
|
||||||
libcurl.pc.in vc6curl.dsw MacOSX-Framework Android.mk $(CMAKE_DIST)
|
libcurl.pc.in vc6curl.dsw MacOSX-Framework Android.mk $(CMAKE_DIST) \
|
||||||
|
Makefile.msvc.names $(WINBUILD_DIST)
|
||||||
|
|
||||||
bin_SCRIPTS = curl-config
|
bin_SCRIPTS = curl-config
|
||||||
|
|
||||||
|
@@ -32,27 +32,27 @@ ssl:
|
|||||||
|
|
||||||
borland:
|
borland:
|
||||||
cd lib
|
cd lib
|
||||||
make -f Makefile.b32
|
$(MAKE) -f Makefile.b32
|
||||||
cd ..\src
|
cd ..\src
|
||||||
make -f Makefile.b32
|
$(MAKE) -f Makefile.b32
|
||||||
|
|
||||||
borland-ssl:
|
borland-ssl:
|
||||||
cd lib
|
cd lib
|
||||||
make -f Makefile.b32 WITH_SSL=1
|
$(MAKE) -f Makefile.b32 WITH_SSL=1
|
||||||
cd ..\src
|
cd ..\src
|
||||||
make -f Makefile.b32 WITH_SSL=1
|
$(MAKE) -f Makefile.b32 WITH_SSL=1
|
||||||
|
|
||||||
borland-ssl-zlib:
|
borland-ssl-zlib:
|
||||||
cd lib
|
cd lib
|
||||||
make -f Makefile.b32 WITH_SSL=1 WITH_ZLIB=1
|
$(MAKE) -f Makefile.b32 WITH_SSL=1 WITH_ZLIB=1
|
||||||
cd ..\src
|
cd ..\src
|
||||||
make -f Makefile.b32 WITH_SSL=1 WITH_ZLIB=1
|
$(MAKE) -f Makefile.b32 WITH_SSL=1 WITH_ZLIB=1
|
||||||
|
|
||||||
borland-clean:
|
borland-clean:
|
||||||
cd lib
|
cd lib
|
||||||
make -f Makefile.b32 clean
|
$(MAKE) -f Makefile.b32 clean
|
||||||
cd ..\src
|
cd ..\src
|
||||||
make -f Makefile.b32 clean
|
$(MAKE) -f Makefile.b32 clean
|
||||||
|
|
||||||
watcom: .SYMBOLIC
|
watcom: .SYMBOLIC
|
||||||
cd lib && $(MAKE) -u -f Makefile.Watcom
|
cd lib && $(MAKE) -u -f Makefile.Watcom
|
||||||
|
81
Makefile.msvc.names
Normal file
81
Makefile.msvc.names
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1999 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
#***************************************************************************
|
||||||
|
|
||||||
|
#
|
||||||
|
# This file is included from MSVC makefiles located in lib and src,
|
||||||
|
# providing libcurl common file names required by these makefiles.
|
||||||
|
#
|
||||||
|
|
||||||
|
# ------------------
|
||||||
|
# libcurl base name
|
||||||
|
# ------------------
|
||||||
|
|
||||||
|
!IF !DEFINED(LIB_NAME) || "$(LIB_NAME)" == ""
|
||||||
|
LIB_NAME = libcurl
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# -------------------------------------------------
|
||||||
|
# libcurl static and dynamic libraries common base
|
||||||
|
# file names for release and debug configurations
|
||||||
|
# -------------------------------------------------
|
||||||
|
|
||||||
|
!IF !DEFINED(LIB_NAME_STA_REL) || "$(LIB_NAME_STA_REL)" == ""
|
||||||
|
LIB_NAME_STA_REL = $(LIB_NAME)
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF !DEFINED(LIB_NAME_STA_DBG) || "$(LIB_NAME_STA_DBG)" == ""
|
||||||
|
LIB_NAME_STA_DBG = $(LIB_NAME_STA_REL)d
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF !DEFINED(LIB_NAME_DYN_REL) || "$(LIB_NAME_DYN_REL)" == ""
|
||||||
|
LIB_NAME_DYN_REL = $(LIB_NAME)
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF !DEFINED(LIB_NAME_DYN_DBG) || "$(LIB_NAME_DYN_DBG)" == ""
|
||||||
|
LIB_NAME_DYN_DBG = $(LIB_NAME_DYN_REL)d
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# --------------------------------------------
|
||||||
|
# Base names for libcurl DLL import libraries
|
||||||
|
# --------------------------------------------
|
||||||
|
|
||||||
|
!IF !DEFINED(LIB_NAME_IMP_REL) || "$(LIB_NAME_IMP_REL)" == ""
|
||||||
|
LIB_NAME_IMP_REL = $(LIB_NAME_DYN_REL)_imp
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF !DEFINED(LIB_NAME_IMP_DBG) || "$(LIB_NAME_IMP_DBG)" == ""
|
||||||
|
LIB_NAME_IMP_DBG = $(LIB_NAME_DYN_DBG)_imp
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# --------------------------------------
|
||||||
|
# File names with extension and no path
|
||||||
|
# --------------------------------------
|
||||||
|
|
||||||
|
LIBCURL_STA_LIB_REL = $(LIB_NAME_STA_REL).lib
|
||||||
|
LIBCURL_STA_LIB_DBG = $(LIB_NAME_STA_DBG).lib
|
||||||
|
LIBCURL_DYN_LIB_REL = $(LIB_NAME_DYN_REL).dll
|
||||||
|
LIBCURL_DYN_LIB_DBG = $(LIB_NAME_DYN_DBG).dll
|
||||||
|
LIBCURL_IMP_LIB_REL = $(LIB_NAME_IMP_REL).lib
|
||||||
|
LIBCURL_IMP_LIB_DBG = $(LIB_NAME_IMP_DBG).lib
|
||||||
|
LIBCURL_DYN_LIB_PDB = $(LIB_NAME_IMP_DBG).pdb
|
||||||
|
|
||||||
|
# End of Makefile.msvc.names
|
100
RELEASE-NOTES
100
RELEASE-NOTES
@@ -1,51 +1,69 @@
|
|||||||
Curl and libcurl 7.21.3
|
Curl and libcurl 7.21.5
|
||||||
|
|
||||||
Public curl releases: 119
|
Public curl releases: 121
|
||||||
Command line options: 143
|
Command line options: 143
|
||||||
curl_easy_setopt() options: 185
|
curl_easy_setopt() options: 185
|
||||||
Public functions in libcurl: 58
|
Public functions in libcurl: 58
|
||||||
Known libcurl bindings: 39
|
Known libcurl bindings: 39
|
||||||
Contributors: 827
|
Contributors: 854
|
||||||
|
|
||||||
This release includes the following changes:
|
This release includes the following changes:
|
||||||
|
|
||||||
o Added --noconfigure switch to testcurl.pl
|
o SOCKOPTFUNCTION: callback can say already-connected
|
||||||
o Added --xattr option
|
o Added --netrc-file
|
||||||
o Added CURLOPT_RESOLVE and --resolve
|
o Added (new) support for cyassl
|
||||||
o Added CURLAUTH_ONLY
|
o TSL-SRP: enabled with OpenSSL
|
||||||
o Added version-check.pl to the examples dir
|
o Added CURLE_NOT_BUILT_IN and CURLE_UNKNOWN_OPTION
|
||||||
|
|
||||||
This release includes the following bugfixes:
|
This release includes the following bugfixes:
|
||||||
|
|
||||||
o check for libcurl features for some command line options
|
o nss: avoid memory leak on SSL connection failure
|
||||||
o Curl_setopt: disallow CURLOPT_USE_SSL without SSL support
|
o nss: do not ignore failure of SSL handshake
|
||||||
o http_chunks: remove debug output
|
o multi: better failed connect handling when using FTP, SMTP, POP3 and IMAP
|
||||||
o URL-parsing: consider ? a divider
|
o runtests.pl: fix pid number concatenation that prevented it from killing
|
||||||
o SSH: avoid using the libssh2_ prefix
|
the correct process at times
|
||||||
o SSH: use libssh2_session_handshake() to work on win64
|
o PolarSSL: Return 0 on receiving TLS CLOSE_NOTIFY alert
|
||||||
o ftp: prevent server from hanging on closed data connection when stopping
|
o curl_easy_setopt.3: Removed wrong reference to CURLOPT_USERPASSWORD
|
||||||
a transfer before the end of the full transfer (ranges)
|
o multi: close connection on timeout
|
||||||
o LDAP: detect non-binary attributes properly
|
o IMAP in multi mode does SSL connections non-blocking
|
||||||
o ftp: treat server's response 421 as CURLE_OPERATION_TIMEDOUT
|
o honours the --disable-ldaps configure option
|
||||||
o gnutls->handshake: improved timeout handling
|
o Force setopt constants written by --libcurl to be long
|
||||||
o security: Pass the right parameter to init
|
o ssh_connect: treat libssh2 return code better
|
||||||
o krb5: Use GSS_ERROR to check for error
|
o SFTP upload could stall the state machine when the multi_socket API was
|
||||||
o TFTP: resend the correct data
|
used
|
||||||
o configure: fix autoconf 2.68 warning: no AC_LANG_SOURCE call detected
|
o SFTP and SCP could leak memory when used with the multi interface and
|
||||||
o GnuTLS: now detects socket errors on Windows
|
the connection was closed
|
||||||
o symbols-in-versions: updated en masse
|
o Added missing file to repair the MSVC makefiles
|
||||||
o added a couple examples that were missing from the tar ball
|
o Fixed detection of recvfrom arguments on Android/bionic
|
||||||
o Curl_send/recv_plain: return errno on failure
|
o GSS: handle reuse fix
|
||||||
o Curl_wait_for_resolv (for c-ares): correct timeout
|
o transfer: avoid insane conversion of time_t
|
||||||
o ossl_connect_common: detect connection re-use
|
o nss: do not ignore value of CURLOPT_SSL_VERIFYPEER in certain cases
|
||||||
o configure: Prevent link errors with --librtmp
|
o SMTP-multi: non-blocking connect
|
||||||
o openldap: use remote port in URL passed to ldap_init_fd()
|
o SFTP-multi: set cselect for sftp and scp to fix "stall" risk
|
||||||
o url: provide dead_connection flag in Curl_handler::disconnect
|
o configure: removed wrongly claimed default paths
|
||||||
o lots of compiler warning fixes
|
o pop3: fixed torture tests to succeed
|
||||||
o ssh: fix a download resume point calculation
|
o symbols-in-versions: many corrections
|
||||||
o fix getinfo CURLINFO_LOCAL* for reused connections
|
o if a HTTP request gets retried because the connection was dead, rewind if
|
||||||
o multi: the returned running handles conuter could turn negative
|
any data was sent as part of it
|
||||||
o multi: only ever consider pipelining for connections doing HTTP(S)
|
o only probe for working ipv6 once and then re-use that info for further
|
||||||
|
requests
|
||||||
|
o requests that are asked to bound to a local interface/port will no longer
|
||||||
|
wrongly re-use connections that aren't
|
||||||
|
o libcurl.m4: Add missing quotes in AC_LINK_IFELSE
|
||||||
|
o progress output: don't print the last update on a separate line
|
||||||
|
o POP3: the command to send is STLS, not STARTTLS
|
||||||
|
o POP3: PASS command was not sent after upgrade to TLS
|
||||||
|
o configure: fix libtool warning
|
||||||
|
o nss: allow to use multiple client certificates for a single host
|
||||||
|
o HTTP pipelining: Fix handling of zero-length responses
|
||||||
|
o Don't list NTLM in curl-config when HTTP is disabled
|
||||||
|
o curl_easy_setopt.3: CURLOPT_RESOLVE typo version
|
||||||
|
o OpenSSL: build fine with no-sslv2 versions
|
||||||
|
o checkconnection: don't call with NULL pointer with RTSP and multi interface
|
||||||
|
o Borland makefile updates
|
||||||
|
o configure: libssh2 link fix without pkg-config
|
||||||
|
o certinfo crash
|
||||||
|
o CCC crash
|
||||||
|
|
||||||
This release includes the following known bugs:
|
This release includes the following known bugs:
|
||||||
|
|
||||||
@@ -54,8 +72,10 @@ This release includes the following known bugs:
|
|||||||
This release would not have looked like this without help, code, reports and
|
This release would not have looked like this without help, code, reports and
|
||||||
advice from friends like these:
|
advice from friends like these:
|
||||||
|
|
||||||
Dan Fandrich, Guenter Knauf, Pat Ray, Hongli Lai, Kamil Dudka,
|
Mike Crowe, Kamil Dudka, Julien Chaffraix, Hoi-Ho Chan, Ben Noordhuis,
|
||||||
Stefan Tomanek, Alfred Gebert, Yang Tse, Julien Chaffraix, Adam Light,
|
Dan Fandrich, Henry Ludemann, Karl M, Manuel Massing, Marcus Sundberg,
|
||||||
Rutger Hofman, Matthias Bolte, Heinrich Ko, Dmitri Shubin
|
Stefan Krause, Todd A Ouska, Saqib Ali, Andre Guibert de Bruet,
|
||||||
|
Tor Arntsen, Vincent Torri, Dave Reisner, Chris Smowton, Tinus van den Berg,
|
||||||
|
Hongli Lai, Gisle Vanem, Andrei Benea, Mehmet Bozkurt
|
||||||
|
|
||||||
Thanks! (and sorry if I forgot to mention someone)
|
Thanks! (and sorry if I forgot to mention someone)
|
||||||
|
15
TODO-RELEASE
15
TODO-RELEASE
@@ -1,10 +1,15 @@
|
|||||||
To be addressed in 7.21.3
|
To be addressed in 7.21.6
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
263 - Support binding DNS to local interface/IP
|
284 - bug 3172608 "No re-authentication when HTTP connecton is closed"
|
||||||
|
http://curl.haxx.se/bug/view.cgi?id=3172608
|
||||||
|
Would be nice if someone could verify the suggested patch
|
||||||
|
|
||||||
265 - 1. FTP cmd channel and data channel validation
|
285 - bug 3163118 "Allow programatic use of telnet on Windows"
|
||||||
|
http://curl.haxx.se/bug/view.cgi?id=3163118
|
||||||
|
Would appreciate a Windows developer to give it a look before we apply
|
||||||
|
the suggested patch
|
||||||
|
|
||||||
267 - 2. Cert chain for data channel
|
287 - bug 3215314 Post quote operation to rename fails in Windows
|
||||||
|
|
||||||
271 -
|
289 -
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
# | (__| |_| | _ <| |___
|
# | (__| |_| | _ <| |___
|
||||||
# \___|\___/|_| \_\_____|
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
#
|
#
|
||||||
# This software is licensed as described in the file COPYING, which
|
# This software is licensed as described in the file COPYING, which
|
||||||
# you should have received as part of this distribution. The terms
|
# you should have received as part of this distribution. The terms
|
||||||
@@ -1663,7 +1663,7 @@ AC_DEFUN([CURL_CHECK_FUNC_RECVFROM], [
|
|||||||
for recvfrom_arg2 in 'char *' 'void *'; do
|
for recvfrom_arg2 in 'char *' 'void *'; do
|
||||||
for recvfrom_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
|
for recvfrom_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
|
||||||
for recvfrom_arg4 in 'int' 'unsigned int'; do
|
for recvfrom_arg4 in 'int' 'unsigned int'; do
|
||||||
for recvfrom_arg5 in 'struct sockaddr *' 'void *'; do
|
for recvfrom_arg5 in 'const struct sockaddr *' 'struct sockaddr *' 'void *'; do
|
||||||
for recvfrom_arg6 in 'socklen_t *' 'int *' 'unsigned int *' 'size_t *' 'void *'; do
|
for recvfrom_arg6 in 'socklen_t *' 'int *' 'unsigned int *' 'size_t *' 'void *'; do
|
||||||
if test "$curl_cv_func_recvfrom_args" = "unknown"; then
|
if test "$curl_cv_func_recvfrom_args" = "unknown"; then
|
||||||
AC_COMPILE_IFELSE([
|
AC_COMPILE_IFELSE([
|
||||||
@@ -3181,7 +3181,7 @@ AC_DEFUN([CURL_CHECK_WIN32_LARGEFILE], [
|
|||||||
;;
|
;;
|
||||||
win32_small_files)
|
win32_small_files)
|
||||||
AC_MSG_RESULT([yes (large file disabled)])
|
AC_MSG_RESULT([yes (large file disabled)])
|
||||||
AC_DEFINE_UNQUOTED(USE_WIN32_LARGE_FILES, 1,
|
AC_DEFINE_UNQUOTED(USE_WIN32_SMALL_FILES, 1,
|
||||||
[Define to 1 if you are building a Windows target without large file support.])
|
[Define to 1 if you are building a Windows target without large file support.])
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
243
configure.ac
243
configure.ac
@@ -5,7 +5,7 @@
|
|||||||
# | (__| |_| | _ <| |___
|
# | (__| |_| | _ <| |___
|
||||||
# \___|\___/|_| \_\_____|
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
#
|
#
|
||||||
# This software is licensed as described in the file COPYING, which
|
# This software is licensed as described in the file COPYING, which
|
||||||
# you should have received as part of this distribution. The terms
|
# you should have received as part of this distribution. The terms
|
||||||
@@ -29,12 +29,13 @@ AC_INIT([curl], [-], [a suitable curl mailing list: http://curl.haxx.se/mail/])
|
|||||||
CURL_OVERRIDE_AUTOCONF
|
CURL_OVERRIDE_AUTOCONF
|
||||||
|
|
||||||
dnl configure script copyright
|
dnl configure script copyright
|
||||||
AC_COPYRIGHT([Copyright (c) 1998 - 2010 Daniel Stenberg, <daniel@haxx.se>
|
AC_COPYRIGHT([Copyright (c) 1998 - 2011 Daniel Stenberg, <daniel@haxx.se>
|
||||||
This configure script may be copied, distributed and modified under the
|
This configure script may be copied, distributed and modified under the
|
||||||
terms of the curl license; see COPYING for more details])
|
terms of the curl license; see COPYING for more details])
|
||||||
|
|
||||||
AC_CONFIG_SRCDIR([lib/urldata.h])
|
AC_CONFIG_SRCDIR([lib/urldata.h])
|
||||||
AM_CONFIG_HEADER(lib/curl_config.h src/curl_config.h include/curl/curlbuild.h)
|
AM_CONFIG_HEADER(lib/curl_config.h src/curl_config.h include/curl/curlbuild.h)
|
||||||
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
AM_MAINTAINER_MODE
|
AM_MAINTAINER_MODE
|
||||||
|
|
||||||
CURL_CHECK_OPTION_DEBUG
|
CURL_CHECK_OPTION_DEBUG
|
||||||
@@ -120,10 +121,12 @@ if test -f ${srcdir}/include/curl/curlbuild.h; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dnl figure out the libcurl version
|
dnl figure out the libcurl version
|
||||||
VERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curlver.h`
|
CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curlver.h`
|
||||||
AM_INIT_AUTOMAKE(curl,$VERSION)
|
AM_INIT_AUTOMAKE
|
||||||
AC_MSG_CHECKING([curl version])
|
AC_MSG_CHECKING([curl version])
|
||||||
AC_MSG_RESULT($VERSION)
|
AC_MSG_RESULT($CURLVERSION)
|
||||||
|
|
||||||
|
AC_SUBST(CURLVERSION)
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl we extract the numerical version for curl-config only
|
dnl we extract the numerical version for curl-config only
|
||||||
@@ -140,12 +143,13 @@ AC_SUBST(PKGADD_VENDOR)
|
|||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl initialize all the info variables
|
dnl initialize all the info variables
|
||||||
curl_ssl_msg="no (--with-{ssl,gnutls,nss,polarssl} )"
|
curl_ssl_msg="no (--with-{ssl,gnutls,nss,polarssl,cyassl,axtls} )"
|
||||||
curl_ssh_msg="no (--with-libssh2)"
|
curl_ssh_msg="no (--with-libssh2)"
|
||||||
curl_zlib_msg="no (--with-zlib)"
|
curl_zlib_msg="no (--with-zlib)"
|
||||||
curl_krb4_msg="no (--with-krb4*)"
|
curl_krb4_msg="no (--with-krb4*)"
|
||||||
curl_gss_msg="no (--with-gssapi)"
|
curl_gss_msg="no (--with-gssapi)"
|
||||||
curl_spnego_msg="no (--with-spnego)"
|
curl_spnego_msg="no (--with-spnego)"
|
||||||
|
curl_tls_srp_msg="no (--enable-tls-srp)"
|
||||||
curl_res_msg="default (--enable-ares / --enable-threaded-resolver)"
|
curl_res_msg="default (--enable-ares / --enable-threaded-resolver)"
|
||||||
curl_ipv6_msg="no (--enable-ipv6)"
|
curl_ipv6_msg="no (--enable-ipv6)"
|
||||||
curl_idn_msg="no (--with-libidn)"
|
curl_idn_msg="no (--with-libidn)"
|
||||||
@@ -156,6 +160,7 @@ curl_verbose_msg="enabled (--disable-verbose)"
|
|||||||
curl_ldaps_msg="no (--enable-ldaps)"
|
curl_ldaps_msg="no (--enable-ldaps)"
|
||||||
curl_rtsp_msg="no (--enable-rtsp)"
|
curl_rtsp_msg="no (--enable-rtsp)"
|
||||||
curl_rtmp_msg="no (--with-librtmp)"
|
curl_rtmp_msg="no (--with-librtmp)"
|
||||||
|
init_ssl_msg=${curl_ssl_msg}
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Save anything in $LIBS for later
|
dnl Save anything in $LIBS for later
|
||||||
@@ -1630,6 +1635,17 @@ if test X"$OPENSSL_ENABLED" = X"1"; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl ---
|
||||||
|
dnl We require OpenSSL with SRP support.
|
||||||
|
dnl ---
|
||||||
|
if test "$OPENSSL_ENABLED" = "1"; then
|
||||||
|
AC_CHECK_LIB(crypto, SRP_Calc_client_key,
|
||||||
|
[
|
||||||
|
AC_DEFINE(HAVE_SSLEAY_SRP, 1, [if you have the function SRP_Calc_client_key])
|
||||||
|
AC_SUBST(HAVE_SSLEAY_SRP, [1])
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
|
||||||
dnl ----------------------------------------------------
|
dnl ----------------------------------------------------
|
||||||
dnl check for GnuTLS
|
dnl check for GnuTLS
|
||||||
dnl ----------------------------------------------------
|
dnl ----------------------------------------------------
|
||||||
@@ -1638,7 +1654,7 @@ dnl Default to compiler & linker defaults for GnuTLS files & libraries.
|
|||||||
OPT_GNUTLS=no
|
OPT_GNUTLS=no
|
||||||
|
|
||||||
AC_ARG_WITH(gnutls,dnl
|
AC_ARG_WITH(gnutls,dnl
|
||||||
AC_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root (default: /usr/local/)])
|
AC_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root])
|
||||||
AC_HELP_STRING([--without-gnutls], [disable GnuTLS detection]),
|
AC_HELP_STRING([--without-gnutls], [disable GnuTLS detection]),
|
||||||
OPT_GNUTLS=$withval)
|
OPT_GNUTLS=$withval)
|
||||||
|
|
||||||
@@ -1753,6 +1769,17 @@ if test "$GNUTLS_ENABLED" = "1"; then
|
|||||||
])
|
])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl ---
|
||||||
|
dnl We require GnuTLS with SRP support.
|
||||||
|
dnl ---
|
||||||
|
if test "$GNUTLS_ENABLED" = "1"; then
|
||||||
|
AC_CHECK_LIB(gnutls, gnutls_srp_verifier,
|
||||||
|
[
|
||||||
|
AC_DEFINE(HAVE_GNUTLS_SRP, 1, [if you have the function gnutls_srp_verifier])
|
||||||
|
AC_SUBST(HAVE_GNUTLS_SRP, [1])
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
|
||||||
dnl ----------------------------------------------------
|
dnl ----------------------------------------------------
|
||||||
dnl check for PolarSSL
|
dnl check for PolarSSL
|
||||||
dnl ----------------------------------------------------
|
dnl ----------------------------------------------------
|
||||||
@@ -1763,7 +1790,7 @@ OPT_POLARSSL=no
|
|||||||
_cppflags=$CPPFLAGS
|
_cppflags=$CPPFLAGS
|
||||||
_ldflags=$LDFLAGS
|
_ldflags=$LDFLAGS
|
||||||
AC_ARG_WITH(polarssl,dnl
|
AC_ARG_WITH(polarssl,dnl
|
||||||
AC_HELP_STRING([--with-polarssl=PATH],[where to look for PolarSSL, PATH points to the installation root (default: /usr/local/)])
|
AC_HELP_STRING([--with-polarssl=PATH],[where to look for PolarSSL, PATH points to the installation root])
|
||||||
AC_HELP_STRING([--without-polarssl], [disable PolarSSL detection]),
|
AC_HELP_STRING([--without-polarssl], [disable PolarSSL detection]),
|
||||||
OPT_POLARSSL=$withval)
|
OPT_POLARSSL=$withval)
|
||||||
|
|
||||||
@@ -1837,6 +1864,95 @@ if test "$OPENSSL_ENABLED" != "1"; then
|
|||||||
|
|
||||||
fi dnl OPENSSL != 1
|
fi dnl OPENSSL != 1
|
||||||
|
|
||||||
|
dnl ----------------------------------------------------
|
||||||
|
dnl check for CyaSSL
|
||||||
|
dnl ----------------------------------------------------
|
||||||
|
|
||||||
|
dnl Default to compiler & linker defaults for CyaSSL files & libraries.
|
||||||
|
OPT_CYASSL=no
|
||||||
|
|
||||||
|
_cppflags=$CPPFLAGS
|
||||||
|
_ldflags=$LDFLAGS
|
||||||
|
AC_ARG_WITH(cyassl,dnl
|
||||||
|
AC_HELP_STRING([--with-cyassl=PATH],[where to look for CyaSSL, PATH points to the installation root (default: /usr/local/cyassl)])
|
||||||
|
AC_HELP_STRING([--without-cyassl], [disable CyaSSL detection]),
|
||||||
|
OPT_CYASSL=$withval)
|
||||||
|
|
||||||
|
if test "$OPENSSL_ENABLED" != "1"; then
|
||||||
|
|
||||||
|
if test X"$OPT_CYASSL" != Xno; then
|
||||||
|
|
||||||
|
if test "$OPT_CYASSL" = "yes"; then
|
||||||
|
OPT_CYASSL=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$OPT_CYASSL" ; then
|
||||||
|
dnl check for lib in default first
|
||||||
|
|
||||||
|
trycyassldir="/usr/local/cyassl"
|
||||||
|
|
||||||
|
LDFLAGS="$LDFLAGS -L$trycyassldir/lib"
|
||||||
|
CPPFLAGS="$CPPFLAGS -I$trycyassldir/include"
|
||||||
|
|
||||||
|
AC_CHECK_LIB(cyassl, InitCyaSSL,
|
||||||
|
dnl libcyassl found, set the variable
|
||||||
|
[
|
||||||
|
AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled])
|
||||||
|
AC_SUBST(USE_CYASSL, [1])
|
||||||
|
CYASSL_ENABLED=1
|
||||||
|
USE_CYASSL="yes"
|
||||||
|
curl_ssl_msg="enabled (CyaSSL)"
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$USE_CYASSL" != "xyes"; then
|
||||||
|
dnl add the path and test again
|
||||||
|
addld=-L$OPT_CYASSL/lib$libsuff
|
||||||
|
addcflags=-I$OPT_CYASSL/include
|
||||||
|
cyassllib=$OPT_CYASSL/lib$libsuff
|
||||||
|
|
||||||
|
LDFLAGS="$LDFLAGS $addld"
|
||||||
|
if test "$addcflags" != "-I/usr/include"; then
|
||||||
|
CPPFLAGS="$CPPFLAGS $addcflags"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_CHECK_LIB(cyassl, InitCyaSSL,
|
||||||
|
[
|
||||||
|
AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled])
|
||||||
|
AC_SUBST(USE_CYASSL, [1])
|
||||||
|
CYASSL_ENABLED=1
|
||||||
|
USE_CYASSL="yes"
|
||||||
|
curl_ssl_msg="enabled (CyaSSL)"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
CPPFLAGS=$_cppflags
|
||||||
|
LDFLAGS=$_ldflags
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$USE_CYASSL" = "xyes"; then
|
||||||
|
AC_MSG_NOTICE([detected CyaSSL])
|
||||||
|
|
||||||
|
CURL_LIBS="$CURL_LIBS -lcyassl -lm"
|
||||||
|
LIBS="$LIBS -lcyassl -lm"
|
||||||
|
|
||||||
|
if test -n "$cyassllib"; then
|
||||||
|
dnl when shared libs were found in a path that the run-time
|
||||||
|
dnl linker doesn't search through, we need to add it to
|
||||||
|
dnl LD_LIBRARY_PATH to prevent further configure tests to fail
|
||||||
|
dnl due to this
|
||||||
|
|
||||||
|
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$cyassllib"
|
||||||
|
export LD_LIBRARY_PATH
|
||||||
|
AC_MSG_NOTICE([Added $cyassllib to LD_LIBRARY_PATH])
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi dnl CyaSSL not disabled
|
||||||
|
|
||||||
|
fi dnl OPENSSL != 1
|
||||||
|
|
||||||
dnl ----------------------------------------------------
|
dnl ----------------------------------------------------
|
||||||
dnl NSS. Only check if GnuTLS and OpenSSL are not enabled
|
dnl NSS. Only check if GnuTLS and OpenSSL are not enabled
|
||||||
dnl ----------------------------------------------------
|
dnl ----------------------------------------------------
|
||||||
@@ -1845,7 +1961,7 @@ dnl Default to compiler & linker defaults for NSS files & libraries.
|
|||||||
OPT_NSS=no
|
OPT_NSS=no
|
||||||
|
|
||||||
AC_ARG_WITH(nss,dnl
|
AC_ARG_WITH(nss,dnl
|
||||||
AC_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the installation root (default: /usr/local/)])
|
AC_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the installation root])
|
||||||
AC_HELP_STRING([--without-nss], [disable NSS detection]),
|
AC_HELP_STRING([--without-nss], [disable NSS detection]),
|
||||||
OPT_NSS=$withval)
|
OPT_NSS=$withval)
|
||||||
|
|
||||||
@@ -1933,9 +2049,64 @@ if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
|
|||||||
|
|
||||||
fi dnl OPENSSL != 1 -a GNUTLS_ENABLED != 1
|
fi dnl OPENSSL != 1 -a GNUTLS_ENABLED != 1
|
||||||
|
|
||||||
if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED" = "x"; then
|
OPT_AXTLS=off
|
||||||
|
|
||||||
|
AC_ARG_WITH(axtls,dnl
|
||||||
|
AC_HELP_STRING([--with-axtls=PATH],[Where to look for axTLS, PATH points to the axTLS installation prefix (default: /usr/local). Ignored if another SSL engine is selected.])
|
||||||
|
AC_HELP_STRING([--without-axtls], [disable axTLS]),
|
||||||
|
OPT_AXTLS=$withval)
|
||||||
|
|
||||||
|
if test "$curl_ssl_msg" = "$init_ssl_msg"; then
|
||||||
|
if test X"$OPT_AXTLS" != Xno; then
|
||||||
|
dnl backup the pre-axtls variables
|
||||||
|
CLEANLDFLAGS="$LDFLAGS"
|
||||||
|
CLEANCPPFLAGS="$CPPFLAGS"
|
||||||
|
CLEANLIBS="$LIBS"
|
||||||
|
|
||||||
|
case "$OPT_AXTLS" in
|
||||||
|
yes)
|
||||||
|
dnl --with-axtls (without path) used
|
||||||
|
PREFIX_AXTLS=/usr/local
|
||||||
|
LIB_AXTLS="$PREFIX_AXTLS/lib"
|
||||||
|
LDFLAGS="$LDFLAGS -L$LIB_AXTLS"
|
||||||
|
CPPFLAGS="$CPPFLAGS -I$PREFIX_AXTLS/include"
|
||||||
|
;;
|
||||||
|
off)
|
||||||
|
dnl no --with-axtls option given, just check default places
|
||||||
|
PREFIX_AXTLS=
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
dnl check the given --with-axtls spot
|
||||||
|
PREFIX_AXTLS=$OPT_AXTLS
|
||||||
|
LIB_AXTLS="$PREFIX_AXTLS/lib"
|
||||||
|
LDFLAGS="$LDFLAGS -L$LIB_AXTLS"
|
||||||
|
CPPFLAGS="$CPPFLAGS -I$PREFIX_AXTLS/include"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
AC_CHECK_LIB(axtls, ssl_version,[
|
||||||
|
LIBS="-laxtls $LIBS"
|
||||||
|
AC_DEFINE(USE_AXTLS, 1, [if axTLS is enabled])
|
||||||
|
AC_SUBST(USE_AXTLS, [1])
|
||||||
|
AXTLS_ENABLED=1
|
||||||
|
USE_AXTLS="yes"
|
||||||
|
curl_ssl_msg="enabled (axTLS)"
|
||||||
|
|
||||||
|
|
||||||
|
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_AXTLS"
|
||||||
|
export LD_LIBRARY_PATH
|
||||||
|
AC_MSG_NOTICE([Added $LIB_AXTLS to LD_LIBRARY_PATH])
|
||||||
|
],[
|
||||||
|
LDFLAGS="$CLEANLDFLAGS"
|
||||||
|
CPPFLAGS="$CLEANCPPFLAGS"
|
||||||
|
LIBS="$CLEANLIBS"
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED$AXTLS_ENABLED$CYASSL_ENABLED" = "x"; then
|
||||||
AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.])
|
AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.])
|
||||||
AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-polarssl or --with-nss to address this.])
|
AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyassl, --with-nss or --with-axtls to address this.])
|
||||||
else
|
else
|
||||||
# SSL is enabled, genericly
|
# SSL is enabled, genericly
|
||||||
AC_SUBST(SSL_ENABLED)
|
AC_SUBST(SSL_ENABLED)
|
||||||
@@ -1955,7 +2126,7 @@ dnl **********************************************************************
|
|||||||
dnl Default to compiler & linker defaults for LIBSSH2 files & libraries.
|
dnl Default to compiler & linker defaults for LIBSSH2 files & libraries.
|
||||||
OPT_LIBSSH2=off
|
OPT_LIBSSH2=off
|
||||||
AC_ARG_WITH(libssh2,dnl
|
AC_ARG_WITH(libssh2,dnl
|
||||||
AC_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH points to the LIBSSH2 installation (default: /usr/local/lib); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
|
AC_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH points to the LIBSSH2 installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
|
||||||
AC_HELP_STRING([--without-libssh2], [disable LIBSSH2]),
|
AC_HELP_STRING([--without-libssh2], [disable LIBSSH2]),
|
||||||
OPT_LIBSSH2=$withval)
|
OPT_LIBSSH2=$withval)
|
||||||
|
|
||||||
@@ -1990,6 +2161,7 @@ if test X"$OPT_LIBSSH2" != Xno; then
|
|||||||
|
|
||||||
dnl if given with a prefix, we set -L and -I based on that
|
dnl if given with a prefix, we set -L and -I based on that
|
||||||
if test -n "$PREFIX_SSH2"; then
|
if test -n "$PREFIX_SSH2"; then
|
||||||
|
LIB_SSH2="-lssh2"
|
||||||
LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff
|
LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff
|
||||||
CPP_SSH2=-I${PREFIX_SSH2}/include
|
CPP_SSH2=-I${PREFIX_SSH2}/include
|
||||||
DIR_SSH2=${PREFIX_SSH2}/lib$libsuff
|
DIR_SSH2=${PREFIX_SSH2}/lib$libsuff
|
||||||
@@ -2045,7 +2217,7 @@ dnl **********************************************************************
|
|||||||
dnl Default to compiler & linker defaults for LIBRTMP files & libraries.
|
dnl Default to compiler & linker defaults for LIBRTMP files & libraries.
|
||||||
OPT_LIBRTMP=off
|
OPT_LIBRTMP=off
|
||||||
AC_ARG_WITH(librtmp,dnl
|
AC_ARG_WITH(librtmp,dnl
|
||||||
AC_HELP_STRING([--with-librtmp=PATH],[Where to look for librtmp, PATH points to the LIBRTMP installation (default: /usr/local/lib); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
|
AC_HELP_STRING([--with-librtmp=PATH],[Where to look for librtmp, PATH points to the LIBRTMP installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
|
||||||
AC_HELP_STRING([--without-librtmp], [disable LIBRTMP]),
|
AC_HELP_STRING([--without-librtmp], [disable LIBRTMP]),
|
||||||
OPT_LIBRTMP=$withval)
|
OPT_LIBRTMP=$withval)
|
||||||
|
|
||||||
@@ -2505,7 +2677,8 @@ AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
|
|||||||
CURL_CHECK_LIB_ARES
|
CURL_CHECK_LIB_ARES
|
||||||
AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$embedded_ares = xyes)
|
AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$embedded_ares = xyes)
|
||||||
|
|
||||||
if test "x$enable_shared" = "xyes"; then
|
if test "x$ac_cv_native_windows" != "xyes" &&
|
||||||
|
test "x$enable_shared" = "xyes"; then
|
||||||
build_libhostname=yes
|
build_libhostname=yes
|
||||||
else
|
else
|
||||||
build_libhostname=no
|
build_libhostname=no
|
||||||
@@ -2597,6 +2770,33 @@ AC_HELP_STRING([--disable-crypto-auth],[Disable cryptographic authentication]),
|
|||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
dnl ************************************************************
|
||||||
|
dnl disable TLS-SRP authentication
|
||||||
|
dnl
|
||||||
|
AC_MSG_CHECKING([whether to enable TLS-SRP authentication])
|
||||||
|
AC_ARG_ENABLE(tls-srp,
|
||||||
|
AC_HELP_STRING([--enable-tls-srp],[Enable TLS-SRP authentication])
|
||||||
|
AC_HELP_STRING([--disable-tls-srp],[Disable TLS-SRP authentication]),
|
||||||
|
[ case "$enableval" in
|
||||||
|
no)
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
AC_DEFINE(CURL_DISABLE_TLS_SRP, 1, [to disable TLS-SRP authentication])
|
||||||
|
want_tls_srp=no
|
||||||
|
;;
|
||||||
|
*) AC_MSG_RESULT(yes)
|
||||||
|
want_tls_srp=yes
|
||||||
|
;;
|
||||||
|
esac ],
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
want_tls_srp=yes
|
||||||
|
)
|
||||||
|
|
||||||
|
if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$HAVE_SSLEAY_SRP" = "x1") ; then
|
||||||
|
AC_DEFINE(USE_TLS_SRP, 1, [Use TLS-SRP authentication])
|
||||||
|
USE_TLS_SRP=1
|
||||||
|
curl_tls_srp_msg="enabled"
|
||||||
|
fi
|
||||||
|
|
||||||
dnl ************************************************************
|
dnl ************************************************************
|
||||||
dnl disable cookies support
|
dnl disable cookies support
|
||||||
dnl
|
dnl
|
||||||
@@ -2741,9 +2941,14 @@ fi
|
|||||||
if test "x$USE_WINDOWS_SSPI" = "x1"; then
|
if test "x$USE_WINDOWS_SSPI" = "x1"; then
|
||||||
SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
|
SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
|
||||||
fi
|
fi
|
||||||
if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
|
if test "x$CURL_DISABLE_HTTP" != "x1"; then
|
||||||
-o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1"; then
|
if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
|
||||||
SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
|
-o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1"; then
|
||||||
|
SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "x$USE_TLS_SRP" = "x1"; then
|
||||||
|
SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(SUPPORT_FEATURES)
|
AC_SUBST(SUPPORT_FEATURES)
|
||||||
@@ -2854,6 +3059,7 @@ AC_CONFIG_FILES([Makefile \
|
|||||||
tests/data/Makefile \
|
tests/data/Makefile \
|
||||||
tests/server/Makefile \
|
tests/server/Makefile \
|
||||||
tests/libtest/Makefile \
|
tests/libtest/Makefile \
|
||||||
|
tests/unit/Makefile \
|
||||||
packages/Makefile \
|
packages/Makefile \
|
||||||
packages/Win32/Makefile \
|
packages/Win32/Makefile \
|
||||||
packages/Win32/cygwin/Makefile \
|
packages/Win32/cygwin/Makefile \
|
||||||
@@ -2877,7 +3083,7 @@ CURL_GENERATE_CONFIGUREHELP_PM
|
|||||||
|
|
||||||
AC_MSG_NOTICE([Configured to build curl/libcurl:
|
AC_MSG_NOTICE([Configured to build curl/libcurl:
|
||||||
|
|
||||||
curl version: ${VERSION}
|
curl version: ${CURLVERSION}
|
||||||
Host setup: ${host}
|
Host setup: ${host}
|
||||||
Install prefix: ${prefix}
|
Install prefix: ${prefix}
|
||||||
Compiler: ${CC}
|
Compiler: ${CC}
|
||||||
@@ -2887,6 +3093,7 @@ AC_MSG_NOTICE([Configured to build curl/libcurl:
|
|||||||
krb4 support: ${curl_krb4_msg}
|
krb4 support: ${curl_krb4_msg}
|
||||||
GSSAPI support: ${curl_gss_msg}
|
GSSAPI support: ${curl_gss_msg}
|
||||||
SPNEGO support: ${curl_spnego_msg}
|
SPNEGO support: ${curl_spnego_msg}
|
||||||
|
TLS-SRP support: ${curl_tls_srp_msg}
|
||||||
resolver: ${curl_res_msg}
|
resolver: ${curl_res_msg}
|
||||||
ipv6 support: ${curl_ipv6_msg}
|
ipv6 support: ${curl_ipv6_msg}
|
||||||
IDN support: ${curl_idn_msg}
|
IDN support: ${curl_idn_msg}
|
||||||
|
@@ -189,7 +189,7 @@
|
|||||||
|
|
||||||
3.2 How To Make a Patch with git
|
3.2 How To Make a Patch with git
|
||||||
|
|
||||||
You need to first checkout the respository:
|
You need to first checkout the repository:
|
||||||
|
|
||||||
git clone git://github.com/bagder/curl.git
|
git clone git://github.com/bagder/curl.git
|
||||||
|
|
||||||
@@ -233,47 +233,46 @@
|
|||||||
|
|
||||||
For unix-like operating systems:
|
For unix-like operating systems:
|
||||||
|
|
||||||
http://www.gnu.org/software/patch/patch.html
|
http://www.gnu.org/software/patch/patch.html
|
||||||
http://www.gnu.org/directory/diffutils.html
|
http://www.gnu.org/directory/diffutils.html
|
||||||
|
|
||||||
For Windows:
|
For Windows:
|
||||||
|
|
||||||
http://gnuwin32.sourceforge.net/packages/patch.htm
|
http://gnuwin32.sourceforge.net/packages/patch.htm
|
||||||
http://gnuwin32.sourceforge.net/packages/diffutils.htm
|
http://gnuwin32.sourceforge.net/packages/diffutils.htm
|
||||||
|
|
||||||
3.4 How to get your changes into the main sources
|
3.4 How to get your changes into the main sources
|
||||||
|
|
||||||
1. Submit your patch to the curl-library mailing list
|
Submit your patch to the curl-library mailing list.
|
||||||
|
|
||||||
2. Make the patch against as recent sources as possible.
|
Make the patch against as recent sources as possible.
|
||||||
|
|
||||||
3. Make sure your patch adheres to the source indent and coding style of
|
Make sure your patch adheres to the source indent and coding style of already
|
||||||
already existing source code. Failing to do so just adds more work for me.
|
existing source code. Failing to do so just adds more work for me.
|
||||||
|
|
||||||
4. Respond to replies on the list about the patch and answer questions and/or
|
Respond to replies on the list about the patch and answer questions and/or
|
||||||
fix nits/flaws. This is very important. I will take lack of replies as a
|
fix nits/flaws. This is very important. I will take lack of replies as a sign
|
||||||
sign that you're not very anxious to get your patch accepted and I tend to
|
that you're not very anxious to get your patch accepted and I tend to simply
|
||||||
simply drop such patches from my TODO list.
|
drop such patches from my TODO list.
|
||||||
|
|
||||||
5. If you've followed the above mentioned paragraphs and your patch still
|
If you've followed the above paragraphs and your patch still hasn't been
|
||||||
hasn't been incorporated after some weeks, consider resubmitting it to the
|
incorporated after some weeks, consider resubmitting it to the list.
|
||||||
list.
|
|
||||||
|
|
||||||
3.5 Write good commit messages
|
3.5 Write good commit messages
|
||||||
|
|
||||||
A short guide to how to do fine commit messages in the curl project.
|
A short guide to how to do fine commit messages in the curl project.
|
||||||
|
|
||||||
---- start ----
|
---- start ----
|
||||||
[area]: [short line describing the main effect]
|
[area]: [short line describing the main effect]
|
||||||
|
|
||||||
[separate the above single line from the rest with an empty line]
|
[separate the above single line from the rest with an empty line]
|
||||||
|
|
||||||
[full description, no wider than 72 columns that describe as much as
|
[full description, no wider than 72 columns that describe as much as
|
||||||
possible as to why this change is made, and possibly what things
|
possible as to why this change is made, and possibly what things
|
||||||
it fixes and everything else that is related]
|
it fixes and everything else that is related]
|
||||||
---- stop ----
|
---- stop ----
|
||||||
|
|
||||||
Don't forget to use commit --author="" if you commit someone else's work,
|
Don't forget to use commit --author="" if you commit someone else's work,
|
||||||
and make sure that you have your own user and email setup correctly in git
|
and make sure that you have your own user and email setup correctly in git
|
||||||
before you commit
|
before you commit
|
||||||
|
|
||||||
|
109
docs/FAQ
109
docs/FAQ
@@ -1,4 +1,4 @@
|
|||||||
Updated: October 6, 2010 (http://curl.haxx.se/docs/faq.html)
|
Updated: March 8, 2011 (http://curl.haxx.se/docs/faq.html)
|
||||||
_ _ ____ _
|
_ _ ____ _
|
||||||
___| | | | _ \| |
|
___| | | | _ \| |
|
||||||
/ __| | | | |_) | |
|
/ __| | | | |_) | |
|
||||||
@@ -51,6 +51,8 @@ FAQ
|
|||||||
3.17 How do I list the root dir of an FTP server?
|
3.17 How do I list the root dir of an FTP server?
|
||||||
3.18 Can I use curl to send a POST/PUT and not wait for a response?
|
3.18 Can I use curl to send a POST/PUT and not wait for a response?
|
||||||
3.19 How do I get HTTP from a host using a specific IP address?
|
3.19 How do I get HTTP from a host using a specific IP address?
|
||||||
|
3.20 How to SFTP from my user's home directory?
|
||||||
|
3.21 Protocol xxx not supported or disabled in libcurl
|
||||||
|
|
||||||
4. Running Problems
|
4. Running Problems
|
||||||
4.1 Problems connecting to SSL servers.
|
4.1 Problems connecting to SSL servers.
|
||||||
@@ -107,7 +109,7 @@ FAQ
|
|||||||
|
|
||||||
7. PHP/CURL Issues
|
7. PHP/CURL Issues
|
||||||
7.1 What is PHP/CURL?
|
7.1 What is PHP/CURL?
|
||||||
7.2 Who write PHP/CURL?
|
7.2 Who wrote PHP/CURL?
|
||||||
7.3 Can I perform multiple requests using the same handle?
|
7.3 Can I perform multiple requests using the same handle?
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
@@ -446,10 +448,10 @@ FAQ
|
|||||||
|
|
||||||
2.2 Does curl work/build with other SSL libraries?
|
2.2 Does curl work/build with other SSL libraries?
|
||||||
|
|
||||||
Curl has been written to use OpenSSL, GnuTLS, yassl, NSS or PolarSSL,
|
Curl has been written to use OpenSSL, GnuTLS, yassl, NSS, PolarSSL, axTLS or
|
||||||
although there should not be many problems using a different library. If
|
qssl, although there should not be many problems using a different
|
||||||
anyone does "port" curl to use a different SSL library, we are of course
|
library. If anyone does "port" curl to use a different SSL library, we are
|
||||||
very interested in getting the patch!
|
of course very interested in getting the patch!
|
||||||
|
|
||||||
2.3 Where can I find a copy of LIBEAY32.DLL?
|
2.3 Where can I find a copy of LIBEAY32.DLL?
|
||||||
|
|
||||||
@@ -470,9 +472,13 @@ FAQ
|
|||||||
3.1 curl: (1) SSL is disabled, https: not supported
|
3.1 curl: (1) SSL is disabled, https: not supported
|
||||||
|
|
||||||
If you get this output when trying to get anything from a https:// server,
|
If you get this output when trying to get anything from a https:// server,
|
||||||
it means that the configure script couldn't find all libs and include files
|
it means that the instance of curl/libcurl that you're using was built
|
||||||
it requires for SSL to work. If the configure script fails to find them,
|
without support for this protocol.
|
||||||
curl is simply built without SSL support.
|
|
||||||
|
This could've happened if the configure script that was run at build time
|
||||||
|
couldn't find all libs and include files curl requires for SSL to work. If
|
||||||
|
the configure script fails to find them, curl is simply built without SSL
|
||||||
|
support.
|
||||||
|
|
||||||
To get the https:// support into a curl that was previously built but that
|
To get the https:// support into a curl that was previously built but that
|
||||||
reports that https:// is not supported, you should dig through the document
|
reports that https:// is not supported, you should dig through the document
|
||||||
@@ -715,6 +721,35 @@ FAQ
|
|||||||
|
|
||||||
curl --header "Host: www.example.com" http://127.0.0.1/
|
curl --header "Host: www.example.com" http://127.0.0.1/
|
||||||
|
|
||||||
|
3.20 How to SFTP from my user's home directory?
|
||||||
|
|
||||||
|
Contrary to how FTP works, SFTP and SCP URLs specify the exact directory to
|
||||||
|
work with. It means that if you don't specify that you want the user's home
|
||||||
|
directory, you get the actual root directory.
|
||||||
|
|
||||||
|
To specify a file in your user's home directory, you need to use the correct
|
||||||
|
URL syntax which for sftp might look similar to:
|
||||||
|
|
||||||
|
curl -O -u user:password sftp://example.com/~/file.txt
|
||||||
|
|
||||||
|
and for SCP it is just a different protocol prefix:
|
||||||
|
|
||||||
|
curl -O -u user:password scp://example.com/~/file.txt
|
||||||
|
|
||||||
|
3.21 Protocol xxx not supported or disabled in libcurl
|
||||||
|
|
||||||
|
When passing on a URL to curl to use, it may respond that the particular
|
||||||
|
protocol is not supported or disabled. The particular way this error message
|
||||||
|
is phrased is because curl doesn't make a distinction internally of whether
|
||||||
|
a particular protocol is not supported (ie never got any code added that
|
||||||
|
knows how to speak that protocol) or if it was explicitly disabled. curl can
|
||||||
|
be built to only support a given set of protocols, and the rest would then
|
||||||
|
be disabled or not supported.
|
||||||
|
|
||||||
|
Note that this error will also occur if you pass a wrongly spelled protocol
|
||||||
|
part as in "htpt://example.com" or as in the less evident case if you prefix
|
||||||
|
the protocol part with a space as in " http://example.com/".
|
||||||
|
|
||||||
|
|
||||||
4. Running Problems
|
4. Running Problems
|
||||||
|
|
||||||
@@ -1138,13 +1173,12 @@ FAQ
|
|||||||
the import libraries below. These are the libraries produced by the various
|
the import libraries below. These are the libraries produced by the various
|
||||||
lib/Makefile.* files:
|
lib/Makefile.* files:
|
||||||
|
|
||||||
Target: static lib. import lib for libcurl*.dll.
|
Target: static lib. import lib for libcurl*.dll.
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
MingW: libcurl.a libcurldll.a
|
MingW: libcurl.a libcurldll.a
|
||||||
MSVC (release): libcurl.lib libcurl_imp.lib
|
MSVC (release): libcurl.lib libcurl_imp.lib
|
||||||
MSVC (debug): libcurld.lib libcurld_imp.lib
|
MSVC (debug): libcurld.lib libcurld_imp.lib
|
||||||
Borland: libcurl.lib libcurl_imp.lib
|
Borland: libcurl.lib libcurl_imp.lib
|
||||||
|
|
||||||
|
|
||||||
5.8 libcurl.so.X: open failed: No such file or directory
|
5.8 libcurl.so.X: open failed: No such file or directory
|
||||||
|
|
||||||
@@ -1178,21 +1212,20 @@ FAQ
|
|||||||
- The non-ipv6 resolver that can use one out of four host name resolve calls
|
- The non-ipv6 resolver that can use one out of four host name resolve calls
|
||||||
(depending on what your system supports):
|
(depending on what your system supports):
|
||||||
|
|
||||||
A - gethostbyname()
|
A - gethostbyname()
|
||||||
B - gethostbyname_r() with 3 arguments
|
B - gethostbyname_r() with 3 arguments
|
||||||
C - gethostbyname_r() with 5 arguments
|
C - gethostbyname_r() with 5 arguments
|
||||||
D - gethostbyname_r() with 6 arguments
|
D - gethostbyname_r() with 6 arguments
|
||||||
|
|
||||||
- The ipv6-resolver that uses getaddrinfo()
|
- The ipv6-resolver that uses getaddrinfo()
|
||||||
|
|
||||||
- The c-ares based name resolver that uses the c-ares library for resolves.
|
- The c-ares based name resolver that uses the c-ares library for resolves.
|
||||||
Using this offers asynchronous name resolves but it currently has no IPv6
|
Using this offers asynchronous name resolves.
|
||||||
support.
|
|
||||||
|
|
||||||
- The threaded resolver (default option on Windows). It uses:
|
- The threaded resolver (default option on Windows). It uses:
|
||||||
|
|
||||||
A - gethostbyname() on plain ipv4 hosts
|
A - gethostbyname() on plain ipv4 hosts
|
||||||
B - getaddrinfo() on ipv6-enabled hosts
|
B - getaddrinfo() on ipv6-enabled hosts
|
||||||
|
|
||||||
Also note that libcurl never resolves or reverse-lookups addresses given as
|
Also note that libcurl never resolves or reverse-lookups addresses given as
|
||||||
pure numbers, such as 127.0.0.1 or ::1.
|
pure numbers, such as 127.0.0.1 or ::1.
|
||||||
@@ -1224,16 +1257,18 @@ FAQ
|
|||||||
|
|
||||||
5.13 How do I stop an ongoing transfer?
|
5.13 How do I stop an ongoing transfer?
|
||||||
|
|
||||||
There are several ways, but none of them are instant. There is no function
|
With the easy interface you make sure to return the correct error code from
|
||||||
you can call from another thread or similar that will stop it immediately.
|
one of the callbacks, but none of them are instant. There is no function you
|
||||||
|
can call from another thread or similar that will stop it immediately.
|
||||||
Instead you need to make sure that one of the callbacks you use return an
|
Instead you need to make sure that one of the callbacks you use return an
|
||||||
appropriate value that will stop the transfer.
|
appropriate value that will stop the transfer.
|
||||||
|
|
||||||
Suitable callbacks that you can do this with include the progress callback,
|
Suitable callbacks that you can do this with include the progress callback,
|
||||||
the read callback and the write callback.
|
the read callback and the write callback.
|
||||||
|
|
||||||
If you're using the multi interface, you also stop a transfer by removing
|
If you're using the multi interface, you can also stop a transfer by
|
||||||
the particular easy handle from the multi stack.
|
removing the particular easy handle from the multi stack. At any moment you
|
||||||
|
think the transfer is done.
|
||||||
|
|
||||||
5.14 Using C++ non-static functions for callbacks?
|
5.14 Using C++ non-static functions for callbacks?
|
||||||
|
|
||||||
@@ -1243,14 +1278,14 @@ FAQ
|
|||||||
member function that is passed a pointer to the class:
|
member function that is passed a pointer to the class:
|
||||||
|
|
||||||
// f is the pointer to your object.
|
// f is the pointer to your object.
|
||||||
static YourClass::staticFunction(void *buffer, size_t sz, size_t n, void *f)
|
static YourClass::func(void *buffer, size_t sz, size_t n, void *f)
|
||||||
{
|
{
|
||||||
// Call non-static member function.
|
// Call non-static member function.
|
||||||
static_cast<YourClass*>(f)->nonStaticFunction();
|
static_cast<YourClass*>(f)->nonStaticFunction();
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is how you pass pointer to the static function:
|
// This is how you pass pointer to the static function:
|
||||||
curl_easy_setopt(hcurl, CURLOPT_WRITEFUNCTION, YourClass:staticFunction);
|
curl_easy_setopt(hcurl, CURLOPT_WRITEFUNCTION, YourClass:func);
|
||||||
curl_easy_setopt(hcurl, CURLOPT_WRITEDATA, this);
|
curl_easy_setopt(hcurl, CURLOPT_WRITEDATA, this);
|
||||||
|
|
||||||
5.15 How do I get an FTP directory listing?
|
5.15 How do I get an FTP directory listing?
|
||||||
@@ -1345,12 +1380,16 @@ FAQ
|
|||||||
You do not have to reveal or make public any changes to the libcurl source
|
You do not have to reveal or make public any changes to the libcurl source
|
||||||
code.
|
code.
|
||||||
|
|
||||||
You do not have to reveal or make public that you are using libcurl within
|
You do not have to broadcast to the world that you are using libcurl within
|
||||||
your app.
|
your app.
|
||||||
|
|
||||||
As can be seen here: http://curl.haxx.se/docs/companies.html and
|
All we ask is that you disclose "the copyright notice and this permission
|
||||||
elsewhere, more and more companies are discovering the power
|
notice" somewhere. Most probably like in the documentation or in the section
|
||||||
of libcurl and take advantage of it even in commercial environments.
|
where other third party dependencies already are mentioned and acknowledged.
|
||||||
|
|
||||||
|
As can be seen here: http://curl.haxx.se/docs/companies.html and elsewhere,
|
||||||
|
more and more companies are discovering the power of libcurl and take
|
||||||
|
advantage of it even in commercial environments.
|
||||||
|
|
||||||
|
|
||||||
7. PHP/CURL Issues
|
7. PHP/CURL Issues
|
||||||
@@ -1366,7 +1405,7 @@ FAQ
|
|||||||
CURL (often using all caps) or sometimes ext/curl, but both cause much
|
CURL (often using all caps) or sometimes ext/curl, but both cause much
|
||||||
confusion to users which in turn gives us a higher question load.
|
confusion to users which in turn gives us a higher question load.
|
||||||
|
|
||||||
7.2 Who write PHP/CURL?
|
7.2 Who wrote PHP/CURL?
|
||||||
|
|
||||||
PHP/CURL is a module that comes with the regular PHP package. It depends and
|
PHP/CURL is a module that comes with the regular PHP package. It depends and
|
||||||
uses libcurl, so you need to have libcurl installed properly first before
|
uses libcurl, so you need to have libcurl installed properly first before
|
||||||
|
@@ -125,7 +125,7 @@ FILE
|
|||||||
FOOTNOTES
|
FOOTNOTES
|
||||||
=========
|
=========
|
||||||
|
|
||||||
*1 = requires OpenSSL, GnuTLS, NSS, yassl or PolarSSL
|
*1 = requires OpenSSL, GnuTLS, NSS, yassl, axTLS or PolarSSL
|
||||||
*2 = requires OpenLDAP
|
*2 = requires OpenLDAP
|
||||||
*3 = requires a GSSAPI-compliant library, such as Heimdal or similar.
|
*3 = requires a GSSAPI-compliant library, such as Heimdal or similar.
|
||||||
*4 = requires FBopenssl
|
*4 = requires FBopenssl
|
||||||
|
106
docs/INSTALL
106
docs/INSTALL
@@ -142,6 +142,9 @@ UNIX
|
|||||||
To build with PolarSSL support instead of OpenSSL for SSL/TLS, note that
|
To build with PolarSSL support instead of OpenSSL for SSL/TLS, note that
|
||||||
you need to use both --without-ssl and --with-polarssl.
|
you need to use both --without-ssl and --with-polarssl.
|
||||||
|
|
||||||
|
To build with axTLS support instead of OpenSSL for TLS, note that you
|
||||||
|
need to use both --without-ssl and --with-axtls.
|
||||||
|
|
||||||
To get GSSAPI support, build with --with-gssapi and have the MIT or
|
To get GSSAPI support, build with --with-gssapi and have the MIT or
|
||||||
Heimdal Kerberos 5 packages installed.
|
Heimdal Kerberos 5 packages installed.
|
||||||
|
|
||||||
@@ -208,9 +211,9 @@ Win32
|
|||||||
adjust as necessary. It is also possible to override these paths with
|
adjust as necessary. It is also possible to override these paths with
|
||||||
environment variables, for example:
|
environment variables, for example:
|
||||||
|
|
||||||
set ZLIB_PATH=c:\zlib-1.2.3
|
set ZLIB_PATH=c:\zlib-1.2.5
|
||||||
set OPENSSL_PATH=c:\openssl-0.9.8k
|
set OPENSSL_PATH=c:\openssl-0.9.8r
|
||||||
set LIBSSH2_PATH=c:\libssh2-1.1
|
set LIBSSH2_PATH=c:\libssh2-1.2.7
|
||||||
|
|
||||||
ATTENTION: if you want to build with libssh2 support you have to use latest
|
ATTENTION: if you want to build with libssh2 support you have to use latest
|
||||||
version 0.17 - previous versions will NOT work with 7.17.0 and later!
|
version 0.17 - previous versions will NOT work with 7.17.0 and later!
|
||||||
@@ -229,7 +232,7 @@ Win32
|
|||||||
|
|
||||||
If you want to enable LDAPS support then set LDAPS=1.
|
If you want to enable LDAPS support then set LDAPS=1.
|
||||||
|
|
||||||
- optional MingW32-built OpenlDAP SDK available from:
|
- optional MingW32-built OpenLDAP SDK available from:
|
||||||
http://www.gknw.net/mirror/openldap/
|
http://www.gknw.net/mirror/openldap/
|
||||||
- optional recent Novell CLDAP SDK available from:
|
- optional recent Novell CLDAP SDK available from:
|
||||||
http://developer.novell.com/ndk/cldap.htm
|
http://developer.novell.com/ndk/cldap.htm
|
||||||
@@ -311,7 +314,7 @@ Win32
|
|||||||
documentation on how to compile zlib. Define the ZLIB_PATH environment
|
documentation on how to compile zlib. Define the ZLIB_PATH environment
|
||||||
variable to the location of zlib.h and zlib.lib, for example:
|
variable to the location of zlib.h and zlib.lib, for example:
|
||||||
|
|
||||||
set ZLIB_PATH=c:\zlib-1.2.3
|
set ZLIB_PATH=c:\zlib-1.2.5
|
||||||
|
|
||||||
Then run 'nmake vc-zlib' in curl's root directory.
|
Then run 'nmake vc-zlib' in curl's root directory.
|
||||||
|
|
||||||
@@ -325,7 +328,7 @@ Win32
|
|||||||
Before running nmake define the OPENSSL_PATH environment variable with
|
Before running nmake define the OPENSSL_PATH environment variable with
|
||||||
the root/base directory of OpenSSL, for example:
|
the root/base directory of OpenSSL, for example:
|
||||||
|
|
||||||
set OPENSSL_PATH=c:\openssl-0.9.8k
|
set OPENSSL_PATH=c:\openssl-0.9.8q
|
||||||
|
|
||||||
Then run 'nmake vc-ssl' or 'nmake vc-ssl-dll' in curl's root
|
Then run 'nmake vc-ssl' or 'nmake vc-ssl-dll' in curl's root
|
||||||
directory. 'nmake vc-ssl' will create a libcurl static and dynamic
|
directory. 'nmake vc-ssl' will create a libcurl static and dynamic
|
||||||
@@ -374,30 +377,49 @@ Win32
|
|||||||
Borland C++ compiler
|
Borland C++ compiler
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
compile openssl
|
Ensure that your build environment is properly set up to use the compiler
|
||||||
|
and associated tools. PATH environment variable must include the path to
|
||||||
|
bin subdirectory of your compiler installation, eg: c:\Borland\BCC55\bin
|
||||||
|
|
||||||
Make sure you include the paths to curl/include and openssl/inc32 in
|
It is advisable to set environment variable BCCDIR to the base path of
|
||||||
your bcc32.cnf file
|
the compiler installation.
|
||||||
|
|
||||||
eg : -I"c:\Bcc55\include;c:\path_curl\include;c:\path_openssl\inc32"
|
set BCCDIR=c:\Borland\BCC55
|
||||||
|
|
||||||
Check to make sure that all of the sources listed in lib/Makefile.b32
|
In order to build a plain vanilla version of curl and libcurl run the
|
||||||
are present in the /path_to_curl/lib directory. (Check the src
|
following command from curl's root directory:
|
||||||
directory for missing ones.)
|
|
||||||
|
|
||||||
Make sure the environment variable "BCCDIR" is set to the install
|
make borland
|
||||||
location for the compiler eg : c:\Borland\BCC55
|
|
||||||
|
|
||||||
command line:
|
To build curl and libcurl with zlib and OpenSSL support set environment
|
||||||
make -f /path_to_curl/lib/Makefile-ssl.b32
|
variables ZLIB_PATH and OPENSSL_PATH to the base subdirectories of the
|
||||||
|
already built zlib and OpenSSL libraries and from curl's root directory
|
||||||
|
run command:
|
||||||
|
|
||||||
compile simplessl.c with appropriate links
|
make borland-ssl-zlib
|
||||||
|
|
||||||
|
libcurl library will be built in 'lib' subdirectory while curl tool
|
||||||
|
is built in 'src' subdirectory. In order to use libcurl library it is
|
||||||
|
advisable to modify compiler's configuration file bcc32.cfg located
|
||||||
|
in c:\Borland\BCC55\bin to reflect the location of libraries include
|
||||||
|
paths for example the '-I' line could result in something like:
|
||||||
|
|
||||||
|
-I"c:\Borland\BCC55\include;c:\curl\include;c:\openssl\inc32"
|
||||||
|
|
||||||
|
bcc3.cfg '-L' line could also be modified to reflect the location of
|
||||||
|
of libcurl library resulting for example:
|
||||||
|
|
||||||
|
-L"c:\Borland\BCC55\lib;c:\curl\lib;c:\openssl\out32"
|
||||||
|
|
||||||
|
In order to build sample program 'simple.c' from the docs\examples
|
||||||
|
subdirectory run following command from mentioned subdirectory:
|
||||||
|
|
||||||
|
bcc32 simple.c libcurl.lib cw32mt.lib
|
||||||
|
|
||||||
|
In order to build sample program simplessl.c an SSL enabled libcurl
|
||||||
|
is required, as well as the OpenSSL libeay32.lib and ssleay32.lib
|
||||||
|
libraries.
|
||||||
|
|
||||||
c:\curl\docs\examples\> bcc32 -L c:\path_to_curl\lib\libcurl.lib
|
|
||||||
-L c:\borland\bcc55\lib\psdk\ws2_32.lib
|
|
||||||
-L c:\openssl\out32\libeay32.lib
|
|
||||||
-L c:\openssl\out32\ssleay32.lib
|
|
||||||
simplessl.c
|
|
||||||
|
|
||||||
OTHER MSVC IDEs
|
OTHER MSVC IDEs
|
||||||
---------------
|
---------------
|
||||||
@@ -638,7 +660,7 @@ NetWare
|
|||||||
Builds automatically created 8 times a day from current git are here:
|
Builds automatically created 8 times a day from current git are here:
|
||||||
http://www.gknw.net/mirror/curl/autobuilds/
|
http://www.gknw.net/mirror/curl/autobuilds/
|
||||||
the status of these builds can be viewed at the autobuild table:
|
the status of these builds can be viewed at the autobuild table:
|
||||||
http://curl.haxx.se/auto/
|
http://curl.haxx.se/dev/builds.html
|
||||||
|
|
||||||
|
|
||||||
eCos
|
eCos
|
||||||
@@ -882,9 +904,9 @@ REDUCING SIZE
|
|||||||
.comment section).
|
.comment section).
|
||||||
|
|
||||||
Using these techniques it is possible to create a basic HTTP-only shared
|
Using these techniques it is possible to create a basic HTTP-only shared
|
||||||
libcurl library for i386 Linux platforms that is only 98 KiB in size, and
|
libcurl library for i386 Linux platforms that is only 101 KiB in size, and
|
||||||
an FTP-only library that is 94 KiB in size (as of libcurl version 7.20.0,
|
an FTP-only library that is 105 KiB in size (as of libcurl version 7.21.5,
|
||||||
using gcc 4.3.3).
|
using gcc 4.4.3).
|
||||||
|
|
||||||
You may find that statically linking libcurl to your application will
|
You may find that statically linking libcurl to your application will
|
||||||
result in a lower total size than dynamically linking.
|
result in a lower total size than dynamically linking.
|
||||||
@@ -980,17 +1002,21 @@ PORTS
|
|||||||
Useful URLs
|
Useful URLs
|
||||||
===========
|
===========
|
||||||
|
|
||||||
c-ares http://daniel.haxx.se/projects/c-ares/license.html
|
axTLS http://axtls.sourceforge.net/
|
||||||
GNU GSS http://www.gnu.org/software/gss/
|
c-ares http://c-ares.haxx.se/
|
||||||
GnuTLS http://www.gnu.org/software/gnutls/
|
GNU GSS http://www.gnu.org/software/gss/
|
||||||
Heimdal http://www.pdc.kth.se/heimdal/
|
GnuTLS http://www.gnu.org/software/gnutls/
|
||||||
libidn http://www.gnu.org/software/libidn/
|
Heimdal http://www.pdc.kth.se/heimdal/
|
||||||
libssh2 http://www.libssh2.org
|
libidn http://www.gnu.org/software/libidn/
|
||||||
MingW http://www.mingw.org
|
libssh2 http://www.libssh2.org/
|
||||||
MIT Kerberos http://web.mit.edu/kerberos/www/dist/
|
MIT Kerberos http://web.mit.edu/kerberos/www/dist/
|
||||||
NSS http://www.mozilla.org/projects/security/pki/nss/
|
NSS http://www.mozilla.org/projects/security/pki/nss/
|
||||||
OpenLDAP http://www.openldap.org
|
OpenLDAP http://www.openldap.org/
|
||||||
OpenSSL http://www.openssl.org
|
OpenSSL http://www.openssl.org/
|
||||||
PolarSSL http://polarssl.org
|
PolarSSL http://polarssl.org/
|
||||||
yassl http://www.yassl.com/
|
yassl http://www.yassl.com/
|
||||||
Zlib http://www.gzip.org/zlib/
|
Zlib http://www.zlib.net/
|
||||||
|
|
||||||
|
MingW http://www.mingw.org/
|
||||||
|
MinGW-w64 http://mingw-w64.sourceforge.net/
|
||||||
|
OpenWatcom http://www.openwatcom.org/
|
||||||
|
@@ -15,7 +15,7 @@ INTERNALS
|
|||||||
GIT
|
GIT
|
||||||
===
|
===
|
||||||
All changes to the sources are committed to the git repository as soon as
|
All changes to the sources are committed to the git repository as soon as
|
||||||
they're somewhat verified to work. Changes shall be commited as independently
|
they're somewhat verified to work. Changes shall be committed as independently
|
||||||
as possible so that individual changes can be easier spotted and tracked
|
as possible so that individual changes can be easier spotted and tracked
|
||||||
afterwards.
|
afterwards.
|
||||||
|
|
||||||
@@ -39,11 +39,12 @@ Portability
|
|||||||
libssh2 0.16
|
libssh2 0.16
|
||||||
c-ares 1.6.0
|
c-ares 1.6.0
|
||||||
libidn 0.4.1
|
libidn 0.4.1
|
||||||
*yassl 1.4.0 (http://curl.haxx.se/mail/lib-2008-02/0093.html)
|
cyassl 1.4.0
|
||||||
openldap 2.0
|
openldap 2.0
|
||||||
MIT krb5 lib 1.2.4
|
MIT krb5 lib 1.2.4
|
||||||
qsossl V5R2M0
|
qsossl V5R2M0
|
||||||
NSS 3.11.x
|
NSS 3.11.x
|
||||||
|
axTLS 1.2.7
|
||||||
Heimdal ?
|
Heimdal ?
|
||||||
|
|
||||||
* = only partly functional, but that's due to bugs in the third party lib, not
|
* = only partly functional, but that's due to bugs in the third party lib, not
|
||||||
@@ -90,7 +91,7 @@ Windows vs Unix
|
|||||||
do it etc there might be reasons for applications to alter that behaviour.
|
do it etc there might be reasons for applications to alter that behaviour.
|
||||||
|
|
||||||
3. The file descriptors for network communication and file operations are
|
3. The file descriptors for network communication and file operations are
|
||||||
not easily interchangable as in unix.
|
not easily interchangeable as in unix.
|
||||||
|
|
||||||
We avoid this by not trying any funny tricks on file descriptors.
|
We avoid this by not trying any funny tricks on file descriptors.
|
||||||
|
|
||||||
@@ -182,7 +183,7 @@ Library
|
|||||||
|
|
||||||
Some time during the DO function, the Curl_setup_transfer() function must
|
Some time during the DO function, the Curl_setup_transfer() function must
|
||||||
be called with some basic info about the upcoming transfer: what socket(s)
|
be called with some basic info about the upcoming transfer: what socket(s)
|
||||||
to read/write and the expected file tranfer sizes (if known).
|
to read/write and the expected file transfer sizes (if known).
|
||||||
|
|
||||||
o Transfer()
|
o Transfer()
|
||||||
|
|
||||||
@@ -224,15 +225,15 @@ Library
|
|||||||
A quick roundup on internal function sequences (many of these call
|
A quick roundup on internal function sequences (many of these call
|
||||||
protocol-specific function-pointers):
|
protocol-specific function-pointers):
|
||||||
|
|
||||||
curl_connect - connects to a remote site and does initial connect fluff
|
Curl_connect - connects to a remote site and does initial connect fluff
|
||||||
This also checks for an existing connection to the requested site and uses
|
This also checks for an existing connection to the requested site and uses
|
||||||
that one if it is possible.
|
that one if it is possible.
|
||||||
|
|
||||||
curl_do - starts a transfer
|
Curl_do - starts a transfer
|
||||||
curl_transfer() - transfers data
|
Curl_handler::do_it() - transfers data
|
||||||
curl_done - ends a transfer
|
Curl_done - ends a transfer
|
||||||
|
|
||||||
curl_disconnect - disconnects from a remote site. This is called when the
|
Curl_disconnect - disconnects from a remote site. This is called when the
|
||||||
disconnect is really requested, which doesn't necessarily have to be
|
disconnect is really requested, which doesn't necessarily have to be
|
||||||
exactly after curl_done in case we want to keep the connection open for
|
exactly after curl_done in case we want to keep the connection open for
|
||||||
a while.
|
a while.
|
||||||
@@ -249,16 +250,16 @@ Library
|
|||||||
HTTPS uses in almost every means the same procedure as HTTP, with only two
|
HTTPS uses in almost every means the same procedure as HTTP, with only two
|
||||||
exceptions: the connect procedure is different and the function used to read
|
exceptions: the connect procedure is different and the function used to read
|
||||||
or write from the socket is different, although the latter fact is hidden in
|
or write from the socket is different, although the latter fact is hidden in
|
||||||
the source by the use of curl_read() for reading and curl_write() for writing
|
the source by the use of Curl_read() for reading and Curl_write() for writing
|
||||||
data to the remote server.
|
data to the remote server.
|
||||||
|
|
||||||
http_chunks.c contains functions that understands HTTP 1.1 chunked transfer
|
http_chunks.c contains functions that understands HTTP 1.1 chunked transfer
|
||||||
encoding.
|
encoding.
|
||||||
|
|
||||||
An interesting detail with the HTTP(S) request, is the add_buffer() series of
|
An interesting detail with the HTTP(S) request, is the Curl_add_buffer()
|
||||||
functions we use. They append data to one single buffer, and when the
|
series of functions we use. They append data to one single buffer, and when
|
||||||
building is done the entire request is sent off in one single write. This is
|
the building is done the entire request is sent off in one single write. This
|
||||||
done this way to overcome problems with flawed firewalls and lame servers.
|
is done this way to overcome problems with flawed firewalls and lame servers.
|
||||||
|
|
||||||
FTP
|
FTP
|
||||||
|
|
||||||
@@ -284,14 +285,14 @@ Library
|
|||||||
|
|
||||||
LDAP
|
LDAP
|
||||||
|
|
||||||
Everything LDAP is in lib/ldap.c.
|
Everything LDAP is in lib/ldap.c and lib/openldap.c
|
||||||
|
|
||||||
GENERAL
|
GENERAL
|
||||||
|
|
||||||
URL encoding and decoding, called escaping and unescaping in the source code,
|
URL encoding and decoding, called escaping and unescaping in the source code,
|
||||||
is found in lib/escape.c.
|
is found in lib/escape.c.
|
||||||
|
|
||||||
While transfering data in Transfer() a few functions might get used.
|
While transferring data in Transfer() a few functions might get used.
|
||||||
curl_getdate() in lib/parsedate.c is for HTTP date comparisons (and more).
|
curl_getdate() in lib/parsedate.c is for HTTP date comparisons (and more).
|
||||||
|
|
||||||
lib/getenv.c offers curl_getenv() which is for reading environment variables
|
lib/getenv.c offers curl_getenv() which is for reading environment variables
|
||||||
@@ -303,7 +304,7 @@ Library
|
|||||||
lib/netrc.c holds the .netrc parser
|
lib/netrc.c holds the .netrc parser
|
||||||
|
|
||||||
lib/timeval.c features replacement functions for systems that don't have
|
lib/timeval.c features replacement functions for systems that don't have
|
||||||
gettimeofday() and a few support functions for timeval convertions.
|
gettimeofday() and a few support functions for timeval conversions.
|
||||||
|
|
||||||
A function named curl_version() that returns the full curl version string is
|
A function named curl_version() that returns the full curl version string is
|
||||||
found in lib/version.c.
|
found in lib/version.c.
|
||||||
@@ -356,8 +357,10 @@ multi interface/non-blocking
|
|||||||
|
|
||||||
The FTP and the SFTP/SCP protocols are thus perfect examples of how we adapt
|
The FTP and the SFTP/SCP protocols are thus perfect examples of how we adapt
|
||||||
and adjust the code to allow non-blocking operations even on multi-stage
|
and adjust the code to allow non-blocking operations even on multi-stage
|
||||||
protocols. The DICT, LDAP and TELNET are crappy examples and they are subject
|
protocols. They are built around state machines that return when they could
|
||||||
for rewrite in the future to better fit the libcurl protocol family.
|
block waiting for data. The DICT, LDAP and TELNET protocols are crappy
|
||||||
|
examples and they are subject for rewrite in the future to better fit the
|
||||||
|
libcurl protocol family.
|
||||||
|
|
||||||
SSL libraries
|
SSL libraries
|
||||||
=============
|
=============
|
||||||
@@ -379,7 +382,9 @@ Library Symbols
|
|||||||
All symbols used internally in libcurl must use a 'Curl_' prefix if they're
|
All symbols used internally in libcurl must use a 'Curl_' prefix if they're
|
||||||
used in more than a single file. Single-file symbols must be made static.
|
used in more than a single file. Single-file symbols must be made static.
|
||||||
Public ("exported") symbols must use a 'curl_' prefix. (There are exceptions,
|
Public ("exported") symbols must use a 'curl_' prefix. (There are exceptions,
|
||||||
but they are to be changed to follow this pattern in future versions.)
|
but they are to be changed to follow this pattern in future versions.) Public
|
||||||
|
API functions are marked with CURL_EXTERN in the public header files so that
|
||||||
|
all others can be hidden on platforms where this is possible.
|
||||||
|
|
||||||
Return Codes and Informationals
|
Return Codes and Informationals
|
||||||
===============================
|
===============================
|
||||||
@@ -458,31 +463,43 @@ Memory Debugging
|
|||||||
Test Suite
|
Test Suite
|
||||||
==========
|
==========
|
||||||
|
|
||||||
Since November 2000, a test suite has evolved. It is placed in its own
|
The test suite is placed in its own subdirectory directly off the root in the
|
||||||
subdirectory directly off the root in the curl archive tree, and it contains
|
curl archive tree, and it contains a bunch of scripts and a lot of test case
|
||||||
a bunch of scripts and a lot of test case data.
|
data.
|
||||||
|
|
||||||
The main test script is runtests.pl that will invoke the two servers
|
The main test script is runtests.pl that will invoke test servers like
|
||||||
httpserver.pl and ftpserver.pl before all the test cases are performed. The
|
httpserver.pl and ftpserver.pl before all the test cases are performed. The
|
||||||
test suite currently only runs on unix-like platforms.
|
test suite currently only runs on unix-like platforms.
|
||||||
|
|
||||||
You'll find a complete description of the test case data files in the
|
You'll find a description of the test suite in the tests/README file, and the
|
||||||
tests/README file.
|
test case data files in the tests/FILEFORMAT file.
|
||||||
|
|
||||||
The test suite automatically detects if curl was built with the memory
|
The test suite automatically detects if curl was built with the memory
|
||||||
debugging enabled, and if it was it will detect memory leaks too.
|
debugging enabled, and if it was it will detect memory leaks, too.
|
||||||
|
|
||||||
Building Releases
|
Building Releases
|
||||||
=================
|
=================
|
||||||
|
|
||||||
There's no magic to this. When you consider everything stable enough to be
|
There's no magic to this. When you consider everything stable enough to be
|
||||||
released, run the 'maketgz' script (using 'make distcheck' will give you a
|
released, do this:
|
||||||
pretty good view on the status of the current sources). maketgz prompts for
|
|
||||||
version number of the client and the library before it creates a release
|
|
||||||
archive. maketgz uses 'make dist' for the actual archive building, why you
|
|
||||||
need to fill in the Makefile.am files properly for which files that should
|
|
||||||
be included in the release archives.
|
|
||||||
|
|
||||||
NOTE: you need to have curl checked out from git to be able to do a proper
|
1. Tag the source code accordingly.
|
||||||
|
|
||||||
|
2. run the 'maketgz' script (using 'make distcheck' will give you a pretty
|
||||||
|
good view on the status of the current sources). maketgz requires a
|
||||||
|
version number and creates the release archive. maketgz uses 'make dist'
|
||||||
|
for the actual archive building, why you need to fill in the Makefile.am
|
||||||
|
files properly for which files that should be included in the release
|
||||||
|
archives.
|
||||||
|
|
||||||
|
3. When that's complete, sign the output files.
|
||||||
|
|
||||||
|
4. Upload
|
||||||
|
|
||||||
|
5. Update web site and changelog on site
|
||||||
|
|
||||||
|
6. Send announcement to the mailing lists
|
||||||
|
|
||||||
|
NOTE: you must have curl checked out from git to be able to do a proper
|
||||||
release build. The release tarballs do not have everything setup in order to
|
release build. The release tarballs do not have everything setup in order to
|
||||||
do releases properly.
|
do releases properly.
|
||||||
|
@@ -55,6 +55,10 @@ NSS http://www.mozilla.org/projects/security/pki/nss/
|
|||||||
grant you different permissions and impose different obligations. You
|
grant you different permissions and impose different obligations. You
|
||||||
should select the license that best meets your needs.
|
should select the license that best meets your needs.
|
||||||
|
|
||||||
|
axTLS http://axtls.sourceforge.net/
|
||||||
|
|
||||||
|
(May be used for SSL/TLS support) Uses a Modified BSD-style license.
|
||||||
|
|
||||||
c-ares http://daniel.haxx.se/projects/c-ares/license.html
|
c-ares http://daniel.haxx.se/projects/c-ares/license.html
|
||||||
|
|
||||||
(Used for asynchronous name resolves) Uses an MIT license that is very
|
(Used for asynchronous name resolves) Uses an MIT license that is very
|
||||||
|
213
docs/MAIL-ETIQUETTE
Normal file
213
docs/MAIL-ETIQUETTE
Normal file
@@ -0,0 +1,213 @@
|
|||||||
|
_ _ ____ _
|
||||||
|
___| | | | _ \| |
|
||||||
|
/ __| | | | |_) | |
|
||||||
|
| (__| |_| | _ <| |___
|
||||||
|
\___|\___/|_| \_\_____|
|
||||||
|
|
||||||
|
MAIL ETIQUETTE
|
||||||
|
|
||||||
|
1. About the lists
|
||||||
|
1.1 Mailing Lists
|
||||||
|
1.2 Netiquette
|
||||||
|
1.3 Do Not Mail a Single Individual
|
||||||
|
1.4 Subscription Required
|
||||||
|
1.5 Moderation of new posters
|
||||||
|
1.6 Handling trolls and spam
|
||||||
|
|
||||||
|
2. Sending mail
|
||||||
|
2.1 Reply or New Mail
|
||||||
|
2.2 Reply to the List
|
||||||
|
2.3 Use a Sensible Subject
|
||||||
|
2.4 Do Not Top-Post
|
||||||
|
2.5 HTML is not for mails
|
||||||
|
2.6 Quoting
|
||||||
|
2.7 Digest
|
||||||
|
2.8 Please Tell Us How You Solved The Problem!
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
1. About the lists
|
||||||
|
|
||||||
|
1.1 Mailing Lists
|
||||||
|
|
||||||
|
The mailing lists we have are all listed and described at
|
||||||
|
http://curl.haxx.se/mail/
|
||||||
|
|
||||||
|
Each mailing list is targeted to a specific set of users and subjects,
|
||||||
|
please use the one or the ones that suit you the most.
|
||||||
|
|
||||||
|
Each mailing list have hundreds up to thousands of readers, meaning that
|
||||||
|
each mail sent will be received and read by a very large amount of people.
|
||||||
|
People from various cultures, regions, religions and continents.
|
||||||
|
|
||||||
|
1.2 Netiquette
|
||||||
|
|
||||||
|
Netiquette is a common name for how to behave on the internet. Of course, in
|
||||||
|
each particular group and subculture there will be differences in what is
|
||||||
|
acceptable and what is considered good manners.
|
||||||
|
|
||||||
|
This document outlines what we in the cURL project considers to be good
|
||||||
|
etiquette, and primarily this focus on how to behave on and how to use our
|
||||||
|
mailing lists.
|
||||||
|
|
||||||
|
1.3 Do Not Mail a Single Individual
|
||||||
|
|
||||||
|
Many people send one question to one person. One person gets many mails, and
|
||||||
|
there is only one person who can give you a reply. The question may be
|
||||||
|
something that other people are also wanting to ask. These other people have
|
||||||
|
no way to read the reply, but to ask the one person the question. The one
|
||||||
|
person consequently gets overloaded with mail.
|
||||||
|
|
||||||
|
If you really want to contact an individual and perhaps pay for his or her's
|
||||||
|
services, by all means go ahead, but if it's just another curl question,
|
||||||
|
take it to a suitable list instead.
|
||||||
|
|
||||||
|
1.4 Subscription Required
|
||||||
|
|
||||||
|
All curl mailing lists require that you are subscribed to allow a mail to go
|
||||||
|
through to all the subscribers.
|
||||||
|
|
||||||
|
If you post without being subscribed (or from a different mail address than
|
||||||
|
the one you are subscribed with), your mail will simply be silently
|
||||||
|
discarded. You have to subscribe first, then post.
|
||||||
|
|
||||||
|
The reason for this unfortunate and strict subscription policy is of course
|
||||||
|
to stop spam from pestering the lists.
|
||||||
|
|
||||||
|
1.5 Moderation of new posters
|
||||||
|
|
||||||
|
Several of the curl mailing lists automatically make all posts from new
|
||||||
|
subscribers require moderation. This means that after you've subscribed and
|
||||||
|
send your first mail to a list, that mail will not be let through to the
|
||||||
|
list until a mailing list administrator has verified that it is OK and
|
||||||
|
permits it to get posted.
|
||||||
|
|
||||||
|
Once a first post has been made that proves the sender is actually talking
|
||||||
|
about curl-related subjects, the moderation "flag" will be switched off and
|
||||||
|
future posts will go through without being moderated.
|
||||||
|
|
||||||
|
The reason for this moderation policy is that we do suffer from spammers who
|
||||||
|
actually subscribe and send spam to our lists.
|
||||||
|
|
||||||
|
1.6 Handling trolls and spam
|
||||||
|
|
||||||
|
Despite our good intensions and hard work to keep spam off the lists and to
|
||||||
|
maintain a friendly and positive atmosphere, there will be times when spam
|
||||||
|
and or trolls get through.
|
||||||
|
|
||||||
|
Troll - "someone who posts inflammatory, extraneous, or off-topic messages
|
||||||
|
in an online community"
|
||||||
|
|
||||||
|
Spam - "use of electronic messaging systems to send unsolicited bulk
|
||||||
|
messages"
|
||||||
|
|
||||||
|
No matter what, we NEVER EVER respond to trolls or spammers on the list. If
|
||||||
|
you believe the list admin should do something particular, contact him/her
|
||||||
|
off-list. The subject will be taken care of as good as possible to prevent
|
||||||
|
repeated offences, but responding on the list to such messages never lead to
|
||||||
|
anything good and only puts the light even more on the offender: which was
|
||||||
|
the entire purpose of it getting to the list in the first place.
|
||||||
|
|
||||||
|
Don't feed the trolls!
|
||||||
|
|
||||||
|
|
||||||
|
2. Sending mail
|
||||||
|
|
||||||
|
2.1 Reply or New Mail
|
||||||
|
|
||||||
|
Please do not reply to an existing message as a short-cut to post a message
|
||||||
|
to the lists.
|
||||||
|
|
||||||
|
Many mail programs and web archivers use information within mails to keep
|
||||||
|
them together as "threads", as collections of posts that discuss a certain
|
||||||
|
subject. If you don't intend to reply on the same or similar subject, don't
|
||||||
|
just hit reply on an existing mail and change subject, create a new mail.
|
||||||
|
|
||||||
|
2.2 Reply to the List
|
||||||
|
|
||||||
|
When replying to a message from the list, make sure that you do "group
|
||||||
|
reply" or "reply to all", and not just reply to the author of the single
|
||||||
|
mail you reply to.
|
||||||
|
|
||||||
|
We're actively discouraging replying back to the single person by setting
|
||||||
|
the Reply-To: field in outgoing mails back to the mailing list address,
|
||||||
|
making it harder for people to mail the author only by mistake.
|
||||||
|
|
||||||
|
2.3 Use a Sensible Subject
|
||||||
|
|
||||||
|
Please use a subject of the mail that makes sense and that is related to the
|
||||||
|
contents of your mail. It makes it a lot easier to find your mail afterwards
|
||||||
|
and it makes it easier to track mail threads and topics.
|
||||||
|
|
||||||
|
2.4 Do Not Top-Post
|
||||||
|
|
||||||
|
If you reply to a message, don't use top-posting. Top-posting is when you
|
||||||
|
write the new text at the top of a mail and you insert the previous quoted
|
||||||
|
mail conversation below. It forces users to read the mail in a backwards
|
||||||
|
order to properly understand it.
|
||||||
|
|
||||||
|
This is why top posting is so bad:
|
||||||
|
|
||||||
|
A: Because it messes up the order in which people normally read
|
||||||
|
text.
|
||||||
|
Q: Why is top-posting such a bad thing?
|
||||||
|
A: Top-posting.
|
||||||
|
Q: What is the most annoying thing in e-mail?
|
||||||
|
|
||||||
|
Apart from the screwed up read order (especially when mixed together in a
|
||||||
|
thread when some responds doing the mandaded bottom-posting style), it also
|
||||||
|
makes it impossible to quote only parts of the original mail.
|
||||||
|
|
||||||
|
When you reply to a mail. You let the mail client insert the previous mail
|
||||||
|
quoted. Then you put the cursor on the first line of the mail and you move
|
||||||
|
down through the mail, deleting all parts of the quotes that don't add
|
||||||
|
context for your comments. When you want to add a comment you do so, inline,
|
||||||
|
right after the quotes that relate to your comment. Then you continue
|
||||||
|
downwards again.
|
||||||
|
|
||||||
|
When most of the quotes have been removed and you've added your own words,
|
||||||
|
you're done!
|
||||||
|
|
||||||
|
2.5 HTML is not for mails
|
||||||
|
|
||||||
|
Please switch off those HTML encoded messages. You can mail all those funny
|
||||||
|
mails to your friends. We speak plain text mails.
|
||||||
|
|
||||||
|
2.6 Quoting
|
||||||
|
|
||||||
|
Quote as little as possible. Just enough to provide the context you cannot
|
||||||
|
leave out. A lengthy description can be found here:
|
||||||
|
|
||||||
|
http://www.netmeister.org/news/learn2quote.html
|
||||||
|
|
||||||
|
2.7 Digest
|
||||||
|
|
||||||
|
We allow subscribers to subscribe to the "digest" version of the mailing
|
||||||
|
lists. A digest is a collection of mails lumped together in one single mail.
|
||||||
|
|
||||||
|
Should you decide to reply to a mail sent out as a digest, there are two
|
||||||
|
things you MUST consider if you really really cannot subscribe normally
|
||||||
|
instead:
|
||||||
|
|
||||||
|
Cut off all mails and chatter that is not related to the mail you want to
|
||||||
|
reply to.
|
||||||
|
|
||||||
|
Change the subject name to something sensible and related to the subject,
|
||||||
|
preferably even the actual subject of the single mail you wanted to reply to
|
||||||
|
|
||||||
|
2.8 Please Tell Us How You Solved The Problem!
|
||||||
|
|
||||||
|
Many people mail questions to the list, people spend some of their time and
|
||||||
|
make an effort in providing good answers to these questions.
|
||||||
|
|
||||||
|
If you are the one who asks, please consider responding once more in case
|
||||||
|
one of the hints was what solved your problems. The guys who write answers
|
||||||
|
feel good to know that they provided a good answer and that you fixed the
|
||||||
|
problem. Far too often, the person who asked the question is never heard of
|
||||||
|
again, and we never get to know if he/she is gone because the problem was
|
||||||
|
solved or perhaps because the problem was unsolvable!
|
||||||
|
|
||||||
|
Getting the solution posted also helps other users that experience the same
|
||||||
|
problem(s). They get to see (possibly in the web archives) that the
|
||||||
|
suggested fixes actually has helped at least one person.
|
||||||
|
|
24
docs/MANUAL
24
docs/MANUAL
@@ -123,7 +123,13 @@ USING PASSWORDS
|
|||||||
|
|
||||||
PROXY
|
PROXY
|
||||||
|
|
||||||
Get an ftp file using a proxy named my-proxy that uses port 888:
|
curl supports both HTTP and SOCKS proxy servers, with optional authentication.
|
||||||
|
It does not have special support for FTP proxy servers since there are no
|
||||||
|
standards for those, but it can still be made to work with many of them. You
|
||||||
|
can also use both HTTP and SOCKS proxies to transfer files to and from FTP
|
||||||
|
servers.
|
||||||
|
|
||||||
|
Get an ftp file using an HTTP proxy named my-proxy that uses port 888:
|
||||||
|
|
||||||
curl -x my-proxy:888 ftp://ftp.leachsite.com/README
|
curl -x my-proxy:888 ftp://ftp.leachsite.com/README
|
||||||
|
|
||||||
@@ -146,9 +152,23 @@ PROXY
|
|||||||
|
|
||||||
curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5.
|
curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5.
|
||||||
|
|
||||||
See also the environment variables Curl support that offer further proxy
|
See also the environment variables Curl supports that offer further proxy
|
||||||
control.
|
control.
|
||||||
|
|
||||||
|
Most FTP proxy servers are set up to appear as a normal FTP server from the
|
||||||
|
client's perspective, with special commands to select the remote FTP server.
|
||||||
|
curl supports the -u, -Q and --ftp-account options that can be used to
|
||||||
|
set up transfers through many FTP proxies. For example, a file can be
|
||||||
|
uploaded to a remote FTP server using a Blue Coat FTP proxy with the
|
||||||
|
options:
|
||||||
|
|
||||||
|
curl -u "Remote-FTP-Username@remote.ftp.server Proxy-Username:Remote-Pass" \
|
||||||
|
--ftp-account Proxy-Password --upload-file local-file \
|
||||||
|
ftp://my-ftp.proxy.server:21/remote/upload/path/
|
||||||
|
|
||||||
|
See the manual for your FTP proxy to determine the form it expects to set up
|
||||||
|
transfers, and curl's -v option to see exactly what curl is sending.
|
||||||
|
|
||||||
RANGES
|
RANGES
|
||||||
|
|
||||||
With HTTP 1.1 byte-ranges were introduced. Using this, a client can request
|
With HTTP 1.1 byte-ranges were introduced. Using this, a client can request
|
||||||
|
@@ -1,5 +1,24 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
|
# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
#
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = foreign no-dependencies
|
AUTOMAKE_OPTIONS = foreign no-dependencies
|
||||||
|
|
||||||
@@ -16,7 +35,8 @@ CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES)
|
|||||||
EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS \
|
EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS \
|
||||||
README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS \
|
README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS \
|
||||||
KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) HISTORY INSTALL \
|
KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) HISTORY INSTALL \
|
||||||
$(PDFPAGES) LICENSE-MIXING README.netware DISTRO-DILEMMA INSTALL.devcpp
|
$(PDFPAGES) LICENSE-MIXING README.netware DISTRO-DILEMMA INSTALL.devcpp \
|
||||||
|
MAIL-ETIQUETTE
|
||||||
|
|
||||||
MAN2HTML= roffit < $< >$@
|
MAN2HTML= roffit < $< >$@
|
||||||
|
|
||||||
|
27
docs/THANKS
27
docs/THANKS
@@ -30,8 +30,10 @@ Alexey Borzov
|
|||||||
Alexey Pesternikov
|
Alexey Pesternikov
|
||||||
Alexey Simak
|
Alexey Simak
|
||||||
Alexis Carvalho
|
Alexis Carvalho
|
||||||
|
Alfred Gebert
|
||||||
Allen Pulsifer
|
Allen Pulsifer
|
||||||
Amol Pattekar
|
Amol Pattekar
|
||||||
|
Amr Shahin
|
||||||
Anatoli Tubman
|
Anatoli Tubman
|
||||||
Anders Gustafsson
|
Anders Gustafsson
|
||||||
Andi Jahja
|
Andi Jahja
|
||||||
@@ -83,6 +85,7 @@ Bernard Leak
|
|||||||
Bertrand Demiddelaer
|
Bertrand Demiddelaer
|
||||||
Bill Egert
|
Bill Egert
|
||||||
Bill Hoffman
|
Bill Hoffman
|
||||||
|
Bjoern Sikora
|
||||||
Bjorn Augustsson
|
Bjorn Augustsson
|
||||||
Bjorn Reese
|
Bjorn Reese
|
||||||
Bj<EFBFBD>rn Stenberg
|
Bj<EFBFBD>rn Stenberg
|
||||||
@@ -90,6 +93,8 @@ Bob Richmond
|
|||||||
Bob Schader
|
Bob Schader
|
||||||
Bogdan Nicula
|
Bogdan Nicula
|
||||||
Brad Burdick
|
Brad Burdick
|
||||||
|
Brad Hards
|
||||||
|
Brad King
|
||||||
Bradford Bruce
|
Bradford Bruce
|
||||||
Brendan Jurd
|
Brendan Jurd
|
||||||
Brent Beardsley
|
Brent Beardsley
|
||||||
@@ -158,14 +163,17 @@ Daniel Cater
|
|||||||
Daniel Egger
|
Daniel Egger
|
||||||
Daniel Fandrich
|
Daniel Fandrich
|
||||||
Daniel Johnson
|
Daniel Johnson
|
||||||
|
Daniel Mentz
|
||||||
Daniel Steinberg
|
Daniel Steinberg
|
||||||
Daniel Stenberg
|
Daniel Stenberg
|
||||||
Daniel at touchtunes
|
Daniel at touchtunes
|
||||||
Darryl House
|
Darryl House
|
||||||
|
Darshan Mody
|
||||||
Dave Dribin
|
Dave Dribin
|
||||||
Dave Halbakken
|
Dave Halbakken
|
||||||
Dave Hamilton
|
Dave Hamilton
|
||||||
Dave May
|
Dave May
|
||||||
|
Dave Reisner
|
||||||
Dave Vasilevsky
|
Dave Vasilevsky
|
||||||
David Bau
|
David Bau
|
||||||
David Binderman
|
David Binderman
|
||||||
@@ -199,6 +207,7 @@ Dimitris Sarris
|
|||||||
Dinar
|
Dinar
|
||||||
Dirk Eddelbuettel
|
Dirk Eddelbuettel
|
||||||
Dirk Manske
|
Dirk Manske
|
||||||
|
Dmitri Shubin
|
||||||
Dmitriy Sergeyev
|
Dmitriy Sergeyev
|
||||||
Dmitry Bartsevich
|
Dmitry Bartsevich
|
||||||
Dmitry Kurochkin
|
Dmitry Kurochkin
|
||||||
@@ -231,6 +240,7 @@ Emiliano Ida
|
|||||||
Enrico Scholz
|
Enrico Scholz
|
||||||
Enrik Berkhan
|
Enrik Berkhan
|
||||||
Eric Cooper
|
Eric Cooper
|
||||||
|
Eric Hu
|
||||||
Eric Landes
|
Eric Landes
|
||||||
Eric Lavigne
|
Eric Lavigne
|
||||||
Eric Melville
|
Eric Melville
|
||||||
@@ -307,12 +317,15 @@ Hardeep Singh
|
|||||||
Harshal Pradhan
|
Harshal Pradhan
|
||||||
Hauke Duden
|
Hauke Duden
|
||||||
Heikki Korpela
|
Heikki Korpela
|
||||||
|
Heinrich Ko
|
||||||
Hendrik Visage
|
Hendrik Visage
|
||||||
Henrik Storner
|
Henrik Storner
|
||||||
Hidemoto Nakada
|
Hidemoto Nakada
|
||||||
Hoi-Ho Chan
|
Hoi-Ho Chan
|
||||||
|
Hongli Lai
|
||||||
Howard Chu
|
Howard Chu
|
||||||
Hzhijun
|
Hzhijun
|
||||||
|
Ian D Allen
|
||||||
Ian Ford
|
Ian Ford
|
||||||
Ian Gulliver
|
Ian Gulliver
|
||||||
Ian Lynagh
|
Ian Lynagh
|
||||||
@@ -382,6 +395,7 @@ Jofell Gallardo
|
|||||||
Johan Anderson
|
Johan Anderson
|
||||||
Johan Nilsson
|
Johan Nilsson
|
||||||
Johan van Selst
|
Johan van Selst
|
||||||
|
John Bradshaw
|
||||||
John Crow
|
John Crow
|
||||||
John Dennis
|
John Dennis
|
||||||
John E. Malmberg
|
John E. Malmberg
|
||||||
@@ -479,6 +493,7 @@ Luca Altea
|
|||||||
Luca Alteas
|
Luca Alteas
|
||||||
Lucas Adamski
|
Lucas Adamski
|
||||||
Lukasz Czekierda
|
Lukasz Czekierda
|
||||||
|
Luke Amery
|
||||||
Luke Call
|
Luke Call
|
||||||
Luong Dinh Dung
|
Luong Dinh Dung
|
||||||
Maciej Karpiuk
|
Maciej Karpiuk
|
||||||
@@ -486,6 +501,7 @@ Maciej W. Rozycki
|
|||||||
Manfred Schwarb
|
Manfred Schwarb
|
||||||
Marc Boucher
|
Marc Boucher
|
||||||
Marc Kleine-Budde
|
Marc Kleine-Budde
|
||||||
|
Marcel Roelofs
|
||||||
Marcelo Juchem
|
Marcelo Juchem
|
||||||
Marcin Konicki
|
Marcin Konicki
|
||||||
Marco G. Salvagno
|
Marco G. Salvagno
|
||||||
@@ -507,6 +523,7 @@ Martin C. Martin
|
|||||||
Martin Drasar
|
Martin Drasar
|
||||||
Martin Hager
|
Martin Hager
|
||||||
Martin Hedenfalk
|
Martin Hedenfalk
|
||||||
|
Martin Lemke
|
||||||
Martin Skinner
|
Martin Skinner
|
||||||
Martin Storsjo
|
Martin Storsjo
|
||||||
Marty Kuhrt
|
Marty Kuhrt
|
||||||
@@ -522,6 +539,7 @@ Matt Witherspoon
|
|||||||
Matt Wixson
|
Matt Wixson
|
||||||
Matthew Blain
|
Matthew Blain
|
||||||
Matthew Clarke
|
Matthew Clarke
|
||||||
|
Matthias Bolte
|
||||||
Maurice Barnum
|
Maurice Barnum
|
||||||
Mauro Iorio
|
Mauro Iorio
|
||||||
Max Katsev
|
Max Katsev
|
||||||
@@ -566,6 +584,7 @@ Naveen Noel
|
|||||||
Neil Dunbar
|
Neil Dunbar
|
||||||
Neil Spring
|
Neil Spring
|
||||||
Nic Roets
|
Nic Roets
|
||||||
|
Nicholas Maniscalco
|
||||||
Nick Gimbrone
|
Nick Gimbrone
|
||||||
Nick Humfrey
|
Nick Humfrey
|
||||||
Nick Zitzmann
|
Nick Zitzmann
|
||||||
@@ -590,6 +609,7 @@ Olaf St
|
|||||||
Oren Tirosh
|
Oren Tirosh
|
||||||
P R Schaffner
|
P R Schaffner
|
||||||
Pascal Terjan
|
Pascal Terjan
|
||||||
|
Pasha Kuznetsov
|
||||||
Pat Ray
|
Pat Ray
|
||||||
Patrick Bihan-Faou
|
Patrick Bihan-Faou
|
||||||
Patrick Monnerat
|
Patrick Monnerat
|
||||||
@@ -607,6 +627,7 @@ Pavel Orehov
|
|||||||
Pavel Raiskup
|
Pavel Raiskup
|
||||||
Pawel A. Gajda
|
Pawel A. Gajda
|
||||||
Pawel Kierski
|
Pawel Kierski
|
||||||
|
Pedro Larroy
|
||||||
Pedro Neves
|
Pedro Neves
|
||||||
Pete Su
|
Pete Su
|
||||||
Peter Bray
|
Peter Bray
|
||||||
@@ -640,6 +661,7 @@ Pramod Sharma
|
|||||||
Puneet Pawaia
|
Puneet Pawaia
|
||||||
Quagmire
|
Quagmire
|
||||||
Quanah Gibson-Mount
|
Quanah Gibson-Mount
|
||||||
|
Quinn Slack
|
||||||
Rafa Muyo
|
Rafa Muyo
|
||||||
Rafael Sagula
|
Rafael Sagula
|
||||||
Rainer Canavan
|
Rainer Canavan
|
||||||
@@ -695,6 +717,7 @@ Rosimildo da Silva
|
|||||||
Roy Shan
|
Roy Shan
|
||||||
Rune Kleveland
|
Rune Kleveland
|
||||||
Ruslan Gazizov
|
Ruslan Gazizov
|
||||||
|
Rutger Hofman
|
||||||
Ryan Chan
|
Ryan Chan
|
||||||
Ryan Nelson
|
Ryan Nelson
|
||||||
S. Moonesamy
|
S. Moonesamy
|
||||||
@@ -704,6 +727,7 @@ Sam Listopad
|
|||||||
Sampo Kellomaki
|
Sampo Kellomaki
|
||||||
Samuel D<>az Garc<72>a
|
Samuel D<>az Garc<72>a
|
||||||
Samuel Listopad
|
Samuel Listopad
|
||||||
|
Samuel Thibault
|
||||||
Sander Gates
|
Sander Gates
|
||||||
Sandor Feldi
|
Sandor Feldi
|
||||||
Saul good
|
Saul good
|
||||||
@@ -735,6 +759,7 @@ Stan van de Burgt
|
|||||||
Stefan Esser
|
Stefan Esser
|
||||||
Stefan Krause
|
Stefan Krause
|
||||||
Stefan Teleman
|
Stefan Teleman
|
||||||
|
Stefan Tomanek
|
||||||
Stefan Ulrich
|
Stefan Ulrich
|
||||||
Stephan Bergmann
|
Stephan Bergmann
|
||||||
Stephen Collyer
|
Stephen Collyer
|
||||||
@@ -786,6 +811,7 @@ Tom Zerucha
|
|||||||
Tomas Pospisek
|
Tomas Pospisek
|
||||||
Tomas Szepe
|
Tomas Szepe
|
||||||
Tomasz Lacki
|
Tomasz Lacki
|
||||||
|
Tommie Gannert
|
||||||
Tommy Tam
|
Tommy Tam
|
||||||
Ton Voon
|
Ton Voon
|
||||||
Toon Verwaest
|
Toon Verwaest
|
||||||
@@ -812,6 +838,7 @@ Vlad Ureche
|
|||||||
Vladimir Lazarenko
|
Vladimir Lazarenko
|
||||||
Vojtech Janota
|
Vojtech Janota
|
||||||
Vojtech Minarik
|
Vojtech Minarik
|
||||||
|
Vsevolod Novikov
|
||||||
Walter J. Mack
|
Walter J. Mack
|
||||||
Wayne Haigh
|
Wayne Haigh
|
||||||
Werner Koch
|
Werner Koch
|
||||||
|
10
docs/TODO
10
docs/TODO
@@ -16,6 +16,7 @@
|
|||||||
1.2 More data sharing
|
1.2 More data sharing
|
||||||
1.3 struct lifreq
|
1.3 struct lifreq
|
||||||
1.4 signal-based resolver timeouts
|
1.4 signal-based resolver timeouts
|
||||||
|
1.5 get rid of PATH_MAX
|
||||||
|
|
||||||
2. libcurl - multi interface
|
2. libcurl - multi interface
|
||||||
2.1 More non-blocking
|
2.1 More non-blocking
|
||||||
@@ -134,6 +135,15 @@
|
|||||||
Also, alarm() provides timeout resolution only to the nearest second. alarm
|
Also, alarm() provides timeout resolution only to the nearest second. alarm
|
||||||
ought to be replaced by setitimer on systems that support it.
|
ought to be replaced by setitimer on systems that support it.
|
||||||
|
|
||||||
|
1.5 get rid of PATH_MAX
|
||||||
|
|
||||||
|
Having code use and rely on PATH_MAX is not nice:
|
||||||
|
http://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html
|
||||||
|
|
||||||
|
Currently the SSH based code uses it a bit, but to remove PATH_MAX from there
|
||||||
|
we need libssh2 to properly tell us when we pass in a too small buffer and
|
||||||
|
its current API (as of libssh2 1.2.7) doesn't.
|
||||||
|
|
||||||
2. libcurl - multi interface
|
2. libcurl - multi interface
|
||||||
|
|
||||||
2.1 More non-blocking
|
2.1 More non-blocking
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
Online: http://curl.haxx.se/docs/httpscripting.html
|
Online: http://curl.haxx.se/docs/httpscripting.html
|
||||||
Date: May 28, 2008
|
Date: Jan 19, 2011
|
||||||
|
|
||||||
The Art Of Scripting HTTP Requests Using Curl
|
The Art Of Scripting HTTP Requests Using Curl
|
||||||
=============================================
|
=============================================
|
||||||
@@ -38,10 +38,26 @@ Date: May 28, 2008
|
|||||||
request a particular action, and then the server replies a few text lines
|
request a particular action, and then the server replies a few text lines
|
||||||
before the actual requested content is sent to the client.
|
before the actual requested content is sent to the client.
|
||||||
|
|
||||||
Using curl's option --verbose (-v as a short option) will display what kind of
|
The client, curl, sends a HTTP request. The request contains a method (like
|
||||||
commands curl sends to the server, as well as a few other informational texts.
|
GET, POST, HEAD etc), a number of request headers and sometimes a request
|
||||||
--verbose is the single most useful option when it comes to debug or even
|
body. The HTTP server responds with a status line (indicating if things went
|
||||||
understand the curl<->server interaction.
|
well), response headers and most often also a response body. The "body" part
|
||||||
|
is the plain data you requested, like the actual HTML or the image etc.
|
||||||
|
|
||||||
|
1.1 See the Protocol
|
||||||
|
|
||||||
|
Using curl's option --verbose (-v as a short option) will display what kind
|
||||||
|
of commands curl sends to the server, as well as a few other informational
|
||||||
|
texts.
|
||||||
|
|
||||||
|
--verbose is the single most useful option when it comes to debug or even
|
||||||
|
understand the curl<->server interaction.
|
||||||
|
|
||||||
|
Sometimes even --verbose is not enough. Then --trace and --trace-ascii offer
|
||||||
|
even more details as they show EVERYTHING curl sends and receives. Use it
|
||||||
|
like this:
|
||||||
|
|
||||||
|
curl --trace-ascii debugdump.txt http://www.example.com/
|
||||||
|
|
||||||
2. URL
|
2. URL
|
||||||
|
|
||||||
@@ -61,10 +77,10 @@ Date: May 28, 2008
|
|||||||
you get a web page returned in your terminal window. The entire HTML document
|
you get a web page returned in your terminal window. The entire HTML document
|
||||||
that that URL holds.
|
that that URL holds.
|
||||||
|
|
||||||
All HTTP replies contain a set of headers that are normally hidden, use
|
All HTTP replies contain a set of response headers that are normally hidden,
|
||||||
curl's --include (-i) option to display them as well as the rest of the
|
use curl's --include (-i) option to display them as well as the rest of the
|
||||||
document. You can also ask the remote server for ONLY the headers by using the
|
document. You can also ask the remote server for ONLY the headers by using
|
||||||
--head (-I) option (which will make curl issue a HEAD request).
|
the --head (-I) option (which will make curl issue a HEAD request).
|
||||||
|
|
||||||
4. Forms
|
4. Forms
|
||||||
|
|
||||||
@@ -127,7 +143,8 @@ Date: May 28, 2008
|
|||||||
And to use curl to post this form with the same data filled in as before, we
|
And to use curl to post this form with the same data filled in as before, we
|
||||||
could do it like:
|
could do it like:
|
||||||
|
|
||||||
curl --data "birthyear=1905&press=%20OK%20" http://www.hotmail.com/when/junk.cgi
|
curl --data "birthyear=1905&press=%20OK%20" \
|
||||||
|
http://www.example.com/when.cgi
|
||||||
|
|
||||||
This kind of POST will use the Content-Type
|
This kind of POST will use the Content-Type
|
||||||
application/x-www-form-urlencoded and is the most widely used POST kind.
|
application/x-www-form-urlencoded and is the most widely used POST kind.
|
||||||
@@ -204,7 +221,7 @@ Date: May 28, 2008
|
|||||||
|
|
||||||
Put a file to a HTTP server with curl:
|
Put a file to a HTTP server with curl:
|
||||||
|
|
||||||
curl --upload-file uploadfile http://www.uploadhttp.com/receive.cgi
|
curl --upload-file uploadfile http://www.example.com/receive.cgi
|
||||||
|
|
||||||
6. HTTP Authentication
|
6. HTTP Authentication
|
||||||
|
|
||||||
@@ -217,7 +234,7 @@ Date: May 28, 2008
|
|||||||
|
|
||||||
To tell curl to use a user and password for authentication:
|
To tell curl to use a user and password for authentication:
|
||||||
|
|
||||||
curl --user name:password http://www.secrets.com
|
curl --user name:password http://www.example.com
|
||||||
|
|
||||||
The site might require a different authentication method (check the headers
|
The site might require a different authentication method (check the headers
|
||||||
returned by the server), and then --ntlm, --digest, --negotiate or even
|
returned by the server), and then --ntlm, --digest, --negotiate or even
|
||||||
@@ -257,7 +274,7 @@ Date: May 28, 2008
|
|||||||
|
|
||||||
Use curl to set the referer field with:
|
Use curl to set the referer field with:
|
||||||
|
|
||||||
curl --referer http://curl.haxx.se http://daniel.haxx.se
|
curl --referer http://www.example.come http://www.example.com
|
||||||
|
|
||||||
8. User Agent
|
8. User Agent
|
||||||
|
|
||||||
@@ -273,13 +290,13 @@ Date: May 28, 2008
|
|||||||
is time to set the User Agent field to fool the server into thinking you're
|
is time to set the User Agent field to fool the server into thinking you're
|
||||||
one of those browsers.
|
one of those browsers.
|
||||||
|
|
||||||
To make curl look like Internet Explorer on a Windows 2000 box:
|
To make curl look like Internet Explorer 5 on a Windows 2000 box:
|
||||||
|
|
||||||
curl --user-agent "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" [URL]
|
curl --user-agent "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" [URL]
|
||||||
|
|
||||||
Or why not look like you're using Netscape 4.73 on a Linux (PIII) box:
|
Or why not look like you're using Netscape 4.73 on an old Linux box:
|
||||||
|
|
||||||
curl --user-agent "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" [URL]
|
curl --user-agent "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" [URL]
|
||||||
|
|
||||||
9. Redirects
|
9. Redirects
|
||||||
|
|
||||||
@@ -294,7 +311,7 @@ Date: May 28, 2008
|
|||||||
|
|
||||||
To tell curl to follow a Location:
|
To tell curl to follow a Location:
|
||||||
|
|
||||||
curl --location http://www.sitethatredirects.com
|
curl --location http://www.example.com
|
||||||
|
|
||||||
If you use curl to POST to a site that immediately redirects you to another
|
If you use curl to POST to a site that immediately redirects you to another
|
||||||
page, you can safely use --location (-L) and --data/--form together. Curl will
|
page, you can safely use --location (-L) and --data/--form together. Curl will
|
||||||
@@ -321,13 +338,13 @@ Date: May 28, 2008
|
|||||||
The simplest way to send a few cookies to the server when getting a page with
|
The simplest way to send a few cookies to the server when getting a page with
|
||||||
curl is to add them on the command line like:
|
curl is to add them on the command line like:
|
||||||
|
|
||||||
curl --cookie "name=Daniel" http://www.cookiesite.com
|
curl --cookie "name=Daniel" http://www.example.com
|
||||||
|
|
||||||
Cookies are sent as common HTTP headers. This is practical as it allows curl
|
Cookies are sent as common HTTP headers. This is practical as it allows curl
|
||||||
to record cookies simply by recording headers. Record cookies with curl by
|
to record cookies simply by recording headers. Record cookies with curl by
|
||||||
using the --dump-header (-D) option like:
|
using the --dump-header (-D) option like:
|
||||||
|
|
||||||
curl --dump-header headers_and_cookies http://www.cookiesite.com
|
curl --dump-header headers_and_cookies http://www.example.com
|
||||||
|
|
||||||
(Take note that the --cookie-jar option described below is a better way to
|
(Take note that the --cookie-jar option described below is a better way to
|
||||||
store cookies.)
|
store cookies.)
|
||||||
@@ -338,24 +355,25 @@ Date: May 28, 2008
|
|||||||
believing you had a previous connection). To use previously stored cookies,
|
believing you had a previous connection). To use previously stored cookies,
|
||||||
you run curl like:
|
you run curl like:
|
||||||
|
|
||||||
curl --cookie stored_cookies_in_file http://www.cookiesite.com
|
curl --cookie stored_cookies_in_file http://www.example.com
|
||||||
|
|
||||||
Curl's "cookie engine" gets enabled when you use the --cookie option. If you
|
Curl's "cookie engine" gets enabled when you use the --cookie option. If you
|
||||||
only want curl to understand received cookies, use --cookie with a file that
|
only want curl to understand received cookies, use --cookie with a file that
|
||||||
doesn't exist. Example, if you want to let curl understand cookies from a page
|
doesn't exist. Example, if you want to let curl understand cookies from a
|
||||||
and follow a location (and thus possibly send back cookies it received), you
|
page and follow a location (and thus possibly send back cookies it received),
|
||||||
can invoke it like:
|
you can invoke it like:
|
||||||
|
|
||||||
curl --cookie nada --location http://www.cookiesite.com
|
curl --cookie nada --location http://www.example.com
|
||||||
|
|
||||||
Curl has the ability to read and write cookie files that use the same file
|
Curl has the ability to read and write cookie files that use the same file
|
||||||
format that Netscape and Mozilla do. It is a convenient way to share cookies
|
format that Netscape and Mozilla do. It is a convenient way to share cookies
|
||||||
between browsers and automatic scripts. The --cookie (-b) switch automatically
|
between browsers and automatic scripts. The --cookie (-b) switch
|
||||||
detects if a given file is such a cookie file and parses it, and by using the
|
automatically detects if a given file is such a cookie file and parses it,
|
||||||
--cookie-jar (-c) option you'll make curl write a new cookie file at the end of
|
and by using the --cookie-jar (-c) option you'll make curl write a new cookie
|
||||||
an operation:
|
file at the end of an operation:
|
||||||
|
|
||||||
curl --cookie cookies.txt --cookie-jar newcookies.txt http://www.cookiesite.com
|
curl --cookie cookies.txt --cookie-jar newcookies.txt \
|
||||||
|
http://www.example.com
|
||||||
|
|
||||||
11. HTTPS
|
11. HTTPS
|
||||||
|
|
||||||
@@ -371,7 +389,7 @@ Date: May 28, 2008
|
|||||||
Curl supports encrypted fetches thanks to the freely available OpenSSL
|
Curl supports encrypted fetches thanks to the freely available OpenSSL
|
||||||
libraries. To get a page from a HTTPS server, simply run curl like:
|
libraries. To get a page from a HTTPS server, simply run curl like:
|
||||||
|
|
||||||
curl https://that.secure.server.com
|
curl https://secure.example.com
|
||||||
|
|
||||||
11.1 Certificates
|
11.1 Certificates
|
||||||
|
|
||||||
@@ -382,7 +400,7 @@ Date: May 28, 2008
|
|||||||
can be specified on the command line or if not, entered interactively when
|
can be specified on the command line or if not, entered interactively when
|
||||||
curl queries for it. Use a certificate with curl on a HTTPS server like:
|
curl queries for it. Use a certificate with curl on a HTTPS server like:
|
||||||
|
|
||||||
curl --cert mycert.pem https://that.secure.server.com
|
curl --cert mycert.pem https://secure.example.com
|
||||||
|
|
||||||
curl also tries to verify that the server is who it claims to be, by
|
curl also tries to verify that the server is who it claims to be, by
|
||||||
verifying the server's certificate against a locally stored CA cert
|
verifying the server's certificate against a locally stored CA cert
|
||||||
@@ -403,17 +421,18 @@ Date: May 28, 2008
|
|||||||
For example, you can change the POST request to a PROPFIND and send the data
|
For example, you can change the POST request to a PROPFIND and send the data
|
||||||
as "Content-Type: text/xml" (instead of the default Content-Type) like this:
|
as "Content-Type: text/xml" (instead of the default Content-Type) like this:
|
||||||
|
|
||||||
curl --data "<xml>" --header "Content-Type: text/xml" --request PROPFIND url.com
|
curl --data "<xml>" --header "Content-Type: text/xml" \
|
||||||
|
--request PROPFIND url.com
|
||||||
|
|
||||||
You can delete a default header by providing one without content. Like you
|
You can delete a default header by providing one without content. Like you
|
||||||
can ruin the request by chopping off the Host: header:
|
can ruin the request by chopping off the Host: header:
|
||||||
|
|
||||||
curl --header "Host:" http://mysite.com
|
curl --header "Host:" http://www.example.com
|
||||||
|
|
||||||
You can add headers the same way. Your server may want a "Destination:"
|
You can add headers the same way. Your server may want a "Destination:"
|
||||||
header, and you can add it:
|
header, and you can add it:
|
||||||
|
|
||||||
curl --header "Destination: http://moo.com/nowhere" http://url.com
|
curl --header "Destination: http://nowhere" http://example.com
|
||||||
|
|
||||||
13. Web Login
|
13. Web Login
|
||||||
|
|
||||||
@@ -444,7 +463,6 @@ Date: May 28, 2008
|
|||||||
to do a proper login POST. Remember that the contents need to be URL encoded
|
to do a proper login POST. Remember that the contents need to be URL encoded
|
||||||
when sent in a normal POST.
|
when sent in a normal POST.
|
||||||
|
|
||||||
|
|
||||||
14. Debug
|
14. Debug
|
||||||
|
|
||||||
Many times when you run curl on a site, you'll notice that the site doesn't
|
Many times when you run curl on a site, you'll notice that the site doesn't
|
||||||
@@ -480,12 +498,10 @@ Date: May 28, 2008
|
|||||||
RFC 2616 is a must to read if you want in-depth understanding of the HTTP
|
RFC 2616 is a must to read if you want in-depth understanding of the HTTP
|
||||||
protocol.
|
protocol.
|
||||||
|
|
||||||
RFC 2396 explains the URL syntax.
|
RFC 3986 explains the URL syntax.
|
||||||
|
|
||||||
RFC 2109 defines how cookies are supposed to work.
|
RFC 2109 defines how cookies are supposed to work.
|
||||||
|
|
||||||
RFC 1867 defines the HTTP post upload format.
|
RFC 1867 defines the HTTP post upload format.
|
||||||
|
|
||||||
http://www.openssl.org is the home of the OpenSSL project
|
|
||||||
|
|
||||||
http://curl.haxx.se is the home of the cURL project
|
http://curl.haxx.se is the home of the cURL project
|
||||||
|
108
docs/curl.1
108
docs/curl.1
@@ -5,7 +5,7 @@
|
|||||||
.\" * | (__| |_| | _ <| |___
|
.\" * | (__| |_| | _ <| |___
|
||||||
.\" * \___|\___/|_| \_\_____|
|
.\" * \___|\___/|_| \_\_____|
|
||||||
.\" *
|
.\" *
|
||||||
.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
.\" *
|
.\" *
|
||||||
.\" * This software is licensed as described in the file COPYING, which
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
.\" * you should have received as part of this distribution. The terms
|
.\" * you should have received as part of this distribution. The terms
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
.\" *
|
.\" *
|
||||||
.\" **************************************************************************
|
.\" **************************************************************************
|
||||||
.\"
|
.\"
|
||||||
.TH curl 1 "28 November 2009" "Curl 7.20.0" "Curl Manual"
|
.TH curl 1 "28 November 2009" "Curl 7.21.4" "Curl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl \- transfer a URL
|
curl \- transfer a URL
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -351,18 +351,19 @@ run curl.
|
|||||||
is used to seed the random engine for SSL connections. See also the
|
is used to seed the random engine for SSL connections. See also the
|
||||||
\fI--random-file\fP option.
|
\fI--random-file\fP option.
|
||||||
.IP "-E/--cert <certificate[:password]>"
|
.IP "-E/--cert <certificate[:password]>"
|
||||||
(SSL) Tells curl to use the specified certificate file when getting a file
|
(SSL) Tells curl to use the specified client certificate file when getting a
|
||||||
with HTTPS or FTPS. The certificate must be in PEM format. If the optional
|
file with HTTPS, FTPS or another SSL-based protocol. The certificate must be
|
||||||
password isn't specified, it will be queried for on the terminal. Note that
|
in PEM format. If the optional password isn't specified, it will be queried
|
||||||
this option assumes a \&"certificate" file that is the private key and the
|
for on the terminal. Note that this option assumes a \&"certificate" file that
|
||||||
private certificate concatenated! See \fI--cert\fP and \fI--key\fP to specify
|
is the private key and the private certificate concatenated! See \fI--cert\fP
|
||||||
them independently.
|
and \fI--key\fP to specify them independently.
|
||||||
|
|
||||||
If curl is built against the NSS SSL library then this option tells
|
If curl is built against the NSS SSL library then this option can tell
|
||||||
curl the nickname of the certificate to use within the NSS database defined
|
curl the nickname of the certificate to use within the NSS database defined
|
||||||
by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the
|
by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the
|
||||||
NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be
|
NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be
|
||||||
loaded.
|
loaded. If you want to use a file from the current directory, please precede
|
||||||
|
it with "./" prefix, in order to avoid confusion with a nickname.
|
||||||
|
|
||||||
If this option is used several times, the last one will be used.
|
If this option is used several times, the last one will be used.
|
||||||
.IP "--cert-type <type>"
|
.IP "--cert-type <type>"
|
||||||
@@ -393,11 +394,11 @@ may be loaded.
|
|||||||
If this option is used several times, the last one will be used.
|
If this option is used several times, the last one will be used.
|
||||||
.IP "--capath <CA certificate directory>"
|
.IP "--capath <CA certificate directory>"
|
||||||
(SSL) Tells curl to use the specified certificate directory to verify the
|
(SSL) Tells curl to use the specified certificate directory to verify the
|
||||||
peer. The certificates must be in PEM format, and the directory must have been
|
peer. The certificates must be in PEM format, and if curl is built against
|
||||||
processed using the c_rehash utility supplied with openssl. Using
|
OpenSSL, the directory must have been processed using the c_rehash utility
|
||||||
\fI--capath\fP can allow curl to make SSL-connections much more efficiently
|
supplied with OpenSSL. Using \fI--capath\fP can allow OpenSSL-powered curl to
|
||||||
than using \fI--cacert\fP if the \fI--cacert\fP file contains many CA
|
make SSL-connections much more efficiently than using \fI--cacert\fP if the
|
||||||
certificates.
|
\fI--cacert\fP file contains many CA certificates.
|
||||||
|
|
||||||
If this option is used several times, the last one will be used.
|
If this option is used several times, the last one will be used.
|
||||||
.IP "-f/--fail"
|
.IP "-f/--fail"
|
||||||
@@ -427,7 +428,7 @@ server. The method argument should be one of the following alternatives:
|
|||||||
.RS
|
.RS
|
||||||
.IP multicwd
|
.IP multicwd
|
||||||
curl does a single CWD operation for each path part in the given URL. For deep
|
curl does a single CWD operation for each path part in the given URL. For deep
|
||||||
hierarchies this means very many commands. This is how RFC1738 says it should
|
hierarchies this means very many commands. This is how RFC 1738 says it should
|
||||||
be done. This is the default but the slowest behavior.
|
be done. This is the default but the slowest behavior.
|
||||||
.IP nocwd
|
.IP nocwd
|
||||||
curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full
|
curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full
|
||||||
@@ -439,7 +440,7 @@ compliant than 'nocwd' but without the full penalty of 'multicwd'.
|
|||||||
.RE
|
.RE
|
||||||
(Added in 7.15.1)
|
(Added in 7.15.1)
|
||||||
.IP "--ftp-pasv"
|
.IP "--ftp-pasv"
|
||||||
(FTP) Use passive mode for the data conection. Passive is the internal default
|
(FTP) Use passive mode for the data connection. Passive is the internal default
|
||||||
behavior, but using this option can be used to override a previous
|
behavior, but using this option can be used to override a previous
|
||||||
\fI-P/-ftp-port\fP option. (Added in 7.11.0)
|
\fI-P/-ftp-port\fP option. (Added in 7.11.0)
|
||||||
|
|
||||||
@@ -501,7 +502,7 @@ waits for a reply from the server.
|
|||||||
.IP "-F/--form <name=content>"
|
.IP "-F/--form <name=content>"
|
||||||
(HTTP) This lets curl emulate a filled-in form in which a user has pressed the
|
(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
|
submit button. This causes curl to POST data using the Content-Type
|
||||||
multipart/form-data according to RFC2388. This enables uploading of binary
|
multipart/form-data according to RFC 2388. This enables uploading of binary
|
||||||
files etc. To force the 'content' part to be a file, prefix the file name
|
files etc. To force the 'content' part to be a file, prefix the file name
|
||||||
with an @ sign. To just get the content part from a file, prefix the file name
|
with an @ sign. To just get the content part from a file, prefix the file name
|
||||||
with the symbol <. The difference between @ and < is then that @ makes a file
|
with the symbol <. The difference between @ and < is then that @ makes a file
|
||||||
@@ -514,8 +515,8 @@ input:
|
|||||||
|
|
||||||
\fBcurl\fP -F password=@/etc/passwd www.mypasswords.com
|
\fBcurl\fP -F password=@/etc/passwd www.mypasswords.com
|
||||||
|
|
||||||
To read the file's content from stdin instead of a file, use - where the file
|
To read content from stdin instead of a file, use - as the filename. This goes
|
||||||
name should've been. This goes for both @ and < constructs.
|
for both @ and < constructs.
|
||||||
|
|
||||||
You can also tell curl what Content-Type to use by using 'type=', in a manner
|
You can also tell curl what Content-Type to use by using 'type=', in a manner
|
||||||
similar to:
|
similar to:
|
||||||
@@ -814,6 +815,17 @@ to FTP to the machine host.domain.com with user name \&'myself' and password
|
|||||||
.IP "--netrc-optional"
|
.IP "--netrc-optional"
|
||||||
Very similar to \fI--netrc\fP, but this option makes the .netrc usage
|
Very similar to \fI--netrc\fP, but this option makes the .netrc usage
|
||||||
\fBoptional\fP and not mandatory as the \fI--netrc\fP option does.
|
\fBoptional\fP and not mandatory as the \fI--netrc\fP option does.
|
||||||
|
|
||||||
|
.IP "--netrc-file"
|
||||||
|
This option is similar to \fI--netrc\fP, except that you provide the path
|
||||||
|
(absolute or relative) to the netrc file that Curl should use.
|
||||||
|
You can only specify one netrc file per invocation. If several
|
||||||
|
\fI--netrc-file\fP options are provided, only the \fBlast one\fP will be used.
|
||||||
|
(Added in 7.21.5)
|
||||||
|
|
||||||
|
This option overrides any use of \fI--netrc\fP as they are mutually exclusive.
|
||||||
|
It will also abide by --netrc-optional if specified.
|
||||||
|
|
||||||
.IP "--negotiate"
|
.IP "--negotiate"
|
||||||
(HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate method was
|
(HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate method was
|
||||||
designed by Microsoft and is used in their web applications. It is primarily
|
designed by Microsoft and is used in their web applications. It is primarily
|
||||||
@@ -904,6 +916,10 @@ part of the remote file is used, the path is cut off.)
|
|||||||
The remote file name to use for saving is extracted from the given URL,
|
The remote file name to use for saving is extracted from the given URL,
|
||||||
nothing else.
|
nothing else.
|
||||||
|
|
||||||
|
Consequentially, the file will be saved in the current working directory. If
|
||||||
|
you want the file saved in a different directory, make sure you change current
|
||||||
|
working directory before you invoke curl with the \fB-O/--remote-name\fP flag!
|
||||||
|
|
||||||
You may use this option as many times as the number of URLs you have.
|
You may use this option as many times as the number of URLs you have.
|
||||||
.IP "--remote-name-all"
|
.IP "--remote-name-all"
|
||||||
This option changes the default action for all given URLs to be dealt with as
|
This option changes the default action for all given URLs to be dealt with as
|
||||||
@@ -1051,11 +1067,12 @@ just before the transfer command(s), prefix the command with a '+' (this
|
|||||||
is only supported for FTP). You may specify any number of commands. If
|
is only supported for FTP). You may specify any number of commands. If
|
||||||
the server returns failure for one of the commands, the entire operation
|
the server returns failure for one of the commands, the entire operation
|
||||||
will be aborted. You must send syntactically correct FTP commands as
|
will be aborted. You must send syntactically correct FTP commands as
|
||||||
RFC959 defines to FTP servers, or one of the commands listed below to
|
RFC 959 defines to FTP servers, or one of the commands listed below to
|
||||||
SFTP servers. This option can be used multiple times.
|
SFTP servers. This option can be used multiple times.
|
||||||
|
|
||||||
SFTP is a binary protocol. Unlike for FTP, libcurl interprets SFTP quote
|
SFTP is a binary protocol. Unlike for FTP, libcurl interprets SFTP quote
|
||||||
commands before sending them to the server. Following is the list of
|
commands itself before sending them to the server. File names may be quoted
|
||||||
|
shell-style to embed spaces or special characters. Following is the list of
|
||||||
all supported SFTP quote commands:
|
all supported SFTP quote commands:
|
||||||
.RS
|
.RS
|
||||||
.IP "chgrp group file"
|
.IP "chgrp group file"
|
||||||
@@ -1234,14 +1251,12 @@ This option (as well as \fI--socks4\fP) does not work with IPV6, FTPS or LDAP.
|
|||||||
The default service name for a socks server is rcmd/server-fqdn. This option
|
The default service name for a socks server is rcmd/server-fqdn. This option
|
||||||
allows you to change it.
|
allows you to change it.
|
||||||
|
|
||||||
Examples:
|
Examples: --socks5 proxy-name \fI--socks5-gssapi-service\fP sockd would use
|
||||||
--socks5 proxy-name \fI--socks5-gssapi-service\fP sockd would use
|
sockd/proxy-name --socks5 proxy-name \fI--socks5-gssapi-service\fP
|
||||||
sockd/proxy-name
|
sockd/real-name would use sockd/real-name for cases where the proxy-name does
|
||||||
--socks5 proxy-name \fI--socks5-gssapi-service\fP sockd/real-name would use
|
not match the principal name. (Added in 7.19.4).
|
||||||
sockd/real-name for cases where the proxy-name does not match the princpal name.
|
|
||||||
(Added in 7.19.4).
|
|
||||||
.IP "--socks5-gssapi-nec"
|
.IP "--socks5-gssapi-nec"
|
||||||
As part of the gssapi negotiation a protection mode is negotiated. The rfc1961
|
As part of the gssapi negotiation a protection mode is negotiated. RFC 1961
|
||||||
says in section 4.3/4.4 it should be protected, but the NEC reference
|
says in section 4.3/4.4 it should be protected, but the NEC reference
|
||||||
implementation does not. The option \fI--socks5-gssapi-nec\fP allows the
|
implementation does not. The option \fI--socks5-gssapi-nec\fP allows the
|
||||||
unprotected exchange of the protection mode negotiation. (Added in 7.19.4).
|
unprotected exchange of the protection mode negotiation. (Added in 7.19.4).
|
||||||
@@ -1264,12 +1279,25 @@ XDISPLOC=<X display> Sets the X display location.
|
|||||||
NEW_ENV=<var,val> Sets an environment variable.
|
NEW_ENV=<var,val> Sets an environment variable.
|
||||||
.IP "--tftp-blksize <value>"
|
.IP "--tftp-blksize <value>"
|
||||||
(TFTP) Set TFTP BLKSIZE option (must be >512). This is the block size that
|
(TFTP) Set TFTP BLKSIZE option (must be >512). This is the block size that
|
||||||
curl will try to use when tranferring data to or from a TFTP server. By
|
curl will try to use when transferring data to or from a TFTP server. By
|
||||||
default 512 bytes will be used.
|
default 512 bytes will be used.
|
||||||
|
|
||||||
If this option is used several times, the last one will be used.
|
If this option is used several times, the last one will be used.
|
||||||
|
|
||||||
(Added in 7.20.0)
|
(Added in 7.20.0)
|
||||||
|
.IP "--tlsauthtype <authtype>"
|
||||||
|
Set TLS authentication type. Currently, the only supported option is "SRP",
|
||||||
|
for TLS-SRP (RFC 5054). If \fI--tlsuser\fP and \fI--tlspassword\fP are
|
||||||
|
specified but \fI--tlsauthtype\fP is not, then this option defaults to "SRP".
|
||||||
|
(Added in 7.21.4)
|
||||||
|
.IP "--tlsuser <user>"
|
||||||
|
Set username for use with the TLS authentication method specified with
|
||||||
|
\fI--tlsauthtype\fP. Requires that \fI--tlspassword\fP also be set. (Added in
|
||||||
|
7.21.4)
|
||||||
|
.IP "--tlspassword <password>"
|
||||||
|
Set password for use with the TLS authentication method specified with
|
||||||
|
\fI--tlsauthtype\fP. Requires that \fI--tlsuser\fP also be set. (Added in
|
||||||
|
7.21.4)
|
||||||
.IP "-T/--upload-file <file>"
|
.IP "-T/--upload-file <file>"
|
||||||
This transfers the specified local file to the remote URL. If there is no file
|
This transfers the specified local file to the remote URL. If there is no file
|
||||||
part in the specified URL, Curl will append the local file name. NOTE that you
|
part in the specified URL, Curl will append the local file name. NOTE that you
|
||||||
@@ -1357,7 +1385,7 @@ If you think this option still doesn't give you enough details, consider using
|
|||||||
|
|
||||||
This option overrides previous uses of \fI--trace-ascii\fP or \fI--trace\fP.
|
This option overrides previous uses of \fI--trace-ascii\fP or \fI--trace\fP.
|
||||||
|
|
||||||
Use \fI-S/--silent\fP to make curl quiet.
|
Use \fI-s/--silent\fP to make curl quiet.
|
||||||
.IP "-V/--version"
|
.IP "-V/--version"
|
||||||
Displays information about curl and the libcurl version it uses.
|
Displays information about curl and the libcurl version it uses.
|
||||||
|
|
||||||
@@ -1396,6 +1424,8 @@ This curl supports IDN - international domain names.
|
|||||||
.IP "SSPI"
|
.IP "SSPI"
|
||||||
SSPI is supported. If you use NTLM and set a blank user name, curl will
|
SSPI is supported. If you use NTLM and set a blank user name, curl will
|
||||||
authenticate with your current user and password.
|
authenticate with your current user and password.
|
||||||
|
.IP "TLS-SRP"
|
||||||
|
SRP (Secure Remote Password) authentication is supported for TLS.
|
||||||
.RE
|
.RE
|
||||||
.IP "-w/--write-out <format>"
|
.IP "-w/--write-out <format>"
|
||||||
Defines what to display on stdout after a completed and successful
|
Defines what to display on stdout after a completed and successful
|
||||||
@@ -1552,9 +1582,9 @@ not set.
|
|||||||
|
|
||||||
If this option is used several times, the last one will be used.
|
If this option is used several times, the last one will be used.
|
||||||
.IP "-z/--time-cond <date expression>"
|
.IP "-z/--time-cond <date expression>"
|
||||||
(HTTP/FTP) Request a file that has been modified later than the given time and
|
(HTTP/FTP/FILE) Request a file that has been modified later than the given time
|
||||||
date, or one that has been modified before that time. The date expression can
|
and date, or one that has been modified before that time. The date expression
|
||||||
be all sorts of date strings or if it doesn't match any internal ones, it
|
can be all sorts of date strings or if it doesn't match any internal ones, it
|
||||||
tries to get the time from a given file name instead! See the
|
tries to get the time from a given file name instead! See the
|
||||||
\fIcurl_getdate(3)\fP man pages for date expression details.
|
\fIcurl_getdate(3)\fP man pages for date expression details.
|
||||||
|
|
||||||
@@ -1622,6 +1652,10 @@ Unsupported protocol. This build of curl has no support for this protocol.
|
|||||||
Failed to initialize.
|
Failed to initialize.
|
||||||
.IP 3
|
.IP 3
|
||||||
URL malformed. The syntax was not correct.
|
URL malformed. The syntax was not correct.
|
||||||
|
.IP 4
|
||||||
|
A feature or option that was needed to perform the desired request was not
|
||||||
|
enabled or was explicitly disabled at build-time. To make curl able to do
|
||||||
|
this, you probably need another build of libcurl!
|
||||||
.IP 5
|
.IP 5
|
||||||
Couldn't resolve proxy. The given proxy host could not be resolved.
|
Couldn't resolve proxy. The given proxy host could not be resolved.
|
||||||
.IP 6
|
.IP 6
|
||||||
@@ -1698,11 +1732,13 @@ Interface error. A specified outgoing interface could not be used.
|
|||||||
.IP 47
|
.IP 47
|
||||||
Too many redirects. When following redirects, curl hit the maximum amount.
|
Too many redirects. When following redirects, curl hit the maximum amount.
|
||||||
.IP 48
|
.IP 48
|
||||||
Unknown TELNET option specified.
|
Unknown option specified to libcurl. This indicates that you passed a weird
|
||||||
|
option to curl that was passed on to libcurl and rejected. Read up in the
|
||||||
|
manual!
|
||||||
.IP 49
|
.IP 49
|
||||||
Malformed telnet option.
|
Malformed telnet option.
|
||||||
.IP 51
|
.IP 51
|
||||||
The peer's SSL certificate or SSH MD5 fingerprint was not ok.
|
The peer's SSL certificate or SSH MD5 fingerprint was not OK.
|
||||||
.IP 52
|
.IP 52
|
||||||
The server didn't reply anything, which here is considered an error.
|
The server didn't reply anything, which here is considered an error.
|
||||||
.IP 53
|
.IP 53
|
||||||
|
3
docs/examples/.gitignore
vendored
3
docs/examples/.gitignore
vendored
@@ -29,4 +29,7 @@ sendrecv
|
|||||||
sepheaders
|
sepheaders
|
||||||
simple
|
simple
|
||||||
simplepost
|
simplepost
|
||||||
|
simplesmtp
|
||||||
simplessl
|
simplessl
|
||||||
|
smtp-multi
|
||||||
|
smtp-tls
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* Example application source code using the multi interface to download many
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* Example application source code using the multi interface to download many
|
||||||
* files, but with a capped maximum amount of simultaneous transfers.
|
* files, but with a capped maximum amount of simultaneous transfers.
|
||||||
*
|
*
|
||||||
* Written by Michael Wallner
|
* Written by Michael Wallner
|
||||||
|
@@ -1,5 +1,24 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
|
# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
#
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = foreign nostdinc
|
AUTOMAKE_OPTIONS = foreign nostdinc
|
||||||
|
|
||||||
@@ -34,4 +53,4 @@ LDADD = $(LIBDIR)/libcurl.la
|
|||||||
# Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
|
# Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
|
||||||
include Makefile.inc
|
include Makefile.inc
|
||||||
|
|
||||||
|
all: $(check_PROGRAMS)
|
||||||
|
@@ -1,11 +1,24 @@
|
|||||||
#############################################################################
|
#***************************************************************************
|
||||||
# _ _ ____ _
|
# _ _ ____ _
|
||||||
# Project ___| | | | _ \| |
|
# Project ___| | | | _ \| |
|
||||||
# / __| | | | |_) | |
|
# / __| | | | |_) | |
|
||||||
# | (__| |_| | _ <| |___
|
# | (__| |_| | _ <| |___
|
||||||
# \___|\___/|_| \_\_____|
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
|
# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
#
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
# What to call the final executable
|
# What to call the final executable
|
||||||
TARGET = example
|
TARGET = example
|
||||||
|
@@ -4,7 +4,7 @@ check_PROGRAMS = 10-at-a-time anyauthput cookie_interface debug fileupload \
|
|||||||
https multi-app multi-debugcallback multi-double multi-post multi-single \
|
https multi-app multi-debugcallback multi-double multi-post multi-single \
|
||||||
persistant post-callback postit2 sepheaders simple simplepost simplessl \
|
persistant post-callback postit2 sepheaders simple simplepost simplessl \
|
||||||
sendrecv httpcustomheader certinfo chkspeed ftpgetinfo ftp-wildcard \
|
sendrecv httpcustomheader certinfo chkspeed ftpgetinfo ftp-wildcard \
|
||||||
smtp-multi
|
smtp-multi simplesmtp smtp-tls
|
||||||
|
|
||||||
# These examples require external dependencies that may not be commonly
|
# These examples require external dependencies that may not be commonly
|
||||||
# available on POSIX systems, so don't bother attempting to compile them here.
|
# available on POSIX systems, so don't bother attempting to compile them here.
|
||||||
|
@@ -1,3 +1,24 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
#########################################################################
|
#########################################################################
|
||||||
#
|
#
|
||||||
## Makefile for building curl examples with MingW32
|
## Makefile for building curl examples with MingW32
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* Example using a "in core" PEM certificate to retrieve a https page.
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* Example using a "in core" PEM certificate to retrieve a https page.
|
||||||
* Written by Theo Borm
|
* Written by Theo Borm
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@@ -1,6 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
*/
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
@@ -9,9 +27,12 @@
|
|||||||
|
|
||||||
static size_t wrfu(void *ptr, size_t size, size_t nmemb, void *stream)
|
static size_t wrfu(void *ptr, size_t size, size_t nmemb, void *stream)
|
||||||
{
|
{
|
||||||
|
(void)stream;
|
||||||
|
(void)ptr;
|
||||||
return size * nmemb;
|
return size * nmemb;
|
||||||
}
|
}
|
||||||
int main(int argc, char **argv)
|
|
||||||
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* Example source code to show how the callback function can be used to
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* Example source code to show how the callback function can be used to
|
||||||
* download data into a chunk of memory instead of storing it in a file.
|
* download data into a chunk of memory instead of storing it in a file.
|
||||||
* After successful download we use curl_easy_getinfo() calls to get the
|
* After successful download we use curl_easy_getinfo() calls to get the
|
||||||
* amount of downloaded bytes, the time used for the whole download, and
|
* amount of downloaded bytes, the time used for the whole download, and
|
||||||
@@ -71,7 +84,7 @@ int main(int argc, char *argv[])
|
|||||||
} else if (strncasecmp(*argv, "-T", 2) == 0) {
|
} else if (strncasecmp(*argv, "-T", 2) == 0) {
|
||||||
prttime = 1;
|
prttime = 1;
|
||||||
} else if (strncasecmp(*argv, "-M=", 3) == 0) {
|
} else if (strncasecmp(*argv, "-M=", 3) == 0) {
|
||||||
long m = strtol(argv+3, NULL, 10);
|
long m = strtol((*argv)+3, NULL, 10);
|
||||||
switch(m) {
|
switch(m) {
|
||||||
case 1: url = URL_1M;
|
case 1: url = URL_1M;
|
||||||
break;
|
break;
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* This example shows usage of simple cookie interface.
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*/
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* This example shows usage of simple cookie interface. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
@@ -28,12 +40,12 @@ void dump(const char *text,
|
|||||||
/* without the hex output, we can fit more on screen */
|
/* without the hex output, we can fit more on screen */
|
||||||
width = 0x40;
|
width = 0x40;
|
||||||
|
|
||||||
fprintf(stream, "%s, %010.10ld bytes (0x%08.8lx)\n",
|
fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n",
|
||||||
text, (long)size, (long)size);
|
text, (long)size, (long)size);
|
||||||
|
|
||||||
for(i=0; i<size; i+= width) {
|
for(i=0; i<size; i+= width) {
|
||||||
|
|
||||||
fprintf(stream, "%04.4lx: ", (long)i);
|
fprintf(stream, "%4.4lx: ", (long)i);
|
||||||
|
|
||||||
if(!nohex) {
|
if(!nohex) {
|
||||||
/* hex not disabled, show it */
|
/* hex not disabled, show it */
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* Example application source code using the multi socket interface to
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* Example application source code using the multi socket interface to
|
||||||
* download many files at once.
|
* download many files at once.
|
||||||
*
|
*
|
||||||
* This example features the same basic functionality as hiperfifo.c does,
|
* This example features the same basic functionality as hiperfifo.c does,
|
||||||
@@ -367,7 +380,7 @@ static int init_fifo (GlobalInfo *g)
|
|||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
static const char *fifo = "hiper.fifo";
|
static const char *fifo = "hiper.fifo";
|
||||||
int sockfd;
|
curl_socket_t sockfd;
|
||||||
|
|
||||||
fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
|
fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
|
||||||
if ( lstat (fifo, &st) == 0 )
|
if ( lstat (fifo, &st) == 0 )
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@@ -68,8 +68,8 @@ struct fcurl_data
|
|||||||
} handle; /* handle */
|
} handle; /* handle */
|
||||||
|
|
||||||
char *buffer; /* buffer to store cached data*/
|
char *buffer; /* buffer to store cached data*/
|
||||||
int buffer_len; /* currently allocated buffers length */
|
size_t buffer_len; /* currently allocated buffers length */
|
||||||
int buffer_pos; /* end of data in buffer*/
|
size_t buffer_pos; /* end of data in buffer*/
|
||||||
int still_running; /* Is background url fetch still in progress */
|
int still_running; /* Is background url fetch still in progress */
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ URL_FILE *url_fopen(const char *url,const char *operation);
|
|||||||
int url_fclose(URL_FILE *file);
|
int url_fclose(URL_FILE *file);
|
||||||
int url_feof(URL_FILE *file);
|
int url_feof(URL_FILE *file);
|
||||||
size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file);
|
size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file);
|
||||||
char * url_fgets(char *ptr, int size, URL_FILE *file);
|
char * url_fgets(char *ptr, size_t size, URL_FILE *file);
|
||||||
void url_rewind(URL_FILE *file);
|
void url_rewind(URL_FILE *file);
|
||||||
|
|
||||||
/* we use a global one for convenience */
|
/* we use a global one for convenience */
|
||||||
@@ -93,7 +93,7 @@ static size_t write_callback(char *buffer,
|
|||||||
void *userp)
|
void *userp)
|
||||||
{
|
{
|
||||||
char *newbuff;
|
char *newbuff;
|
||||||
int rembuff;
|
size_t rembuff;
|
||||||
|
|
||||||
URL_FILE *url = (URL_FILE *)userp;
|
URL_FILE *url = (URL_FILE *)userp;
|
||||||
size *= nitems;
|
size *= nitems;
|
||||||
@@ -121,7 +121,7 @@ static size_t write_callback(char *buffer,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* use to attempt to fill the read buffer up to requested number of bytes */
|
/* use to attempt to fill the read buffer up to requested number of bytes */
|
||||||
static int fill_buffer(URL_FILE *file,int want,int waittime)
|
static int fill_buffer(URL_FILE *file, size_t want)
|
||||||
{
|
{
|
||||||
fd_set fdread;
|
fd_set fdread;
|
||||||
fd_set fdwrite;
|
fd_set fdwrite;
|
||||||
@@ -323,7 +323,7 @@ size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file)
|
|||||||
case CFTYPE_CURL:
|
case CFTYPE_CURL:
|
||||||
want = nmemb * size;
|
want = nmemb * size;
|
||||||
|
|
||||||
fill_buffer(file,want,1);
|
fill_buffer(file,want);
|
||||||
|
|
||||||
/* check if theres data in the buffer - if not fill_buffer()
|
/* check if theres data in the buffer - if not fill_buffer()
|
||||||
* either errored or EOF */
|
* either errored or EOF */
|
||||||
@@ -351,10 +351,10 @@ size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file)
|
|||||||
return want;
|
return want;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *url_fgets(char *ptr, int size, URL_FILE *file)
|
char *url_fgets(char *ptr, size_t size, URL_FILE *file)
|
||||||
{
|
{
|
||||||
int want = size - 1;/* always need to leave room for zero termination */
|
size_t want = size - 1;/* always need to leave room for zero termination */
|
||||||
int loop;
|
size_t loop;
|
||||||
|
|
||||||
switch(file->type) {
|
switch(file->type) {
|
||||||
case CFTYPE_FILE:
|
case CFTYPE_FILE:
|
||||||
@@ -362,7 +362,7 @@ char *url_fgets(char *ptr, int size, URL_FILE *file)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CFTYPE_CURL:
|
case CFTYPE_CURL:
|
||||||
fill_buffer(file,want,1);
|
fill_buffer(file,want);
|
||||||
|
|
||||||
/* check if theres data in the buffer - if not fill either errored or
|
/* check if theres data in the buffer - if not fill either errored or
|
||||||
* EOF */
|
* EOF */
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@@ -21,6 +33,8 @@
|
|||||||
|
|
||||||
static size_t throw_away(void *ptr, size_t size, size_t nmemb, void *data)
|
static size_t throw_away(void *ptr, size_t size, size_t nmemb, void *data)
|
||||||
{
|
{
|
||||||
|
(void)ptr;
|
||||||
|
(void)data;
|
||||||
/* we are not interested in the headers itself,
|
/* we are not interested in the headers itself,
|
||||||
so we only return the size we would have saved ... */
|
so we only return the size we would have saved ... */
|
||||||
return (size_t)(size * nmemb);
|
return (size_t)(size * nmemb);
|
||||||
@@ -58,7 +72,7 @@ int main(void)
|
|||||||
if((CURLE_OK == res) && filetime)
|
if((CURLE_OK == res) && filetime)
|
||||||
printf("filetime %s: %s", filename, ctime(&filetime));
|
printf("filetime %s: %s", filename, ctime(&filetime));
|
||||||
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &filesize);
|
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &filesize);
|
||||||
if((CURLE_OK == res) && filesize)
|
if((CURLE_OK == res) && (filesize>0))
|
||||||
printf("filesize %s: %0.0f bytes\n", filename, filesize);
|
printf("filesize %s: %0.0f bytes\n", filename, filesize);
|
||||||
} else {
|
} else {
|
||||||
/* we failed */
|
/* we failed */
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
@@ -27,7 +39,7 @@ write_response(void *ptr, size_t size, size_t nmemb, void *data)
|
|||||||
return fwrite(ptr, size, nmemb, writehere);
|
return fwrite(ptr, size, nmemb, writehere);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@@ -48,7 +60,7 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
|
|||||||
return retcode;
|
return retcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* Upload to FTP, resuming failed transfers
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* Upload to FTP, resuming failed transfers
|
||||||
*
|
*
|
||||||
* Compile for MinGW like this:
|
* Compile for MinGW like this:
|
||||||
* gcc -Wall -pedantic -std=c99 ftpuploadwithresume.c -o ftpuploadresume.exe
|
* gcc -Wall -pedantic -std=c99 ftpuploadwithresume.c -o ftpuploadresume.exe
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* Example source code to show how the callback function can be used to
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* Example source code to show how the callback function can be used to
|
||||||
* download data into a chunk of memory instead of storing it in a file.
|
* download data into a chunk of memory instead of storing it in a file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -43,7 +56,7 @@ WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *curl_handle;
|
CURL *curl_handle;
|
||||||
|
|
||||||
@@ -87,7 +100,7 @@ int main(int argc, char **argv)
|
|||||||
* you're done with it, you should free() it as a nice application.
|
* you're done with it, you should free() it as a nice application.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
printf("%lu bytes retrieved\n", chunk.size);
|
printf("%lu bytes retrieved\n", (long)chunk.size);
|
||||||
|
|
||||||
if(chunk.memory)
|
if(chunk.memory)
|
||||||
free(chunk.memory);
|
free(chunk.memory);
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* Example application source code using the multi socket interface to
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* Example application source code using the multi socket interface to
|
||||||
* download many files at once.
|
* download many files at once.
|
||||||
*
|
*
|
||||||
* Written by Jeff Pohlmeyer
|
* Written by Jeff Pohlmeyer
|
||||||
|
@@ -1,15 +1,28 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* Example application source code using the multi socket interface to
|
* This software is licensed as described in the file COPYING, which
|
||||||
* download many files at once.
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
*
|
*
|
||||||
* Written by Jeff Pohlmeyer
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* Example application source code using the multi socket interface to
|
||||||
|
download many files at once.
|
||||||
|
|
||||||
|
Written by Jeff Pohlmeyer
|
||||||
|
|
||||||
Requires libevent and a (POSIX?) system that has mkfifo().
|
Requires libevent and a (POSIX?) system that has mkfifo().
|
||||||
|
|
||||||
@@ -350,7 +363,7 @@ static int init_fifo (GlobalInfo *g)
|
|||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
static const char *fifo = "hiper.fifo";
|
static const char *fifo = "hiper.fifo";
|
||||||
int sockfd;
|
curl_socket_t sockfd;
|
||||||
|
|
||||||
fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
|
fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
|
||||||
if (lstat (fifo, &st) == 0) {
|
if (lstat (fifo, &st) == 0) {
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* Download a document and use libtidy to parse the HTML.
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* Download a document and use libtidy to parse the HTML.
|
||||||
* Written by Jeff Pohlmeyer
|
* Written by Jeff Pohlmeyer
|
||||||
*
|
*
|
||||||
* LibTidy => http://tidy.sourceforge.net
|
* LibTidy => http://tidy.sourceforge.net
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
// Get a web page, parse it with libxml.
|
// Get a web page, parse it with libxml.
|
||||||
//
|
//
|
||||||
// Written by Lars Nilsson
|
// Written by Lars Nilsson
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -1,6 +1,27 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
#
|
#
|
||||||
# Adapted for djgpp / Watt-32 / DOS by
|
# Adapted for djgpp / Watt-32 / DOS by
|
||||||
# Gisle Vanem <giva@bgnett.no>
|
# Gisle Vanem <gvanem@broadpark.no>
|
||||||
#
|
#
|
||||||
|
|
||||||
TOPDIR = ../..
|
TOPDIR = ../..
|
||||||
|
@@ -1,13 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This is an example application source code using the multi interface.
|
* This software is licensed as described in the file COPYING, which
|
||||||
*/
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* This is an example application source code using the multi interface. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -27,7 +39,7 @@
|
|||||||
#define HTTP_HANDLE 0 /* Index for the HTTP transfer */
|
#define HTTP_HANDLE 0 /* Index for the HTTP transfer */
|
||||||
#define FTP_HANDLE 1 /* Index for the FTP transfer */
|
#define FTP_HANDLE 1 /* Index for the FTP transfer */
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *handles[HANDLECOUNT];
|
CURL *handles[HANDLECOUNT];
|
||||||
CURLM *multi_handle;
|
CURLM *multi_handle;
|
||||||
|
@@ -1,14 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This is a very simple example using the multi interface and the debug
|
* This software is licensed as described in the file COPYING, which
|
||||||
* callback.
|
* you should have received as part of this distribution. The terms
|
||||||
*/
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* This is an example showing the multi interface and the debug callback. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -37,12 +48,12 @@ void dump(const char *text,
|
|||||||
/* without the hex output, we can fit more on screen */
|
/* without the hex output, we can fit more on screen */
|
||||||
width = 0x40;
|
width = 0x40;
|
||||||
|
|
||||||
fprintf(stream, "%s, %010.10ld bytes (0x%08.8lx)\n",
|
fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n",
|
||||||
text, (long)size, (long)size);
|
text, (long)size, (long)size);
|
||||||
|
|
||||||
for(i=0; i<size; i+= width) {
|
for(i=0; i<size; i+= width) {
|
||||||
|
|
||||||
fprintf(stream, "%04.4lx: ", (long)i);
|
fprintf(stream, "%4.4lx: ", (long)i);
|
||||||
|
|
||||||
if(!nohex) {
|
if(!nohex) {
|
||||||
/* hex not disabled, show it */
|
/* hex not disabled, show it */
|
||||||
@@ -79,6 +90,7 @@ int my_trace(CURL *handle, curl_infotype type,
|
|||||||
{
|
{
|
||||||
const char *text;
|
const char *text;
|
||||||
|
|
||||||
|
(void)userp;
|
||||||
(void)handle; /* prevent compiler warning */
|
(void)handle; /* prevent compiler warning */
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@@ -108,7 +120,7 @@ int my_trace(CURL *handle, curl_infotype type,
|
|||||||
/*
|
/*
|
||||||
* Simply download a HTTP file.
|
* Simply download a HTTP file.
|
||||||
*/
|
*/
|
||||||
int main(int argc, char **argv)
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *http_handle;
|
CURL *http_handle;
|
||||||
CURLM *multi_handle;
|
CURLM *multi_handle;
|
||||||
|
@@ -1,14 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This is a very simple example using the multi interface.
|
* This software is licensed as described in the file COPYING, which
|
||||||
*/
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@@ -22,7 +32,7 @@
|
|||||||
/*
|
/*
|
||||||
* Simply download two HTTP files!
|
* Simply download two HTTP files!
|
||||||
*/
|
*/
|
||||||
int main(int argc, char **argv)
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *http_handle;
|
CURL *http_handle;
|
||||||
CURL *http_handle2;
|
CURL *http_handle2;
|
||||||
|
@@ -1,21 +1,33 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This is an example application source code using the multi interface
|
* This software is licensed as described in the file COPYING, which
|
||||||
* to do a multipart formpost without "blocking".
|
* you should have received as part of this distribution. The terms
|
||||||
*/
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* This is an example application source code using the multi interface
|
||||||
|
* to do a multipart formpost without "blocking". */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
|
|
||||||
|
@@ -1,13 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This is a very simple example using the multi interface.
|
* This software is licensed as described in the file COPYING, which
|
||||||
*/
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* This is a very simple example using the multi interface. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -22,7 +34,7 @@
|
|||||||
/*
|
/*
|
||||||
* Simply download a HTTP file.
|
* Simply download a HTTP file.
|
||||||
*/
|
*/
|
||||||
int main(int argc, char **argv)
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *http_handle;
|
CURL *http_handle;
|
||||||
CURLM *multi_handle;
|
CURLM *multi_handle;
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
/* A multi-threaded example that uses pthreads extensively to fetch
|
/* A multi-threaded example that uses pthreads extensively to fetch
|
||||||
* X remote files at once */
|
* X remote files at once */
|
||||||
|
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* Example source code to show one way to set the necessary OpenSSL locking
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* Example source code to show one way to set the necessary OpenSSL locking
|
||||||
* callbacks if you want to do multi-threaded transfers with HTTPS/FTPS with
|
* callbacks if you want to do multi-threaded transfers with HTTPS/FTPS with
|
||||||
* libcurl built to use OpenSSL.
|
* libcurl built to use OpenSSL.
|
||||||
*
|
*
|
||||||
|
@@ -1,17 +1,29 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
|
@@ -1,14 +1,26 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* An example source code that issues a HTTP POST and we provide the actual
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* An example source code that issues a HTTP POST and we provide the actual
|
||||||
* data through a read callback.
|
* data through a read callback.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* Example code that uploads a file name 'foo' to a remote script that accepts
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* Example code that uploads a file name 'foo' to a remote script that accepts
|
||||||
* "HTML form based" (as described in RFC1738) uploads using HTTP POST.
|
* "HTML form based" (as described in RFC1738) uploads using HTTP POST.
|
||||||
*
|
*
|
||||||
* The imaginary form we'll fill in looks like:
|
* The imaginary form we'll fill in looks like:
|
||||||
|
@@ -1,11 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
/*
|
/*
|
||||||
This is a simple example showing how a program on a non-ASCII platform
|
This is a simple example showing how a program on a non-ASCII platform
|
||||||
would invoke callbacks to do its own codeset conversions instead of
|
would invoke callbacks to do its own codeset conversions instead of
|
||||||
|
@@ -1,20 +1,32 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* An example of curl_easy_send() and curl_easy_recv() usage.
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
*/
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* An example of curl_easy_send() and curl_easy_recv() usage. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
/* Auxiliary function that waits on the socket. */
|
/* Auxiliary function that waits on the socket. */
|
||||||
static int wait_on_socket(int sockfd, int for_recv, long timeout_ms)
|
static int wait_on_socket(curl_socket_t sockfd, int for_recv, long timeout_ms)
|
||||||
{
|
{
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
fd_set infd, outfd, errfd;
|
fd_set infd, outfd, errfd;
|
||||||
@@ -49,7 +61,8 @@ int main(void)
|
|||||||
CURLcode res;
|
CURLcode res;
|
||||||
/* Minimalistic http request */
|
/* Minimalistic http request */
|
||||||
const char *request = "GET / HTTP/1.0\r\nHost: example.com\r\n\r\n";
|
const char *request = "GET / HTTP/1.0\r\nHost: example.com\r\n\r\n";
|
||||||
int sockfd; /* socket */
|
curl_socket_t sockfd; /* socket */
|
||||||
|
long sockextr;
|
||||||
size_t iolen;
|
size_t iolen;
|
||||||
|
|
||||||
curl = curl_easy_init();
|
curl = curl_easy_init();
|
||||||
@@ -65,9 +78,11 @@ int main(void)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Extract the socket from the curl handle - we'll need it
|
/* Extract the socket from the curl handle - we'll need it for waiting.
|
||||||
* for waiting */
|
* Note that this API takes a pointer to a 'long' while we use
|
||||||
res = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, &sockfd);
|
* curl_socket_t for sockets otherwise.
|
||||||
|
*/
|
||||||
|
res = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, &sockextr);
|
||||||
|
|
||||||
if(CURLE_OK != res)
|
if(CURLE_OK != res)
|
||||||
{
|
{
|
||||||
@@ -75,6 +90,8 @@ int main(void)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sockfd = sockextr;
|
||||||
|
|
||||||
/* wait for the socket to become ready for sending */
|
/* wait for the socket to become ready for sending */
|
||||||
if(!wait_on_socket(sockfd, 0, 60000L))
|
if(!wait_on_socket(sockfd, 0, 60000L))
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@@ -21,7 +33,7 @@ static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
|
|||||||
return written;
|
return written;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *curl_handle;
|
CURL *curl_handle;
|
||||||
static const char *headerfilename = "head.out";
|
static const char *headerfilename = "head.out";
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
83
docs/examples/simplesmtp.c
Normal file
83
docs/examples/simplesmtp.c
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
CURL *curl;
|
||||||
|
CURLcode res;
|
||||||
|
struct curl_slist *recipients = NULL;
|
||||||
|
|
||||||
|
/* value for envelope reverse-path */
|
||||||
|
static const char *from = "<bradh@example.com>";
|
||||||
|
|
||||||
|
/* this becomes the envelope forward-path */
|
||||||
|
static const char *to = "<bradh@example.net>";
|
||||||
|
|
||||||
|
curl = curl_easy_init();
|
||||||
|
if(curl) {
|
||||||
|
/* this is the URL for your mailserver - you can also use an smtps:// URL
|
||||||
|
* here */
|
||||||
|
curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.net.");
|
||||||
|
|
||||||
|
/* Note that this option isn't strictly required, omitting it will result in
|
||||||
|
* libcurl will sent the MAIL FROM command with no sender data. All
|
||||||
|
* autoresponses should have an empty reverse-path, and should be directed
|
||||||
|
* to the address in the reverse-path which triggered them. Otherwise, they
|
||||||
|
* could cause an endless loop. See RFC 5321 Section 4.5.5 for more details.
|
||||||
|
*/
|
||||||
|
curl_easy_setopt(curl, CURLOPT_MAIL_FROM, from);
|
||||||
|
|
||||||
|
/* Note that the CURLOPT_MAIL_RCPT takes a list, not a char array. */
|
||||||
|
recipients = curl_slist_append(recipients, to);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
|
||||||
|
|
||||||
|
/* You provide the payload (headers and the body of the message) as the
|
||||||
|
* "data" element. There are two choices, either:
|
||||||
|
* - provide a callback function and specify the function name using the
|
||||||
|
* CURLOPT_READFUNCTION option; or
|
||||||
|
* - just provide a FILE pointer that can be used to read the data from.
|
||||||
|
* The easiest case is just to read from standard input, (which is available
|
||||||
|
* as a FILE pointer) as shown here.
|
||||||
|
*/
|
||||||
|
curl_easy_setopt(curl, CURLOPT_READDATA, stdin);
|
||||||
|
|
||||||
|
/* send the message (including headers) */
|
||||||
|
res = curl_easy_perform(curl);
|
||||||
|
|
||||||
|
/* free the list of recipients */
|
||||||
|
curl_slist_free_all(recipients);
|
||||||
|
|
||||||
|
/* curl won't send the QUIT command until you call cleanup, so you should be
|
||||||
|
* able to re-use this connection for additional messages (setting
|
||||||
|
* CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT as required, and calling
|
||||||
|
* curl_easy_perform() again. It may not be a good idea to keep the
|
||||||
|
* connection open for a very long time though (more than a few minutes may
|
||||||
|
* result in the server timing out the connection), and you do want to clean
|
||||||
|
* up in the end.
|
||||||
|
*/
|
||||||
|
curl_easy_cleanup(curl);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
@@ -32,7 +44,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
@@ -47,7 +59,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
const char *pEngine;
|
const char *pEngine;
|
||||||
|
|
||||||
#if USE_ENGINE
|
#ifdef USE_ENGINE
|
||||||
pKeyName = "rsa_test";
|
pKeyName = "rsa_test";
|
||||||
pKeyType = "ENG";
|
pKeyType = "ENG";
|
||||||
pEngine = "chil"; /* for nChiper HSM... */
|
pEngine = "chil"; /* for nChiper HSM... */
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This is a multi threaded application that uses a progress bar to show
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* This is a multi threaded application that uses a progress bar to show
|
||||||
* status. It uses Gtk+ to make a smooth pulse.
|
* status. It uses Gtk+ to make a smooth pulse.
|
||||||
*
|
*
|
||||||
* Written by Jud Bishop after studying the other examples provided with
|
* Written by Jud Bishop after studying the other examples provided with
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This is an example application source code sending SMTP mail using the
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* This is an example application source code sending SMTP mail using the
|
||||||
* multi interface.
|
* multi interface.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -21,7 +34,7 @@
|
|||||||
#define SMTPSERVER "smtp.example.com"
|
#define SMTPSERVER "smtp.example.com"
|
||||||
#define SMTPPORT ":587" /* it is a colon+port string, but you can set it
|
#define SMTPPORT ":587" /* it is a colon+port string, but you can set it
|
||||||
to "" to use the default port */
|
to "" to use the default port */
|
||||||
#define RECEPIENT "receipient@example.com"
|
#define RECIPIENT "<recipient@example.com>"
|
||||||
#define MAILFROM "<realuser@example.com>"
|
#define MAILFROM "<realuser@example.com>"
|
||||||
|
|
||||||
#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
|
#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
|
||||||
@@ -99,9 +112,9 @@ int main(void)
|
|||||||
if(!mcurl)
|
if(!mcurl)
|
||||||
return 2;
|
return 2;
|
||||||
|
|
||||||
rcpt_list = curl_slist_append(rcpt_list, RECEPIENT);
|
rcpt_list = curl_slist_append(rcpt_list, RECIPIENT);
|
||||||
/* more addresses can be added here
|
/* more addresses can be added here
|
||||||
rcpt_list = curl_slist_append(rcpt_list, "others@example.com");
|
rcpt_list = curl_slist_append(rcpt_list, "<others@example.com>");
|
||||||
*/
|
*/
|
||||||
|
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, "smtp://" SMTPSERVER SMTPPORT);
|
curl_easy_setopt(curl, CURLOPT_URL, "smtp://" SMTPSERVER SMTPPORT);
|
||||||
|
148
docs/examples/smtp-tls.c
Normal file
148
docs/examples/smtp-tls.c
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
/* This is a simple example showing how to send mail using libcurl's SMTP
|
||||||
|
* capabilities. It builds on the simplesmtp.c example, adding some
|
||||||
|
* authentication and transport security.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define FROM "<sender@example.org>"
|
||||||
|
#define TO "<addressee@example.net>"
|
||||||
|
#define CC "<info@example.org>"
|
||||||
|
|
||||||
|
static const char *payload_text[]={
|
||||||
|
"Date: Mon, 29 Nov 2010 21:54:29 +1100\n",
|
||||||
|
"To: " TO "\n",
|
||||||
|
"From: " FROM "(Example User)\n",
|
||||||
|
"Cc: " CC "(Another example User)\n",
|
||||||
|
"Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@rfcpedant.example.org>\n",
|
||||||
|
"Subject: SMTP TLS example message\n",
|
||||||
|
"\n", /* empty line to divide headers from body, see RFC5322 */
|
||||||
|
"The body of the message starts here.\n",
|
||||||
|
"\n",
|
||||||
|
"It could be a lot of lines, could be MIME encoded, whatever.\n",
|
||||||
|
"Check RFC5322.\n",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
struct upload_status {
|
||||||
|
int lines_read;
|
||||||
|
};
|
||||||
|
|
||||||
|
static size_t payload_source(void *ptr, size_t size, size_t nmemb, void *userp)
|
||||||
|
{
|
||||||
|
struct upload_status *upload_ctx = (struct upload_status *)userp;
|
||||||
|
const char *data;
|
||||||
|
|
||||||
|
if ((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
data = payload_text[upload_ctx->lines_read];
|
||||||
|
|
||||||
|
if (data) {
|
||||||
|
size_t len = strlen(data);
|
||||||
|
memcpy(ptr, data, len);
|
||||||
|
upload_ctx->lines_read ++;
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
CURL *curl;
|
||||||
|
CURLcode res;
|
||||||
|
struct curl_slist *recipients = NULL;
|
||||||
|
struct upload_status upload_ctx;
|
||||||
|
|
||||||
|
upload_ctx.lines_read = 0;
|
||||||
|
|
||||||
|
curl = curl_easy_init();
|
||||||
|
if (curl) {
|
||||||
|
/* This is the URL for your mailserver. Note the use of port 587 here,
|
||||||
|
* instead of the normal SMTP port (25). Port 587 is commonly used for
|
||||||
|
* secure mail submission (see RFC4403), but you should use whatever
|
||||||
|
* matches your server configuration. */
|
||||||
|
curl_easy_setopt(curl, CURLOPT_URL, "smtp://mainserver.example.net:587");
|
||||||
|
|
||||||
|
/* In this example, we'll start with a plain text connection, and upgrade
|
||||||
|
* to Transport Layer Security (TLS) using the STARTTLS command. Be careful
|
||||||
|
* of using CURLUSESSL_TRY here, because if TLS upgrade fails, the transfer
|
||||||
|
* will continue anyway - see the security discussion in the libcurl
|
||||||
|
* tutorial for more details. */
|
||||||
|
curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
|
||||||
|
|
||||||
|
/* If your server doesn't have a valid certificate, then you can disable
|
||||||
|
* part of the Transport Layer Security protection by setting the
|
||||||
|
* CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST options to 0 (false).
|
||||||
|
* curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
|
||||||
|
* curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
|
||||||
|
* That is, in general, a bad idea. It is still better than sending your
|
||||||
|
* authentication details in plain text though.
|
||||||
|
* Instead, you should get the issuer certificate (or the host certificate
|
||||||
|
* if the certificate is self-signed) and add it to the set of certificates
|
||||||
|
* that are known to libcurl using CURLOPT_CAINFO and/or CURLOPT_CAPATH. See
|
||||||
|
* docs/SSLCERTS for more information.
|
||||||
|
*/
|
||||||
|
curl_easy_setopt(curl, CURLOPT_CAINFO, "/path/to/certificate.pem");
|
||||||
|
|
||||||
|
/* A common reason for requiring transport security is to protect
|
||||||
|
* authentication details (user names and passwords) from being "snooped"
|
||||||
|
* on the network. Here is how the user name and password are provided: */
|
||||||
|
curl_easy_setopt(curl, CURLOPT_USERNAME, "user@example.net");
|
||||||
|
curl_easy_setopt(curl, CURLOPT_PASSWORD, "P@ssw0rd");
|
||||||
|
|
||||||
|
/* value for envelope reverse-path */
|
||||||
|
curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM);
|
||||||
|
/* Add two recipients, in this particular case they correspond to the
|
||||||
|
* To: and Cc: addressees in the header, but they could be any kind of
|
||||||
|
* recipient. */
|
||||||
|
recipients = curl_slist_append(recipients, TO);
|
||||||
|
recipients = curl_slist_append(recipients, CC);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
|
||||||
|
|
||||||
|
/* In this case, we're using a callback function to specify the data. You
|
||||||
|
* could just use the CURLOPT_READDATA option to specify a FILE pointer to
|
||||||
|
* read from.
|
||||||
|
*/
|
||||||
|
curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
|
||||||
|
|
||||||
|
/* Since the traffic will be encrypted, it is very useful to turn on debug
|
||||||
|
* information within libcurl to see what is happening during the transfer.
|
||||||
|
*/
|
||||||
|
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||||
|
|
||||||
|
/* send the message (including headers) */
|
||||||
|
res = curl_easy_perform(curl);
|
||||||
|
|
||||||
|
/* free the list of recipients and clean up */
|
||||||
|
curl_slist_free_all(recipients);
|
||||||
|
curl_easy_cleanup(curl);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This example code only builds as-is on Windows.
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* This example code only builds as-is on Windows.
|
||||||
*
|
*
|
||||||
* While Unix/Linux user, you do not need this software.
|
* While Unix/Linux user, you do not need this software.
|
||||||
* You can achieve the same result as synctime using curl, awk and date.
|
* You can achieve the same result as synctime using curl, awk and date.
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* A multi-threaded example that uses pthreads and fetches 4 remote files at
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* A multi-threaded example that uses pthreads and fetches 4 remote files at
|
||||||
* once over HTTPS. The lock callbacks and stuff assume OpenSSL or GnuTLS
|
* once over HTTPS. The lock callbacks and stuff assume OpenSSL or GnuTLS
|
||||||
* (libgcrypt) so far.
|
* (libgcrypt) so far.
|
||||||
*
|
*
|
||||||
|
@@ -1,5 +1,24 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
|
# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
#
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = foreign no-dependencies
|
AUTOMAKE_OPTIONS = foreign no-dependencies
|
||||||
|
|
||||||
|
@@ -1,6 +1,24 @@
|
|||||||
.\" You can view this file with:
|
.\" **************************************************************************
|
||||||
.\" nroff -man [file]
|
.\" * _ _ ____ _
|
||||||
.\"
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
|
.\" * you should have received as part of this distribution. The terms
|
||||||
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
.\" *
|
||||||
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
.\" * copies of the Software, and permit persons to whom the Software is
|
||||||
|
.\" * furnished to do so, under the terms of the COPYING file.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
.\" * KIND, either express or implied.
|
||||||
|
.\" *
|
||||||
|
.\" **************************************************************************
|
||||||
.TH curl_easy_duphandle 3 "18 September 2001" "libcurl 7.9" "libcurl Manual"
|
.TH curl_easy_duphandle 3 "18 September 2001" "libcurl 7.9" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_easy_duphandle - Clone a libcurl session handle
|
curl_easy_duphandle - Clone a libcurl session handle
|
||||||
|
@@ -206,6 +206,8 @@ Pass a pointer to a char pointer to receive a pointer to a string holding the
|
|||||||
path of the entry path. That is the initial path libcurl ended up in when
|
path of the entry path. That is the initial path libcurl ended up in when
|
||||||
logging on to the remote FTP server. This stores a NULL as pointer if
|
logging on to the remote FTP server. This stores a NULL as pointer if
|
||||||
something is wrong. (Added in 7.15.4)
|
something is wrong. (Added in 7.15.4)
|
||||||
|
|
||||||
|
Also works for SFTP since 7.21.4
|
||||||
.IP CURLINFO_CERTINFO
|
.IP CURLINFO_CERTINFO
|
||||||
Pass a pointer to a 'struct curl_certinfo *' and you'll get it set to point to
|
Pass a pointer to a 'struct curl_certinfo *' and you'll get it set to point to
|
||||||
struct that holds a number of linked lists with info about the certificate
|
struct that holds a number of linked lists with info about the certificate
|
||||||
|
@@ -1,4 +1,24 @@
|
|||||||
.\"
|
.\" **************************************************************************
|
||||||
|
.\" * _ _ ____ _
|
||||||
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
|
.\" * you should have received as part of this distribution. The terms
|
||||||
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
.\" *
|
||||||
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
.\" * copies of the Software, and permit persons to whom the Software is
|
||||||
|
.\" * furnished to do so, under the terms of the COPYING file.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
.\" * KIND, either express or implied.
|
||||||
|
.\" *
|
||||||
|
.\" **************************************************************************
|
||||||
.TH curl_easy_init 3 "4 March 2002" "libcurl 7.8.1" "libcurl Manual"
|
.TH curl_easy_init 3 "4 March 2002" "libcurl 7.8.1" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_easy_init - Start a libcurl easy session
|
curl_easy_init - Start a libcurl easy session
|
||||||
|
@@ -1,4 +1,24 @@
|
|||||||
.\"
|
.\" **************************************************************************
|
||||||
|
.\" * _ _ ____ _
|
||||||
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
|
.\" * you should have received as part of this distribution. The terms
|
||||||
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
.\" *
|
||||||
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
.\" * copies of the Software, and permit persons to whom the Software is
|
||||||
|
.\" * furnished to do so, under the terms of the COPYING file.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
.\" * KIND, either express or implied.
|
||||||
|
.\" *
|
||||||
|
.\" **************************************************************************
|
||||||
.TH curl_easy_pause 3 "17 Dec 2007" "libcurl 7.18.0" "libcurl Manual"
|
.TH curl_easy_pause 3 "17 Dec 2007" "libcurl 7.18.0" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_easy_pause - pause and unpause a connection
|
curl_easy_pause - pause and unpause a connection
|
||||||
|
@@ -1,6 +1,24 @@
|
|||||||
.\" You can view this file with:
|
.\" **************************************************************************
|
||||||
.\" nroff -man [file]
|
.\" * _ _ ____ _
|
||||||
.\"
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
|
.\" * you should have received as part of this distribution. The terms
|
||||||
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
.\" *
|
||||||
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
.\" * copies of the Software, and permit persons to whom the Software is
|
||||||
|
.\" * furnished to do so, under the terms of the COPYING file.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
.\" * KIND, either express or implied.
|
||||||
|
.\" *
|
||||||
|
.\" **************************************************************************
|
||||||
.TH curl_easy_perform 3 "5 Mar 2001" "libcurl 7.7" "libcurl Manual"
|
.TH curl_easy_perform 3 "5 Mar 2001" "libcurl 7.7" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_easy_perform - Perform a file transfer
|
curl_easy_perform - Perform a file transfer
|
||||||
|
@@ -1,4 +1,24 @@
|
|||||||
.\"
|
.\" **************************************************************************
|
||||||
|
.\" * _ _ ____ _
|
||||||
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
|
.\" * you should have received as part of this distribution. The terms
|
||||||
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
.\" *
|
||||||
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
.\" * copies of the Software, and permit persons to whom the Software is
|
||||||
|
.\" * furnished to do so, under the terms of the COPYING file.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
.\" * KIND, either express or implied.
|
||||||
|
.\" *
|
||||||
|
.\" **************************************************************************
|
||||||
.TH curl_easy_reset 3 "31 July 2004" "libcurl 7.12.1" "libcurl Manual"
|
.TH curl_easy_reset 3 "31 July 2004" "libcurl 7.12.1" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_easy_reset - reset all options of a libcurl session handle
|
curl_easy_reset - reset all options of a libcurl session handle
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
.\" * | (__| |_| | _ <| |___
|
.\" * | (__| |_| | _ <| |___
|
||||||
.\" * \___|\___/|_| \_\_____|
|
.\" * \___|\___/|_| \_\_____|
|
||||||
.\" *
|
.\" *
|
||||||
.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
.\" *
|
.\" *
|
||||||
.\" * This software is licensed as described in the file COPYING, which
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
.\" * you should have received as part of this distribution. The terms
|
.\" * you should have received as part of this distribution. The terms
|
||||||
@@ -208,6 +208,10 @@ From 7.18.0, the function can return CURL_READFUNC_PAUSE which then will cause
|
|||||||
reading from this connection to become paused. See \fIcurl_easy_pause(3)\fP
|
reading from this connection to become paused. See \fIcurl_easy_pause(3)\fP
|
||||||
for further details.
|
for further details.
|
||||||
|
|
||||||
|
\fBBugs\fP: when doing TFTP uploads, you must return the exact amount of data
|
||||||
|
that the callback wants, or it will be considered the final packet by the
|
||||||
|
server end and the transfer will end there.
|
||||||
|
|
||||||
If you set this callback pointer to NULL, or don't set it at all, the default
|
If you set this callback pointer to NULL, or don't set it at all, the default
|
||||||
internal read function will be used. It is doing an fread() on the FILE *
|
internal read function will be used. It is doing an fread() on the FILE *
|
||||||
userdata set with \fICURLOPT_READDATA\fP.
|
userdata set with \fICURLOPT_READDATA\fP.
|
||||||
@@ -271,6 +275,10 @@ discretion. Return 0 (zero) from the callback on success. Return 1 from the
|
|||||||
callback function to signal an unrecoverable error to the library and it will
|
callback function to signal an unrecoverable error to the library and it will
|
||||||
close the socket and return \fICURLE_COULDNT_CONNECT\fP. (Option added in
|
close the socket and return \fICURLE_COULDNT_CONNECT\fP. (Option added in
|
||||||
7.15.6.)
|
7.15.6.)
|
||||||
|
|
||||||
|
Added in 7.21.5, the callback function may return
|
||||||
|
\fICURL_SOCKOPT_ALREADY_CONNECTED\fP, which tells libcurl that the socket is
|
||||||
|
in fact already connected and then libcurl will not attempt to connect it.
|
||||||
.IP CURLOPT_SOCKOPTDATA
|
.IP CURLOPT_SOCKOPTDATA
|
||||||
Pass a pointer that will be untouched by libcurl and passed as the first
|
Pass a pointer that will be untouched by libcurl and passed as the first
|
||||||
argument in the sockopt callback set with \fICURLOPT_SOCKOPTFUNCTION\fP.
|
argument in the sockopt callback set with \fICURLOPT_SOCKOPTFUNCTION\fP.
|
||||||
@@ -823,7 +831,7 @@ below. If more than one bit is set, libcurl will first query the site to see
|
|||||||
which authentication methods it supports and then pick the best one you allow
|
which authentication methods it supports and then pick the best one you allow
|
||||||
it to use. For some methods, this will induce an extra network round-trip. Set
|
it to use. For some methods, this will induce an extra network round-trip. Set
|
||||||
the actual name and password with the \fICURLOPT_USERPWD\fP option or
|
the actual name and password with the \fICURLOPT_USERPWD\fP option or
|
||||||
with the \fICURLOPT_USERNAME\fP and the \fICURLOPT_USERPASSWORD\fP options.
|
with the \fICURLOPT_USERNAME\fP and the \fICURLOPT_PASSWORD\fP options.
|
||||||
(Added in 7.10.6)
|
(Added in 7.10.6)
|
||||||
.RS
|
.RS
|
||||||
.IP CURLAUTH_BASIC
|
.IP CURLAUTH_BASIC
|
||||||
@@ -870,6 +878,29 @@ This is a meta symbol. Or this value together with a single specific auth
|
|||||||
value to force libcurl to probe for un-restricted auth and if not, only that
|
value to force libcurl to probe for un-restricted auth and if not, only that
|
||||||
single auth algorithm is acceptable. (Added in 7.21.3)
|
single auth algorithm is acceptable. (Added in 7.21.3)
|
||||||
.RE
|
.RE
|
||||||
|
.IP CURLOPT_TLSAUTH_TYPE
|
||||||
|
Pass a long as parameter, which is set to a bitmask, to tell libcurl which
|
||||||
|
authentication method(s) you want it to use for TLS authentication.
|
||||||
|
.RS
|
||||||
|
.IP CURLOPT_TLSAUTH_SRP
|
||||||
|
TLS-SRP authentication. Secure Remote Password authentication for TLS is
|
||||||
|
defined in RFC 5054 and provides mutual authentication if both sides have a
|
||||||
|
shared secret. To use TLS-SRP, you must also set the
|
||||||
|
\fICURLOPT_TLSAUTH_USERNAME\fP and \fICURLOPT_TLSAUTH_PASSWORD\fP options.
|
||||||
|
|
||||||
|
You need to build libcurl with GnuTLS or OpenSSL with TLS-SRP support for this
|
||||||
|
to work. (Added in 7.21.4)
|
||||||
|
.RE
|
||||||
|
.IP CURLOPT_TLSAUTH_USERNAME
|
||||||
|
Pass a char * as parameter, which should point to the zero-terminated username
|
||||||
|
to use for the TLS authentication method specified with the
|
||||||
|
\fICURLOPT_TLSAUTH_TYPE\fP option. Requires that the
|
||||||
|
\fICURLOPT_TLS_PASSWORD\fP option also be set. (Added in 7.21.4)
|
||||||
|
.IP CURLOPT_TLSAUTH_PASSWORD
|
||||||
|
Pass a char * as parameter, which should point to the zero-terminated password
|
||||||
|
to use for the TLS authentication method specified with the
|
||||||
|
\fICURLOPT_TLSAUTH_TYPE\fP option. Requires that the
|
||||||
|
\fICURLOPT_TLS_USERNAME\fP option also be set. (Added in 7.21.4)
|
||||||
.IP CURLOPT_PROXYAUTH
|
.IP CURLOPT_PROXYAUTH
|
||||||
Pass a long as parameter, which is set to a bitmask, to tell libcurl which
|
Pass a long as parameter, which is set to a bitmask, to tell libcurl which
|
||||||
authentication method(s) you want it to use for your proxy authentication. If
|
authentication method(s) you want it to use for your proxy authentication. If
|
||||||
@@ -1189,6 +1220,10 @@ option is set to zero. (added in 7.16.2)
|
|||||||
Pass a pointer to a zero terminated string as parameter. It will be used to
|
Pass a pointer to a zero terminated string as parameter. It will be used to
|
||||||
specify the sender address in a mail when sending an SMTP mail with libcurl.
|
specify the sender address in a mail when sending an SMTP mail with libcurl.
|
||||||
|
|
||||||
|
An originator email address in SMTP lingo is specified within angle brackets
|
||||||
|
(<>) which libcurl will not add for you before version 7.21.4. Failing to
|
||||||
|
provide such brackets may cause the server to reject your mail.
|
||||||
|
|
||||||
(Added in 7.20.0)
|
(Added in 7.20.0)
|
||||||
.IP CURLOPT_MAIL_RCPT
|
.IP CURLOPT_MAIL_RCPT
|
||||||
Pass a pointer to a linked list of recipients to pass to the server in your
|
Pass a pointer to a linked list of recipients to pass to the server in your
|
||||||
@@ -1644,8 +1679,8 @@ given limit. This concerns both FTP and HTTP transfers.
|
|||||||
.IP CURLOPT_TIMECONDITION
|
.IP CURLOPT_TIMECONDITION
|
||||||
Pass a long as parameter. This defines how the \fICURLOPT_TIMEVALUE\fP time
|
Pass a long as parameter. This defines how the \fICURLOPT_TIMEVALUE\fP time
|
||||||
value is treated. You can set this parameter to \fICURL_TIMECOND_IFMODSINCE\fP
|
value is treated. You can set this parameter to \fICURL_TIMECOND_IFMODSINCE\fP
|
||||||
or \fICURL_TIMECOND_IFUNMODSINCE\fP. This feature applies to HTTP, FTP, and
|
or \fICURL_TIMECOND_IFUNMODSINCE\fP. This feature applies to HTTP, FTP, RTSP,
|
||||||
RTSP.
|
and FILE.
|
||||||
|
|
||||||
The last modification time of a file is not always known and in such instances
|
The last modification time of a file is not always known and in such instances
|
||||||
this feature will have no effect even if the given time condition would not
|
this feature will have no effect even if the given time condition would not
|
||||||
@@ -1800,15 +1835,16 @@ resolves, by including a string in the linked list that uses the format
|
|||||||
\&"-HOST:PORT". The host name must be prefixed with a dash, and the host name
|
\&"-HOST:PORT". The host name must be prefixed with a dash, and the host name
|
||||||
and port number must exactly match what was already added previously.
|
and port number must exactly match what was already added previously.
|
||||||
|
|
||||||
(Added in 7.12.3)
|
(Added in 7.21.3)
|
||||||
.SH SSL and SECURITY OPTIONS
|
.SH SSL and SECURITY OPTIONS
|
||||||
.IP CURLOPT_SSLCERT
|
.IP CURLOPT_SSLCERT
|
||||||
Pass a pointer to a zero terminated string as parameter. The string should be
|
Pass a pointer to a zero terminated string as parameter. The string should be
|
||||||
the file name of your certificate. The default format is "PEM" and can be
|
the file name of your certificate. The default format is "PEM" and can be
|
||||||
changed with \fICURLOPT_SSLCERTTYPE\fP.
|
changed with \fICURLOPT_SSLCERTTYPE\fP.
|
||||||
|
|
||||||
With NSS this is the nickname of the certificate you wish to authenticate
|
With NSS this can also be the nickname of the certificate you wish to
|
||||||
with.
|
authenticate with. If you want to use a file from the current directory, please
|
||||||
|
precede it with "./" prefix, in order to avoid confusion with a nickname.
|
||||||
.IP CURLOPT_SSLCERTTYPE
|
.IP CURLOPT_SSLCERTTYPE
|
||||||
Pass a pointer to a zero terminated string as parameter. The string should be
|
Pass a pointer to a zero terminated string as parameter. The string should be
|
||||||
the format of your certificate. Supported formats are "PEM" and "DER". (Added
|
the format of your certificate. Supported formats are "PEM" and "DER". (Added
|
||||||
@@ -1867,28 +1903,30 @@ Force SSLv2
|
|||||||
Force SSLv3
|
Force SSLv3
|
||||||
.RE
|
.RE
|
||||||
.IP CURLOPT_SSL_VERIFYPEER
|
.IP CURLOPT_SSL_VERIFYPEER
|
||||||
Pass a long as parameter.
|
Pass a long as parameter. By default, curl assumes a value of 1.
|
||||||
|
|
||||||
This option determines whether curl verifies the authenticity of the peer's
|
This option determines whether curl verifies the authenticity of the peer's
|
||||||
certificate. A value of 1 means curl verifies; zero means it doesn't. The
|
certificate. A value of 1 means curl verifies; 0 (zero) means it doesn't.
|
||||||
default is nonzero, but before 7.10, it was zero.
|
|
||||||
|
|
||||||
When negotiating an SSL connection, the server sends a certificate indicating
|
When negotiating an SSL connection, the server sends a certificate indicating
|
||||||
its identity. Curl verifies whether the certificate is authentic, i.e. that
|
its identity. Curl verifies whether the certificate is authentic, i.e. that
|
||||||
you can trust that the server is who the certificate says it is. This trust
|
you can trust that the server is who the certificate says it is. This trust
|
||||||
is based on a chain of digital signatures, rooted in certification authority
|
is based on a chain of digital signatures, rooted in certification authority
|
||||||
(CA) certificates you supply. As of 7.10, curl installs a default bundle of
|
(CA) certificates you supply. curl uses a default bundle of CA certificates
|
||||||
CA certificates and you can specify alternate certificates with the
|
(the path for that is determined at build time) and you can specify alternate
|
||||||
\fICURLOPT_CAINFO\fP option or the \fICURLOPT_CAPATH\fP option.
|
certificates with the \fICURLOPT_CAINFO\fP option or the \fICURLOPT_CAPATH\fP
|
||||||
|
option.
|
||||||
|
|
||||||
When \fICURLOPT_SSL_VERIFYPEER\fP is nonzero, and the verification fails to
|
When \fICURLOPT_SSL_VERIFYPEER\fP is nonzero, and the verification fails to
|
||||||
prove that the certificate is authentic, the connection fails. When the
|
prove that the certificate is authentic, the connection fails. When the
|
||||||
option is zero, the connection succeeds regardless.
|
option is zero, the peer certificate verification succeeds regardless.
|
||||||
|
|
||||||
Authenticating the certificate is not by itself very useful. You typically
|
Authenticating the certificate is not by itself very useful. You typically
|
||||||
want to ensure that the server, as authentically identified by its
|
want to ensure that the server, as authentically identified by its
|
||||||
certificate, is the server you mean to be talking to. Use
|
certificate, is the server you mean to be talking to. Use
|
||||||
\fICURLOPT_SSL_VERIFYHOST\fP to control that.
|
\fICURLOPT_SSL_VERIFYHOST\fP to control that. The check that the host name in
|
||||||
|
the certificate is valid for the host name you're connecting to is done
|
||||||
|
independently of the \fICURLOPT_SSL_VERIFYPEER\fP option.
|
||||||
.IP CURLOPT_CAINFO
|
.IP CURLOPT_CAINFO
|
||||||
Pass a char * to a zero terminated string naming a file holding one or more
|
Pass a char * to a zero terminated string naming a file holding one or more
|
||||||
certificates to verify the peer with. This makes sense only when used in
|
certificates to verify the peer with. This makes sense only when used in
|
||||||
@@ -1919,13 +1957,15 @@ mismatch with the issuer of peer certificate (\fICURLOPT_SSL_VERIFYPEER\fP has
|
|||||||
to be set too for the check to fail). (Added in 7.19.0)
|
to be set too for the check to fail). (Added in 7.19.0)
|
||||||
.IP CURLOPT_CAPATH
|
.IP CURLOPT_CAPATH
|
||||||
Pass a char * to a zero terminated string naming a directory holding multiple
|
Pass a char * to a zero terminated string naming a directory holding multiple
|
||||||
CA certificates to verify the peer with. The certificate directory must be
|
CA certificates to verify the peer with. If libcurl is built against OpenSSL,
|
||||||
prepared using the openssl c_rehash utility. This makes sense only when used
|
the certificate directory must be prepared using the openssl c_rehash utility.
|
||||||
in combination with the \fICURLOPT_SSL_VERIFYPEER\fP option. If
|
This makes sense only when used in combination with the
|
||||||
\fICURLOPT_SSL_VERIFYPEER\fP is zero, \fICURLOPT_CAPATH\fP need not even
|
\fICURLOPT_SSL_VERIFYPEER\fP option. If \fICURLOPT_SSL_VERIFYPEER\fP is zero,
|
||||||
indicate an accessible path. The \fICURLOPT_CAPATH\fP function apparently
|
\fICURLOPT_CAPATH\fP need not even indicate an accessible path. The
|
||||||
does not work in Windows due to some limitation in openssl. This option is
|
\fICURLOPT_CAPATH\fP function apparently does not work in Windows due to some
|
||||||
OpenSSL-specific and does nothing if libcurl is built to use GnuTLS.
|
limitation in openssl. This option is OpenSSL-specific and does nothing if
|
||||||
|
libcurl is built to use GnuTLS. NSS-powered libcurl provides the option only
|
||||||
|
for backward compatibility.
|
||||||
.IP CURLOPT_CRLFILE
|
.IP CURLOPT_CRLFILE
|
||||||
Pass a char * to a zero terminated string naming a file with the concatenation
|
Pass a char * to a zero terminated string naming a file with the concatenation
|
||||||
of CRL (in PEM format) to use in the certificate validation that occurs during
|
of CRL (in PEM format) to use in the certificate validation that occurs during
|
||||||
@@ -1944,20 +1984,6 @@ A specific error code (CURLE_SSL_CRL_BADFILE) is defined with the option. It
|
|||||||
is returned when the SSL exchange fails because the CRL file cannot be loaded.
|
is returned when the SSL exchange fails because the CRL file cannot be loaded.
|
||||||
A failure in certificate verification due to a revocation information found in
|
A failure in certificate verification due to a revocation information found in
|
||||||
the CRL does not trigger this specific error. (Added in 7.19.0)
|
the CRL does not trigger this specific error. (Added in 7.19.0)
|
||||||
.IP CURLOPT_CERTINFO
|
|
||||||
Pass a long set to 1 to enable libcurl's certificate chain info gatherer. With
|
|
||||||
this enabled, libcurl (if built with OpenSSL) will extract lots of information
|
|
||||||
and data about the certificates in the certificate chain used in the SSL
|
|
||||||
connection. This data is then possible to extract after a transfer using
|
|
||||||
\fIcurl_easy_getinfo(3)\fP and its option \fICURLINFO_CERTINFO\fP. (Added in
|
|
||||||
7.19.1)
|
|
||||||
.IP CURLOPT_RANDOM_FILE
|
|
||||||
Pass a char * to a zero terminated file name. The file will be used to read
|
|
||||||
from to seed the random engine for SSL. The more random the specified file is,
|
|
||||||
the more secure the SSL connection will become.
|
|
||||||
.IP CURLOPT_EGDSOCKET
|
|
||||||
Pass a char * to the zero terminated path name to the Entropy Gathering Daemon
|
|
||||||
socket. It will be used to seed the random engine for SSL.
|
|
||||||
.IP CURLOPT_SSL_VERIFYHOST
|
.IP CURLOPT_SSL_VERIFYHOST
|
||||||
Pass a long as parameter.
|
Pass a long as parameter.
|
||||||
|
|
||||||
@@ -1981,10 +2007,28 @@ doesn't matter what name it says. (This is not ordinarily a useful setting).
|
|||||||
When the value is 0, the connection succeeds regardless of the names in the
|
When the value is 0, the connection succeeds regardless of the names in the
|
||||||
certificate.
|
certificate.
|
||||||
|
|
||||||
The default, since 7.10, is 2.
|
The default value for this option is 2.
|
||||||
|
|
||||||
This option controls checking the server's claimed identity. The server could
|
This option controls checking the server's certificate's claimed identity.
|
||||||
be lying. To control lying, see \fICURLOPT_SSL_VERIFYPEER\fP.
|
The server could be lying. To control lying, see
|
||||||
|
\fICURLOPT_SSL_VERIFYPEER\fP. If libcurl is built against NSS and
|
||||||
|
\fICURLOPT_SSL_VERIFYPEER\fP is zero, \fICURLOPT_SSL_VERIFYHOST\fP
|
||||||
|
is ignored.
|
||||||
|
|
||||||
|
.IP CURLOPT_CERTINFO
|
||||||
|
Pass a long set to 1 to enable libcurl's certificate chain info gatherer. With
|
||||||
|
this enabled, libcurl (if built with OpenSSL) will extract lots of information
|
||||||
|
and data about the certificates in the certificate chain used in the SSL
|
||||||
|
connection. This data is then possible to extract after a transfer using
|
||||||
|
\fIcurl_easy_getinfo(3)\fP and its option \fICURLINFO_CERTINFO\fP. (Added in
|
||||||
|
7.19.1)
|
||||||
|
.IP CURLOPT_RANDOM_FILE
|
||||||
|
Pass a char * to a zero terminated file name. The file will be used to read
|
||||||
|
from to seed the random engine for SSL. The more random the specified file is,
|
||||||
|
the more secure the SSL connection will become.
|
||||||
|
.IP CURLOPT_EGDSOCKET
|
||||||
|
Pass a char * to the zero terminated path name to the Entropy Gathering Daemon
|
||||||
|
socket. It will be used to seed the random engine for SSL.
|
||||||
.IP CURLOPT_SSL_CIPHER_LIST
|
.IP CURLOPT_SSL_CIPHER_LIST
|
||||||
Pass a char *, pointing to a zero terminated string holding the list of
|
Pass a char *, pointing to a zero terminated string holding the list of
|
||||||
ciphers to use for the SSL connection. The list must be syntactically correct,
|
ciphers to use for the SSL connection. The list must be syntactically correct,
|
||||||
@@ -2051,7 +2095,10 @@ behavior on host and key (mis)matching. (Added in 7.19.6)
|
|||||||
.IP CURLOPT_SSH_KEYFUNCTION
|
.IP CURLOPT_SSH_KEYFUNCTION
|
||||||
Pass a pointer to a curl_sshkeycallback function. It gets called when the
|
Pass a pointer to a curl_sshkeycallback function. It gets called when the
|
||||||
known_host matching has been done, to allow the application to act and decide
|
known_host matching has been done, to allow the application to act and decide
|
||||||
for libcurl how to proceed. It gets passed the CURL handle, the key from the
|
for libcurl how to proceed. The callback will only be called if
|
||||||
|
\fICURLOPT_SSH_KNOWNHOSTS\fP is also set.
|
||||||
|
|
||||||
|
The curl_sshkeycallback function gets passed the CURL handle, the key from the
|
||||||
known_hosts file, the key from the remote site, info from libcurl on the
|
known_hosts file, the key from the remote site, info from libcurl on the
|
||||||
matching status and a custom pointer (set with \fICURLOPT_SSH_KEYDATA\fP). It
|
matching status and a custom pointer (set with \fICURLOPT_SSH_KEYDATA\fP). It
|
||||||
MUST return one of the following return codes to tell libcurl how to act:
|
MUST return one of the following return codes to tell libcurl how to act:
|
||||||
|
@@ -1,6 +1,24 @@
|
|||||||
.\" You can view this file with:
|
.\" **************************************************************************
|
||||||
.\" nroff -man [file]
|
.\" * _ _ ____ _
|
||||||
.\"
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
|
.\" * you should have received as part of this distribution. The terms
|
||||||
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
.\" *
|
||||||
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
.\" * copies of the Software, and permit persons to whom the Software is
|
||||||
|
.\" * furnished to do so, under the terms of the COPYING file.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
.\" * KIND, either express or implied.
|
||||||
|
.\" *
|
||||||
|
.\" **************************************************************************
|
||||||
.TH curl_easy_strerror 3 "26 Apr 2004" "libcurl 7.12" "libcurl Manual"
|
.TH curl_easy_strerror 3 "26 Apr 2004" "libcurl 7.12" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_easy_strerror - return string describing error code
|
curl_easy_strerror - return string describing error code
|
||||||
|
@@ -1,6 +1,24 @@
|
|||||||
.\" You can view this file with:
|
.\" **************************************************************************
|
||||||
.\" nroff -man [file]
|
.\" * _ _ ____ _
|
||||||
.\"
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
|
.\" * you should have received as part of this distribution. The terms
|
||||||
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
.\" *
|
||||||
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
.\" * copies of the Software, and permit persons to whom the Software is
|
||||||
|
.\" * furnished to do so, under the terms of the COPYING file.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
.\" * KIND, either express or implied.
|
||||||
|
.\" *
|
||||||
|
.\" **************************************************************************
|
||||||
.TH curl_escape 3 "6 March 2002" "libcurl 7.9" "libcurl Manual"
|
.TH curl_escape 3 "6 March 2002" "libcurl 7.9" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_escape - URL encodes the given string
|
curl_escape - URL encodes the given string
|
||||||
|
@@ -1,6 +1,24 @@
|
|||||||
.\" You can view this file with:
|
.\" **************************************************************************
|
||||||
.\" nroff -man [file]
|
.\" * _ _ ____ _
|
||||||
.\"
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
|
.\" * you should have received as part of this distribution. The terms
|
||||||
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
.\" *
|
||||||
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
.\" * copies of the Software, and permit persons to whom the Software is
|
||||||
|
.\" * furnished to do so, under the terms of the COPYING file.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
.\" * KIND, either express or implied.
|
||||||
|
.\" *
|
||||||
|
.\" **************************************************************************
|
||||||
.TH curl_formadd 3 "24 June 2002" "libcurl 7.9.8" "libcurl Manual"
|
.TH curl_formadd 3 "24 June 2002" "libcurl 7.9.8" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_formadd - add a section to a multipart/formdata HTTP POST
|
curl_formadd - add a section to a multipart/formdata HTTP POST
|
||||||
|
@@ -1,6 +1,24 @@
|
|||||||
.\" You can view this file with:
|
.\" **************************************************************************
|
||||||
.\" nroff -man [file]
|
.\" * _ _ ____ _
|
||||||
.\"
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
|
.\" * you should have received as part of this distribution. The terms
|
||||||
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
.\" *
|
||||||
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
.\" * copies of the Software, and permit persons to whom the Software is
|
||||||
|
.\" * furnished to do so, under the terms of the COPYING file.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
.\" * KIND, either express or implied.
|
||||||
|
.\" *
|
||||||
|
.\" **************************************************************************
|
||||||
.TH curl_formfree 3 "6 April 2001" "libcurl 7.7.1" "libcurl Manual"
|
.TH curl_formfree 3 "6 April 2001" "libcurl 7.7.1" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_formfree - free a previously build multipart/formdata HTTP POST chain
|
curl_formfree - free a previously build multipart/formdata HTTP POST chain
|
||||||
|
@@ -1,6 +1,24 @@
|
|||||||
.\" You can view this file with:
|
.\" **************************************************************************
|
||||||
.\" nroff -man [file]
|
.\" * _ _ ____ _
|
||||||
.\"
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
|
.\" * you should have received as part of this distribution. The terms
|
||||||
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
.\" *
|
||||||
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
.\" * copies of the Software, and permit persons to whom the Software is
|
||||||
|
.\" * furnished to do so, under the terms of the COPYING file.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
.\" * KIND, either express or implied.
|
||||||
|
.\" *
|
||||||
|
.\" **************************************************************************
|
||||||
.TH curl_formget 3 "20 June 2006" "libcurl 7.15.5" "libcurl Manual"
|
.TH curl_formget 3 "20 June 2006" "libcurl 7.15.5" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_formget - serialize a previously built multipart/formdata HTTP POST chain
|
curl_formget - serialize a previously built multipart/formdata HTTP POST chain
|
||||||
|
@@ -1,6 +1,24 @@
|
|||||||
.\" You can view this file with:
|
.\" **************************************************************************
|
||||||
.\" nroff -man [file]
|
.\" * _ _ ____ _
|
||||||
.\"
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
|
.\" * you should have received as part of this distribution. The terms
|
||||||
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
.\" *
|
||||||
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
.\" * copies of the Software, and permit persons to whom the Software is
|
||||||
|
.\" * furnished to do so, under the terms of the COPYING file.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
.\" * KIND, either express or implied.
|
||||||
|
.\" *
|
||||||
|
.\" **************************************************************************
|
||||||
.TH curl_free 3 "12 Aug 2003" "libcurl 7.10" "libcurl Manual"
|
.TH curl_free 3 "12 Aug 2003" "libcurl 7.10" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_free - reclaim memory that has been obtained through a libcurl call
|
curl_free - reclaim memory that has been obtained through a libcurl call
|
||||||
|
@@ -1,6 +1,24 @@
|
|||||||
.\" You can view this file with:
|
.\" **************************************************************************
|
||||||
.\" nroff -man [file]
|
.\" * _ _ ____ _
|
||||||
.\"
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
|
.\" * you should have received as part of this distribution. The terms
|
||||||
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
.\" *
|
||||||
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
.\" * copies of the Software, and permit persons to whom the Software is
|
||||||
|
.\" * furnished to do so, under the terms of the COPYING file.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
.\" * KIND, either express or implied.
|
||||||
|
.\" *
|
||||||
|
.\" **************************************************************************
|
||||||
.TH curl_getdate 3 "12 Aug 2005" "libcurl 7.0" "libcurl Manual"
|
.TH curl_getdate 3 "12 Aug 2005" "libcurl 7.0" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_getdate - Convert a date string to number of seconds since January 1,
|
curl_getdate - Convert a date string to number of seconds since January 1,
|
||||||
|
@@ -1,4 +1,24 @@
|
|||||||
.\"
|
.\" **************************************************************************
|
||||||
|
.\" * _ _ ____ _
|
||||||
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
|
.\" * you should have received as part of this distribution. The terms
|
||||||
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
.\" *
|
||||||
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
.\" * copies of the Software, and permit persons to whom the Software is
|
||||||
|
.\" * furnished to do so, under the terms of the COPYING file.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
.\" * KIND, either express or implied.
|
||||||
|
.\" *
|
||||||
|
.\" **************************************************************************
|
||||||
.TH curl_getenv 3 "30 April 2004" "libcurl 7.12" "libcurl Manual"
|
.TH curl_getenv 3 "30 April 2004" "libcurl 7.12" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_getenv - return value for environment name
|
curl_getenv - return value for environment name
|
||||||
|
@@ -1,6 +1,24 @@
|
|||||||
.\" You can view this file with:
|
.\" **************************************************************************
|
||||||
.\" nroff -man [file]
|
.\" * _ _ ____ _
|
||||||
.\"
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
|
.\" * you should have received as part of this distribution. The terms
|
||||||
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
.\" *
|
||||||
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
.\" * copies of the Software, and permit persons to whom the Software is
|
||||||
|
.\" * furnished to do so, under the terms of the COPYING file.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
.\" * KIND, either express or implied.
|
||||||
|
.\" *
|
||||||
|
.\" **************************************************************************
|
||||||
.TH curl_global_cleanup 3 "17 Feb 2006" "libcurl 7.8" "libcurl Manual"
|
.TH curl_global_cleanup 3 "17 Feb 2006" "libcurl 7.8" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_global_cleanup - global libcurl cleanup
|
curl_global_cleanup - global libcurl cleanup
|
||||||
|
@@ -1,6 +1,24 @@
|
|||||||
.\" You can view this file with:
|
.\" **************************************************************************
|
||||||
.\" nroff -man [file]
|
.\" * _ _ ____ _
|
||||||
.\"
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
|
.\" * you should have received as part of this distribution. The terms
|
||||||
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
.\" *
|
||||||
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
.\" * copies of the Software, and permit persons to whom the Software is
|
||||||
|
.\" * furnished to do so, under the terms of the COPYING file.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
.\" * KIND, either express or implied.
|
||||||
|
.\" *
|
||||||
|
.\" **************************************************************************
|
||||||
.TH curl_global_init 3 "11 May 2004" "libcurl 7.12" "libcurl Manual"
|
.TH curl_global_init 3 "11 May 2004" "libcurl 7.12" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_global_init - Global libcurl initialisation
|
curl_global_init - Global libcurl initialisation
|
||||||
|
@@ -1,6 +1,24 @@
|
|||||||
.\" You can view this file with:
|
.\" **************************************************************************
|
||||||
.\" nroff -man [file]
|
.\" * _ _ ____ _
|
||||||
.\"
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
|
.\" * you should have received as part of this distribution. The terms
|
||||||
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
.\" *
|
||||||
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
.\" * copies of the Software, and permit persons to whom the Software is
|
||||||
|
.\" * furnished to do so, under the terms of the COPYING file.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
.\" * KIND, either express or implied.
|
||||||
|
.\" *
|
||||||
|
.\" **************************************************************************
|
||||||
.TH curl_global_init_mem 3 "10 May 2004" "libcurl 7.12.0" "libcurl Manual"
|
.TH curl_global_init_mem 3 "10 May 2004" "libcurl 7.12.0" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_global_init_mem - Global libcurl initialisation with memory callbacks
|
curl_global_init_mem - Global libcurl initialisation with memory callbacks
|
||||||
|
@@ -1,4 +1,24 @@
|
|||||||
.\"
|
.\" **************************************************************************
|
||||||
|
.\" * _ _ ____ _
|
||||||
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
|
.\" * you should have received as part of this distribution. The terms
|
||||||
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
.\" *
|
||||||
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
.\" * copies of the Software, and permit persons to whom the Software is
|
||||||
|
.\" * furnished to do so, under the terms of the COPYING file.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
.\" * KIND, either express or implied.
|
||||||
|
.\" *
|
||||||
|
.\" **************************************************************************
|
||||||
.TH curl_printf 3 "30 April 2004" "libcurl 7.12" "libcurl Manual"
|
.TH curl_printf 3 "30 April 2004" "libcurl 7.12" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_maprintf, curl_mfprintf, curl_mprintf, curl_msnprintf, curl_msprintf
|
curl_maprintf, curl_mfprintf, curl_mprintf, curl_msnprintf, curl_msprintf
|
||||||
|
@@ -1,4 +1,24 @@
|
|||||||
.\"
|
.\" **************************************************************************
|
||||||
|
.\" * _ _ ____ _
|
||||||
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
|
.\" * you should have received as part of this distribution. The terms
|
||||||
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
.\" *
|
||||||
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
.\" * copies of the Software, and permit persons to whom the Software is
|
||||||
|
.\" * furnished to do so, under the terms of the COPYING file.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
.\" * KIND, either express or implied.
|
||||||
|
.\" *
|
||||||
|
.\" **************************************************************************
|
||||||
.TH curl_multi_add_handle 3 "4 March 2002" "libcurl 7.9.5" "libcurl Manual"
|
.TH curl_multi_add_handle 3 "4 March 2002" "libcurl 7.9.5" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_multi_add_handle - add an easy handle to a multi session
|
curl_multi_add_handle - add an easy handle to a multi session
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user