Compare commits
No commits in common. "main" and "Curl_easy_1-1-8" have entirely different histories.
main
...
Curl_easy_
@ -1,10 +0,0 @@
|
||||
;;; Directory Local Variables
|
||||
;;; See Info node `(emacs) Directory Variables' for more information.
|
||||
|
||||
((nil . ((indent-tabs-mode . nil)
|
||||
(show-trailing-whitespace . t)))
|
||||
(c-mode . ((c-basic-offset . 2)
|
||||
))
|
||||
(c++-mode . ((c-basic-offset . 2)
|
||||
))
|
||||
)
|
5
.gitattributes
vendored
5
.gitattributes
vendored
@ -1,5 +0,0 @@
|
||||
*.dsw -crlf
|
||||
buildconf eol=lf
|
||||
configure.ac eol=lf
|
||||
*.m4 eol=lf
|
||||
*.in eol=lf
|
23
.github/CONTRIBUTING.md
vendored
23
.github/CONTRIBUTING.md
vendored
@ -1,23 +0,0 @@
|
||||
How to contribute to curl
|
||||
=========================
|
||||
|
||||
Join the community
|
||||
------------------
|
||||
|
||||
1. Click 'watch' on the github repo
|
||||
|
||||
2. Subscribe to the suitable [mailing lists](https://curl.haxx.se/mail/)
|
||||
|
||||
Read [CONTRIBUTE](../docs/CONTRIBUTE)
|
||||
---------------------------------------
|
||||
|
||||
Send your suggestions using one of these methods:
|
||||
-------------------------------------------------
|
||||
|
||||
1. in a mail to the mailing list
|
||||
|
||||
2. as a [pull request](https://github.com/curl/curl/pulls)
|
||||
|
||||
3. as an [issue](https://github.com/curl/curl/issues)
|
||||
|
||||
/ The cURL team!
|
9
.github/ISSUE_TEMPLATE
vendored
9
.github/ISSUE_TEMPLATE
vendored
@ -1,9 +0,0 @@
|
||||
### I did this
|
||||
|
||||
### I expected the following
|
||||
|
||||
### curl/libcurl version
|
||||
|
||||
[curl -V output perhaps?]
|
||||
|
||||
### operating system
|
52
.gitignore
vendored
52
.gitignore
vendored
@ -1,52 +0,0 @@
|
||||
*.asc
|
||||
*.dll
|
||||
*.exe
|
||||
*.exp
|
||||
*.la
|
||||
*.lib
|
||||
*.lo
|
||||
*.o
|
||||
*.obj
|
||||
*.pdb
|
||||
*~
|
||||
.*.swp
|
||||
.cproject
|
||||
.deps
|
||||
.dirstamp
|
||||
.libs
|
||||
.project
|
||||
.settings
|
||||
/build/
|
||||
/builds/
|
||||
CHANGES.dist
|
||||
Debug
|
||||
INSTALL
|
||||
Makefile
|
||||
Makefile.in
|
||||
Release
|
||||
TAGS
|
||||
aclocal.m4
|
||||
aclocal.m4.bak
|
||||
autom4te.cache
|
||||
compile
|
||||
config.cache
|
||||
config.guess
|
||||
config.log
|
||||
config.status
|
||||
config.sub
|
||||
configure
|
||||
curl-*.tar.bz2
|
||||
curl-*.tar.gz
|
||||
curl-*.tar.lzma
|
||||
curl-*.zip
|
||||
curl-config
|
||||
depcomp
|
||||
install-sh
|
||||
libcurl.pc
|
||||
libtool
|
||||
ltmain.sh
|
||||
missing
|
||||
mkinstalldirs
|
||||
tags
|
||||
test-driver
|
||||
scripts/_curl
|
23
.travis.yml
23
.travis.yml
@ -1,23 +0,0 @@
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
|
||||
sudo: false
|
||||
|
||||
language: c
|
||||
|
||||
install:
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update > /dev/null; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install openssl libidn rtmpdump libssh2 c-ares libmetalink libressl nghttp2; fi
|
||||
|
||||
before_script:
|
||||
- ./buildconf
|
||||
|
||||
script: ./configure --enable-debug && make && make test-full
|
||||
|
||||
compiler:
|
||||
- clang
|
||||
- gcc
|
||||
|
||||
notifications:
|
||||
email: false
|
1381
CHANGES.2000
Normal file
1381
CHANGES.2000
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,2 +0,0 @@
|
||||
@CMAKE_CONFIGURABLE_FILE_CONTENT@
|
||||
|
@ -1,535 +0,0 @@
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2014, 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 https://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
|
||||
/* Time with sys/time test */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
if ((struct tm *) 0)
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FCNTL_O_NONBLOCK
|
||||
|
||||
/* headers for FCNTL_O_NONBLOCK test */
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
/* */
|
||||
#if defined(sun) || defined(__sun__) || \
|
||||
defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||
# if defined(__SVR4) || defined(__srv4__)
|
||||
# define PLATFORM_SOLARIS
|
||||
# else
|
||||
# define PLATFORM_SUNOS4
|
||||
# endif
|
||||
#endif
|
||||
#if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX41)
|
||||
# define PLATFORM_AIX_V3
|
||||
#endif
|
||||
/* */
|
||||
#if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3) || defined(__BEOS__)
|
||||
#error "O_NONBLOCK does not work on this platform"
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
/* O_NONBLOCK source test */
|
||||
int flags = 0;
|
||||
if(0 != fcntl(0, F_SETFL, flags | O_NONBLOCK))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* tests for gethostbyaddr_r or gethostbyname_r */
|
||||
#if defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT) || \
|
||||
defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT) || \
|
||||
defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
|
||||
# define _REENTRANT
|
||||
/* no idea whether _REENTRANT is always set, just invent a new flag */
|
||||
# define TEST_GETHOSTBYFOO_REENTRANT
|
||||
#endif
|
||||
#if defined(HAVE_GETHOSTBYADDR_R_5) || \
|
||||
defined(HAVE_GETHOSTBYADDR_R_7) || \
|
||||
defined(HAVE_GETHOSTBYADDR_R_8) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_3) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_5) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_6) || \
|
||||
defined(TEST_GETHOSTBYFOO_REENTRANT)
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
int main(void)
|
||||
{
|
||||
char *address = "example.com";
|
||||
int length = 0;
|
||||
int type = 0;
|
||||
struct hostent h;
|
||||
int rc = 0;
|
||||
#if defined(HAVE_GETHOSTBYADDR_R_5) || \
|
||||
defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT) || \
|
||||
\
|
||||
defined(HAVE_GETHOSTBYNAME_R_3) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT)
|
||||
struct hostent_data hdata;
|
||||
#elif defined(HAVE_GETHOSTBYADDR_R_7) || \
|
||||
defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT) || \
|
||||
defined(HAVE_GETHOSTBYADDR_R_8) || \
|
||||
defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT) || \
|
||||
\
|
||||
defined(HAVE_GETHOSTBYNAME_R_5) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_6) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
|
||||
char buffer[8192];
|
||||
int h_errnop;
|
||||
struct hostent *hp;
|
||||
#endif
|
||||
|
||||
#ifndef gethostbyaddr_r
|
||||
(void)gethostbyaddr_r;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_GETHOSTBYADDR_R_5) || \
|
||||
defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT)
|
||||
rc = gethostbyaddr_r(address, length, type, &h, &hdata);
|
||||
#elif defined(HAVE_GETHOSTBYADDR_R_7) || \
|
||||
defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT)
|
||||
hp = gethostbyaddr_r(address, length, type, &h, buffer, 8192, &h_errnop);
|
||||
(void)hp;
|
||||
#elif defined(HAVE_GETHOSTBYADDR_R_8) || \
|
||||
defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT)
|
||||
rc = gethostbyaddr_r(address, length, type, &h, buffer, 8192, &hp, &h_errnop);
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_GETHOSTBYNAME_R_3) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT)
|
||||
rc = gethostbyname_r(address, &h, &hdata);
|
||||
#elif defined(HAVE_GETHOSTBYNAME_R_5) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT)
|
||||
rc = gethostbyname_r(address, &h, buffer, 8192, &h_errnop);
|
||||
(void)hp; /* not used for test */
|
||||
#elif defined(HAVE_GETHOSTBYNAME_R_6) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
|
||||
rc = gethostbyname_r(address, &h, buffer, 8192, &hp, &h_errnop);
|
||||
#endif
|
||||
|
||||
(void)length;
|
||||
(void)type;
|
||||
(void)rc;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SOCKLEN_T
|
||||
#ifdef _WIN32
|
||||
#include <ws2tcpip.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
int
|
||||
main ()
|
||||
{
|
||||
if ((socklen_t *) 0)
|
||||
return 0;
|
||||
if (sizeof (socklen_t))
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_IN_ADDR_T
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
if ((in_addr_t *) 0)
|
||||
return 0;
|
||||
if (sizeof (in_addr_t))
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BOOL_T
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDBOOL_H
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
int
|
||||
main ()
|
||||
{
|
||||
if (sizeof (bool *) )
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <float.h>
|
||||
int main() { return 0; }
|
||||
#endif
|
||||
#ifdef RETSIGTYPE_TEST
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
#ifdef signal
|
||||
# undef signal
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
extern "C" void (*signal (int, void (*)(int)))(int);
|
||||
#else
|
||||
void (*signal ()) ();
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_INET_NTOA_R_DECL
|
||||
#include <arpa/inet.h>
|
||||
|
||||
typedef void (*func_type)();
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef inet_ntoa_r
|
||||
func_type func;
|
||||
func = (func_type)inet_ntoa_r;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_INET_NTOA_R_DECL_REENTRANT
|
||||
#define _REENTRANT
|
||||
#include <arpa/inet.h>
|
||||
|
||||
typedef void (*func_type)();
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef inet_ntoa_r
|
||||
func_type func;
|
||||
func = (func_type)&inet_ntoa_r;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETADDRINFO
|
||||
#include <netdb.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
int main(void) {
|
||||
struct addrinfo hints, *ai;
|
||||
int error;
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_family = AF_UNSPEC;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
#ifndef getaddrinfo
|
||||
(void)getaddrinfo;
|
||||
#endif
|
||||
error = getaddrinfo("127.0.0.1", "8080", &hints, &ai);
|
||||
if (error) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_FILE_OFFSET_BITS
|
||||
#ifdef _FILE_OFFSET_BITS
|
||||
#undef _FILE_OFFSET_BITS
|
||||
#endif
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
#include <sys/types.h>
|
||||
/* Check that off_t can represent 2**63 - 1 correctly.
|
||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||
since some C++ compilers masquerading as C compilers
|
||||
incorrectly reject 9223372036854775807. */
|
||||
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
int main () { ; return 0; }
|
||||
#endif
|
||||
#ifdef HAVE_IOCTLSOCKET
|
||||
/* includes start */
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# ifdef HAVE_WINSOCK2_H
|
||||
# include <winsock2.h>
|
||||
# else
|
||||
# ifdef HAVE_WINSOCK_H
|
||||
# include <winsock.h>
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
/* ioctlsocket source code */
|
||||
int socket;
|
||||
unsigned long flags = ioctlsocket(socket, FIONBIO, &flags);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifdef HAVE_IOCTLSOCKET_CAMEL
|
||||
/* includes start */
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# ifdef HAVE_WINSOCK2_H
|
||||
# include <winsock2.h>
|
||||
# else
|
||||
# ifdef HAVE_WINSOCK_H
|
||||
# include <winsock.h>
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
/* IoctlSocket source code */
|
||||
if(0 != IoctlSocket(0, 0, 0))
|
||||
return 1;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_IOCTLSOCKET_CAMEL_FIONBIO
|
||||
/* includes start */
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# ifdef HAVE_WINSOCK2_H
|
||||
# include <winsock2.h>
|
||||
# else
|
||||
# ifdef HAVE_WINSOCK_H
|
||||
# include <winsock.h>
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
/* IoctlSocket source code */
|
||||
long flags = 0;
|
||||
if(0 != ioctlsocket(0, FIONBIO, &flags))
|
||||
return 1;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_IOCTLSOCKET_FIONBIO
|
||||
/* includes start */
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# ifdef HAVE_WINSOCK2_H
|
||||
# include <winsock2.h>
|
||||
# else
|
||||
# ifdef HAVE_WINSOCK_H
|
||||
# include <winsock.h>
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
int flags = 0;
|
||||
if(0 != ioctlsocket(0, FIONBIO, &flags))
|
||||
return 1;
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_IOCTL_FIONBIO
|
||||
/* headers for FIONBIO test */
|
||||
/* includes start */
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
#ifdef HAVE_STROPTS_H
|
||||
# include <stropts.h>
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
int flags = 0;
|
||||
if(0 != ioctl(0, FIONBIO, &flags))
|
||||
return 1;
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_IOCTL_SIOCGIFADDR
|
||||
/* headers for FIONBIO test */
|
||||
/* includes start */
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
#ifdef HAVE_STROPTS_H
|
||||
# include <stropts.h>
|
||||
#endif
|
||||
#include <net/if.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
struct ifreq ifr;
|
||||
if(0 != ioctl(0, SIOCGIFADDR, &ifr))
|
||||
return 1;
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_SETSOCKOPT_SO_NONBLOCK
|
||||
/* includes start */
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# ifdef HAVE_WINSOCK2_H
|
||||
# include <winsock2.h>
|
||||
# else
|
||||
# ifdef HAVE_WINSOCK_H
|
||||
# include <winsock.h>
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
/* includes start */
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
/* includes end */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
if(0 != setsockopt(0, SOL_SOCKET, SO_NONBLOCK, 0, 0))
|
||||
return 1;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GLIBC_STRERROR_R
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
int
|
||||
main () {
|
||||
char buffer[1024]; /* big enough to play with */
|
||||
char *string =
|
||||
strerror_r(EACCES, buffer, sizeof(buffer));
|
||||
/* this should've returned a string */
|
||||
if(!string || !string[0])
|
||||
return 99;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_POSIX_STRERROR_R
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
int
|
||||
main () {
|
||||
char buffer[1024]; /* big enough to play with */
|
||||
int error =
|
||||
strerror_r(EACCES, buffer, sizeof(buffer));
|
||||
/* This should've returned zero, and written an error string in the
|
||||
buffer.*/
|
||||
if(!buffer[0] || error)
|
||||
return 99;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
@ -1,42 +0,0 @@
|
||||
# - Find c-ares
|
||||
# Find the c-ares includes and library
|
||||
# This module defines
|
||||
# CARES_INCLUDE_DIR, where to find ares.h, etc.
|
||||
# CARES_LIBRARIES, the libraries needed to use c-ares.
|
||||
# CARES_FOUND, If false, do not try to use c-ares.
|
||||
# also defined, but not for general use are
|
||||
# CARES_LIBRARY, where to find the c-ares library.
|
||||
|
||||
FIND_PATH(CARES_INCLUDE_DIR ares.h
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
)
|
||||
|
||||
SET(CARES_NAMES ${CARES_NAMES} cares)
|
||||
FIND_LIBRARY(CARES_LIBRARY
|
||||
NAMES ${CARES_NAMES}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
)
|
||||
|
||||
IF (CARES_LIBRARY AND CARES_INCLUDE_DIR)
|
||||
SET(CARES_LIBRARIES ${CARES_LIBRARY})
|
||||
SET(CARES_FOUND "YES")
|
||||
ELSE (CARES_LIBRARY AND CARES_INCLUDE_DIR)
|
||||
SET(CARES_FOUND "NO")
|
||||
ENDIF (CARES_LIBRARY AND CARES_INCLUDE_DIR)
|
||||
|
||||
|
||||
IF (CARES_FOUND)
|
||||
IF (NOT CARES_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found c-ares: ${CARES_LIBRARIES}")
|
||||
ENDIF (NOT CARES_FIND_QUIETLY)
|
||||
ELSE (CARES_FOUND)
|
||||
IF (CARES_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find c-ares library")
|
||||
ENDIF (CARES_FIND_REQUIRED)
|
||||
ENDIF (CARES_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
CARES_LIBRARY
|
||||
CARES_INCLUDE_DIR
|
||||
)
|
@ -1,289 +0,0 @@
|
||||
# - Try to find the GSS Kerberos library
|
||||
# Once done this will define
|
||||
#
|
||||
# GSS_ROOT_DIR - Set this variable to the root installation of GSS
|
||||
#
|
||||
# Read-Only variables:
|
||||
# GSS_FOUND - system has the Heimdal library
|
||||
# GSS_FLAVOUR - "MIT" or "Heimdal" if anything found.
|
||||
# GSS_INCLUDE_DIR - the Heimdal include directory
|
||||
# GSS_LIBRARIES - The libraries needed to use GSS
|
||||
# GSS_LINK_DIRECTORIES - Directories to add to linker search path
|
||||
# GSS_LINKER_FLAGS - Additional linker flags
|
||||
# GSS_COMPILER_FLAGS - Additional compiler flags
|
||||
# GSS_VERSION - This is set to version advertised by pkg-config or read from manifest.
|
||||
# In case the library is found but no version info availabe it'll be set to "unknown"
|
||||
|
||||
set(_MIT_MODNAME mit-krb5-gssapi)
|
||||
set(_HEIMDAL_MODNAME heimdal-gssapi)
|
||||
|
||||
include(CheckIncludeFile)
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckTypeSize)
|
||||
|
||||
set(_GSS_ROOT_HINTS
|
||||
"${GSS_ROOT_DIR}"
|
||||
"$ENV{GSS_ROOT_DIR}"
|
||||
)
|
||||
|
||||
# try to find library using system pkg-config if user didn't specify root dir
|
||||
if(NOT GSS_ROOT_DIR AND NOT "$ENV{GSS_ROOT_DIR}")
|
||||
if(UNIX)
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_search_module(_GSS_PKG ${_MIT_MODNAME} ${_HEIMDAL_MODNAME})
|
||||
list(APPEND _GSS_ROOT_HINTS "${_GSS_PKG_PREFIX}")
|
||||
elseif(WIN32)
|
||||
list(APPEND _GSS_ROOT_HINTS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MIT\\Kerberos;InstallDir]")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT _GSS_FOUND) #not found by pkg-config. Let's take more traditional approach.
|
||||
find_file(_GSS_CONFIGURE_SCRIPT
|
||||
NAMES
|
||||
"krb5-config"
|
||||
HINTS
|
||||
${_GSS_ROOT_HINTS}
|
||||
PATH_SUFFIXES
|
||||
bin
|
||||
NO_CMAKE_PATH
|
||||
NO_CMAKE_ENVIRONMENT_PATH
|
||||
)
|
||||
|
||||
# if not found in user-supplied directories, maybe system knows better
|
||||
find_file(_GSS_CONFIGURE_SCRIPT
|
||||
NAMES
|
||||
"krb5-config"
|
||||
PATH_SUFFIXES
|
||||
bin
|
||||
)
|
||||
|
||||
if(_GSS_CONFIGURE_SCRIPT)
|
||||
execute_process(
|
||||
COMMAND ${_GSS_CONFIGURE_SCRIPT} "--cflags" "gssapi"
|
||||
OUTPUT_VARIABLE _GSS_CFLAGS
|
||||
RESULT_VARIABLE _GSS_CONFIGURE_FAILED
|
||||
)
|
||||
message(STATUS "CFLAGS: ${_GSS_CFLAGS}")
|
||||
if(NOT _GSS_CONFIGURE_FAILED) # 0 means success
|
||||
# should also work in an odd case when multiple directories are given
|
||||
string(STRIP "${_GSS_CFLAGS}" _GSS_CFLAGS)
|
||||
string(REGEX REPLACE " +-I" ";" _GSS_CFLAGS "${_GSS_CFLAGS}")
|
||||
string(REGEX REPLACE " +-([^I][^ \\t;]*)" ";-\\1"_GSS_CFLAGS "${_GSS_CFLAGS}")
|
||||
|
||||
foreach(_flag ${_GSS_CFLAGS})
|
||||
if(_flag MATCHES "^-I.*")
|
||||
string(REGEX REPLACE "^-I" "" _val "${_flag}")
|
||||
list(APPEND _GSS_INCLUDE_DIR "${_val}")
|
||||
else()
|
||||
list(APPEND _GSS_COMPILER_FLAGS "${_flag}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${_GSS_CONFIGURE_SCRIPT} "--libs" "gssapi"
|
||||
OUTPUT_VARIABLE _GSS_LIB_FLAGS
|
||||
RESULT_VARIABLE _GSS_CONFIGURE_FAILED
|
||||
)
|
||||
message(STATUS "LDFLAGS: ${_GSS_LIB_FLAGS}")
|
||||
if(NOT _GSS_CONFIGURE_FAILED) # 0 means success
|
||||
# this script gives us libraries and link directories. Blah. We have to deal with it.
|
||||
string(STRIP "${_GSS_LIB_FLAGS}" _GSS_LIB_FLAGS)
|
||||
string(REGEX REPLACE " +-(L|l)" ";-\\1" _GSS_LIB_FLAGS "${_GSS_LIB_FLAGS}")
|
||||
string(REGEX REPLACE " +-([^Ll][^ \\t;]*)" ";-\\1"_GSS_LIB_FLAGS "${_GSS_LIB_FLAGS}")
|
||||
|
||||
foreach(_flag ${_GSS_LIB_FLAGS})
|
||||
if(_flag MATCHES "^-l.*")
|
||||
string(REGEX REPLACE "^-l" "" _val "${_flag}")
|
||||
list(APPEND _GSS_LIBRARIES "${_val}")
|
||||
elseif(_flag MATCHES "^-L.*")
|
||||
string(REGEX REPLACE "^-L" "" _val "${_flag}")
|
||||
list(APPEND _GSS_LINK_DIRECTORIES "${_val}")
|
||||
else()
|
||||
list(APPEND _GSS_LINKER_FLAGS "${_flag}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
|
||||
execute_process(
|
||||
COMMAND ${_GSS_CONFIGURE_SCRIPT} "--version"
|
||||
OUTPUT_VARIABLE _GSS_VERSION
|
||||
RESULT_VARIABLE _GSS_CONFIGURE_FAILED
|
||||
)
|
||||
|
||||
# older versions may not have the "--version" parameter. In this case we just don't care.
|
||||
if(_GSS_CONFIGURE_FAILED)
|
||||
set(_GSS_VERSION 0)
|
||||
endif()
|
||||
|
||||
|
||||
execute_process(
|
||||
COMMAND ${_GSS_CONFIGURE_SCRIPT} "--vendor"
|
||||
OUTPUT_VARIABLE _GSS_VENDOR
|
||||
RESULT_VARIABLE _GSS_CONFIGURE_FAILED
|
||||
)
|
||||
|
||||
# older versions may not have the "--vendor" parameter. In this case we just don't care.
|
||||
if(_GSS_CONFIGURE_FAILED)
|
||||
set(GSS_FLAVOUR "Heimdal") # most probably, shouldn't really matter
|
||||
else()
|
||||
if(_GSS_VENDOR MATCHES ".*H|heimdal.*")
|
||||
set(GSS_FLAVOUR "Heimdal")
|
||||
else()
|
||||
set(GSS_FLAVOUR "MIT")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
else() # either there is no config script or we are on platform that doesn't provide one (Windows?)
|
||||
|
||||
find_path(_GSS_INCLUDE_DIR
|
||||
NAMES
|
||||
"gssapi/gssapi.h"
|
||||
HINTS
|
||||
${_GSS_ROOT_HINTS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
inc
|
||||
)
|
||||
|
||||
if(_GSS_INCLUDE_DIR) #jay, we've found something
|
||||
set(CMAKE_REQUIRED_INCLUDES "${_GSS_INCLUDE_DIR}")
|
||||
check_include_files( "gssapi/gssapi_generic.h;gssapi/gssapi_krb5.h" _GSS_HAVE_MIT_HEADERS)
|
||||
|
||||
if(_GSS_HAVE_MIT_HEADERS)
|
||||
set(GSS_FLAVOUR "MIT")
|
||||
else()
|
||||
# prevent compiling the header - just check if we can include it
|
||||
set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D__ROKEN_H__")
|
||||
check_include_file( "roken.h" _GSS_HAVE_ROKEN_H)
|
||||
|
||||
check_include_file( "heimdal/roken.h" _GSS_HAVE_HEIMDAL_ROKEN_H)
|
||||
if(_GSS_HAVE_ROKEN_H OR _GSS_HAVE_HEIMDAL_ROKEN_H)
|
||||
set(GSS_FLAVOUR "Heimdal")
|
||||
endif()
|
||||
set(CMAKE_REQUIRED_DEFINITIONS "")
|
||||
endif()
|
||||
else()
|
||||
# I'm not convienced if this is the right way but this is what autotools do at the moment
|
||||
find_path(_GSS_INCLUDE_DIR
|
||||
NAMES
|
||||
"gssapi.h"
|
||||
HINTS
|
||||
${_GSS_ROOT_HINTS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
inc
|
||||
)
|
||||
|
||||
if(_GSS_INCLUDE_DIR)
|
||||
set(GSS_FLAVOUR "Heimdal")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# if we have headers, check if we can link libraries
|
||||
if(GSS_FLAVOUR)
|
||||
set(_GSS_LIBDIR_SUFFIXES "")
|
||||
set(_GSS_LIBDIR_HINTS ${_GSS_ROOT_HINTS})
|
||||
get_filename_component(_GSS_CALCULATED_POTENTIAL_ROOT "${_GSS_INCLUDE_DIR}" PATH)
|
||||
list(APPEND _GSS_LIBDIR_HINTS ${_GSS_CALCULATED_POTENTIAL_ROOT})
|
||||
|
||||
if(WIN32)
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
list(APPEND _GSS_LIBDIR_SUFFIXES "lib/AMD64")
|
||||
if(GSS_FLAVOUR STREQUAL "MIT")
|
||||
set(_GSS_LIBNAME "gssapi64")
|
||||
else()
|
||||
set(_GSS_LIBNAME "libgssapi")
|
||||
endif()
|
||||
else()
|
||||
list(APPEND _GSS_LIBDIR_SUFFIXES "lib/i386")
|
||||
if(GSS_FLAVOUR STREQUAL "MIT")
|
||||
set(_GSS_LIBNAME "gssapi32")
|
||||
else()
|
||||
set(_GSS_LIBNAME "libgssapi")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
list(APPEND _GSS_LIBDIR_SUFFIXES "lib;lib64") # those suffixes are not checked for HINTS
|
||||
if(GSS_FLAVOUR STREQUAL "MIT")
|
||||
set(_GSS_LIBNAME "gssapi_krb5")
|
||||
else()
|
||||
set(_GSS_LIBNAME "gssapi")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_library(_GSS_LIBRARIES
|
||||
NAMES
|
||||
${_GSS_LIBNAME}
|
||||
HINTS
|
||||
${_GSS_LIBDIR_HINTS}
|
||||
PATH_SUFFIXES
|
||||
${_GSS_LIBDIR_SUFFIXES}
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
endif()
|
||||
else()
|
||||
if(_GSS_PKG_${_MIT_MODNAME}_VERSION)
|
||||
set(GSS_FLAVOUR "MIT")
|
||||
set(_GSS_VERSION _GSS_PKG_${_MIT_MODNAME}_VERSION)
|
||||
else()
|
||||
set(GSS_FLAVOUR "Heimdal")
|
||||
set(_GSS_VERSION _GSS_PKG_${_MIT_HEIMDAL}_VERSION)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(GSS_INCLUDE_DIR ${_GSS_INCLUDE_DIR})
|
||||
set(GSS_LIBRARIES ${_GSS_LIBRARIES})
|
||||
set(GSS_LINK_DIRECTORIES ${_GSS_LINK_DIRECTORIES})
|
||||
set(GSS_LINKER_FLAGS ${_GSS_LINKER_FLAGS})
|
||||
set(GSS_COMPILER_FLAGS ${_GSS_COMPILER_FLAGS})
|
||||
set(GSS_VERSION ${_GSS_VERSION})
|
||||
|
||||
if(GSS_FLAVOUR)
|
||||
|
||||
if(NOT GSS_VERSION AND GSS_FLAVOUR STREQUAL "Heimdal")
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(HEIMDAL_MANIFEST_FILE "Heimdal.Application.amd64.manifest")
|
||||
else()
|
||||
set(HEIMDAL_MANIFEST_FILE "Heimdal.Application.x86.manifest")
|
||||
endif()
|
||||
|
||||
if(EXISTS "${GSS_INCLUDE_DIR}/${HEIMDAL_MANIFEST_FILE}")
|
||||
file(STRINGS "${GSS_INCLUDE_DIR}/${HEIMDAL_MANIFEST_FILE}" heimdal_version_str
|
||||
REGEX "^.*version=\"[0-9]\\.[^\"]+\".*$")
|
||||
|
||||
string(REGEX MATCH "[0-9]\\.[^\"]+"
|
||||
GSS_VERSION "${heimdal_version_str}")
|
||||
endif()
|
||||
|
||||
if(NOT GSS_VERSION)
|
||||
set(GSS_VERSION "Heimdal Unknown")
|
||||
endif()
|
||||
elseif(NOT GSS_VERSION AND GSS_FLAVOUR STREQUAL "MIT")
|
||||
get_filename_component(_MIT_VERSION "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MIT\\Kerberos\\SDK\\CurrentVersion;VersionString]" NAME CACHE)
|
||||
if(WIN32 AND _MIT_VERSION)
|
||||
set(GSS_VERSION "${_MIT_VERSION}")
|
||||
else()
|
||||
set(GSS_VERSION "MIT Unknown")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
set(_GSS_REQUIRED_VARS GSS_LIBRARIES GSS_FLAVOUR)
|
||||
|
||||
find_package_handle_standard_args(GSS
|
||||
REQUIRED_VARS
|
||||
${_GSS_REQUIRED_VARS}
|
||||
VERSION_VAR
|
||||
GSS_VERSION
|
||||
FAIL_MESSAGE
|
||||
"Could NOT find GSS, try to set the path to GSS root folder in the system variable GSS_ROOT_DIR"
|
||||
)
|
||||
|
||||
mark_as_advanced(GSS_INCLUDE_DIR GSS_LIBRARIES)
|
@ -1,35 +0,0 @@
|
||||
# - Try to find the libssh2 library
|
||||
# Once done this will define
|
||||
#
|
||||
# LIBSSH2_FOUND - system has the libssh2 library
|
||||
# LIBSSH2_INCLUDE_DIR - the libssh2 include directory
|
||||
# LIBSSH2_LIBRARY - the libssh2 library name
|
||||
|
||||
if (LIBSSH2_INCLUDE_DIR AND LIBSSH2_LIBRARY)
|
||||
set(LibSSH2_FIND_QUIETLY TRUE)
|
||||
endif (LIBSSH2_INCLUDE_DIR AND LIBSSH2_LIBRARY)
|
||||
|
||||
FIND_PATH(LIBSSH2_INCLUDE_DIR libssh2.h
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LIBSSH2_LIBRARY NAMES ssh2
|
||||
)
|
||||
|
||||
if(LIBSSH2_INCLUDE_DIR)
|
||||
file(STRINGS "${LIBSSH2_INCLUDE_DIR}/libssh2.h" libssh2_version_str REGEX "^#define[\t ]+LIBSSH2_VERSION_NUM[\t ]+0x[0-9][0-9][0-9][0-9][0-9][0-9].*")
|
||||
|
||||
string(REGEX REPLACE "^.*LIBSSH2_VERSION_NUM[\t ]+0x([0-9][0-9]).*$" "\\1" LIBSSH2_VERSION_MAJOR "${libssh2_version_str}")
|
||||
string(REGEX REPLACE "^.*LIBSSH2_VERSION_NUM[\t ]+0x[0-9][0-9]([0-9][0-9]).*$" "\\1" LIBSSH2_VERSION_MINOR "${libssh2_version_str}")
|
||||
string(REGEX REPLACE "^.*LIBSSH2_VERSION_NUM[\t ]+0x[0-9][0-9][0-9][0-9]([0-9][0-9]).*$" "\\1" LIBSSH2_VERSION_PATCH "${libssh2_version_str}")
|
||||
|
||||
string(REGEX REPLACE "^0(.+)" "\\1" LIBSSH2_VERSION_MAJOR "${LIBSSH2_VERSION_MAJOR}")
|
||||
string(REGEX REPLACE "^0(.+)" "\\1" LIBSSH2_VERSION_MINOR "${LIBSSH2_VERSION_MINOR}")
|
||||
string(REGEX REPLACE "^0(.+)" "\\1" LIBSSH2_VERSION_PATCH "${LIBSSH2_VERSION_PATCH}")
|
||||
|
||||
set(LIBSSH2_VERSION "${LIBSSH2_VERSION_MAJOR}.${LIBSSH2_VERSION_MINOR}.${LIBSSH2_VERSION_PATCH}")
|
||||
endif(LIBSSH2_INCLUDE_DIR)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibSSH2 DEFAULT_MSG LIBSSH2_INCLUDE_DIR LIBSSH2_LIBRARY )
|
||||
|
||||
MARK_AS_ADVANCED(LIBSSH2_INCLUDE_DIR LIBSSH2_LIBRARY LIBSSH2_VERSION_MAJOR LIBSSH2_VERSION_MINOR LIBSSH2_VERSION_PATCH LIBSSH2_VERSION)
|
@ -1,95 +0,0 @@
|
||||
#File defines convenience macros for available feature testing
|
||||
|
||||
# This macro checks if the symbol exists in the library and if it
|
||||
# does, it prepends library to the list. It is intended to be called
|
||||
# multiple times with a sequence of possibly dependent libraries in
|
||||
# order of least-to-most-dependent. Some libraries depend on others
|
||||
# to link correctly.
|
||||
macro(CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
|
||||
check_library_exists("${LIBRARY};${CURL_LIBS}" ${SYMBOL} "${CMAKE_LIBRARY_PATH}"
|
||||
${VARIABLE})
|
||||
if(${VARIABLE})
|
||||
set(CURL_LIBS ${LIBRARY} ${CURL_LIBS})
|
||||
endif(${VARIABLE})
|
||||
endmacro(CHECK_LIBRARY_EXISTS_CONCAT)
|
||||
|
||||
# Check if header file exists and add it to the list.
|
||||
# This macro is intended to be called multiple times with a sequence of
|
||||
# possibly dependent header files. Some headers depend on others to be
|
||||
# compiled correctly.
|
||||
macro(CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
|
||||
check_include_files("${CURL_INCLUDES};${FILE}" ${VARIABLE})
|
||||
if(${VARIABLE})
|
||||
set(CURL_INCLUDES ${CURL_INCLUDES} ${FILE})
|
||||
set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -D${VARIABLE}")
|
||||
endif(${VARIABLE})
|
||||
endmacro(CHECK_INCLUDE_FILE_CONCAT)
|
||||
|
||||
# For other curl specific tests, use this macro.
|
||||
macro(CURL_INTERNAL_TEST CURL_TEST)
|
||||
if(NOT DEFINED "${CURL_TEST}")
|
||||
set(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||
"-D${CURL_TEST} ${CURL_TEST_DEFINES} ${CMAKE_REQUIRED_FLAGS}")
|
||||
if(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CURL_TEST_ADD_LIBRARIES
|
||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||
endif(CMAKE_REQUIRED_LIBRARIES)
|
||||
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST}")
|
||||
try_compile(${CURL_TEST}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c
|
||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
|
||||
"${CURL_TEST_ADD_LIBRARIES}"
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
if(${CURL_TEST})
|
||||
set(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST} - Success")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Performing Curl Test ${CURL_TEST} passed with the following output:\n"
|
||||
"${OUTPUT}\n")
|
||||
else(${CURL_TEST})
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
|
||||
set(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
|
||||
"${OUTPUT}\n")
|
||||
endif(${CURL_TEST})
|
||||
endif()
|
||||
endmacro(CURL_INTERNAL_TEST)
|
||||
|
||||
macro(CURL_INTERNAL_TEST_RUN CURL_TEST)
|
||||
if(NOT DEFINED "${CURL_TEST}_COMPILE")
|
||||
set(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||
"-D${CURL_TEST} ${CMAKE_REQUIRED_FLAGS}")
|
||||
if(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CURL_TEST_ADD_LIBRARIES
|
||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||
endif(CMAKE_REQUIRED_LIBRARIES)
|
||||
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST}")
|
||||
try_run(${CURL_TEST} ${CURL_TEST}_COMPILE
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c
|
||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
|
||||
"${CURL_TEST_ADD_LIBRARIES}"
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
if(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
|
||||
set(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST} - Success")
|
||||
else(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
|
||||
set(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||
file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
|
||||
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
|
||||
"${OUTPUT}")
|
||||
if(${CURL_TEST}_COMPILE)
|
||||
file(APPEND
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
|
||||
"There was a problem running this test\n")
|
||||
endif(${CURL_TEST}_COMPILE)
|
||||
file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
|
||||
"\n\n")
|
||||
endif(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
|
||||
endif()
|
||||
endmacro(CURL_INTERNAL_TEST_RUN)
|
@ -1,229 +0,0 @@
|
||||
include(CheckCSourceCompiles)
|
||||
# The begin of the sources (macros and includes)
|
||||
set(_source_epilogue "#undef inline")
|
||||
|
||||
macro(add_header_include check header)
|
||||
if(${check})
|
||||
set(_source_epilogue "${_source_epilogue}\n#include <${header}>")
|
||||
endif(${check})
|
||||
endmacro(add_header_include)
|
||||
|
||||
set(signature_call_conv)
|
||||
if(HAVE_WINDOWS_H)
|
||||
add_header_include(HAVE_WINSOCK2_H "winsock2.h")
|
||||
add_header_include(HAVE_WINDOWS_H "windows.h")
|
||||
add_header_include(HAVE_WINSOCK_H "winsock.h")
|
||||
set(_source_epilogue
|
||||
"${_source_epilogue}\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif")
|
||||
set(signature_call_conv "PASCAL")
|
||||
if(HAVE_LIBWS2_32)
|
||||
set(CMAKE_REQUIRED_LIBRARIES ws2_32)
|
||||
endif()
|
||||
else(HAVE_WINDOWS_H)
|
||||
add_header_include(HAVE_SYS_TYPES_H "sys/types.h")
|
||||
add_header_include(HAVE_SYS_SOCKET_H "sys/socket.h")
|
||||
endif(HAVE_WINDOWS_H)
|
||||
|
||||
check_c_source_compiles("${_source_epilogue}
|
||||
int main(void) {
|
||||
recv(0, 0, 0, 0);
|
||||
return 0;
|
||||
}" curl_cv_recv)
|
||||
if(curl_cv_recv)
|
||||
if(NOT DEFINED curl_cv_func_recv_args OR "${curl_cv_func_recv_args}" STREQUAL "unknown")
|
||||
foreach(recv_retv "int" "ssize_t" )
|
||||
foreach(recv_arg1 "int" "ssize_t" "SOCKET")
|
||||
foreach(recv_arg2 "void *" "char *")
|
||||
foreach(recv_arg3 "size_t" "int" "socklen_t" "unsigned int")
|
||||
foreach(recv_arg4 "int" "unsigned int")
|
||||
if(NOT curl_cv_func_recv_done)
|
||||
unset(curl_cv_func_recv_test CACHE)
|
||||
check_c_source_compiles("
|
||||
${_source_epilogue}
|
||||
extern ${recv_retv} ${signature_call_conv}
|
||||
recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4});
|
||||
int main(void) {
|
||||
${recv_arg1} s=0;
|
||||
${recv_arg2} buf=0;
|
||||
${recv_arg3} len=0;
|
||||
${recv_arg4} flags=0;
|
||||
${recv_retv} res = recv(s, buf, len, flags);
|
||||
(void) res;
|
||||
return 0;
|
||||
}"
|
||||
curl_cv_func_recv_test)
|
||||
message(STATUS
|
||||
"Tested: ${recv_retv} recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4})")
|
||||
if(curl_cv_func_recv_test)
|
||||
set(curl_cv_func_recv_args
|
||||
"${recv_arg1},${recv_arg2},${recv_arg3},${recv_arg4},${recv_retv}")
|
||||
set(RECV_TYPE_ARG1 "${recv_arg1}")
|
||||
set(RECV_TYPE_ARG2 "${recv_arg2}")
|
||||
set(RECV_TYPE_ARG3 "${recv_arg3}")
|
||||
set(RECV_TYPE_ARG4 "${recv_arg4}")
|
||||
set(RECV_TYPE_RETV "${recv_retv}")
|
||||
set(HAVE_RECV 1)
|
||||
set(curl_cv_func_recv_done 1)
|
||||
endif(curl_cv_func_recv_test)
|
||||
endif(NOT curl_cv_func_recv_done)
|
||||
endforeach(recv_arg4)
|
||||
endforeach(recv_arg3)
|
||||
endforeach(recv_arg2)
|
||||
endforeach(recv_arg1)
|
||||
endforeach(recv_retv)
|
||||
else()
|
||||
string(REGEX REPLACE "^([^,]*),[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG1 "${curl_cv_func_recv_args}")
|
||||
string(REGEX REPLACE "^[^,]*,([^,]*),[^,]*,[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG2 "${curl_cv_func_recv_args}")
|
||||
string(REGEX REPLACE "^[^,]*,[^,]*,([^,]*),[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG3 "${curl_cv_func_recv_args}")
|
||||
string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,([^,]*),[^,]*$" "\\1" RECV_TYPE_ARG4 "${curl_cv_func_recv_args}")
|
||||
string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,([^,]*)$" "\\1" RECV_TYPE_RETV "${curl_cv_func_recv_args}")
|
||||
endif()
|
||||
|
||||
if("${curl_cv_func_recv_args}" STREQUAL "unknown")
|
||||
message(FATAL_ERROR "Cannot find proper types to use for recv args")
|
||||
endif("${curl_cv_func_recv_args}" STREQUAL "unknown")
|
||||
else(curl_cv_recv)
|
||||
message(FATAL_ERROR "Unable to link function recv")
|
||||
endif(curl_cv_recv)
|
||||
set(curl_cv_func_recv_args "${curl_cv_func_recv_args}" CACHE INTERNAL "Arguments for recv")
|
||||
set(HAVE_RECV 1)
|
||||
|
||||
check_c_source_compiles("${_source_epilogue}
|
||||
int main(void) {
|
||||
send(0, 0, 0, 0);
|
||||
return 0;
|
||||
}" curl_cv_send)
|
||||
if(curl_cv_send)
|
||||
if(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown")
|
||||
foreach(send_retv "int" "ssize_t" )
|
||||
foreach(send_arg1 "int" "ssize_t" "SOCKET")
|
||||
foreach(send_arg2 "const void *" "void *" "char *" "const char *")
|
||||
foreach(send_arg3 "size_t" "int" "socklen_t" "unsigned int")
|
||||
foreach(send_arg4 "int" "unsigned int")
|
||||
if(NOT curl_cv_func_send_done)
|
||||
unset(curl_cv_func_send_test CACHE)
|
||||
check_c_source_compiles("
|
||||
${_source_epilogue}
|
||||
extern ${send_retv} ${signature_call_conv}
|
||||
send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4});
|
||||
int main(void) {
|
||||
${send_arg1} s=0;
|
||||
${send_arg2} buf=0;
|
||||
${send_arg3} len=0;
|
||||
${send_arg4} flags=0;
|
||||
${send_retv} res = send(s, buf, len, flags);
|
||||
(void) res;
|
||||
return 0;
|
||||
}"
|
||||
curl_cv_func_send_test)
|
||||
message(STATUS
|
||||
"Tested: ${send_retv} send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4})")
|
||||
if(curl_cv_func_send_test)
|
||||
string(REGEX REPLACE "(const) .*" "\\1" send_qual_arg2 "${send_arg2}")
|
||||
string(REGEX REPLACE "const (.*)" "\\1" send_arg2 "${send_arg2}")
|
||||
set(curl_cv_func_send_args
|
||||
"${send_arg1},${send_arg2},${send_arg3},${send_arg4},${send_retv},${send_qual_arg2}")
|
||||
set(SEND_TYPE_ARG1 "${send_arg1}")
|
||||
set(SEND_TYPE_ARG2 "${send_arg2}")
|
||||
set(SEND_TYPE_ARG3 "${send_arg3}")
|
||||
set(SEND_TYPE_ARG4 "${send_arg4}")
|
||||
set(SEND_TYPE_RETV "${send_retv}")
|
||||
set(HAVE_SEND 1)
|
||||
set(curl_cv_func_send_done 1)
|
||||
endif(curl_cv_func_send_test)
|
||||
endif(NOT curl_cv_func_send_done)
|
||||
endforeach(send_arg4)
|
||||
endforeach(send_arg3)
|
||||
endforeach(send_arg2)
|
||||
endforeach(send_arg1)
|
||||
endforeach(send_retv)
|
||||
else()
|
||||
string(REGEX REPLACE "^([^,]*),[^,]*,[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG1 "${curl_cv_func_send_args}")
|
||||
string(REGEX REPLACE "^[^,]*,([^,]*),[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG2 "${curl_cv_func_send_args}")
|
||||
string(REGEX REPLACE "^[^,]*,[^,]*,([^,]*),[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG3 "${curl_cv_func_send_args}")
|
||||
string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,([^,]*),[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG4 "${curl_cv_func_send_args}")
|
||||
string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,([^,]*),[^,]*$" "\\1" SEND_TYPE_RETV "${curl_cv_func_send_args}")
|
||||
string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,([^,]*)$" "\\1" SEND_QUAL_ARG2 "${curl_cv_func_send_args}")
|
||||
endif()
|
||||
|
||||
if("${curl_cv_func_send_args}" STREQUAL "unknown")
|
||||
message(FATAL_ERROR "Cannot find proper types to use for send args")
|
||||
endif("${curl_cv_func_send_args}" STREQUAL "unknown")
|
||||
set(SEND_QUAL_ARG2 "const")
|
||||
else(curl_cv_send)
|
||||
message(FATAL_ERROR "Unable to link function send")
|
||||
endif(curl_cv_send)
|
||||
set(curl_cv_func_send_args "${curl_cv_func_send_args}" CACHE INTERNAL "Arguments for send")
|
||||
set(HAVE_SEND 1)
|
||||
|
||||
check_c_source_compiles("${_source_epilogue}
|
||||
int main(void) {
|
||||
int flag = MSG_NOSIGNAL;
|
||||
(void)flag;
|
||||
return 0;
|
||||
}" HAVE_MSG_NOSIGNAL)
|
||||
|
||||
if(NOT HAVE_WINDOWS_H)
|
||||
add_header_include(HAVE_SYS_TIME_H "sys/time.h")
|
||||
add_header_include(TIME_WITH_SYS_TIME "time.h")
|
||||
add_header_include(HAVE_TIME_H "time.h")
|
||||
endif()
|
||||
check_c_source_compiles("${_source_epilogue}
|
||||
int main(void) {
|
||||
struct timeval ts;
|
||||
ts.tv_sec = 0;
|
||||
ts.tv_usec = 0;
|
||||
(void)ts;
|
||||
return 0;
|
||||
}" HAVE_STRUCT_TIMEVAL)
|
||||
|
||||
|
||||
include(CheckCSourceRuns)
|
||||
set(CMAKE_REQUIRED_FLAGS)
|
||||
if(HAVE_SYS_POLL_H)
|
||||
set(CMAKE_REQUIRED_FLAGS "-DHAVE_SYS_POLL_H")
|
||||
endif(HAVE_SYS_POLL_H)
|
||||
check_c_source_runs("
|
||||
#ifdef HAVE_SYS_POLL_H
|
||||
# include <sys/poll.h>
|
||||
#endif
|
||||
int main(void) {
|
||||
return poll((void *)0, 0, 10 /*ms*/);
|
||||
}" HAVE_POLL_FINE)
|
||||
|
||||
set(HAVE_SIG_ATOMIC_T 1)
|
||||
set(CMAKE_REQUIRED_FLAGS)
|
||||
if(HAVE_SIGNAL_H)
|
||||
set(CMAKE_REQUIRED_FLAGS "-DHAVE_SIGNAL_H")
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES "signal.h")
|
||||
endif(HAVE_SIGNAL_H)
|
||||
check_type_size("sig_atomic_t" SIZEOF_SIG_ATOMIC_T)
|
||||
if(HAVE_SIZEOF_SIG_ATOMIC_T)
|
||||
check_c_source_compiles("
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
# include <signal.h>
|
||||
#endif
|
||||
int main(void) {
|
||||
static volatile sig_atomic_t dummy = 0;
|
||||
(void)dummy;
|
||||
return 0;
|
||||
}" HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
|
||||
if(NOT HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
|
||||
set(HAVE_SIG_ATOMIC_T_VOLATILE 1)
|
||||
endif(NOT HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
|
||||
endif(HAVE_SIZEOF_SIG_ATOMIC_T)
|
||||
|
||||
if(HAVE_WINDOWS_H)
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES winsock2.h)
|
||||
else()
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES)
|
||||
if(HAVE_SYS_SOCKET_H)
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
|
||||
endif(HAVE_SYS_SOCKET_H)
|
||||
endif()
|
||||
|
||||
check_type_size("struct sockaddr_storage" SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
||||
if(HAVE_SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
||||
set(HAVE_STRUCT_SOCKADDR_STORAGE 1)
|
||||
endif(HAVE_SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
||||
|
@ -1,125 +0,0 @@
|
||||
if(NOT UNIX)
|
||||
if(WIN32)
|
||||
set(HAVE_LIBDL 0)
|
||||
set(HAVE_LIBUCB 0)
|
||||
set(HAVE_LIBSOCKET 0)
|
||||
set(NOT_NEED_LIBNSL 0)
|
||||
set(HAVE_LIBNSL 0)
|
||||
set(HAVE_GETHOSTNAME 1)
|
||||
set(HAVE_LIBZ 0)
|
||||
set(HAVE_LIBCRYPTO 0)
|
||||
|
||||
set(HAVE_DLOPEN 0)
|
||||
|
||||
set(HAVE_ALLOCA_H 0)
|
||||
set(HAVE_ARPA_INET_H 0)
|
||||
set(HAVE_DLFCN_H 0)
|
||||
set(HAVE_FCNTL_H 1)
|
||||
set(HAVE_INTTYPES_H 0)
|
||||
set(HAVE_IO_H 1)
|
||||
set(HAVE_MALLOC_H 1)
|
||||
set(HAVE_MEMORY_H 1)
|
||||
set(HAVE_NETDB_H 0)
|
||||
set(HAVE_NETINET_IF_ETHER_H 0)
|
||||
set(HAVE_NETINET_IN_H 0)
|
||||
set(HAVE_NET_IF_H 0)
|
||||
set(HAVE_PROCESS_H 1)
|
||||
set(HAVE_PWD_H 0)
|
||||
set(HAVE_SETJMP_H 1)
|
||||
set(HAVE_SGTTY_H 0)
|
||||
set(HAVE_SIGNAL_H 1)
|
||||
set(HAVE_SOCKIO_H 0)
|
||||
set(HAVE_STDINT_H 0)
|
||||
set(HAVE_STDLIB_H 1)
|
||||
set(HAVE_STRINGS_H 0)
|
||||
set(HAVE_STRING_H 1)
|
||||
set(HAVE_SYS_PARAM_H 0)
|
||||
set(HAVE_SYS_POLL_H 0)
|
||||
set(HAVE_SYS_SELECT_H 0)
|
||||
set(HAVE_SYS_SOCKET_H 0)
|
||||
set(HAVE_SYS_SOCKIO_H 0)
|
||||
set(HAVE_SYS_STAT_H 1)
|
||||
set(HAVE_SYS_TIME_H 0)
|
||||
set(HAVE_SYS_TYPES_H 1)
|
||||
set(HAVE_SYS_UTIME_H 1)
|
||||
set(HAVE_TERMIOS_H 0)
|
||||
set(HAVE_TERMIO_H 0)
|
||||
set(HAVE_TIME_H 1)
|
||||
set(HAVE_UNISTD_H 0)
|
||||
set(HAVE_UTIME_H 0)
|
||||
set(HAVE_X509_H 0)
|
||||
set(HAVE_ZLIB_H 0)
|
||||
|
||||
set(HAVE_SIZEOF_LONG_DOUBLE 1)
|
||||
set(SIZEOF_LONG_DOUBLE 8)
|
||||
|
||||
set(HAVE_SOCKET 1)
|
||||
set(HAVE_POLL 0)
|
||||
set(HAVE_SELECT 1)
|
||||
set(HAVE_STRDUP 1)
|
||||
set(HAVE_STRSTR 1)
|
||||
set(HAVE_STRTOK_R 0)
|
||||
set(HAVE_STRFTIME 1)
|
||||
set(HAVE_UNAME 0)
|
||||
set(HAVE_STRCASECMP 0)
|
||||
set(HAVE_STRICMP 1)
|
||||
set(HAVE_STRCMPI 1)
|
||||
set(HAVE_GETHOSTBYADDR 1)
|
||||
set(HAVE_GETTIMEOFDAY 0)
|
||||
set(HAVE_INET_ADDR 1)
|
||||
set(HAVE_INET_NTOA 1)
|
||||
set(HAVE_INET_NTOA_R 0)
|
||||
set(HAVE_TCGETATTR 0)
|
||||
set(HAVE_TCSETATTR 0)
|
||||
set(HAVE_PERROR 1)
|
||||
set(HAVE_CLOSESOCKET 1)
|
||||
set(HAVE_SETVBUF 0)
|
||||
set(HAVE_SIGSETJMP 0)
|
||||
set(HAVE_GETPASS_R 0)
|
||||
set(HAVE_STRLCAT 0)
|
||||
set(HAVE_GETPWUID 0)
|
||||
set(HAVE_GETEUID 0)
|
||||
set(HAVE_UTIME 1)
|
||||
set(HAVE_RAND_EGD 0)
|
||||
set(HAVE_RAND_SCREEN 0)
|
||||
set(HAVE_RAND_STATUS 0)
|
||||
set(HAVE_GMTIME_R 0)
|
||||
set(HAVE_LOCALTIME_R 0)
|
||||
set(HAVE_GETHOSTBYADDR_R 0)
|
||||
set(HAVE_GETHOSTBYNAME_R 0)
|
||||
set(HAVE_SIGNAL_FUNC 1)
|
||||
set(HAVE_SIGNAL_MACRO 0)
|
||||
|
||||
set(HAVE_GETHOSTBYADDR_R_5 0)
|
||||
set(HAVE_GETHOSTBYADDR_R_5_REENTRANT 0)
|
||||
set(HAVE_GETHOSTBYADDR_R_7 0)
|
||||
set(HAVE_GETHOSTBYADDR_R_7_REENTRANT 0)
|
||||
set(HAVE_GETHOSTBYADDR_R_8 0)
|
||||
set(HAVE_GETHOSTBYADDR_R_8_REENTRANT 0)
|
||||
set(HAVE_GETHOSTBYNAME_R_3 0)
|
||||
set(HAVE_GETHOSTBYNAME_R_3_REENTRANT 0)
|
||||
set(HAVE_GETHOSTBYNAME_R_5 0)
|
||||
set(HAVE_GETHOSTBYNAME_R_5_REENTRANT 0)
|
||||
set(HAVE_GETHOSTBYNAME_R_6 0)
|
||||
set(HAVE_GETHOSTBYNAME_R_6_REENTRANT 0)
|
||||
|
||||
set(TIME_WITH_SYS_TIME 0)
|
||||
set(HAVE_O_NONBLOCK 0)
|
||||
set(HAVE_IN_ADDR_T 0)
|
||||
set(HAVE_INET_NTOA_R_DECL 0)
|
||||
set(HAVE_INET_NTOA_R_DECL_REENTRANT 0)
|
||||
if(ENABLE_IPV6)
|
||||
set(HAVE_GETADDRINFO 1)
|
||||
else()
|
||||
set(HAVE_GETADDRINFO 0)
|
||||
endif()
|
||||
set(STDC_HEADERS 1)
|
||||
set(RETSIGTYPE_TEST 1)
|
||||
|
||||
set(HAVE_SIGACTION 0)
|
||||
set(HAVE_MACRO_SIGSETJMP 0)
|
||||
else(WIN32)
|
||||
message("This file should be included on Windows platform only")
|
||||
endif(WIN32)
|
||||
endif(NOT UNIX)
|
||||
|
@ -1,31 +0,0 @@
|
||||
# File containing various utilities
|
||||
|
||||
# Converts a CMake list to a string containing elements separated by spaces
|
||||
function(TO_LIST_SPACES _LIST_NAME OUTPUT_VAR)
|
||||
set(NEW_LIST_SPACE)
|
||||
foreach(ITEM ${${_LIST_NAME}})
|
||||
set(NEW_LIST_SPACE "${NEW_LIST_SPACE} ${ITEM}")
|
||||
endforeach()
|
||||
string(STRIP ${NEW_LIST_SPACE} NEW_LIST_SPACE)
|
||||
set(${OUTPUT_VAR} "${NEW_LIST_SPACE}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Appends a lis of item to a string which is a space-separated list, if they don't already exist.
|
||||
function(LIST_SPACES_APPEND_ONCE LIST_NAME)
|
||||
string(REPLACE " " ";" _LIST ${${LIST_NAME}})
|
||||
list(APPEND _LIST ${ARGN})
|
||||
list(REMOVE_DUPLICATES _LIST)
|
||||
to_list_spaces(_LIST NEW_LIST_SPACE)
|
||||
set(${LIST_NAME} "${NEW_LIST_SPACE}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Convinience function that does the same as LIST(FIND ...) but with a TRUE/FALSE return value.
|
||||
# Ex: IN_STR_LIST(MY_LIST "Searched item" WAS_FOUND)
|
||||
function(IN_STR_LIST LIST_NAME ITEM_SEARCHED RETVAL)
|
||||
list(FIND ${LIST_NAME} ${ITEM_SEARCHED} FIND_POS)
|
||||
if(${FIND_POS} EQUAL -1)
|
||||
set(${RETVAL} FALSE PARENT_SCOPE)
|
||||
else()
|
||||
set(${RETVAL} TRUE PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
1199
CMakeLists.txt
1199
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
22
COPYING
22
COPYING
@ -1,22 +0,0 @@
|
||||
COPYRIGHT AND PERMISSION NOTICE
|
||||
|
||||
Copyright (c) 1996 - 2016, Daniel Stenberg, <daniel@haxx.se>, and many
|
||||
contributors, see the THANKS file.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any purpose
|
||||
with or without fee is hereby granted, provided that the above copyright
|
||||
notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
|
||||
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
||||
OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of a copyright holder shall not
|
||||
be used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization of the copyright holder.
|
@ -1,13 +0,0 @@
|
||||
## This file should be placed in the root directory of your project.
|
||||
## Then modify the CMakeLists.txt file in the root directory of your
|
||||
## project to incorporate the testing dashboard.
|
||||
## # The following are required to uses Dart and the Cdash dashboard
|
||||
## ENABLE_TESTING()
|
||||
## INCLUDE(Dart)
|
||||
set(CTEST_PROJECT_NAME "CURL")
|
||||
set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
|
||||
|
||||
set(CTEST_DROP_METHOD "http")
|
||||
set(CTEST_DROP_SITE "my.cdash.org")
|
||||
set(CTEST_DROP_LOCATION "/submit.php?project=CURL")
|
||||
set(CTEST_DROP_SITE_CDASH TRUE)
|
37
CVS-INFO
Normal file
37
CVS-INFO
Normal file
@ -0,0 +1,37 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
CVS-INFO
|
||||
|
||||
This file is only present in the CVS - never in release archives. It contains
|
||||
information about other files and things that the CVS repository keeps in its
|
||||
inner sanctum.
|
||||
|
||||
Use autoconf 2.50 and no earlier. Also, try having automake 1.5 and libtool
|
||||
1.4.1 at least.
|
||||
|
||||
You will need perl to generate the src/hugehelp.c file. The file
|
||||
src/hugehelp.c.cvs is a one-shot file that you can rename to src/hugehelp.c if
|
||||
you really can't generate the true file yourself!
|
||||
|
||||
CHANGES.0 contains ancient changes.
|
||||
|
||||
memanalyze.pl is for analyzing the output generated by curl if -DMALLOCDEBUG
|
||||
is used when compiling
|
||||
|
||||
buildconf builds the makefiles and configure stuff
|
||||
|
||||
Makefile.dist is included as the root Makefile in distribution archives
|
||||
|
||||
perl/contrib/ is a subdirectory with various perl scripts
|
||||
|
||||
java/ is a subdirectory with the Java interface to libcurl
|
||||
|
||||
To build after having extracted everything from CVS, do this:
|
||||
|
||||
./buildconf
|
||||
./configure
|
||||
make
|
67
GIT-INFO
67
GIT-INFO
@ -1,67 +0,0 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
GIT-INFO
|
||||
|
||||
This file is only present in git - never in release archives. It contains
|
||||
information about other files and things that the git repository keeps in its
|
||||
inner sanctum.
|
||||
|
||||
Compile and build instructions follow below.
|
||||
|
||||
CHANGES.0 contains ancient changes
|
||||
CHANGES contains the most recent changes
|
||||
|
||||
Makefile.dist is included as the root Makefile in distribution archives
|
||||
|
||||
perl/ is a subdirectory with various perl scripts
|
||||
|
||||
To build in environments that support configure, after having extracted
|
||||
everything from git, do this:
|
||||
|
||||
./buildconf
|
||||
./configure
|
||||
make
|
||||
|
||||
Daniel uses a ./configure line similar to this for easier development:
|
||||
|
||||
./configure --disable-shared --enable-debug --enable-maintainer-mode
|
||||
|
||||
In environments that don't support configure (i.e. Microsoft), do this:
|
||||
|
||||
buildconf.bat
|
||||
|
||||
|
||||
REQUIREMENTS
|
||||
|
||||
For buildconf (not buildconf.bat) to work, you need the following software
|
||||
installed:
|
||||
|
||||
o autoconf 2.57 (or later)
|
||||
o automake 1.7 (or later)
|
||||
o libtool 1.4.2 (or later)
|
||||
o GNU m4 (required by autoconf)
|
||||
|
||||
o nroff + perl
|
||||
|
||||
If you don't have nroff and perl and you for some reason don't want to
|
||||
install them, you can rename the source file src/tool_hugehelp.c.cvs to
|
||||
src/tool_hugehelp.c and avoid having to generate this file. This will
|
||||
give you a stubbed version of the file that doesn't contain actual content.
|
||||
|
||||
MAC OS X
|
||||
|
||||
With Mac OS X 10.2 and the associated Developer Tools, the installed versions
|
||||
of the build tools are adequate. For Mac OS X 10.1 users, Guido Neitzer
|
||||
wrote the following step-by-step guide:
|
||||
|
||||
1. Install fink (http://fink.sourceforge.net)
|
||||
2. Update fink to the newest version (with the installed fink)
|
||||
3. Install the latest version of autoconf, automake and m4 with fink
|
||||
4. Install version 1.4.1 of libtool - you find it in the "unstable" section
|
||||
(read the manual to see how to get unstable versions)
|
||||
5. Get cURL from git
|
||||
6. Build cURL with "./buildconf", "./configure", "make", "sudo make install"
|
25
LEGAL
Normal file
25
LEGAL
Normal file
@ -0,0 +1,25 @@
|
||||
Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license
|
||||
document, but changing it is not allowed.
|
||||
|
||||
In order to be useful for every potential user, the curl and libcurl are
|
||||
dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
|
||||
You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
copies of the Software, and permit persons to whom the Software is furnished
|
||||
to do so, under the terms of the MPL or the MIT/X-derivate licenses. You may
|
||||
pick one of these licenses. The files MITX.txt and MPL-1.1.txt contain the
|
||||
license texts.
|
||||
|
||||
As a courtesy to the open-source and free software community, we ask you to
|
||||
dual-license any modifications that you make as well, under the terms of this
|
||||
document.
|
||||
|
||||
Please remember to always keep the licensing information included in
|
||||
individual source files up-to-date, so as to avoid misleading anyone as to
|
||||
the status of these files.
|
||||
|
||||
I will use a submission policy according to which I will only enter
|
||||
contributions into the CVS tree if the contributor agrees to both licenses
|
||||
and this dual-license approach.
|
28
MITX.txt
Normal file
28
MITX.txt
Normal file
@ -0,0 +1,28 @@
|
||||
COPYRIGHT AND PERMISSION NOTICE
|
||||
|
||||
Copyright (c) 1996 - 2001, Daniel Stenberg, <daniel@haxx.se>.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, and/or sell copies of the
|
||||
Software, and to permit persons to whom the Software is furnished to do so,
|
||||
provided that the above copyright notice(s) and this permission notice appear
|
||||
in all copies of the Software and that both the above copyright notice(s) and
|
||||
this permission notice appear in supporting documentation.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
|
||||
NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE
|
||||
LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
|
||||
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of a copyright holder shall not
|
||||
be used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization of the copyright holder.
|
||||
|
470
MPL-1.1.txt
Normal file
470
MPL-1.1.txt
Normal file
@ -0,0 +1,470 @@
|
||||
MOZILLA PUBLIC LICENSE
|
||||
Version 1.1
|
||||
|
||||
---------------
|
||||
|
||||
1. Definitions.
|
||||
|
||||
1.0.1. "Commercial Use" means distribution or otherwise making the
|
||||
Covered Code available to a third party.
|
||||
|
||||
1.1. "Contributor" means each entity that creates or contributes to
|
||||
the creation of Modifications.
|
||||
|
||||
1.2. "Contributor Version" means the combination of the Original
|
||||
Code, prior Modifications used by a Contributor, and the Modifications
|
||||
made by that particular Contributor.
|
||||
|
||||
1.3. "Covered Code" means the Original Code or Modifications or the
|
||||
combination of the Original Code and Modifications, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.4. "Electronic Distribution Mechanism" means a mechanism generally
|
||||
accepted in the software development community for the electronic
|
||||
transfer of data.
|
||||
|
||||
1.5. "Executable" means Covered Code in any form other than Source
|
||||
Code.
|
||||
|
||||
1.6. "Initial Developer" means the individual or entity identified
|
||||
as the Initial Developer in the Source Code notice required by Exhibit
|
||||
A.
|
||||
|
||||
1.7. "Larger Work" means a work which combines Covered Code or
|
||||
portions thereof with code not governed by the terms of this License.
|
||||
|
||||
1.8. "License" means this document.
|
||||
|
||||
1.8.1. "Licensable" means having the right to grant, to the maximum
|
||||
extent possible, whether at the time of the initial grant or
|
||||
subsequently acquired, any and all of the rights conveyed herein.
|
||||
|
||||
1.9. "Modifications" means any addition to or deletion from the
|
||||
substance or structure of either the Original Code or any previous
|
||||
Modifications. When Covered Code is released as a series of files, a
|
||||
Modification is:
|
||||
A. Any addition to or deletion from the contents of a file
|
||||
containing Original Code or previous Modifications.
|
||||
|
||||
B. Any new file that contains any part of the Original Code or
|
||||
previous Modifications.
|
||||
|
||||
1.10. "Original Code" means Source Code of computer software code
|
||||
which is described in the Source Code notice required by Exhibit A as
|
||||
Original Code, and which, at the time of its release under this
|
||||
License is not already Covered Code governed by this License.
|
||||
|
||||
1.10.1. "Patent Claims" means any patent claim(s), now owned or
|
||||
hereafter acquired, including without limitation, method, process,
|
||||
and apparatus claims, in any patent Licensable by grantor.
|
||||
|
||||
1.11. "Source Code" means the preferred form of the Covered Code for
|
||||
making modifications to it, including all modules it contains, plus
|
||||
any associated interface definition files, scripts used to control
|
||||
compilation and installation of an Executable, or source code
|
||||
differential comparisons against either the Original Code or another
|
||||
well known, available Covered Code of the Contributor's choice. The
|
||||
Source Code can be in a compressed or archival form, provided the
|
||||
appropriate decompression or de-archiving software is widely available
|
||||
for no charge.
|
||||
|
||||
1.12. "You" (or "Your") means an individual or a legal entity
|
||||
exercising rights under, and complying with all of the terms of, this
|
||||
License or a future version of this License issued under Section 6.1.
|
||||
For legal entities, "You" includes any entity which controls, is
|
||||
controlled by, or is under common control with You. For purposes of
|
||||
this definition, "control" means (a) the power, direct or indirect,
|
||||
to cause the direction or management of such entity, whether by
|
||||
contract or otherwise, or (b) ownership of more than fifty percent
|
||||
(50%) of the outstanding shares or beneficial ownership of such
|
||||
entity.
|
||||
|
||||
2. Source Code License.
|
||||
|
||||
2.1. The Initial Developer Grant.
|
||||
The Initial Developer hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license, subject to third party intellectual property
|
||||
claims:
|
||||
(a) under intellectual property rights (other than patent or
|
||||
trademark) Licensable by Initial Developer to use, reproduce,
|
||||
modify, display, perform, sublicense and distribute the Original
|
||||
Code (or portions thereof) with or without Modifications, and/or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patents Claims infringed by the making, using or
|
||||
selling of Original Code, to make, have made, use, practice,
|
||||
sell, and offer for sale, and/or otherwise dispose of the
|
||||
Original Code (or portions thereof).
|
||||
|
||||
(c) the licenses granted in this Section 2.1(a) and (b) are
|
||||
effective on the date Initial Developer first distributes
|
||||
Original Code under the terms of this License.
|
||||
|
||||
(d) Notwithstanding Section 2.1(b) above, no patent license is
|
||||
granted: 1) for code that You delete from the Original Code; 2)
|
||||
separate from the Original Code; or 3) for infringements caused
|
||||
by: i) the modification of the Original Code or ii) the
|
||||
combination of the Original Code with other software or devices.
|
||||
|
||||
2.2. Contributor Grant.
|
||||
Subject to third party intellectual property claims, each Contributor
|
||||
hereby grants You a world-wide, royalty-free, non-exclusive license
|
||||
|
||||
(a) under intellectual property rights (other than patent or
|
||||
trademark) Licensable by Contributor, to use, reproduce, modify,
|
||||
display, perform, sublicense and distribute the Modifications
|
||||
created by such Contributor (or portions thereof) either on an
|
||||
unmodified basis, with other Modifications, as Covered Code
|
||||
and/or as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims infringed by the making, using, or
|
||||
selling of Modifications made by that Contributor either alone
|
||||
and/or in combination with its Contributor Version (or portions
|
||||
of such combination), to make, use, sell, offer for sale, have
|
||||
made, and/or otherwise dispose of: 1) Modifications made by that
|
||||
Contributor (or portions thereof); and 2) the combination of
|
||||
Modifications made by that Contributor with its Contributor
|
||||
Version (or portions of such combination).
|
||||
|
||||
(c) the licenses granted in Sections 2.2(a) and 2.2(b) are
|
||||
effective on the date Contributor first makes Commercial Use of
|
||||
the Covered Code.
|
||||
|
||||
(d) Notwithstanding Section 2.2(b) above, no patent license is
|
||||
granted: 1) for any code that Contributor has deleted from the
|
||||
Contributor Version; 2) separate from the Contributor Version;
|
||||
3) for infringements caused by: i) third party modifications of
|
||||
Contributor Version or ii) the combination of Modifications made
|
||||
by that Contributor with other software (except as part of the
|
||||
Contributor Version) or other devices; or 4) under Patent Claims
|
||||
infringed by Covered Code in the absence of Modifications made by
|
||||
that Contributor.
|
||||
|
||||
3. Distribution Obligations.
|
||||
|
||||
3.1. Application of License.
|
||||
The Modifications which You create or to which You contribute are
|
||||
governed by the terms of this License, including without limitation
|
||||
Section 2.2. The Source Code version of Covered Code may be
|
||||
distributed only under the terms of this License or a future version
|
||||
of this License released under Section 6.1, and You must include a
|
||||
copy of this License with every copy of the Source Code You
|
||||
distribute. You may not offer or impose any terms on any Source Code
|
||||
version that alters or restricts the applicable version of this
|
||||
License or the recipients' rights hereunder. However, You may include
|
||||
an additional document offering the additional rights described in
|
||||
Section 3.5.
|
||||
|
||||
3.2. Availability of Source Code.
|
||||
Any Modification which You create or to which You contribute must be
|
||||
made available in Source Code form under the terms of this License
|
||||
either on the same media as an Executable version or via an accepted
|
||||
Electronic Distribution Mechanism to anyone to whom you made an
|
||||
Executable version available; and if made available via Electronic
|
||||
Distribution Mechanism, must remain available for at least twelve (12)
|
||||
months after the date it initially became available, or at least six
|
||||
(6) months after a subsequent version of that particular Modification
|
||||
has been made available to such recipients. You are responsible for
|
||||
ensuring that the Source Code version remains available even if the
|
||||
Electronic Distribution Mechanism is maintained by a third party.
|
||||
|
||||
3.3. Description of Modifications.
|
||||
You must cause all Covered Code to which You contribute to contain a
|
||||
file documenting the changes You made to create that Covered Code and
|
||||
the date of any change. You must include a prominent statement that
|
||||
the Modification is derived, directly or indirectly, from Original
|
||||
Code provided by the Initial Developer and including the name of the
|
||||
Initial Developer in (a) the Source Code, and (b) in any notice in an
|
||||
Executable version or related documentation in which You describe the
|
||||
origin or ownership of the Covered Code.
|
||||
|
||||
3.4. Intellectual Property Matters
|
||||
(a) Third Party Claims.
|
||||
If Contributor has knowledge that a license under a third party's
|
||||
intellectual property rights is required to exercise the rights
|
||||
granted by such Contributor under Sections 2.1 or 2.2,
|
||||
Contributor must include a text file with the Source Code
|
||||
distribution titled "LEGAL" which describes the claim and the
|
||||
party making the claim in sufficient detail that a recipient will
|
||||
know whom to contact. If Contributor obtains such knowledge after
|
||||
the Modification is made available as described in Section 3.2,
|
||||
Contributor shall promptly modify the LEGAL file in all copies
|
||||
Contributor makes available thereafter and shall take other steps
|
||||
(such as notifying appropriate mailing lists or newsgroups)
|
||||
reasonably calculated to inform those who received the Covered
|
||||
Code that new knowledge has been obtained.
|
||||
|
||||
(b) Contributor APIs.
|
||||
If Contributor's Modifications include an application programming
|
||||
interface and Contributor has knowledge of patent licenses which
|
||||
are reasonably necessary to implement that API, Contributor must
|
||||
also include this information in the LEGAL file.
|
||||
|
||||
(c) Representations.
|
||||
Contributor represents that, except as disclosed pursuant to
|
||||
Section 3.4(a) above, Contributor believes that Contributor's
|
||||
Modifications are Contributor's original creation(s) and/or
|
||||
Contributor has sufficient rights to grant the rights conveyed by
|
||||
this License.
|
||||
|
||||
3.5. Required Notices.
|
||||
You must duplicate the notice in Exhibit A in each file of the Source
|
||||
Code. If it is not possible to put such notice in a particular Source
|
||||
Code file due to its structure, then You must include such notice in a
|
||||
location (such as a relevant directory) where a user would be likely
|
||||
to look for such a notice. If You created one or more Modification(s)
|
||||
You may add your name as a Contributor to the notice described in
|
||||
Exhibit A. You must also duplicate this License in any documentation
|
||||
for the Source Code where You describe recipients' rights or ownership
|
||||
rights relating to Covered Code. You may choose to offer, and to
|
||||
charge a fee for, warranty, support, indemnity or liability
|
||||
obligations to one or more recipients of Covered Code. However, You
|
||||
may do so only on Your own behalf, and not on behalf of the Initial
|
||||
Developer or any Contributor. You must make it absolutely clear than
|
||||
any such warranty, support, indemnity or liability obligation is
|
||||
offered by You alone, and You hereby agree to indemnify the Initial
|
||||
Developer and every Contributor for any liability incurred by the
|
||||
Initial Developer or such Contributor as a result of warranty,
|
||||
support, indemnity or liability terms You offer.
|
||||
|
||||
3.6. Distribution of Executable Versions.
|
||||
You may distribute Covered Code in Executable form only if the
|
||||
requirements of Section 3.1-3.5 have been met for that Covered Code,
|
||||
and if You include a notice stating that the Source Code version of
|
||||
the Covered Code is available under the terms of this License,
|
||||
including a description of how and where You have fulfilled the
|
||||
obligations of Section 3.2. The notice must be conspicuously included
|
||||
in any notice in an Executable version, related documentation or
|
||||
collateral in which You describe recipients' rights relating to the
|
||||
Covered Code. You may distribute the Executable version of Covered
|
||||
Code or ownership rights under a license of Your choice, which may
|
||||
contain terms different from this License, provided that You are in
|
||||
compliance with the terms of this License and that the license for the
|
||||
Executable version does not attempt to limit or alter the recipient's
|
||||
rights in the Source Code version from the rights set forth in this
|
||||
License. If You distribute the Executable version under a different
|
||||
license You must make it absolutely clear that any terms which differ
|
||||
from this License are offered by You alone, not by the Initial
|
||||
Developer or any Contributor. You hereby agree to indemnify the
|
||||
Initial Developer and every Contributor for any liability incurred by
|
||||
the Initial Developer or such Contributor as a result of any such
|
||||
terms You offer.
|
||||
|
||||
3.7. Larger Works.
|
||||
You may create a Larger Work by combining Covered Code with other code
|
||||
not governed by the terms of this License and distribute the Larger
|
||||
Work as a single product. In such a case, You must make sure the
|
||||
requirements of this License are fulfilled for the Covered Code.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation.
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Code due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description
|
||||
must be included in the LEGAL file described in Section 3.4 and must
|
||||
be included with all distributions of the Source Code. Except to the
|
||||
extent prohibited by statute or regulation, such description must be
|
||||
sufficiently detailed for a recipient of ordinary skill to be able to
|
||||
understand it.
|
||||
|
||||
5. Application of this License.
|
||||
|
||||
This License applies to code to which the Initial Developer has
|
||||
attached the notice in Exhibit A and to related Covered Code.
|
||||
|
||||
6. Versions of the License.
|
||||
|
||||
6.1. New Versions.
|
||||
Netscape Communications Corporation ("Netscape") may publish revised
|
||||
and/or new versions of the License from time to time. Each version
|
||||
will be given a distinguishing version number.
|
||||
|
||||
6.2. Effect of New Versions.
|
||||
Once Covered Code has been published under a particular version of the
|
||||
License, You may always continue to use it under the terms of that
|
||||
version. You may also choose to use such Covered Code under the terms
|
||||
of any subsequent version of the License published by Netscape. No one
|
||||
other than Netscape has the right to modify the terms applicable to
|
||||
Covered Code created under this License.
|
||||
|
||||
6.3. Derivative Works.
|
||||
If You create or use a modified version of this License (which you may
|
||||
only do in order to apply it to code which is not already Covered Code
|
||||
governed by this License), You must (a) rename Your license so that
|
||||
the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
|
||||
"MPL", "NPL" or any confusingly similar phrase do not appear in your
|
||||
license (except to note that your license differs from this License)
|
||||
and (b) otherwise make it clear that Your version of the license
|
||||
contains terms which differ from the Mozilla Public License and
|
||||
Netscape Public License. (Filling in the name of the Initial
|
||||
Developer, Original Code or Contributor in the notice described in
|
||||
Exhibit A shall not of themselves be deemed to be modifications of
|
||||
this License.)
|
||||
|
||||
7. DISCLAIMER OF WARRANTY.
|
||||
|
||||
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
|
||||
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
|
||||
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
|
||||
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
|
||||
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
|
||||
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
|
||||
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
|
||||
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
|
||||
|
||||
8. TERMINATION.
|
||||
|
||||
8.1. This License and the rights granted hereunder will terminate
|
||||
automatically if You fail to comply with terms herein and fail to cure
|
||||
such breach within 30 days of becoming aware of the breach. All
|
||||
sublicenses to the Covered Code which are properly granted shall
|
||||
survive any termination of this License. Provisions which, by their
|
||||
nature, must remain in effect beyond the termination of this License
|
||||
shall survive.
|
||||
|
||||
8.2. If You initiate litigation by asserting a patent infringement
|
||||
claim (excluding declatory judgment actions) against Initial Developer
|
||||
or a Contributor (the Initial Developer or Contributor against whom
|
||||
You file such action is referred to as "Participant") alleging that:
|
||||
|
||||
(a) such Participant's Contributor Version directly or indirectly
|
||||
infringes any patent, then any and all rights granted by such
|
||||
Participant to You under Sections 2.1 and/or 2.2 of this License
|
||||
shall, upon 60 days notice from Participant terminate prospectively,
|
||||
unless if within 60 days after receipt of notice You either: (i)
|
||||
agree in writing to pay Participant a mutually agreeable reasonable
|
||||
royalty for Your past and future use of Modifications made by such
|
||||
Participant, or (ii) withdraw Your litigation claim with respect to
|
||||
the Contributor Version against such Participant. If within 60 days
|
||||
of notice, a reasonable royalty and payment arrangement are not
|
||||
mutually agreed upon in writing by the parties or the litigation claim
|
||||
is not withdrawn, the rights granted by Participant to You under
|
||||
Sections 2.1 and/or 2.2 automatically terminate at the expiration of
|
||||
the 60 day notice period specified above.
|
||||
|
||||
(b) any software, hardware, or device, other than such Participant's
|
||||
Contributor Version, directly or indirectly infringes any patent, then
|
||||
any rights granted to You by such Participant under Sections 2.1(b)
|
||||
and 2.2(b) are revoked effective as of the date You first made, used,
|
||||
sold, distributed, or had made, Modifications made by that
|
||||
Participant.
|
||||
|
||||
8.3. If You assert a patent infringement claim against Participant
|
||||
alleging that such Participant's Contributor Version directly or
|
||||
indirectly infringes any patent where such claim is resolved (such as
|
||||
by license or settlement) prior to the initiation of patent
|
||||
infringement litigation, then the reasonable value of the licenses
|
||||
granted by such Participant under Sections 2.1 or 2.2 shall be taken
|
||||
into account in determining the amount or value of any payment or
|
||||
license.
|
||||
|
||||
8.4. In the event of termination under Sections 8.1 or 8.2 above,
|
||||
all end user license agreements (excluding distributors and resellers)
|
||||
which have been validly granted by You or any distributor hereunder
|
||||
prior to termination shall survive termination.
|
||||
|
||||
9. LIMITATION OF LIABILITY.
|
||||
|
||||
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
|
||||
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
|
||||
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
|
||||
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
|
||||
ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
|
||||
CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
|
||||
WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
|
||||
COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
|
||||
INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
|
||||
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
|
||||
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
|
||||
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
|
||||
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
|
||||
THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
10. U.S. GOVERNMENT END USERS.
|
||||
|
||||
The Covered Code is a "commercial item," as that term is defined in
|
||||
48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
|
||||
software" and "commercial computer software documentation," as such
|
||||
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
|
||||
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
|
||||
all U.S. Government End Users acquire Covered Code with only those
|
||||
rights set forth herein.
|
||||
|
||||
11. MISCELLANEOUS.
|
||||
|
||||
This License represents the complete agreement concerning subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. This License shall be governed by
|
||||
California law provisions (except to the extent applicable law, if
|
||||
any, provides otherwise), excluding its conflict-of-law provisions.
|
||||
With respect to disputes in which at least one party is a citizen of,
|
||||
or an entity chartered or registered to do business in the United
|
||||
States of America, any litigation relating to this License shall be
|
||||
subject to the jurisdiction of the Federal Courts of the Northern
|
||||
District of California, with venue lying in Santa Clara County,
|
||||
California, with the losing party responsible for costs, including
|
||||
without limitation, court costs and reasonable attorneys' fees and
|
||||
expenses. The application of the United Nations Convention on
|
||||
Contracts for the International Sale of Goods is expressly excluded.
|
||||
Any law or regulation which provides that the language of a contract
|
||||
shall be construed against the drafter shall not apply to this
|
||||
License.
|
||||
|
||||
12. RESPONSIBILITY FOR CLAIMS.
|
||||
|
||||
As between Initial Developer and the Contributors, each party is
|
||||
responsible for claims and damages arising, directly or indirectly,
|
||||
out of its utilization of rights under this License and You agree to
|
||||
work with Initial Developer and Contributors to distribute such
|
||||
responsibility on an equitable basis. Nothing herein is intended or
|
||||
shall be deemed to constitute any admission of liability.
|
||||
|
||||
13. MULTIPLE-LICENSED CODE.
|
||||
|
||||
Initial Developer may designate portions of the Covered Code as
|
||||
"Multiple-Licensed". "Multiple-Licensed" means that the Initial
|
||||
Developer permits you to utilize portions of the Covered Code under
|
||||
Your choice of the NPL or the alternative licenses, if any, specified
|
||||
by the Initial Developer in the file described in Exhibit A.
|
||||
|
||||
EXHIBIT A -Mozilla Public License.
|
||||
|
||||
``The contents of this file are subject to the Mozilla Public License
|
||||
Version 1.1 (the "License"); you may not use this file except in
|
||||
compliance with the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS"
|
||||
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
License for the specific language governing rights and limitations
|
||||
under the License.
|
||||
|
||||
The Original Code is ______________________________________.
|
||||
|
||||
The Initial Developer of the Original Code is ________________________.
|
||||
Portions created by ______________________ are Copyright (C) ______
|
||||
_______________________. All Rights Reserved.
|
||||
|
||||
Contributor(s): ______________________________________.
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms
|
||||
of the _____ license (the "[___] License"), in which case the
|
||||
provisions of [______] License are applicable instead of those
|
||||
above. If you wish to allow use of your version of this file only
|
||||
under the terms of the [____] License and not to allow others to use
|
||||
your version of this file under the MPL, indicate your decision by
|
||||
deleting the provisions above and replace them with the notice and
|
||||
other provisions required by the [___] License. If you do not delete
|
||||
the provisions above, a recipient may use your version of this file
|
||||
under either the MPL or the [___] License."
|
||||
|
||||
[NOTE: The text of this Exhibit A may differ slightly from the text of
|
||||
the notices in the Source Code files of the Original Code. You should
|
||||
use the text of this Exhibit A rather than the text found in the
|
||||
Original Code Source Code for Your Modifications.]
|
||||
|
146
MacOSX-Framework
146
MacOSX-Framework
@ -1,146 +0,0 @@
|
||||
#!/bin/bash
|
||||
# This script performs all of the steps needed to build a
|
||||
# universal binary libcurl.framework for Mac OS X 10.4 or greater.
|
||||
#
|
||||
# Hendrik Visage:
|
||||
# Generalizations added since Snowleopard (10.6) do not include
|
||||
# the 10.4u SDK.
|
||||
#
|
||||
# Also note:
|
||||
# 10.5 is the *ONLY* SDK that support PPC64 :( -- 10.6 do not have ppc64 support
|
||||
#If you need to have PPC64 support then change below to 1
|
||||
PPC64_NEEDED=0
|
||||
# Apple does not support building for PPC anymore in Xcode 4 and later.
|
||||
# If you're using Xcode 3 or earlier and need PPC support, then change
|
||||
# the setting below to 1
|
||||
PPC_NEEDED=0
|
||||
|
||||
# For me the default is to develop for the platform I am on, and if you
|
||||
#desire compatibility with older versions then change USE_OLD to 1 :)
|
||||
USE_OLD=0
|
||||
|
||||
VERSION=`/usr/bin/sed -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' include/curl/curlver.h`
|
||||
FRAMEWORK_VERSION=Versions/Release-$VERSION
|
||||
|
||||
#I also wanted to "copy over" the system, and thus the reason I added the
|
||||
# version to Versions/Release-7.20.1 etc.
|
||||
# now a simple rsync -vaP libcurl.framework /Library/Frameworks will install it
|
||||
# and setup the right paths to this version, leaving the system version
|
||||
# "intact", so you can "fix" it later with the links to Versions/A/...
|
||||
|
||||
DEVELOPER_PATH=`xcode-select --print-path`
|
||||
# Around Xcode 4.3, SDKs were moved from the Developer folder into the
|
||||
# MacOSX.platform folder
|
||||
if test -d "$DEVELOPER_PATH/Platforms/MacOSX.platform/Developer/SDKs"; then
|
||||
SDK_PATH="$DEVELOPER_PATH/Platforms/MacOSX.platform/Developer/SDKs"
|
||||
else
|
||||
SDK_PATH="$DEVELOPER_PATH/SDKs";
|
||||
fi
|
||||
OLD_SDK=`ls $SDK_PATH|head -1`
|
||||
NEW_SDK=`ls -r $SDK_PATH|head -1`
|
||||
|
||||
if test "0"$USE_OLD -gt 0
|
||||
then
|
||||
SDK32=$OLD_SDK
|
||||
else
|
||||
SDK32=$NEW_SDK
|
||||
fi
|
||||
|
||||
MACVER=`echo $SDK32|sed -e s/[a-zA-Z]//g -e s/.\$//`
|
||||
|
||||
SDK32_DIR=$SDK_PATH/$SDK32
|
||||
MINVER32='-mmacosx-version-min='$MACVER
|
||||
if test $PPC_NEEDED -gt 0; then
|
||||
ARCHES32='-arch i386 -arch ppc'
|
||||
else
|
||||
ARCHES32='-arch i386'
|
||||
fi
|
||||
|
||||
if test $PPC64_NEEDED -gt 0
|
||||
then
|
||||
SDK64=10.5
|
||||
ARCHES64='-arch x86_64 -arch ppc64'
|
||||
SDK64=`ls $SDK_PATH|grep 10.5|head -1`
|
||||
else
|
||||
ARCHES64='-arch x86_64'
|
||||
#We "know" that 10.4 and earlier do not support 64bit
|
||||
OLD_SDK64=`ls $SDK_PATH|egrep -v "10.[0-4]"|head -1`
|
||||
NEW_SDK64=`ls -r $SDK_PATH|egrep -v "10.[0-4][^0-9]" | head -1`
|
||||
if test $USE_OLD -gt 0
|
||||
then
|
||||
SDK64=$OLD_SDK64
|
||||
else
|
||||
SDK64=$NEW_SDK64
|
||||
fi
|
||||
fi
|
||||
|
||||
SDK64_DIR=$SDK_PATH/$SDK64
|
||||
MACVER64=`echo $SDK64|sed -e s/[a-zA-Z]//g -e s/.\$//`
|
||||
|
||||
MINVER64='-mmacosx-version-min='$MACVER64
|
||||
|
||||
if test ! -z $SDK32; then
|
||||
echo "----Configuring libcurl for 32 bit universal framework..."
|
||||
make clean
|
||||
./configure --disable-dependency-tracking --disable-static --with-gssapi --with-darwinssl \
|
||||
CFLAGS="-Os -isysroot $SDK32_DIR $ARCHES32" \
|
||||
LDFLAGS="-Wl,-syslibroot,$SDK32_DIR $ARCHES32 -Wl,-headerpad_max_install_names" \
|
||||
CC=$CC
|
||||
|
||||
echo "----Building 32 bit libcurl..."
|
||||
make -j `sysctl -n hw.logicalcpu_max`
|
||||
|
||||
echo "----Creating 32 bit framework..."
|
||||
rm -r libcurl.framework
|
||||
mkdir -p libcurl.framework/${FRAMEWORK_VERSION}/Resources
|
||||
cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||
install_name_tool -id @rpath/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||
/usr/bin/sed -e "s/7\.12\.3/$VERSION/" lib/libcurl.plist >libcurl.framework/${FRAMEWORK_VERSION}/Resources/Info.plist
|
||||
mkdir -p libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl
|
||||
cp include/curl/*.h libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl
|
||||
pushd libcurl.framework
|
||||
ln -fs ${FRAMEWORK_VERSION}/libcurl libcurl
|
||||
ln -fs ${FRAMEWORK_VERSION}/Resources Resources
|
||||
ln -fs ${FRAMEWORK_VERSION}/Headers Headers
|
||||
cd Versions
|
||||
ln -fs $(basename "${FRAMEWORK_VERSION}") Current
|
||||
|
||||
echo Testing for SDK64
|
||||
if test -d $SDK64_DIR; then
|
||||
echo entering...
|
||||
popd
|
||||
make clean
|
||||
echo "----Configuring libcurl for 64 bit universal framework..."
|
||||
./configure --disable-dependency-tracking --disable-static --with-gssapi --with-darwinssl \
|
||||
CFLAGS="-Os -isysroot $SDK64_DIR $ARCHES64" \
|
||||
LDFLAGS="-Wl,-syslibroot,$SDK64_DIR $ARCHES64 -Wl,-headerpad_max_install_names" \
|
||||
CC=$CC
|
||||
|
||||
echo "----Building 64 bit libcurl..."
|
||||
make -j `sysctl -n hw.logicalcpu_max`
|
||||
|
||||
echo "----Appending 64 bit framework to 32 bit framework..."
|
||||
cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
|
||||
install_name_tool -id @rpath/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
|
||||
cp libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl32
|
||||
pwd
|
||||
lipo libcurl.framework/${FRAMEWORK_VERSION}/libcurl32 libcurl.framework/${FRAMEWORK_VERSION}/libcurl64 -create -output libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||
rm libcurl.framework/${FRAMEWORK_VERSION}/libcurl32 libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
|
||||
cp libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl/curlbuild.h libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl/curlbuild32.h
|
||||
cp include/curl/curlbuild.h libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl/curlbuild64.h
|
||||
cat >libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl/curlbuild.h <<EOF
|
||||
#ifdef __LP64__
|
||||
#include "curl/curlbuild64.h"
|
||||
#else
|
||||
#include "curl/curlbuild32.h"
|
||||
#endif
|
||||
EOF
|
||||
fi
|
||||
|
||||
pwd
|
||||
lipo -info libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||
echo "libcurl.framework is built and can now be included in other projects."
|
||||
echo "Copy libcurl.framework to your bundle's Contents/Frameworks folder, ~/Library/Frameworks or /Library/Frameworks."
|
||||
else
|
||||
echo "Building libcurl.framework requires Mac OS X 10.4 or later with the MacOSX10.4/5/6 SDK installed."
|
||||
fi
|
533
Makefile.am
533
Makefile.am
@ -1,217 +1,30 @@
|
||||
#***************************************************************************
|
||||
# _ _ ____ _
|
||||
# Project ___| | | | _ \| |
|
||||
# / __| | | | |_) | |
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# $Id$
|
||||
#
|
||||
# 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 https://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
|
||||
AUTOMAKE_OPTIONS = foreign no-dependencies
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
CMAKE_DIST = CMakeLists.txt CMake/CMakeConfigurableFile.in \
|
||||
CMake/CurlTests.c CMake/FindGSS.cmake CMake/OtherTests.cmake \
|
||||
CMake/Platforms/WindowsCache.cmake CMake/Utilities.cmake \
|
||||
include/curl/curlbuild.h.cmake CMake/Macros.cmake
|
||||
|
||||
VC6_LIBTMPL = projects/Windows/VC6/lib/libcurl.tmpl
|
||||
VC6_LIBDSP = projects/Windows/VC6/lib/libcurl.dsp.dist
|
||||
VC6_LIBDSP_DEPS = $(VC6_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||
VC6_SRCTMPL = projects/Windows/VC6/src/curl.tmpl
|
||||
VC6_SRCDSP = projects/Windows/VC6/src/curl.dsp.dist
|
||||
VC6_SRCDSP_DEPS = $(VC6_SRCTMPL) Makefile.am src/Makefile.inc
|
||||
|
||||
VC7_LIBTMPL = projects/Windows/VC7/lib/libcurl.tmpl
|
||||
VC7_LIBVCPROJ = projects/Windows/VC7/lib/libcurl.vcproj.dist
|
||||
VC7_LIBVCPROJ_DEPS = $(VC7_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||
VC7_SRCTMPL = projects/Windows/VC7/src/curl.tmpl
|
||||
VC7_SRCVCPROJ = projects/Windows/VC7/src/curl.vcproj.dist
|
||||
VC7_SRCVCPROJ_DEPS = $(VC7_SRCTMPL) Makefile.am src/Makefile.inc
|
||||
|
||||
VC71_LIBTMPL = projects/Windows/VC7.1/lib/libcurl.tmpl
|
||||
VC71_LIBVCPROJ = projects/Windows/VC7.1/lib/libcurl.vcproj.dist
|
||||
VC71_LIBVCPROJ_DEPS = $(VC71_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||
VC71_SRCTMPL = projects/Windows/VC7.1/src/curl.tmpl
|
||||
VC71_SRCVCPROJ = projects/Windows/VC7.1/src/curl.vcproj.dist
|
||||
VC71_SRCVCPROJ_DEPS = $(VC71_SRCTMPL) Makefile.am src/Makefile.inc
|
||||
|
||||
VC8_LIBTMPL = projects/Windows/VC8/lib/libcurl.tmpl
|
||||
VC8_LIBVCPROJ = projects/Windows/VC8/lib/libcurl.vcproj.dist
|
||||
VC8_LIBVCPROJ_DEPS = $(VC8_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||
VC8_SRCTMPL = projects/Windows/VC8/src/curl.tmpl
|
||||
VC8_SRCVCPROJ = projects/Windows/VC8/src/curl.vcproj.dist
|
||||
VC8_SRCVCPROJ_DEPS = $(VC8_SRCTMPL) Makefile.am src/Makefile.inc
|
||||
|
||||
VC9_LIBTMPL = projects/Windows/VC9/lib/libcurl.tmpl
|
||||
VC9_LIBVCPROJ = projects/Windows/VC9/lib/libcurl.vcproj.dist
|
||||
VC9_LIBVCPROJ_DEPS = $(VC9_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||
VC9_SRCTMPL = projects/Windows/VC9/src/curl.tmpl
|
||||
VC9_SRCVCPROJ = projects/Windows/VC9/src/curl.vcproj.dist
|
||||
VC9_SRCVCPROJ_DEPS = $(VC9_SRCTMPL) Makefile.am src/Makefile.inc
|
||||
|
||||
VC10_LIBTMPL = projects/Windows/VC10/lib/libcurl.tmpl
|
||||
VC10_LIBVCXPROJ = projects/Windows/VC10/lib/libcurl.vcxproj.dist
|
||||
VC10_LIBVCXPROJ_DEPS = $(VC10_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||
VC10_SRCTMPL = projects/Windows/VC10/src/curl.tmpl
|
||||
VC10_SRCVCXPROJ = projects/Windows/VC10/src/curl.vcxproj.dist
|
||||
VC10_SRCVCXPROJ_DEPS = $(VC10_SRCTMPL) Makefile.am src/Makefile.inc
|
||||
|
||||
VC11_LIBTMPL = projects/Windows/VC11/lib/libcurl.tmpl
|
||||
VC11_LIBVCXPROJ = projects/Windows/VC11/lib/libcurl.vcxproj.dist
|
||||
VC11_LIBVCXPROJ_DEPS = $(VC11_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||
VC11_SRCTMPL = projects/Windows/VC11/src/curl.tmpl
|
||||
VC11_SRCVCXPROJ = projects/Windows/VC11/src/curl.vcxproj.dist
|
||||
VC11_SRCVCXPROJ_DEPS = $(VC11_SRCTMPL) Makefile.am src/Makefile.inc
|
||||
|
||||
VC12_LIBTMPL = projects/Windows/VC12/lib/libcurl.tmpl
|
||||
VC12_LIBVCXPROJ = projects/Windows/VC12/lib/libcurl.vcxproj.dist
|
||||
VC12_LIBVCXPROJ_DEPS = $(VC12_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||
VC12_SRCTMPL = projects/Windows/VC12/src/curl.tmpl
|
||||
VC12_SRCVCXPROJ = projects/Windows/VC12/src/curl.vcxproj.dist
|
||||
VC12_SRCVCXPROJ_DEPS = $(VC12_SRCTMPL) Makefile.am src/Makefile.inc
|
||||
|
||||
VC14_LIBTMPL = projects/Windows/VC14/lib/libcurl.tmpl
|
||||
VC14_LIBVCXPROJ = projects/Windows/VC14/lib/libcurl.vcxproj.dist
|
||||
VC14_LIBVCXPROJ_DEPS = $(VC14_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||
VC14_SRCTMPL = projects/Windows/VC14/src/curl.tmpl
|
||||
VC14_SRCVCXPROJ = projects/Windows/VC14/src/curl.vcxproj.dist
|
||||
VC14_SRCVCXPROJ_DEPS = $(VC14_SRCTMPL) Makefile.am src/Makefile.inc
|
||||
|
||||
VC_DIST = projects/README \
|
||||
projects/build-openssl.bat \
|
||||
projects/build-wolfssl.bat \
|
||||
projects/checksrc.bat \
|
||||
projects/Windows/VC6/curl-all.dsw \
|
||||
projects/Windows/VC6/lib/libcurl.dsw \
|
||||
projects/Windows/VC6/src/curl.dsw \
|
||||
projects/Windows/VC7/curl-all.sln \
|
||||
projects/Windows/VC7/lib/libcurl.sln \
|
||||
projects/Windows/VC7/src/curl.sln \
|
||||
projects/Windows/VC7.1/curl-all.sln \
|
||||
projects/Windows/VC7.1/lib/libcurl.sln \
|
||||
projects/Windows/VC7.1/src/curl.sln \
|
||||
projects/Windows/VC8/curl-all.sln \
|
||||
projects/Windows/VC8/lib/libcurl.sln \
|
||||
projects/Windows/VC8/src/curl.sln \
|
||||
projects/Windows/VC9/curl-all.sln \
|
||||
projects/Windows/VC9/lib/libcurl.sln \
|
||||
projects/Windows/VC9/src/curl.sln \
|
||||
projects/Windows/VC10/curl-all.sln \
|
||||
projects/Windows/VC10/lib/libcurl.sln \
|
||||
projects/Windows/VC10/lib/libcurl.vcxproj.filters \
|
||||
projects/Windows/VC10/src/curl.sln \
|
||||
projects/Windows/VC10/src/curl.vcxproj.filters \
|
||||
projects/Windows/VC11/curl-all.sln \
|
||||
projects/Windows/VC11/lib/libcurl.sln \
|
||||
projects/Windows/VC11/lib/libcurl.vcxproj.filters \
|
||||
projects/Windows/VC11/src/curl.sln \
|
||||
projects/Windows/VC11/src/curl.vcxproj.filters \
|
||||
projects/Windows/VC12/curl-all.sln \
|
||||
projects/Windows/VC12/lib/libcurl.sln \
|
||||
projects/Windows/VC12/lib/libcurl.vcxproj.filters \
|
||||
projects/Windows/VC12/src/curl.sln \
|
||||
projects/Windows/VC12/src/curl.vcxproj.filters \
|
||||
projects/Windows/VC14/curl-all.sln \
|
||||
projects/Windows/VC14/lib/libcurl.sln \
|
||||
projects/Windows/VC14/lib/libcurl.vcxproj.filters \
|
||||
projects/Windows/VC14/src/curl.sln \
|
||||
projects/Windows/VC14/src/curl.vcxproj.filters
|
||||
|
||||
WINBUILD_DIST = winbuild/BUILD.WINDOWS.txt winbuild/gen_resp_file.bat \
|
||||
winbuild/MakefileBuild.vc winbuild/Makefile.vc \
|
||||
winbuild/Makefile.msvc.names
|
||||
|
||||
EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
|
||||
RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework scripts/zsh.pl \
|
||||
$(CMAKE_DIST) $(VC_DIST) $(WINBUILD_DIST) lib/libcurl.vers.in \
|
||||
buildconf.bat
|
||||
|
||||
CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ) \
|
||||
$(VC71_LIBVCPROJ) $(VC71_SRCVCPROJ) $(VC8_LIBVCPROJ) $(VC8_SRCVCPROJ) \
|
||||
$(VC9_LIBVCPROJ) $(VC9_SRCVCPROJ) $(VC10_LIBVCXPROJ) $(VC10_SRCVCXPROJ) \
|
||||
$(VC11_LIBVCXPROJ) $(VC11_SRCVCXPROJ) $(VC12_LIBVCXPROJ) $(VC12_SRCVCXPROJ) \
|
||||
$(VC14_LIBVCXPROJ) $(VC14_SRCVCXPROJ)
|
||||
EXTRA_DIST = \
|
||||
CHANGES LEGAL maketgz MITX.txt MPL-1.1.txt \
|
||||
config-win32.h reconf Makefile.dist \
|
||||
curl-config.in build_vms.com config-riscos.h \
|
||||
config-vms.h curl-mode.el
|
||||
|
||||
bin_SCRIPTS = curl-config
|
||||
|
||||
SUBDIRS = lib src include scripts
|
||||
DIST_SUBDIRS = $(SUBDIRS) tests packages docs
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libcurl.pc
|
||||
|
||||
# List of files required to generate VC IDE .dsp, .vcproj and .vcxproj files
|
||||
include lib/Makefile.inc
|
||||
include src/Makefile.inc
|
||||
SUBDIRS = docs lib src include tests packages
|
||||
|
||||
# create a root makefile in the distribution:
|
||||
dist-hook:
|
||||
rm -rf $(top_builddir)/tests/log
|
||||
find $(distdir) -name "*.dist" -exec rm {} \;
|
||||
(distit=`find $(srcdir) -name "*.dist" | grep -v ./ares/`; \
|
||||
for file in $$distit; do \
|
||||
strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
|
||||
cp $$file $(distdir)$$strip; \
|
||||
done)
|
||||
cp $(srcdir)/Makefile.dist $(distdir)/Makefile
|
||||
|
||||
html:
|
||||
cd docs && make html
|
||||
cd docs; make html
|
||||
|
||||
pdf:
|
||||
cd docs && make pdf
|
||||
|
||||
check: test examples check-docs
|
||||
|
||||
if CROSSCOMPILING
|
||||
test-full: test
|
||||
test-torture: test
|
||||
check: test
|
||||
|
||||
test:
|
||||
@echo "NOTICE: we can't run the tests when cross-compiling!"
|
||||
|
||||
else
|
||||
|
||||
test:
|
||||
@(cd tests; $(MAKE) all quiet-test)
|
||||
|
||||
test-full:
|
||||
@(cd tests; $(MAKE) all full-test)
|
||||
|
||||
test-torture:
|
||||
@(cd tests; $(MAKE) all torture-test)
|
||||
|
||||
test-am:
|
||||
@(cd tests; $(MAKE) all am-test)
|
||||
|
||||
endif
|
||||
|
||||
examples:
|
||||
@(cd docs/examples; $(MAKE) check)
|
||||
|
||||
check-docs:
|
||||
@(cd docs/libcurl; $(MAKE) check)
|
||||
|
||||
# This is a hook to have 'make clean' also clean up the docs and the tests
|
||||
# dir. The extra check for the Makefiles being present is necessary because
|
||||
# 'make distcheck' will make clean first in these directories _before_ it runs
|
||||
# this hook.
|
||||
clean-local:
|
||||
@(if test -f tests/Makefile; then cd tests; $(MAKE) clean; fi)
|
||||
@(if test -f docs/Makefile; then cd docs; $(MAKE) clean; fi)
|
||||
@(cd tests; $(MAKE) quiet-test)
|
||||
|
||||
#
|
||||
# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
|
||||
@ -241,7 +54,7 @@ rpm:
|
||||
mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm .
|
||||
|
||||
#
|
||||
# Build a Solaris pkgadd format file
|
||||
# Build a Solaris pkkgadd format file
|
||||
# run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format
|
||||
# file (which ends up back in this directory).
|
||||
# The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do
|
||||
@ -252,321 +65,5 @@ rpm:
|
||||
pkgadd:
|
||||
umask 022 ; \
|
||||
make install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \
|
||||
cat COPYING > $(srcdir)/packages/Solaris/copyright ; \
|
||||
cat LEGAL MITX.txt MPL-1.1.txt > $(srcdir)/packages/Solaris/copyright ; \
|
||||
cd $(srcdir)/packages/Solaris && $(MAKE) package
|
||||
|
||||
#
|
||||
# Build a cygwin binary tarball installation file
|
||||
# resulting .tar.bz2 file will end up at packages/Win32/cygwin
|
||||
cygwinbin:
|
||||
$(MAKE) -C packages/Win32/cygwin cygwinbin
|
||||
|
||||
# We extend the standard install with a custom hook:
|
||||
install-data-hook:
|
||||
cd include && $(MAKE) install
|
||||
cd docs && $(MAKE) install
|
||||
|
||||
# We extend the standard uninstall with a custom hook:
|
||||
uninstall-hook:
|
||||
cd include && $(MAKE) uninstall
|
||||
cd docs && $(MAKE) uninstall
|
||||
|
||||
ca-bundle: lib/mk-ca-bundle.pl
|
||||
@echo "generating a fresh ca-bundle.crt"
|
||||
@perl $< -b -l -u lib/ca-bundle.crt
|
||||
|
||||
ca-firefox: lib/firefox-db2pem.sh
|
||||
@echo "generating a fresh ca-bundle.crt"
|
||||
./lib/firefox-db2pem.sh lib/ca-bundle.crt
|
||||
|
||||
checksrc:
|
||||
cd lib && $(MAKE) checksrc
|
||||
cd src && $(MAKE) checksrc
|
||||
|
||||
.PHONY: vc-ide
|
||||
|
||||
vc-ide: $(VC6_LIBDSP_DEPS) $(VC6_SRCDSP_DEPS) $(VC7_LIBVCPROJ_DEPS) \
|
||||
$(VC7_SRCVCPROJ_DEPS) $(VC71_LIBVCPROJ_DEPS) $(VC71_SRCVCPROJ_DEPS) \
|
||||
$(VC8_LIBVCPROJ_DEPS) $(VC8_SRCVCPROJ_DEPS) $(VC9_LIBVCPROJ_DEPS) \
|
||||
$(VC9_SRCVCPROJ_DEPS) $(VC10_LIBVCXPROJ_DEPS) $(VC10_SRCVCXPROJ_DEPS) \
|
||||
$(VC11_LIBVCXPROJ_DEPS) $(VC11_SRCVCXPROJ_DEPS) $(VC12_LIBVCXPROJ_DEPS) \
|
||||
$(VC12_SRCVCXPROJ_DEPS) $(VC14_LIBVCXPROJ_DEPS) $(VC14_SRCVCXPROJ_DEPS)
|
||||
@(win32_lib_srcs='$(LIB_CFILES)'; \
|
||||
win32_lib_hdrs='$(LIB_HFILES) config-win32.h'; \
|
||||
win32_lib_rc='$(LIB_RCFILES)'; \
|
||||
win32_lib_vtls_srcs='$(LIB_VTLS_CFILES)'; \
|
||||
win32_lib_vtls_hdrs='$(LIB_VTLS_HFILES)'; \
|
||||
win32_src_srcs='$(CURL_CFILES)'; \
|
||||
win32_src_hdrs='$(CURL_HFILES)'; \
|
||||
win32_src_rc='$(CURL_RCFILES)'; \
|
||||
win32_src_x_srcs='$(CURLX_CFILES)'; \
|
||||
win32_src_x_hdrs='$(CURLX_HFILES) ../lib/config-win32.h'; \
|
||||
\
|
||||
sorted_lib_srcs=`for file in $$win32_lib_srcs; do echo $$file; done | sort`; \
|
||||
sorted_lib_hdrs=`for file in $$win32_lib_hdrs; do echo $$file; done | sort`; \
|
||||
sorted_lib_vtls_srcs=`for file in $$win32_lib_vtls_srcs; do echo $$file; done | sort`; \
|
||||
sorted_lib_vtls_hdrs=`for file in $$win32_lib_vtls_hdrs; do echo $$file; done | sort`; \
|
||||
sorted_src_srcs=`for file in $$win32_src_srcs; do echo $$file; done | sort`; \
|
||||
sorted_src_hdrs=`for file in $$win32_src_hdrs; do echo $$file; done | sort`; \
|
||||
sorted_src_x_srcs=`for file in $$win32_src_x_srcs; do echo $$file; done | sort`; \
|
||||
sorted_src_x_hdrs=`for file in $$win32_src_x_hdrs; do echo $$file; done | sort`; \
|
||||
\
|
||||
awk_code='\
|
||||
function gen_element(type, dir, file)\
|
||||
{\
|
||||
sub(/vtls\//, "", file);\
|
||||
\
|
||||
spaces=" ";\
|
||||
if(dir == "lib\\vtls")\
|
||||
tabs=" ";\
|
||||
else\
|
||||
tabs=" ";\
|
||||
\
|
||||
if(type == "dsp") {\
|
||||
printf("# Begin Source File\r\n");\
|
||||
printf("\r\n");\
|
||||
printf("SOURCE=..\\..\\..\\..\\%s\\%s\r\n", dir, file);\
|
||||
printf("# End Source File\r\n");\
|
||||
}\
|
||||
else if(type == "vcproj1") {\
|
||||
printf("%s<File\r\n", tabs);\
|
||||
printf("%s RelativePath=\"..\\..\\..\\..\\%s\\%s\">\r\n",\
|
||||
tabs, dir, file);\
|
||||
printf("%s</File>\r\n", tabs);\
|
||||
}\
|
||||
else if(type == "vcproj2") {\
|
||||
printf("%s<File\r\n", tabs);\
|
||||
printf("%s RelativePath=\"..\\..\\..\\..\\%s\\%s\"\r\n",\
|
||||
tabs, dir, file);\
|
||||
printf("%s>\r\n", tabs);\
|
||||
printf("%s</File>\r\n", tabs);\
|
||||
}\
|
||||
else if(type == "vcxproj") {\
|
||||
i = index(file, ".");\
|
||||
ext = substr(file, i == 0 ? 0 : i + 1);\
|
||||
\
|
||||
if(ext == "c")\
|
||||
printf("%s<ClCompile Include=\"..\\..\\..\\..\\%s\\%s\" />\r\n",\
|
||||
spaces, dir, file);\
|
||||
else if(ext == "h")\
|
||||
printf("%s<ClInclude Include=\"..\\..\\..\\..\\%s\\%s\" />\r\n",\
|
||||
spaces, dir, file);\
|
||||
else if(ext == "rc")\
|
||||
printf("%s<ResourceCompile Include=\"..\\..\\..\\..\\%s\\%s\" />\r\n",\
|
||||
spaces, dir, file);\
|
||||
}\
|
||||
}\
|
||||
\
|
||||
{\
|
||||
\
|
||||
if($$0 == "CURL_LIB_C_FILES") {\
|
||||
split(lib_srcs, arr);\
|
||||
for(val in arr) gen_element(proj_type, "lib", arr[val]);\
|
||||
}\
|
||||
else if($$0 == "CURL_LIB_H_FILES") {\
|
||||
split(lib_hdrs, arr);\
|
||||
for(val in arr) gen_element(proj_type, "lib", arr[val]);\
|
||||
}\
|
||||
else if($$0 == "CURL_LIB_RC_FILES") {\
|
||||
split(lib_rc, arr);\
|
||||
for(val in arr) gen_element(proj_type, "lib", arr[val]);\
|
||||
}\
|
||||
else if($$0 == "CURL_LIB_VTLS_C_FILES") {\
|
||||
split(lib_vtls_srcs, arr);\
|
||||
for(val in arr) gen_element(proj_type, "lib\\vtls", arr[val]);\
|
||||
}\
|
||||
else if($$0 == "CURL_LIB_VTLS_H_FILES") {\
|
||||
split(lib_vtls_hdrs, arr);\
|
||||
for(val in arr) gen_element(proj_type, "lib\\vtls", arr[val]);\
|
||||
}\
|
||||
else if($$0 == "CURL_SRC_C_FILES") {\
|
||||
split(src_srcs, arr);\
|
||||
for(val in arr) gen_element(proj_type, "src", arr[val]);\
|
||||
}\
|
||||
else if($$0 == "CURL_SRC_H_FILES") {\
|
||||
split(src_hdrs, arr);\
|
||||
for(val in arr) gen_element(proj_type, "src", arr[val]);\
|
||||
}\
|
||||
else if($$0 == "CURL_SRC_RC_FILES") {\
|
||||
split(src_rc, arr);\
|
||||
for(val in arr) gen_element(proj_type, "src", arr[val]);\
|
||||
}\
|
||||
else if($$0 == "CURL_SRC_X_C_FILES") {\
|
||||
split(src_x_srcs, arr);\
|
||||
for(val in arr) {\
|
||||
sub(/..\/lib\//, "", arr[val]);\
|
||||
gen_element(proj_type, "lib", arr[val]);\
|
||||
}\
|
||||
}\
|
||||
else if($$0 == "CURL_SRC_X_H_FILES") {\
|
||||
split(src_x_hdrs, arr);\
|
||||
for(val in arr) {\
|
||||
sub(/..\/lib\//, "", arr[val]);\
|
||||
gen_element(proj_type, "lib", arr[val]);\
|
||||
}\
|
||||
}\
|
||||
else\
|
||||
printf("%s\r\n", $$0);\
|
||||
}';\
|
||||
\
|
||||
echo "generating '$(VC6_LIBDSP)'"; \
|
||||
awk -v proj_type=dsp \
|
||||
-v lib_srcs="$$sorted_lib_srcs" \
|
||||
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||
-v lib_rc="$$win32_lib_rc" \
|
||||
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||
"$$awk_code" $(srcdir)/$(VC6_LIBTMPL) > $(VC6_LIBDSP) || { exit 1; }; \
|
||||
\
|
||||
echo "generating '$(VC6_SRCDSP)'"; \
|
||||
awk -v proj_type=dsp \
|
||||
-v src_srcs="$$sorted_src_srcs" \
|
||||
-v src_hdrs="$$sorted_src_hdrs" \
|
||||
-v src_rc="$$win32_src_rc" \
|
||||
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||
"$$awk_code" $(srcdir)/$(VC6_SRCTMPL) > $(VC6_SRCDSP) || { exit 1; }; \
|
||||
\
|
||||
echo "generating '$(VC7_LIBVCPROJ)'"; \
|
||||
awk -v proj_type=vcproj1 \
|
||||
-v lib_srcs="$$sorted_lib_srcs" \
|
||||
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||
-v lib_rc="$$win32_lib_rc" \
|
||||
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||
"$$awk_code" $(srcdir)/$(VC7_LIBTMPL) > $(VC7_LIBVCPROJ) || { exit 1; }; \
|
||||
\
|
||||
echo "generating '$(VC7_SRCVCPROJ)'"; \
|
||||
awk -v proj_type=vcproj1 \
|
||||
-v src_srcs="$$sorted_src_srcs" \
|
||||
-v src_hdrs="$$sorted_src_hdrs" \
|
||||
-v src_rc="$$win32_src_rc" \
|
||||
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||
"$$awk_code" $(srcdir)/$(VC7_SRCTMPL) > $(VC7_SRCVCPROJ) || { exit 1; }; \
|
||||
\
|
||||
echo "generating '$(VC71_LIBVCPROJ)'"; \
|
||||
awk -v proj_type=vcproj1 \
|
||||
-v lib_srcs="$$sorted_lib_srcs" \
|
||||
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||
-v lib_rc="$$win32_lib_rc" \
|
||||
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||
"$$awk_code" $(srcdir)/$(VC71_LIBTMPL) > $(VC71_LIBVCPROJ) || { exit 1; }; \
|
||||
\
|
||||
echo "generating '$(VC71_SRCVCPROJ)'"; \
|
||||
awk -v proj_type=vcproj1 \
|
||||
-v src_srcs="$$sorted_src_srcs" \
|
||||
-v src_hdrs="$$sorted_src_hdrs" \
|
||||
-v src_rc="$$win32_src_rc" \
|
||||
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||
"$$awk_code" $(srcdir)/$(VC71_SRCTMPL) > $(VC71_SRCVCPROJ) || { exit 1; }; \
|
||||
\
|
||||
echo "generating '$(VC8_LIBVCPROJ)'"; \
|
||||
awk -v proj_type=vcproj2 \
|
||||
-v lib_srcs="$$sorted_lib_srcs" \
|
||||
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||
-v lib_rc="$$win32_lib_rc" \
|
||||
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||
"$$awk_code" $(srcdir)/$(VC8_LIBTMPL) > $(VC8_LIBVCPROJ) || { exit 1; }; \
|
||||
\
|
||||
echo "generating '$(VC8_SRCVCPROJ)'"; \
|
||||
awk -v proj_type=vcproj2 \
|
||||
-v src_srcs="$$sorted_src_srcs" \
|
||||
-v src_hdrs="$$sorted_src_hdrs" \
|
||||
-v src_rc="$$win32_src_rc" \
|
||||
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||
"$$awk_code" $(srcdir)/$(VC8_SRCTMPL) > $(VC8_SRCVCPROJ) || { exit 1; }; \
|
||||
\
|
||||
echo "generating '$(VC9_LIBVCPROJ)'"; \
|
||||
awk -v proj_type=vcproj2 \
|
||||
-v lib_srcs="$$sorted_lib_srcs" \
|
||||
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||
-v lib_rc="$$win32_lib_rc" \
|
||||
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||
"$$awk_code" $(srcdir)/$(VC9_LIBTMPL) > $(VC9_LIBVCPROJ) || { exit 1; }; \
|
||||
\
|
||||
echo "generating '$(VC9_SRCVCPROJ)'"; \
|
||||
awk -v proj_type=vcproj2 \
|
||||
-v src_srcs="$$sorted_src_srcs" \
|
||||
-v src_hdrs="$$sorted_src_hdrs" \
|
||||
-v src_rc="$$win32_src_rc" \
|
||||
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||
"$$awk_code" $(srcdir)/$(VC9_SRCTMPL) > $(VC9_SRCVCPROJ) || { exit 1; }; \
|
||||
\
|
||||
echo "generating '$(VC10_LIBVCXPROJ)'"; \
|
||||
awk -v proj_type=vcxproj \
|
||||
-v lib_srcs="$$sorted_lib_srcs" \
|
||||
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||
-v lib_rc="$$win32_lib_rc" \
|
||||
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||
"$$awk_code" $(srcdir)/$(VC10_LIBTMPL) > $(VC10_LIBVCXPROJ) || { exit 1; }; \
|
||||
\
|
||||
echo "generating '$(VC10_SRCVCXPROJ)'"; \
|
||||
awk -v proj_type=vcxproj \
|
||||
-v src_srcs="$$sorted_src_srcs" \
|
||||
-v src_hdrs="$$sorted_src_hdrs" \
|
||||
-v src_rc="$$win32_src_rc" \
|
||||
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||
"$$awk_code" $(srcdir)/$(VC10_SRCTMPL) > $(VC10_SRCVCXPROJ) || { exit 1; }; \
|
||||
\
|
||||
echo "generating '$(VC11_LIBVCXPROJ)'"; \
|
||||
awk -v proj_type=vcxproj \
|
||||
-v lib_srcs="$$sorted_lib_srcs" \
|
||||
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||
-v lib_rc="$$win32_lib_rc" \
|
||||
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||
"$$awk_code" $(srcdir)/$(VC11_LIBTMPL) > $(VC11_LIBVCXPROJ) || { exit 1; }; \
|
||||
\
|
||||
echo "generating '$(VC11_SRCVCXPROJ)'"; \
|
||||
awk -v proj_type=vcxproj \
|
||||
-v src_srcs="$$sorted_src_srcs" \
|
||||
-v src_hdrs="$$sorted_src_hdrs" \
|
||||
-v src_rc="$$win32_src_rc" \
|
||||
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||
"$$awk_code" $(srcdir)/$(VC11_SRCTMPL) > $(VC11_SRCVCXPROJ) || { exit 1; }; \
|
||||
\
|
||||
echo "generating '$(VC12_LIBVCXPROJ)'"; \
|
||||
awk -v proj_type=vcxproj \
|
||||
-v lib_srcs="$$sorted_lib_srcs" \
|
||||
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||
-v lib_rc="$$win32_lib_rc" \
|
||||
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||
"$$awk_code" $(srcdir)/$(VC12_LIBTMPL) > $(VC12_LIBVCXPROJ) || { exit 1; }; \
|
||||
\
|
||||
echo "generating '$(VC12_SRCVCXPROJ)'"; \
|
||||
awk -v proj_type=vcxproj \
|
||||
-v src_srcs="$$sorted_src_srcs" \
|
||||
-v src_hdrs="$$sorted_src_hdrs" \
|
||||
-v src_rc="$$win32_src_rc" \
|
||||
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||
"$$awk_code" $(srcdir)/$(VC12_SRCTMPL) > $(VC12_SRCVCXPROJ) || { exit 1; }; \
|
||||
\
|
||||
echo "generating '$(VC14_LIBVCXPROJ)'"; \
|
||||
awk -v proj_type=vcxproj \
|
||||
-v lib_srcs="$$sorted_lib_srcs" \
|
||||
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||
-v lib_rc="$$win32_lib_rc" \
|
||||
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||
"$$awk_code" $(srcdir)/$(VC14_LIBTMPL) > $(VC14_LIBVCXPROJ) || { exit 1; }; \
|
||||
\
|
||||
echo "generating '$(VC14_SRCVCXPROJ)'"; \
|
||||
awk -v proj_type=vcxproj \
|
||||
-v src_srcs="$$sorted_src_srcs" \
|
||||
-v src_hdrs="$$sorted_src_hdrs" \
|
||||
-v src_rc="$$win32_src_rc" \
|
||||
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||
"$$awk_code" $(srcdir)/$(VC14_SRCTMPL) > $(VC14_SRCVCXPROJ) || { exit 1; };)
|
||||
|
566
Makefile.dist
566
Makefile.dist
@ -1,26 +1,25 @@
|
||||
#***************************************************************************
|
||||
# _ _ ____ _
|
||||
# Project ___| | | | _ \| |
|
||||
# / __| | | | |_) | |
|
||||
# | (__| |_| | _ <| |___
|
||||
#############################################################################
|
||||
# _ _ ____ _
|
||||
# Project ___| | | | _ \| |
|
||||
# / __| | | | |_) | |
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 2000, 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 https://curl.haxx.se/docs/copyright.html.
|
||||
# In order to be useful for every potential user, curl and libcurl are
|
||||
# dual-licensed under the MPL and the MIT/X-derivate licenses.
|
||||
#
|
||||
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
# copies of the Software, and permit persons to whom the Software is
|
||||
# furnished to do so, under the terms of the COPYING file.
|
||||
# furnished to do so, under the terms of the MPL or the MIT/X-derivate
|
||||
# licenses. You may pick one of these licenses.
|
||||
#
|
||||
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
# KIND, either express or implied.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
VC=vc6
|
||||
# $Id$
|
||||
#############################################################################
|
||||
|
||||
all:
|
||||
./configure
|
||||
@ -31,426 +30,28 @@ ssl:
|
||||
make
|
||||
|
||||
borland:
|
||||
cd lib
|
||||
$(MAKE) -f Makefile.b32
|
||||
cd ..\src
|
||||
$(MAKE) -f Makefile.b32
|
||||
|
||||
borland-ssl:
|
||||
cd lib
|
||||
$(MAKE) -f Makefile.b32 WITH_SSL=1
|
||||
cd ..\src
|
||||
$(MAKE) -f Makefile.b32 WITH_SSL=1
|
||||
|
||||
borland-ssl-zlib:
|
||||
cd lib
|
||||
$(MAKE) -f Makefile.b32 WITH_SSL=1 WITH_ZLIB=1
|
||||
cd ..\src
|
||||
$(MAKE) -f Makefile.b32 WITH_SSL=1 WITH_ZLIB=1
|
||||
|
||||
borland-clean:
|
||||
cd lib
|
||||
$(MAKE) -f Makefile.b32 clean
|
||||
cd ..\src
|
||||
$(MAKE) -f Makefile.b32 clean
|
||||
|
||||
watcom: .SYMBOLIC
|
||||
cd lib && $(MAKE) -u -f Makefile.Watcom
|
||||
cd src && $(MAKE) -u -f Makefile.Watcom
|
||||
|
||||
watcom-clean: .SYMBOLIC
|
||||
cd lib && $(MAKE) -u -f Makefile.Watcom clean
|
||||
cd src && $(MAKE) -u -f Makefile.Watcom clean
|
||||
|
||||
watcom-vclean: .SYMBOLIC
|
||||
cd lib && $(MAKE) -u -f Makefile.Watcom vclean
|
||||
cd src && $(MAKE) -u -f Makefile.Watcom vclean
|
||||
cd lib & make -f Makefile.b32
|
||||
cd src & make -f Makefile.b32
|
||||
|
||||
mingw32:
|
||||
$(MAKE) -C lib -f Makefile.m32
|
||||
$(MAKE) -C src -f Makefile.m32
|
||||
cd lib & make -f Makefile.m32
|
||||
cd src & make -f Makefile.m32
|
||||
|
||||
mingw32-clean:
|
||||
$(MAKE) -C lib -f Makefile.m32 clean
|
||||
$(MAKE) -C src -f Makefile.m32 clean
|
||||
$(MAKE) -C docs/examples -f Makefile.m32 clean
|
||||
mingw32-ssl:
|
||||
cd lib & make -f Makefile.m32 SSL=1
|
||||
cd src & make -f Makefile.m32 SSL=1
|
||||
|
||||
mingw32-vclean mingw32-distclean:
|
||||
$(MAKE) -C lib -f Makefile.m32 vclean
|
||||
$(MAKE) -C src -f Makefile.m32 vclean
|
||||
$(MAKE) -C docs/examples -f Makefile.m32 vclean
|
||||
|
||||
mingw32-examples%:
|
||||
$(MAKE) -C docs/examples -f Makefile.m32 CFG=$@
|
||||
|
||||
mingw32%:
|
||||
$(MAKE) -C lib -f Makefile.m32 CFG=$@
|
||||
$(MAKE) -C src -f Makefile.m32 CFG=$@
|
||||
|
||||
vc-clean: $(VC)
|
||||
vc:
|
||||
cd lib
|
||||
nmake -f Makefile.$(VC) clean
|
||||
nmake -f Makefile.vc6
|
||||
cd ..\src
|
||||
nmake -f Makefile.$(VC) clean
|
||||
nmake -f Makefile.vc6
|
||||
|
||||
vc-all: $(VC)
|
||||
vc-ssl:
|
||||
cd lib
|
||||
nmake -f Makefile.$(VC) cfg=release
|
||||
nmake -f Makefile.$(VC) cfg=release-ssl
|
||||
nmake -f Makefile.$(VC) cfg=release-zlib
|
||||
nmake -f Makefile.$(VC) cfg=release-ssl-zlib
|
||||
nmake -f Makefile.$(VC) cfg=release-ssl-dll
|
||||
nmake -f Makefile.$(VC) cfg=release-zlib-dll
|
||||
nmake -f Makefile.$(VC) cfg=release-ssl-dll-zlib-dll
|
||||
nmake -f Makefile.$(VC) cfg=release-dll
|
||||
nmake -f Makefile.$(VC) cfg=release-dll-ssl-dll
|
||||
nmake -f Makefile.$(VC) cfg=release-dll-zlib-dll
|
||||
nmake -f Makefile.$(VC) cfg=release-dll-ssl-dll-zlib-dll
|
||||
nmake -f Makefile.$(VC) cfg=debug
|
||||
nmake -f Makefile.$(VC) cfg=debug-ssl
|
||||
nmake -f Makefile.$(VC) cfg=debug-zlib
|
||||
nmake -f Makefile.$(VC) cfg=debug-ssl-zlib
|
||||
nmake -f Makefile.$(VC) cfg=debug-ssl-dll
|
||||
nmake -f Makefile.$(VC) cfg=debug-zlib-dll
|
||||
nmake -f Makefile.$(VC) cfg=debug-ssl-dll-zlib-dll
|
||||
nmake -f Makefile.$(VC) cfg=debug-dll
|
||||
nmake -f Makefile.$(VC) cfg=debug-dll-ssl-dll
|
||||
nmake -f Makefile.$(VC) cfg=debug-dll-zlib-dll
|
||||
nmake -f Makefile.$(VC) cfg=debug-dll-ssl-dll-zlib-dll
|
||||
|
||||
vc: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release
|
||||
nmake -f Makefile.vc6 release-ssl
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC)
|
||||
|
||||
vc-x64: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release
|
||||
|
||||
vc-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release WINDOWS_SSPI=1
|
||||
|
||||
vc-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release USE_IDN=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release USE_IDN=1
|
||||
|
||||
vc-x64-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release USE_IDN=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release USE_IDN=1
|
||||
|
||||
vc-idn-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-idn-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-zlib: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib
|
||||
|
||||
vc-x64-zlib: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib
|
||||
|
||||
vc-zlib-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-zlib-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib WINDOWS_SSPI=1
|
||||
|
||||
vc-zlib-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib USE_IDN=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib USE_IDN=1
|
||||
|
||||
vc-x64-zlib-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib USE_IDN=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib USE_IDN=1
|
||||
|
||||
vc-zlib-idn-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-zlib-idn-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-ssl: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl
|
||||
|
||||
vc-x64-ssl: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl
|
||||
|
||||
vc-ssl-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-ssl-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl WINDOWS_SSPI=1
|
||||
|
||||
vc-ssl-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl USE_IDN=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl USE_IDN=1
|
||||
|
||||
vc-x64-ssl-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl USE_IDN=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl USE_IDN=1
|
||||
|
||||
vc-ssl-idn-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-ssl-idn-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-ssl-zlib: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-zlib
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-zlib
|
||||
|
||||
vc-x64-ssl-zlib: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib
|
||||
|
||||
vc-ssl-zlib-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-zlib WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-zlib WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-ssl-zlib-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib WINDOWS_SSPI=1
|
||||
|
||||
vc-ssl-zlib-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-zlib USE_IDN=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-zlib USE_IDN=1
|
||||
|
||||
vc-x64-ssl-zlib-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib USE_IDN=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib USE_IDN=1
|
||||
|
||||
vc-ssl-zlib-idn-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-ssl-zlib-idn-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-ssl-ssh2-zlib: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib
|
||||
|
||||
vc-x64-ssl-ssh2-zlib: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib
|
||||
|
||||
vc-ssl-ssh2-zlib-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-ssl-ssh2-zlib-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib WINDOWS_SSPI=1
|
||||
|
||||
vc-ssl-ssh2-zlib-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib USE_IDN=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib USE_IDN=1
|
||||
|
||||
vc-x64-ssl-ssh2-zlib-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib USE_IDN=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib USE_IDN=1
|
||||
|
||||
vc-ssl-ssh2-zlib-idn-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-ssl-ssh2-zlib-idn-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-winssl: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-winssl WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-winssl WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-winssl: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl WINDOWS_SSPI=1
|
||||
|
||||
vc-winssl-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-winssl USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-winssl USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-winssl-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-winssl-zlib: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-winssl-zlib WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-winssl-zlib WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-winssl-zlib: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl-zlib WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl-zlib WINDOWS_SSPI=1
|
||||
|
||||
vc-winssl-zlib-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-winssl-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-winssl-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-winssl-zlib-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-ssl-dll: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-dll
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-dll
|
||||
|
||||
vc-dll-ssl-dll: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll
|
||||
|
||||
vc-dll: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-dll
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-dll
|
||||
|
||||
vc-dll-zlib-dll: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-dll-zlib-dll
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-dll-zlib-dll
|
||||
|
||||
vc-dll-ssl-dll-zlib-dll: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll-zlib-dll
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll-zlib-dll
|
||||
|
||||
vc-ssl-dll-zlib-dll: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-dll-zlib-dll
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-dll-zlib-dll
|
||||
|
||||
vc-zlib-dll: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib-dll
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib-dll
|
||||
|
||||
djgpp:
|
||||
$(MAKE) -C lib -f Makefile.dj
|
||||
$(MAKE) -C src -f Makefile.dj
|
||||
nmake -f Makefile.vc6
|
||||
|
||||
cygwin:
|
||||
./configure
|
||||
@ -460,35 +61,6 @@ cygwin-ssl:
|
||||
./configure --with-ssl
|
||||
make
|
||||
|
||||
amiga:
|
||||
cd ./lib && make -f makefile.amiga
|
||||
cd ./src && make -f makefile.amiga
|
||||
|
||||
netware:
|
||||
$(MAKE) -C lib -f Makefile.netware
|
||||
$(MAKE) -C src -f Makefile.netware
|
||||
|
||||
netware-clean:
|
||||
$(MAKE) -C lib -f Makefile.netware clean
|
||||
$(MAKE) -C src -f Makefile.netware clean
|
||||
$(MAKE) -C docs/examples -f Makefile.netware clean
|
||||
|
||||
netware-vclean netware-distclean:
|
||||
$(MAKE) -C lib -f Makefile.netware vclean
|
||||
$(MAKE) -C src -f Makefile.netware vclean
|
||||
$(MAKE) -C docs/examples -f Makefile.netware vclean
|
||||
|
||||
netware-install:
|
||||
$(MAKE) -C lib -f Makefile.netware install
|
||||
$(MAKE) -C src -f Makefile.netware install
|
||||
|
||||
netware-examples-%:
|
||||
$(MAKE) -C docs/examples -f Makefile.netware CFG=$@
|
||||
|
||||
netware-%:
|
||||
$(MAKE) -C lib -f Makefile.netware CFG=$@
|
||||
$(MAKE) -C src -f Makefile.netware CFG=$@
|
||||
|
||||
unix: all
|
||||
|
||||
unix-ssl: ssl
|
||||
@ -496,91 +68,3 @@ unix-ssl: ssl
|
||||
linux: all
|
||||
|
||||
linux-ssl: ssl
|
||||
|
||||
# We don't need to do anything for vc6.
|
||||
vc6:
|
||||
|
||||
# VC7 makefiles are for use with VS.NET and VS.NET 2003
|
||||
vc7: lib/Makefile.vc7 src/Makefile.vc7
|
||||
|
||||
lib/Makefile.vc7: lib/Makefile.vc6
|
||||
@echo "generate $@"
|
||||
@sed -e "s/VC6/VC7/g" lib/Makefile.vc6 > lib/Makefile.vc7
|
||||
|
||||
src/Makefile.vc7: src/Makefile.vc6
|
||||
@echo "generate $@"
|
||||
@sed -e "s/VC6/VC7/g" src/Makefile.vc6 > src/Makefile.vc7
|
||||
|
||||
# VC8 makefiles are for use with VS2005
|
||||
vc8: lib/Makefile.vc8 src/Makefile.vc8
|
||||
|
||||
lib/Makefile.vc8: lib/Makefile.vc6
|
||||
@echo "generate $@"
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib bufferoverflowu.lib/g" -e "s/VC6/VC8/g" lib/Makefile.vc6 > lib/Makefile.vc8
|
||||
|
||||
src/Makefile.vc8: src/Makefile.vc6
|
||||
@echo "generate $@"
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib bufferoverflowu.lib/g" -e "s/VC6/VC8/g" src/Makefile.vc6 > src/Makefile.vc8
|
||||
|
||||
# VC9 makefiles are for use with VS2008
|
||||
vc9: lib/Makefile.vc9 src/Makefile.vc9
|
||||
|
||||
lib/Makefile.vc9: lib/Makefile.vc6
|
||||
@echo "generate $@"
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc9/g" -e "s/VC6/VC9/g" lib/Makefile.vc6 > lib/Makefile.vc9
|
||||
|
||||
src/Makefile.vc9: src/Makefile.vc6
|
||||
@echo "generate $@"
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc9/g" -e "s/VC6/VC9/g" src/Makefile.vc6 > src/Makefile.vc9
|
||||
|
||||
# VC10 makefiles are for use with VS2010
|
||||
vc10: lib/Makefile.vc10 src/Makefile.vc10
|
||||
|
||||
lib/Makefile.vc10: lib/Makefile.vc6
|
||||
@echo "generate $@"
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc10/g" -e "s/VC6/VC10/g" lib/Makefile.vc6 > lib/Makefile.vc10
|
||||
|
||||
src/Makefile.vc10: src/Makefile.vc6
|
||||
@echo "generate $@"
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc10/g" -e "s/VC6/VC10/g" src/Makefile.vc6 > src/Makefile.vc10
|
||||
|
||||
# VC11 makefiles are for use with VS2012
|
||||
vc11: lib/Makefile.vc11 src/Makefile.vc11
|
||||
|
||||
lib/Makefile.vc11: lib/Makefile.vc6
|
||||
@echo "generate $@"
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc11/g" -e "s/VC6/VC11/g" lib/Makefile.vc6 > lib/Makefile.vc11
|
||||
|
||||
src/Makefile.vc11: src/Makefile.vc6
|
||||
@echo "generate $@"
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc11/g" -e "s/VC6/VC11/g" src/Makefile.vc6 > src/Makefile.vc11
|
||||
|
||||
# VC12 makefiles are for use with VS2013
|
||||
vc12: lib/Makefile.vc12 src/Makefile.vc12
|
||||
|
||||
lib/Makefile.vc12: lib/Makefile.vc6
|
||||
@echo "generate $@"
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc12/g" -e "s/VC6/VC12/g" lib/Makefile.vc6 > lib/Makefile.vc12
|
||||
|
||||
src/Makefile.vc12: src/Makefile.vc6
|
||||
@echo "generate $@"
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc12/g" -e "s/VC6/VC12/g" src/Makefile.vc6 > src/Makefile.vc12
|
||||
|
||||
# VC14 makefiles are for use with VS2015
|
||||
vc14: lib/Makefile.vc14 src/Makefile.vc14
|
||||
|
||||
lib/Makefile.vc14: lib/Makefile.vc6
|
||||
@echo "generate $@"
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc14/g" -e "s/VC6/VC14/g" lib/Makefile.vc6 > lib/Makefile.vc14
|
||||
|
||||
src/Makefile.vc14: src/Makefile.vc6
|
||||
@echo "generate $@"
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc14/g" -e "s/VC6/VC14/g" src/Makefile.vc6 > src/Makefile.vc14
|
||||
|
||||
ca-bundle: lib/mk-ca-bundle.pl
|
||||
@echo "generate a fresh ca-bundle.crt"
|
||||
@perl $< -b -l -u lib/ca-bundle.crt
|
||||
|
||||
ca-firefox: lib/firefox-db2pem.sh
|
||||
@echo "generate a fresh ca-bundle.crt"
|
||||
./lib/firefox-db2pem.sh lib/ca-bundle.crt
|
||||
|
46
README
46
README
@ -1,49 +1,47 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
README
|
||||
|
||||
Curl is a command line tool for transferring data specified with URL
|
||||
syntax. Find out how to use curl by reading the curl.1 man page or the
|
||||
Curl is a command line tool for transfering data specified with URL
|
||||
syntax. Find out how to use Curl by reading the curl.1 man page or the
|
||||
MANUAL document. Find out how to install Curl by reading the INSTALL
|
||||
document.
|
||||
|
||||
libcurl is the library curl is using to do its job. It is readily
|
||||
libcurl is a library that Curl is using to do its job. It is readily
|
||||
available to be used by your software. Read the libcurl.3 man page to
|
||||
learn how!
|
||||
find out how!
|
||||
|
||||
You find answers to the most frequent questions we get in the FAQ document.
|
||||
|
||||
Study the COPYING file for distribution terms and similar. If you distribute
|
||||
curl binaries or other binaries that involve libcurl, you might enjoy the
|
||||
LICENSE-MIXING document.
|
||||
Study the LEGAL file for distribution terms and similar.
|
||||
|
||||
CONTACT
|
||||
Always try the Curl web site for the latest news:
|
||||
|
||||
If you have problems, questions, ideas or suggestions, please contact us
|
||||
by posting to a suitable mailing list. See https://curl.haxx.se/mail/
|
||||
http://curl.haxx.se
|
||||
|
||||
All contributors to the project are listed in the THANKS document.
|
||||
The official download mirror sites are:
|
||||
|
||||
WEB SITE
|
||||
Sweden -- ftp://ftp.sunet.se/pub/www/utilities/curl/
|
||||
Germany -- ftp://ftp.fu-berlin.de/pub/unix/network/curl/
|
||||
|
||||
Visit the curl web site for the latest news and downloads:
|
||||
To download the very latest source off the CVS server do this:
|
||||
|
||||
https://curl.haxx.se/
|
||||
cvs -d :pserver:anonymous@cvs.curl.sourceforge.net:/cvsroot/curl login
|
||||
|
||||
GIT
|
||||
(just press enter when asked for password)
|
||||
|
||||
To download the very latest source off the GIT server do this:
|
||||
|
||||
git clone https://github.com/curl/curl.git
|
||||
cvs -d :pserver:anonymous@cvs.curl.sourceforge.net:/cvsroot/curl co curl
|
||||
|
||||
(you'll get a directory named curl created, filled with the source code)
|
||||
|
||||
NOTICE
|
||||
cvs -d :pserver:anonymous@cvs.curl.sourceforge.net:/cvsroot/curl logout
|
||||
|
||||
(you're off the hook!)
|
||||
|
||||
Curl contains pieces of source code that is Copyright (c) 1998, 1999
|
||||
Kungliga Tekniska Högskolan. This notice is included here to comply with the
|
||||
Kungliga Tekniska Högskolan. This notice is included here to comply with the
|
||||
distribution terms.
|
||||
|
45
README.md
45
README.md
@ -1,45 +0,0 @@
|
||||
|
||||
Curl is a command line tool for transferring data specified with URL
|
||||
syntax. Find out how to use curl by reading [the curl.1 man
|
||||
page](https://curl.haxx.se/docs/manpage.html) or [the MANUAL
|
||||
document](https://curl.haxx.se/docs/manual.html). Find out how to install Curl
|
||||
by reading [the INSTALL document](https://curl.haxx.se/docs/install.html).
|
||||
|
||||
libcurl is the library curl is using to do its job. It is readily available to
|
||||
be used by your software. Read [the libcurl.3 man
|
||||
page](https://curl.haxx.se/libcurl/c/libcurl.html) to learn how!
|
||||
|
||||
You find answers to the most frequent questions we get in [the FAQ
|
||||
document](https://curl.haxx.se/docs/faq.html).
|
||||
|
||||
Study [the COPYING file](https://curl.haxx.se/docs/copyright.html) for
|
||||
distribution terms and similar. If you distribute curl binaries or other
|
||||
binaries that involve libcurl, you might enjoy [the LICENSE-MIXING
|
||||
document](https://curl.haxx.se/legal/licmix.html).
|
||||
|
||||
## CONTACT
|
||||
|
||||
If you have problems, questions, ideas or suggestions, please contact us by
|
||||
posting to a suitable [mailing list](https://curl.haxx.se/mail/).
|
||||
|
||||
All contributors to the project are listed in [the THANKS
|
||||
document](https://curl.haxx.se/docs/thanks.html).
|
||||
|
||||
## WEB SITE
|
||||
|
||||
Visit the [curl web site](https://curl.haxx.se/) for the latest news and
|
||||
downloads.
|
||||
|
||||
## GIT
|
||||
|
||||
To download the very latest source off the GIT server do this:
|
||||
|
||||
git clone https://github.com/curl/curl.git
|
||||
|
||||
(you'll get a directory named curl created, filled with the source code)
|
||||
|
||||
## NOTICE
|
||||
|
||||
Curl contains pieces of source code that is Copyright (c) 1998, 1999 Kungliga
|
||||
Tekniska Högskolan. This notice is included here to comply with the
|
||||
distribution terms.
|
159
RELEASE-NOTES
159
RELEASE-NOTES
@ -1,159 +0,0 @@
|
||||
Curl and libcurl 7.48.0
|
||||
|
||||
Public curl releases: 153
|
||||
Command line options: 179
|
||||
curl_easy_setopt() options: 221
|
||||
Public functions in libcurl: 61
|
||||
Contributors: 1364
|
||||
|
||||
This release includes the following changes:
|
||||
|
||||
o configure: --with-ca-fallback: use built-in TLS CA fallback [2]
|
||||
o TFTP: add --tftp-no-options to expose CURLOPT_TFTP_NO_OPTIONS [22]
|
||||
o getinfo: CURLINFO_TLS_SSL_PTR supersedes CURLINFO_TLS_SESSION [25]
|
||||
o added CODE_STYLE.md [47]
|
||||
|
||||
This release includes the following bugfixes:
|
||||
|
||||
o Proxy-Connection: stop sending this header by default [1]
|
||||
o os400: sync ILE/RPG definitions with latest public header files
|
||||
o cookies: allow spaces in cookie names, cut of trailing spaces [3]
|
||||
o tool_urlglob: Allow reserved dos device names (Windows) [4]
|
||||
o openssl: remove most BoringSSL #ifdefs [5]
|
||||
o tool_doswin: Support for literal path prefix \\?\
|
||||
o mbedtls: fix ALPN usage segfault [6]
|
||||
o mbedtls: fix memory leak when destroying SSL connection data [7]
|
||||
o nss: do not count enabled cipher-suites
|
||||
o examples/cookie_interface.c: add cleanup call
|
||||
o examples: adhere to curl code style
|
||||
o curlx_tvdiff: handle 32bit time_t overflows [8]
|
||||
o dist: ship buildconf.bat too
|
||||
o curl.1: --disable-{eprt,epsv} are ignored for IPv6 hosts [9]
|
||||
o generate.bat: Fix comment bug by removing old comments [10]
|
||||
o test1604: Add to Makefile.inc so it gets run
|
||||
o gtls: fix for builds lacking encrypted key file support [11]
|
||||
o SCP: use libssh2_scp_recv2 to support > 2GB files on windows [12]
|
||||
o CURLOPT_CONNECTTIMEOUT_MS.3: Fix example to use milliseconds option [13]
|
||||
o cookie: do not refuse cookies to localhost [14]
|
||||
o openssl: avoid direct PKEY access with OpenSSL 1.1.0 [15]
|
||||
o http: Don't break the header into chunks if HTTP/2 [16]
|
||||
o http2: don't decompress gzip decoding automatically [17]
|
||||
o curlx.c: i2s_ASN1_IA5STRING() clashes with an openssl function
|
||||
o curl.1: add a missing dash
|
||||
o curl.1: HTTP headers for --cookie must be Set-Cookie style [18]
|
||||
o CURLOPT_COOKIEFILE.3: HTTP headers must be Set-Cookie style [18]
|
||||
o curl_sasl: Fix memory leak in digest parser [19]
|
||||
o src/Makefile.m32: add CURL_{LD,C}FLAGS_EXTRAS support [20]
|
||||
o CURLOPT_DEBUGFUNCTION.3: Fix example
|
||||
o runtests: Fixed usage of %PWD on MinGW64 [21]
|
||||
o tests/sshserver.pl: use RSA instead of DSA for host auth [23]
|
||||
o multi_remove_handle: keep the timeout list until after disconnect [24]
|
||||
o Curl_read: check for activated HTTP/1 pipelining, not only requested
|
||||
o configure: warn on invalid ca bundle or path [26]
|
||||
o file: try reading from files with no size [27]
|
||||
o getinfo: Add support for mbedTLS TLS session info
|
||||
o formpost: fix memory leaks in AddFormData error branches [28]
|
||||
o makefile.m32: allow to pass .dll/.exe-specific LDFLAGS [29]
|
||||
o url: if Curl_done is premature then pipeline not in use [30]
|
||||
o cookie: remove redundant check [31]
|
||||
o cookie: Don't expire session cookies in remove_expired [32]
|
||||
o makefile.m32: fix to allow -ssh2-winssl combination [33]
|
||||
o checksrc.bat: Fixed cannot find perl if installed but not in path
|
||||
o build-openssl.bat: Fixed cannot find perl if installed but not in path
|
||||
o mbedtls: fix user-specified SSL protocol version
|
||||
o makefile.m32: add missing libs for static -winssl-ssh2 builds [34]
|
||||
o test46: change cookie expiry date [35]
|
||||
o pipeline: Sanity check pipeline pointer before accessing it [36]
|
||||
o openssl: use the correct OpenSSL/BoringSSL/LibreSSL in messages
|
||||
o ftp_done: clear tunnel_state when secondary socket closes [37]
|
||||
o opt-docs: fix heading macros [38]
|
||||
o imap/pop3/smtp: Fixed connections upgraded with TLS are not reused [39]
|
||||
o curl_multi_wait: never return -1 in 'numfds' [40]
|
||||
o url.c: fix clang warning: no newline at end of file
|
||||
o krb5: improved type handling to avoid clang compiler warnings
|
||||
o cookies: first n/v pair in Set-Cookie: is the cookie, then parameters [41]
|
||||
o multi: avoid blocking during CURLM_STATE_WAITPROXYCONNECT [42]
|
||||
o multi hash: ensure modulo performed on curl_socket_t [43]
|
||||
o curl: glob_range: no need to check unsigned variable for negative
|
||||
o easy: add check to malloc() when running event-based
|
||||
o CURLOPT_SSLENGINE.3: Only for OpenSSL built with engine support [44]
|
||||
o version: thread safety
|
||||
o openssl: verbose: show matching SAN pattern
|
||||
o openssl: adapt to OpenSSL 1.1.0 API breakage in ERR_remove_thread_state()
|
||||
o formdata.c: Fixed compilation warning
|
||||
o configure: use cpp -P when needed [45]
|
||||
o imap.c: Fixed compilation warning with /Wall enabled
|
||||
o config-w32.h: Fixed compilation warning when /Wall enabled
|
||||
o ftp/imap/pop3/smtp: Fixed compilation warning when /Wall enabled
|
||||
o build: Added missing Visual Studio filter files for VC10 onwards
|
||||
o easy: Remove poll failure check in easy_transfer
|
||||
o mbedtls: fix compiler warning
|
||||
o build-wolfssl: Update VS properties for wolfSSL v3.9.0
|
||||
o Fixed various compilation warnings when verbose strings disabled
|
||||
|
||||
This release includes the following known bugs:
|
||||
|
||||
o see docs/KNOWN_BUGS (https://curl.haxx.se/docs/knownbugs.html)
|
||||
|
||||
This release would not have looked like this without help, code, reports and
|
||||
advice from friends like these:
|
||||
|
||||
Anders Bakken, Brad Fitzpatrick, Clint Clayton, Dan Fandrich,
|
||||
Daniel Stenberg, David Benjamin, David Byron, Emil Lerner, Eric S. Raymond,
|
||||
Gisle Vanem, Jaime Fullaondo, Jeffrey Walton, Jesse Tan, Justin Ehlert,
|
||||
Kamil Dudka, Kazuho Oku, Ludwig Nussel, Maksim Kuzevanov, Michael König,
|
||||
Oliver Graute, Patrick Monnerat, Rafael Antonio, Ray Satiro, Seth Mos,
|
||||
Shine Fan, Steve Holme, Tatsuhiro Tsujikawa, Timotej Lazar, Tim Rühsen,
|
||||
Viktor Szakáts,
|
||||
(30 contributors)
|
||||
|
||||
Thanks! (and sorry if I forgot to mention someone)
|
||||
|
||||
References to bug reports and discussions on issues:
|
||||
|
||||
[1] = https://curl.haxx.se/bug/?i=633
|
||||
[2] = https://curl.haxx.se/bug/?i=569
|
||||
[3] = https://curl.haxx.se/bug/?i=639
|
||||
[4] = https://github.com/curl/curl/commit/4520534#commitcomment-15954863
|
||||
[5] = https://curl.haxx.se/bug/?i=640
|
||||
[6] = https://curl.haxx.se/bug/?i=642
|
||||
[7] = https://curl.haxx.se/bug/?i=626
|
||||
[8] = https://curl.haxx.se/bug/?i=646
|
||||
[9] = https://bugzilla.redhat.com/1305970
|
||||
[10] = https://curl.haxx.se/bug/?i=649
|
||||
[11] = https://curl.haxx.se/bug/?i=651
|
||||
[12] = https://curl.haxx.se/bug/?i=451
|
||||
[13] = https://curl.haxx.se/bug/?i=653
|
||||
[14] = https://curl.haxx.se/bug/?i=658
|
||||
[15] = https://curl.haxx.se/bug/?i=650
|
||||
[16] = https://curl.haxx.se/bug/?i=659
|
||||
[17] = https://curl.haxx.se/bug/?i=661
|
||||
[18] = https://curl.haxx.se/bug/?i=666
|
||||
[19] = https://curl.haxx.se/bug/?i=667
|
||||
[20] = https://curl.haxx.se/bug/?i=670
|
||||
[21] = https://curl.haxx.se/bug/?i=672
|
||||
[22] = https://curl.haxx.se/bug/?i=481
|
||||
[23] = https://curl.haxx.se/bug/?i=676
|
||||
[24] = https://curl.haxx.se/mail/lib-2016-02/0097.html
|
||||
[25] = https://curl.haxx.se/libcurl/c/CURLINFO_TLS_SSL_PTR.html
|
||||
[26] = https://curl.haxx.se/bug/?i=404
|
||||
[27] = https://curl.haxx.se/bug/?i=681
|
||||
[28] = https://curl.haxx.se/bug/?i=688
|
||||
[29] = https://curl.haxx.se/bug/?i=689
|
||||
[30] = https://curl.haxx.se/bug/?i=690
|
||||
[31] = https://curl.haxx.se/bug/?i=695
|
||||
[32] = https://curl.haxx.se/bug/?i=697
|
||||
[33] = https://curl.haxx.se/bug/?i=692
|
||||
[34] = https://curl.haxx.se/bug/?i=693
|
||||
[35] = https://curl.haxx.se/bug/?i=697
|
||||
[36] = https://curl.haxx.se/bug/?i=704
|
||||
[37] = https://curl.haxx.se/bug/?i=701
|
||||
[38] = https://curl.haxx.se/bug/?i=705
|
||||
[39] = https://curl.haxx.se/bug/?i=422
|
||||
[40] = https://curl.haxx.se/bug/?i=707
|
||||
[41] = https://curl.haxx.se/bug/?i=709
|
||||
[42] = https://curl.haxx.se/bug/?i=703
|
||||
[43] = https://curl.haxx.se/bug/?i=712
|
||||
[44] = https://curl.haxx.se/mail/lib-2016-03/0150.html
|
||||
[45] = https://curl.haxx.se/bug/?i=719
|
||||
[47] = https://curl.haxx.se/dev/code-style.html
|
56
acconfig.h
Normal file
56
acconfig.h
Normal file
@ -0,0 +1,56 @@
|
||||
/* Name of this package! */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Version number of this archive. */
|
||||
#undef VERSION
|
||||
|
||||
/* Define if you have the getpass function. */
|
||||
#undef HAVE_GETPASS
|
||||
|
||||
/* Define cpu-machine-OS */
|
||||
#undef OS
|
||||
|
||||
/* Define if you have the gethostbyaddr_r() function with 5 arguments */
|
||||
#undef HAVE_GETHOSTBYADDR_R_5
|
||||
|
||||
/* Define if you have the gethostbyaddr_r() function with 7 arguments */
|
||||
#undef HAVE_GETHOSTBYADDR_R_7
|
||||
|
||||
/* Define if you have the gethostbyaddr_r() function with 8 arguments */
|
||||
#undef HAVE_GETHOSTBYADDR_R_8
|
||||
|
||||
/* Define if you have the gethostbyname_r() function with 3 arguments */
|
||||
#undef HAVE_GETHOSTBYNAME_R_3
|
||||
|
||||
/* Define if you have the gethostbyname_r() function with 5 arguments */
|
||||
#undef HAVE_GETHOSTBYNAME_R_5
|
||||
|
||||
/* Define if you have the gethostbyname_r() function with 6 arguments */
|
||||
#undef HAVE_GETHOSTBYNAME_R_6
|
||||
|
||||
/* Define if you have the inet_ntoa_r function declared. */
|
||||
#undef HAVE_INET_NTOA_R_DECL
|
||||
|
||||
/* Define if you need the _REENTRANT define for some functions */
|
||||
#undef NEED_REENTRANT
|
||||
|
||||
/* Define if you have the Kerberos4 libraries (including -ldes) */
|
||||
#undef KRB4
|
||||
|
||||
/* Define if you want to enable IPv6 support */
|
||||
#undef ENABLE_IPV6
|
||||
|
||||
/* Define this to 'int' if ssize_t is not an available typedefed type */
|
||||
#undef ssize_t
|
||||
|
||||
/* Define this to 'int' if socklen_t is not an available typedefed type */
|
||||
#undef socklen_t
|
||||
|
||||
/* Define this as a suitable file to read random data from */
|
||||
#undef RANDOM_FILE
|
||||
|
||||
/* Define this to your Entropy Gathering Daemon socket pathname */
|
||||
#undef EGD_SOCKET
|
||||
|
||||
/* Define if you have a working OpenSSL installation */
|
||||
#undef OPENSSL_ENABLED
|
3465
acinclude.m4
3465
acinclude.m4
File diff suppressed because it is too large
Load Diff
35
appveyor.yml
35
appveyor.yml
@ -1,35 +0,0 @@
|
||||
version: 7.47.0.{build}
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- PRJ_GEN: "Visual Studio 11 2012 Win64"
|
||||
BDIR: msvc2012
|
||||
PRJ_CFG: Release
|
||||
OPENSSL: OFF
|
||||
- PRJ_GEN: "Visual Studio 12 2013 Win64"
|
||||
BDIR: msvc2013
|
||||
PRJ_CFG: Release
|
||||
OPENSSL: OFF
|
||||
- PRJ_GEN: "Visual Studio 14 2015 Win64"
|
||||
BDIR: msvc2015
|
||||
PRJ_CFG: Release
|
||||
OPENSSL: OFF
|
||||
- PRJ_GEN: "Visual Studio 11 2012 Win64"
|
||||
BDIR: msvc2012
|
||||
PRJ_CFG: Release
|
||||
OPENSSL: ON
|
||||
- PRJ_GEN: "Visual Studio 12 2013 Win64"
|
||||
BDIR: msvc2013
|
||||
PRJ_CFG: Release
|
||||
OPENSSL: ON
|
||||
- PRJ_GEN: "Visual Studio 14 2015 Win64"
|
||||
BDIR: msvc2015
|
||||
PRJ_CFG: Release
|
||||
OPENSSL: ON
|
||||
|
||||
|
||||
build_script:
|
||||
- mkdir build.%BDIR%
|
||||
- cd build.%BDIR%
|
||||
- cmake .. -G"%PRJ_GEN%" -DCMAKE_USE_OPENSSL=%OPENSSL%
|
||||
- cmake --build . --config %PRJ_CFG% --clean-first
|
BIN
build_vms.com
Executable file
BIN
build_vms.com
Executable file
Binary file not shown.
450
buildconf
450
buildconf
@ -1,449 +1,13 @@
|
||||
#!/bin/sh
|
||||
#***************************************************************************
|
||||
# _ _ ____ _
|
||||
# Project ___| | | | _ \| |
|
||||
# / __| | | | |_) | |
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2014, 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 https://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.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# die prints argument string to stdout and exits this shell script.
|
||||
#
|
||||
die(){
|
||||
echo "buildconf: $@"
|
||||
exit 1
|
||||
echo "$@"
|
||||
exit
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# findtool works as 'which' but we use a different name to make it more
|
||||
# obvious we aren't using 'which'! ;-)
|
||||
# Unlike 'which' does, the current directory is ignored.
|
||||
#
|
||||
findtool(){
|
||||
file="$1"
|
||||
MAKEFILES=`find . -name Makefile.am | sed 's/\.am$//'`
|
||||
|
||||
if { echo "$file" | grep "/" >/dev/null 2>&1; } then
|
||||
# when file is given with a path check it first
|
||||
if test -f "$file"; then
|
||||
echo "$file"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
old_IFS=$IFS; IFS=':'
|
||||
for path in $PATH
|
||||
do
|
||||
IFS=$old_IFS
|
||||
# echo "checks for $file in $path" >&2
|
||||
if test "$path" -a "$path" != '.' -a -f "$path/$file"; then
|
||||
echo "$path/$file"
|
||||
return
|
||||
fi
|
||||
done
|
||||
IFS=$old_IFS
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# removethis() removes all files and subdirectories with the given name,
|
||||
# inside and below the current subdirectory at invocation time.
|
||||
#
|
||||
removethis(){
|
||||
if test "$#" = "1"; then
|
||||
find . -depth -name $1 -print > buildconf.tmp.$$
|
||||
while read fdname
|
||||
do
|
||||
if test -f "$fdname"; then
|
||||
rm -f "$fdname"
|
||||
elif test -d "$fdname"; then
|
||||
rm -f -r "$fdname"
|
||||
fi
|
||||
done < buildconf.tmp.$$
|
||||
rm -f buildconf.tmp.$$
|
||||
fi
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Ensure that buildconf runs from the subdirectory where configure.ac lives
|
||||
#
|
||||
if test ! -f configure.ac ||
|
||||
test ! -f src/tool_main.c ||
|
||||
test ! -f lib/urldata.h ||
|
||||
test ! -f include/curl/curl.h ||
|
||||
test ! -f m4/curl-functions.m4; then
|
||||
echo "Can not run buildconf from outside of curl's source subdirectory!"
|
||||
echo "Change to the subdirectory where buildconf is found, and try again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# autoconf 2.57 or newer. Unpatched version 2.67 does not generate proper
|
||||
# configure script. Unpatched version 2.68 is simply unusable, we should
|
||||
# disallow 2.68 usage.
|
||||
#
|
||||
need_autoconf="2.57"
|
||||
ac_version=`${AUTOCONF:-autoconf} --version 2>/dev/null|head -n 1| sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
|
||||
if test -z "$ac_version"; then
|
||||
echo "buildconf: autoconf not found."
|
||||
echo " You need autoconf version $need_autoconf or newer installed."
|
||||
exit 1
|
||||
fi
|
||||
old_IFS=$IFS; IFS='.'; set $ac_version; IFS=$old_IFS
|
||||
if test "$1" = "2" -a "$2" -lt "57" || test "$1" -lt "2"; then
|
||||
echo "buildconf: autoconf version $ac_version found."
|
||||
echo " You need autoconf version $need_autoconf or newer installed."
|
||||
echo " If you have a sufficient autoconf installed, but it"
|
||||
echo " is not named 'autoconf', then try setting the"
|
||||
echo " AUTOCONF environment variable."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test "$1" = "2" -a "$2" -eq "67"; then
|
||||
echo "buildconf: autoconf version $ac_version (BAD)"
|
||||
echo " Unpatched version generates broken configure script."
|
||||
elif test "$1" = "2" -a "$2" -eq "68"; then
|
||||
echo "buildconf: autoconf version $ac_version (BAD)"
|
||||
echo " Unpatched version generates unusable configure script."
|
||||
else
|
||||
echo "buildconf: autoconf version $ac_version (ok)"
|
||||
fi
|
||||
|
||||
am4te_version=`${AUTOM4TE:-autom4te} --version 2>/dev/null|head -n 1| sed -e 's/autom4te\(.*\)/\1/' -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
|
||||
if test -z "$am4te_version"; then
|
||||
echo "buildconf: autom4te not found. Weird autoconf installation!"
|
||||
exit 1
|
||||
fi
|
||||
if test "$am4te_version" = "$ac_version"; then
|
||||
echo "buildconf: autom4te version $am4te_version (ok)"
|
||||
else
|
||||
echo "buildconf: autom4te version $am4te_version (ERROR: does not match autoconf version)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# autoheader 2.50 or newer
|
||||
#
|
||||
ah_version=`${AUTOHEADER:-autoheader} --version 2>/dev/null|head -n 1| sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
|
||||
if test -z "$ah_version"; then
|
||||
echo "buildconf: autoheader not found."
|
||||
echo " You need autoheader version 2.50 or newer installed."
|
||||
exit 1
|
||||
fi
|
||||
old_IFS=$IFS; IFS='.'; set $ah_version; IFS=$old_IFS
|
||||
if test "$1" = "2" -a "$2" -lt "50" || test "$1" -lt "2"; then
|
||||
echo "buildconf: autoheader version $ah_version found."
|
||||
echo " You need autoheader version 2.50 or newer installed."
|
||||
echo " If you have a sufficient autoheader installed, but it"
|
||||
echo " is not named 'autoheader', then try setting the"
|
||||
echo " AUTOHEADER environment variable."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "buildconf: autoheader version $ah_version (ok)"
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# automake 1.7 or newer
|
||||
#
|
||||
need_automake="1.7"
|
||||
am_version=`${AUTOMAKE:-automake} --version 2>/dev/null|head -n 1| sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//' -e 's/\(.*\)\(-p.*\)/\1/'`
|
||||
if test -z "$am_version"; then
|
||||
echo "buildconf: automake not found."
|
||||
echo " You need automake version $need_automake or newer installed."
|
||||
exit 1
|
||||
fi
|
||||
old_IFS=$IFS; IFS='.'; set $am_version; IFS=$old_IFS
|
||||
if test "$1" = "1" -a "$2" -lt "7" || test "$1" -lt "1"; then
|
||||
echo "buildconf: automake version $am_version found."
|
||||
echo " You need automake version $need_automake or newer installed."
|
||||
echo " If you have a sufficient automake installed, but it"
|
||||
echo " is not named 'automake', then try setting the"
|
||||
echo " AUTOMAKE environment variable."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "buildconf: automake version $am_version (ok)"
|
||||
|
||||
acloc_version=`${ACLOCAL:-aclocal} --version 2>/dev/null|head -n 1| sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//' -e 's/\(.*\)\(-p.*\)/\1/'`
|
||||
if test -z "$acloc_version"; then
|
||||
echo "buildconf: aclocal not found. Weird automake installation!"
|
||||
exit 1
|
||||
fi
|
||||
if test "$acloc_version" = "$am_version"; then
|
||||
echo "buildconf: aclocal version $acloc_version (ok)"
|
||||
else
|
||||
echo "buildconf: aclocal version $acloc_version (ERROR: does not match automake version)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# GNU libtoolize preliminary check
|
||||
#
|
||||
want_lt_major=1
|
||||
want_lt_minor=4
|
||||
want_lt_patch=2
|
||||
want_lt_version=1.4.2
|
||||
|
||||
# This approach that tries 'glibtoolize' first is intended for systems that
|
||||
# have GNU libtool named as 'glibtoolize' and libtoolize not being GNU's.
|
||||
|
||||
libtoolize=`findtool glibtoolize 2>/dev/null`
|
||||
if test ! -x "$libtoolize"; then
|
||||
libtoolize=`findtool ${LIBTOOLIZE:-libtoolize}`
|
||||
fi
|
||||
if test -z "$libtoolize"; then
|
||||
echo "buildconf: libtoolize not found."
|
||||
echo " You need GNU libtoolize $want_lt_version or newer installed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
lt_pver=`$libtoolize --version 2>/dev/null|head -n 1`
|
||||
lt_qver=`echo $lt_pver|sed -e "s/([^)]*)//g" -e "s/^[^0-9]*//g"`
|
||||
lt_version=`echo $lt_qver|sed -e "s/[- ].*//" -e "s/\([a-z]*\)$//"`
|
||||
if test -z "$lt_version"; then
|
||||
echo "buildconf: libtoolize not found."
|
||||
echo " You need GNU libtoolize $want_lt_version or newer installed."
|
||||
exit 1
|
||||
fi
|
||||
old_IFS=$IFS; IFS='.'; set $lt_version; IFS=$old_IFS
|
||||
lt_major=$1
|
||||
lt_minor=$2
|
||||
lt_patch=$3
|
||||
|
||||
if test -z "$lt_major"; then
|
||||
lt_status="bad"
|
||||
elif test "$lt_major" -gt "$want_lt_major"; then
|
||||
lt_status="good"
|
||||
elif test "$lt_major" -lt "$want_lt_major"; then
|
||||
lt_status="bad"
|
||||
elif test -z "$lt_minor"; then
|
||||
lt_status="bad"
|
||||
elif test "$lt_minor" -gt "$want_lt_minor"; then
|
||||
lt_status="good"
|
||||
elif test "$lt_minor" -lt "$want_lt_minor"; then
|
||||
lt_status="bad"
|
||||
elif test -z "$lt_patch"; then
|
||||
lt_status="bad"
|
||||
elif test "$lt_patch" -gt "$want_lt_patch"; then
|
||||
lt_status="good"
|
||||
elif test "$lt_patch" -lt "$want_lt_patch"; then
|
||||
lt_status="bad"
|
||||
else
|
||||
lt_status="good"
|
||||
fi
|
||||
if test "$lt_status" != "good"; then
|
||||
echo "buildconf: libtoolize version $lt_version found."
|
||||
echo " You need GNU libtoolize $want_lt_version or newer installed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "buildconf: libtoolize version $lt_version (ok)"
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# m4 check
|
||||
#
|
||||
m4=`(${M4:-m4} --version || ${M4:-gm4} --version) 2>/dev/null | head -n 1`;
|
||||
m4_version=`echo $m4 | sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//'`
|
||||
|
||||
if { echo $m4 | grep "GNU" >/dev/null 2>&1; } then
|
||||
echo "buildconf: GNU m4 version $m4_version (ok)"
|
||||
else
|
||||
if test -z "$m4"; then
|
||||
echo "buildconf: m4 version not recognized. You need a GNU m4 installed!"
|
||||
else
|
||||
echo "buildconf: m4 version $m4 found. You need a GNU m4 installed!"
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# perl check
|
||||
#
|
||||
PERL=`findtool ${PERL:-perl}`
|
||||
if test -z "$PERL"; then
|
||||
echo "buildconf: perl not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Remove files generated on previous buildconf/configure run.
|
||||
#
|
||||
for fname in .deps \
|
||||
.libs \
|
||||
*.la \
|
||||
*.lo \
|
||||
*.a \
|
||||
*.o \
|
||||
Makefile \
|
||||
Makefile.in \
|
||||
aclocal.m4 \
|
||||
aclocal.m4.bak \
|
||||
ares_build.h \
|
||||
ares_config.h \
|
||||
ares_config.h.in \
|
||||
autom4te.cache \
|
||||
compile \
|
||||
config.guess \
|
||||
curl_config.h \
|
||||
curl_config.h.in \
|
||||
config.log \
|
||||
config.lt \
|
||||
config.status \
|
||||
config.sub \
|
||||
configure \
|
||||
configurehelp.pm \
|
||||
curl-config \
|
||||
curlbuild.h \
|
||||
depcomp \
|
||||
libcares.pc \
|
||||
libcurl.pc \
|
||||
libtool \
|
||||
libtool.m4 \
|
||||
libtool.m4.tmp \
|
||||
ltmain.sh \
|
||||
ltoptions.m4 \
|
||||
ltsugar.m4 \
|
||||
ltversion.m4 \
|
||||
lt~obsolete.m4 \
|
||||
missing \
|
||||
install-sh \
|
||||
stamp-h1 \
|
||||
stamp-h2 \
|
||||
stamp-h3 ; do
|
||||
removethis "$fname"
|
||||
done
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# run the correct scripts now
|
||||
#
|
||||
|
||||
echo "buildconf: running libtoolize"
|
||||
${libtoolize} --copy --force || die "libtoolize command failed"
|
||||
|
||||
# When using libtool 1.5.X (X < 26) we copy libtool.m4 to our local m4
|
||||
# subdirectory and this local copy is patched to fix some warnings that
|
||||
# are triggered when running aclocal and using autoconf 2.62 or later.
|
||||
|
||||
if test "$lt_major" = "1" && test "$lt_minor" = "5"; then
|
||||
if test -z "$lt_patch" || test "$lt_patch" -lt "26"; then
|
||||
echo "buildconf: copying libtool.m4 to local m4 subdir"
|
||||
ac_dir=`${ACLOCAL:-aclocal} --print-ac-dir`
|
||||
if test -f $ac_dir/libtool.m4; then
|
||||
cp -f $ac_dir/libtool.m4 m4/libtool.m4
|
||||
else
|
||||
echo "buildconf: $ac_dir/libtool.m4 not found"
|
||||
fi
|
||||
if test -f m4/libtool.m4; then
|
||||
echo "buildconf: renaming some variables in local m4/libtool.m4"
|
||||
$PERL -i.tmp -pe \
|
||||
's/lt_prog_compiler_pic_works/lt_cv_prog_compiler_pic_works/g; \
|
||||
s/lt_prog_compiler_static_works/lt_cv_prog_compiler_static_works/g;' \
|
||||
m4/libtool.m4
|
||||
rm -f m4/libtool.m4.tmp
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -f m4/libtool.m4; then
|
||||
echo "buildconf: converting all mv to mv -f in local m4/libtool.m4"
|
||||
$PERL -i.tmp -pe 's/\bmv +([^-\s])/mv -f $1/g' m4/libtool.m4
|
||||
rm -f m4/libtool.m4.tmp
|
||||
fi
|
||||
|
||||
echo "buildconf: running aclocal"
|
||||
${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS || die "aclocal command failed"
|
||||
|
||||
echo "buildconf: converting all mv to mv -f in local aclocal.m4"
|
||||
$PERL -i.bak -pe 's/\bmv +([^-\s])/mv -f $1/g' aclocal.m4
|
||||
|
||||
echo "buildconf: running autoheader"
|
||||
${AUTOHEADER:-autoheader} || die "autoheader command failed"
|
||||
|
||||
echo "buildconf: running autoconf"
|
||||
${AUTOCONF:-autoconf} || die "autoconf command failed"
|
||||
|
||||
if test -d ares; then
|
||||
cd ares
|
||||
echo "buildconf: running in ares"
|
||||
./buildconf
|
||||
cd ..
|
||||
fi
|
||||
|
||||
echo "buildconf: running automake"
|
||||
${AUTOMAKE:-automake} --add-missing --copy || die "automake command failed"
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# GNU libtool complementary check
|
||||
#
|
||||
# Depending on the libtool and automake versions being used, config.guess
|
||||
# might not be installed in the subdirectory until automake has finished.
|
||||
# So we can not attempt to use it until this very last buildconf stage.
|
||||
#
|
||||
if test ! -f ./config.guess; then
|
||||
echo "buildconf: config.guess not found"
|
||||
else
|
||||
buildhost=`./config.guess 2>/dev/null|head -n 1`
|
||||
case $buildhost in
|
||||
*-*-darwin*)
|
||||
need_lt_major=1
|
||||
need_lt_minor=5
|
||||
need_lt_patch=26
|
||||
need_lt_check="yes"
|
||||
;;
|
||||
*-*-hpux*)
|
||||
need_lt_major=1
|
||||
need_lt_minor=5
|
||||
need_lt_patch=24
|
||||
need_lt_check="yes"
|
||||
;;
|
||||
esac
|
||||
if test ! -z "$need_lt_check"; then
|
||||
if test -z "$lt_major"; then
|
||||
lt_status="bad"
|
||||
elif test "$lt_major" -gt "$need_lt_major"; then
|
||||
lt_status="good"
|
||||
elif test "$lt_major" -lt "$need_lt_major"; then
|
||||
lt_status="bad"
|
||||
elif test -z "$lt_minor"; then
|
||||
lt_status="bad"
|
||||
elif test "$lt_minor" -gt "$need_lt_minor"; then
|
||||
lt_status="good"
|
||||
elif test "$lt_minor" -lt "$need_lt_minor"; then
|
||||
lt_status="bad"
|
||||
elif test -z "$lt_patch"; then
|
||||
lt_status="bad"
|
||||
elif test "$lt_patch" -gt "$need_lt_patch"; then
|
||||
lt_status="good"
|
||||
elif test "$lt_patch" -lt "$need_lt_patch"; then
|
||||
lt_status="bad"
|
||||
else
|
||||
lt_status="good"
|
||||
fi
|
||||
if test "$lt_status" != "good"; then
|
||||
need_lt_version="$need_lt_major.$need_lt_minor.$need_lt_patch"
|
||||
echo "buildconf: libtool version $lt_version found."
|
||||
echo " $buildhost requires GNU libtool $need_lt_version or newer installed."
|
||||
rm -f configure
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Finished successfully.
|
||||
#
|
||||
echo "buildconf: OK"
|
||||
exit 0
|
||||
automake $MAKEFILES || die "The command 'automake $MAKEFILES' failed"
|
||||
aclocal || die "The command 'aclocal' failed"
|
||||
autoheader || die "The command 'autoheader' failed"
|
||||
autoconf || die "The command 'autoconf' failed"
|
||||
|
350
buildconf.bat
350
buildconf.bat
@ -1,350 +0,0 @@
|
||||
@echo off
|
||||
rem ***************************************************************************
|
||||
rem * _ _ ____ _
|
||||
rem * Project ___| | | | _ \| |
|
||||
rem * / __| | | | |_) | |
|
||||
rem * | (__| |_| | _ <| |___
|
||||
rem * \___|\___/|_| \_\_____|
|
||||
rem *
|
||||
rem * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
rem *
|
||||
rem * This software is licensed as described in the file COPYING, which
|
||||
rem * you should have received as part of this distribution. The terms
|
||||
rem * are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
rem *
|
||||
rem * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
rem * copies of the Software, and permit persons to whom the Software is
|
||||
rem * furnished to do so, under the terms of the COPYING file.
|
||||
rem *
|
||||
rem * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
rem * KIND, either express or implied.
|
||||
rem *
|
||||
rem ***************************************************************************
|
||||
|
||||
rem NOTES
|
||||
rem
|
||||
rem This batch file must be used to set up a git tree to build on systems where
|
||||
rem there is no autotools support (i.e. DOS and Windows).
|
||||
rem
|
||||
|
||||
:begin
|
||||
rem Set our variables
|
||||
if "%OS%" == "Windows_NT" setlocal
|
||||
set MODE=GENERATE
|
||||
|
||||
rem Switch to this batch file's directory
|
||||
cd /d "%~0\.." 1>NUL 2>&1
|
||||
|
||||
rem Check we are running from a curl git repository
|
||||
if not exist GIT-INFO goto norepo
|
||||
|
||||
rem Detect programs. HAVE_<PROGNAME>
|
||||
rem When not found the variable is set undefined. The undefined pattern
|
||||
rem allows for statements like "if not defined HAVE_PERL (command)"
|
||||
groff --version <NUL 1>NUL 2>&1
|
||||
if errorlevel 1 (set HAVE_GROFF=) else (set HAVE_GROFF=Y)
|
||||
nroff --version <NUL 1>NUL 2>&1
|
||||
if errorlevel 1 (set HAVE_NROFF=) else (set HAVE_NROFF=Y)
|
||||
perl --version <NUL 1>NUL 2>&1
|
||||
if errorlevel 1 (set HAVE_PERL=) else (set HAVE_PERL=Y)
|
||||
gzip --version <NUL 1>NUL 2>&1
|
||||
if errorlevel 1 (set HAVE_GZIP=) else (set HAVE_GZIP=Y)
|
||||
|
||||
:parseArgs
|
||||
if "%~1" == "" goto start
|
||||
|
||||
if /i "%~1" == "-clean" (
|
||||
set MODE=CLEAN
|
||||
) else if /i "%~1" == "-?" (
|
||||
goto syntax
|
||||
) else if /i "%~1" == "-h" (
|
||||
goto syntax
|
||||
) else if /i "%~1" == "-help" (
|
||||
goto syntax
|
||||
) else (
|
||||
goto unknown
|
||||
)
|
||||
|
||||
shift & goto parseArgs
|
||||
|
||||
:start
|
||||
if "%MODE%" == "GENERATE" (
|
||||
echo.
|
||||
echo Generating prerequisite files
|
||||
|
||||
call :generate
|
||||
if errorlevel 4 goto nogencurlbuild
|
||||
if errorlevel 3 goto nogenhugehelp
|
||||
if errorlevel 2 goto nogenmakefile
|
||||
if errorlevel 1 goto warning
|
||||
|
||||
) else (
|
||||
echo.
|
||||
echo Removing prerequisite files
|
||||
|
||||
call :clean
|
||||
if errorlevel 3 goto nocleancurlbuild
|
||||
if errorlevel 2 goto nocleanhugehelp
|
||||
if errorlevel 1 goto nocleanmakefile
|
||||
)
|
||||
|
||||
goto success
|
||||
|
||||
rem Main generate function.
|
||||
rem
|
||||
rem Returns:
|
||||
rem
|
||||
rem 0 - success
|
||||
rem 1 - success with simplified tool_hugehelp.c
|
||||
rem 2 - failed to generate Makefile
|
||||
rem 3 - failed to generate tool_hugehelp.c
|
||||
rem 4 - failed to generate curlbuild.h
|
||||
rem
|
||||
:generate
|
||||
if "%OS%" == "Windows_NT" setlocal
|
||||
set BASIC_HUGEHELP=0
|
||||
|
||||
rem Create Makefile
|
||||
echo * %CD%\Makefile
|
||||
if exist Makefile.dist (
|
||||
copy /Y Makefile.dist Makefile 1>NUL 2>&1
|
||||
if errorlevel 1 (
|
||||
if "%OS%" == "Windows_NT" endlocal
|
||||
exit /B 2
|
||||
)
|
||||
)
|
||||
|
||||
rem Create tool_hugehelp.c
|
||||
echo * %CD%\src\tool_hugehelp.c
|
||||
call :genHugeHelp
|
||||
if errorlevel 2 (
|
||||
if "%OS%" == "Windows_NT" endlocal
|
||||
exit /B 3
|
||||
)
|
||||
if errorlevel 1 (
|
||||
set BASIC_HUGEHELP=1
|
||||
)
|
||||
cmd /c exit 0
|
||||
|
||||
rem Create curlbuild.h
|
||||
echo * %CD%\include\curl\curlbuild.h
|
||||
if exist include\curl\curlbuild.h.dist (
|
||||
copy /Y include\curl\curlbuild.h.dist include\curl\curlbuild.h 1>NUL 2>&1
|
||||
if errorlevel 1 (
|
||||
if "%OS%" == "Windows_NT" endlocal
|
||||
exit /B 4
|
||||
)
|
||||
)
|
||||
|
||||
rem Setup c-ares git tree
|
||||
if exist ares\buildconf.bat (
|
||||
echo.
|
||||
echo Configuring c-ares build environment
|
||||
cd ares
|
||||
call buildconf.bat
|
||||
cd ..
|
||||
)
|
||||
|
||||
if "%BASIC_HUGEHELP%" == "1" (
|
||||
if "%OS%" == "Windows_NT" endlocal
|
||||
exit /B 1
|
||||
)
|
||||
|
||||
if "%OS%" == "Windows_NT" endlocal
|
||||
exit /B 0
|
||||
|
||||
rem Main clean function.
|
||||
rem
|
||||
rem Returns:
|
||||
rem
|
||||
rem 0 - success
|
||||
rem 1 - failed to clean Makefile
|
||||
rem 2 - failed to clean tool_hugehelp.c
|
||||
rem 3 - failed to clean curlbuild.h
|
||||
rem
|
||||
:clean
|
||||
rem Remove Makefile
|
||||
echo * %CD%\Makefile
|
||||
if exist Makefile (
|
||||
del Makefile 2>NUL
|
||||
if exist Makefile (
|
||||
exit /B 1
|
||||
)
|
||||
)
|
||||
|
||||
rem Remove tool_hugehelp.c
|
||||
echo * %CD%\src\tool_hugehelp.c
|
||||
if exist src\tool_hugehelp.c (
|
||||
del src\tool_hugehelp.c 2>NUL
|
||||
if exist src\tool_hugehelp.c (
|
||||
exit /B 2
|
||||
)
|
||||
)
|
||||
|
||||
rem Remove curlbuild.h
|
||||
echo * %CD%\include\curl\curlbuild.h
|
||||
if exist include\curl\curlbuild.h (
|
||||
del include\curl\curlbuild.h 2>NUL
|
||||
if exist include\curl\curlbuild.h (
|
||||
exit /B 3
|
||||
)
|
||||
)
|
||||
|
||||
exit /B
|
||||
|
||||
rem Function to generate src\tool_hugehelp.c
|
||||
rem
|
||||
rem Returns:
|
||||
rem
|
||||
rem 0 - full tool_hugehelp.c generated
|
||||
rem 1 - simplified tool_hugehelp.c
|
||||
rem 2 - failure
|
||||
rem
|
||||
:genHugeHelp
|
||||
if "%OS%" == "Windows_NT" setlocal
|
||||
set LC_ALL=C
|
||||
set ROFFCMD=
|
||||
set BASIC=1
|
||||
|
||||
if defined HAVE_PERL (
|
||||
if defined HAVE_GROFF (
|
||||
set ROFFCMD=groff -mtty-char -Tascii -P-c -man
|
||||
) else if defined HAVE_NROFF (
|
||||
set ROFFCMD=nroff -c -Tascii -man
|
||||
)
|
||||
)
|
||||
|
||||
if defined ROFFCMD (
|
||||
echo #include "tool_setup.h"> src\tool_hugehelp.c
|
||||
echo #include "tool_hugehelp.h">> src\tool_hugehelp.c
|
||||
|
||||
if defined HAVE_GZIP (
|
||||
echo #ifndef HAVE_LIBZ>> src\tool_hugehelp.c
|
||||
)
|
||||
|
||||
%ROFFCMD% docs\curl.1 2>NUL | perl src\mkhelp.pl docs\MANUAL >> src\tool_hugehelp.c
|
||||
if defined HAVE_GZIP (
|
||||
echo #else>> src\tool_hugehelp.c
|
||||
%ROFFCMD% docs\curl.1 2>NUL | perl src\mkhelp.pl -c docs\MANUAL >> src\tool_hugehelp.c
|
||||
echo #endif /^* HAVE_LIBZ ^*/>> src\tool_hugehelp.c
|
||||
)
|
||||
|
||||
set BASIC=0
|
||||
) else (
|
||||
if exist src\tool_hugehelp.c.cvs (
|
||||
copy /Y src\tool_hugehelp.c.cvs src\tool_hugehelp.c 1>NUL 2>&1
|
||||
) else (
|
||||
echo #include "tool_setup.h"> src\tool_hugehelp.c
|
||||
echo #include "tool_hugehelp.hd">> src\tool_hugehelp.c
|
||||
echo.>> src\tool_hugehelp.c
|
||||
echo void hugehelp(void^)>> src\tool_hugehelp.c
|
||||
echo {>> src\tool_hugehelp.c
|
||||
echo #ifdef USE_MANUAL>> src\tool_hugehelp.c
|
||||
echo fputs("Built-in manual not included\n", stdout^);>> src\tool_hugehelp.c
|
||||
echo #endif>> src\tool_hugehelp.c
|
||||
echo }>> src\tool_hugehelp.c
|
||||
)
|
||||
)
|
||||
|
||||
findstr "/C:void hugehelp(void)" src\tool_hugehelp.c 1>NUL 2>&1
|
||||
if errorlevel 1 (
|
||||
if "%OS%" == "Windows_NT" endlocal
|
||||
exit /B 2
|
||||
)
|
||||
|
||||
if "%BASIC%" == "1" (
|
||||
if "%OS%" == "Windows_NT" endlocal
|
||||
exit /B 1
|
||||
)
|
||||
|
||||
if "%OS%" == "Windows_NT" endlocal
|
||||
exit /B 0
|
||||
|
||||
rem Function to clean-up local variables under DOS, Windows 3.x and
|
||||
rem Windows 9x as setlocal isn't available until Windows NT
|
||||
rem
|
||||
:dosCleanup
|
||||
set MODE=
|
||||
set HAVE_GROFF=
|
||||
set HAVE_NROFF=
|
||||
set HAVE_PERL=
|
||||
set HAVE_GZIP=
|
||||
set BASIC_HUGEHELP=
|
||||
set LC_ALL
|
||||
set ROFFCMD=
|
||||
set BASIC=
|
||||
|
||||
exit /B
|
||||
|
||||
:syntax
|
||||
rem Display the help
|
||||
echo.
|
||||
echo Usage: buildconf [-clean]
|
||||
echo.
|
||||
echo -clean - Removes the files
|
||||
goto error
|
||||
|
||||
:unknown
|
||||
echo.
|
||||
echo Error: Unknown argument '%1'
|
||||
goto error
|
||||
|
||||
:norepo
|
||||
echo.
|
||||
echo Error: This batch file should only be used with a curl git repository
|
||||
goto error
|
||||
|
||||
:nogenmakefile
|
||||
echo.
|
||||
echo Error: Unable to generate Makefile
|
||||
goto error
|
||||
|
||||
:nogenhugehelp
|
||||
echo.
|
||||
echo Error: Unable to generate src\tool_hugehelp.c
|
||||
goto error
|
||||
|
||||
:nogencurlbuild
|
||||
echo.
|
||||
echo Error: Unable to generate include\curl\curlbuild.h
|
||||
goto error
|
||||
|
||||
:nocleanmakefile
|
||||
echo.
|
||||
echo Error: Unable to clean Makefile
|
||||
goto error
|
||||
|
||||
:nocleanhugehelp
|
||||
echo.
|
||||
echo Error: Unable to clean src\tool_hugehelp.c
|
||||
goto error
|
||||
|
||||
:nocleancurlbuild
|
||||
echo.
|
||||
echo Error: Unable to clean include\curl\curlbuild.h
|
||||
goto error
|
||||
|
||||
:warning
|
||||
echo.
|
||||
echo Warning: The curl manual could not be integrated in the source. This means when
|
||||
echo you build curl the manual will not be available (curl --man^). Integration of
|
||||
echo the manual is not required and a summary of the options will still be available
|
||||
echo (curl --help^). To integrate the manual your PATH is required to have
|
||||
echo groff/nroff, perl and optionally gzip for compression.
|
||||
goto success
|
||||
|
||||
:error
|
||||
if "%OS%" == "Windows_NT" (
|
||||
endlocal
|
||||
) else (
|
||||
call :dosCleanup
|
||||
)
|
||||
exit /B 1
|
||||
|
||||
:success
|
||||
if "%OS%" == "Windows_NT" (
|
||||
endlocal
|
||||
) else (
|
||||
call :dosCleanup
|
||||
)
|
||||
exit /B 0
|
25
config-riscos.h
Normal file
25
config-riscos.h
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
#define socklen_t int
|
||||
|
||||
#define HAVE_SYS_SOCKET_H
|
||||
#define HAVE_ARPA_INET_H
|
||||
#define HAVE_SYS_SELECT_H
|
||||
#define HAVE_FCNTL_H
|
||||
#define HAVE_GETTIMEOFDAY
|
||||
|
||||
#define HAVE_SELECT
|
||||
#define HAVE_SOCKET
|
||||
#define ifr_dstaddr ifr_addr
|
||||
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <sys/if.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
|
||||
#define ioctl(a,b,c,d) (ioctl(a,b,c) * (d==d))
|
||||
|
||||
|
||||
#define OS "RISC OS"
|
367
config-vms.h
Executable file
367
config-vms.h
Executable file
@ -0,0 +1,367 @@
|
||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
/* Define if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
#ifndef _ALL_SOURCE
|
||||
#undef _ALL_SOURCE
|
||||
#endif
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
#undef const
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
#undef size_t
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Define cpu-machine-OS */
|
||||
#define OS "ALPHA-COMPAQ-VMS"
|
||||
|
||||
/* Define if you have the gethostbyaddr_r() function with 5 arguments */
|
||||
#undef HAVE_GETHOSTBYADDR_R_5
|
||||
|
||||
/* Define if you have the gethostbyaddr_r() function with 7 arguments */
|
||||
#undef HAVE_GETHOSTBYADDR_R_7
|
||||
|
||||
/* Define if you have the gethostbyaddr_r() function with 8 arguments */
|
||||
#undef HAVE_GETHOSTBYADDR_R_8
|
||||
|
||||
/* Define if you have the gethostbyname_r() function with 3 arguments */
|
||||
#undef HAVE_GETHOSTBYNAME_R_3
|
||||
|
||||
/* Define if you have the gethostbyname_r() function with 5 arguments */
|
||||
#undef HAVE_GETHOSTBYNAME_R_5
|
||||
|
||||
/* Define if you have the gethostbyname_r() function with 6 arguments */
|
||||
#undef HAVE_GETHOSTBYNAME_R_6
|
||||
|
||||
/* Define if you have the inet_ntoa_r function declared. */
|
||||
#undef HAVE_INET_NTOA_R_DECL
|
||||
|
||||
/* Define if you need the _REENTRANT define for some functions */
|
||||
#undef NEED_REENTRANT
|
||||
|
||||
/* Define if you have the Kerberos4 libraries (including -ldes) */
|
||||
#undef KRB4
|
||||
|
||||
/* Define this to 'int' if ssize_t is not an available typedefed type */
|
||||
#undef ssize_t
|
||||
|
||||
/* Define this to 'int' if socklen_t is not an available typedefed type */
|
||||
#define socklen_t size_t
|
||||
|
||||
/* Define this as a suitable file to read random data from */
|
||||
#undef RANDOM_FILE
|
||||
|
||||
/* Define this to your Entropy Gathering Daemon socket pathname */
|
||||
#undef EGD_SOCKET
|
||||
|
||||
/* The number of bytes in a long double. */
|
||||
#define SIZEOF_LONG_DOUBLE 8
|
||||
|
||||
/* The number of bytes in a long long. */
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
|
||||
/* Define if you have the RAND_egd function. */
|
||||
#undef HAVE_RAND_EGD
|
||||
|
||||
/* Define if you have the RAND_screen function. */
|
||||
#undef HAVE_RAND_SCREEN
|
||||
|
||||
/* Define if you have the RAND_status function. */
|
||||
#undef HAVE_RAND_STATUS
|
||||
|
||||
/* Define if you have the closesocket function. */
|
||||
#undef HAVE_CLOSESOCKET
|
||||
|
||||
/* Define if you have the geteuid function. */
|
||||
#define HAVE_GETEUID 1
|
||||
|
||||
/* Define if you have the gethostbyaddr function. */
|
||||
#define HAVE_GETHOSTBYADDR 1
|
||||
|
||||
/* Define if you have the gethostbyaddr_r function. */
|
||||
#undef HAVE_GETHOSTBYADDR_R
|
||||
|
||||
/* Define if you have the gethostbyname_r function. */
|
||||
#undef HAVE_GETHOSTBYNAME_R
|
||||
|
||||
/* Define if you have the gethostname function. */
|
||||
#define HAVE_GETHOSTNAME 1
|
||||
|
||||
/* Define if you have the getpass_r function. */
|
||||
#undef HAVE_GETPASS_R
|
||||
|
||||
/* Define if you have the getpwuid function. */
|
||||
#define HAVE_GETPWUID 1
|
||||
|
||||
/* Define if you have the getservbyname function. */
|
||||
#define HAVE_GETSERVBYNAME 1
|
||||
|
||||
/* Define if you have the gettimeofday function. */
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
|
||||
/* Define if you have the inet_addr function. */
|
||||
#define HAVE_INET_ADDR 1
|
||||
|
||||
/* Define if you have the inet_ntoa function. */
|
||||
#define HAVE_INET_NTOA 1
|
||||
|
||||
/* Define if you have the inet_ntoa_r function. */
|
||||
#undef HAVE_INET_NTOA_R
|
||||
|
||||
/* Define if you have the krb_get_our_ip_for_realm function. */
|
||||
#undef HAVE_KRB_GET_OUR_IP_FOR_REALM
|
||||
|
||||
/* Define if you have the localtime_r function. */
|
||||
#undef HAVE_LOCALTIME_R
|
||||
|
||||
/* Define if you have the perror function. */
|
||||
#define HAVE_PERROR 1
|
||||
|
||||
/* Define if you have the select function. */
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* Define if you have the setvbuf function. */
|
||||
#undef HAVE_SETVBUF
|
||||
|
||||
/* Define if you have the sigaction function. */
|
||||
#define HAVE_SIGACTION 1
|
||||
|
||||
/* Define if you have the signal function. */
|
||||
#define HAVE_SIGNAL 1
|
||||
|
||||
/* Define if you have the socket function. */
|
||||
#define HAVE_SOCKET 1
|
||||
|
||||
/* Define if you have the strcasecmp function. */
|
||||
#define HAVE_STRCASECMP 1
|
||||
|
||||
/* Define if you have the strcmpi function. */
|
||||
#define HAVE_STRCMPI 1
|
||||
|
||||
/* Define if you have the strdup function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define if you have the strftime function. */
|
||||
#define HAVE_STRFTIME 1
|
||||
|
||||
/* Define if you have the stricmp function. */
|
||||
#define HAVE_STRICMP 1
|
||||
|
||||
/* Define if you have the strlcat function. */
|
||||
#undef HAVE_STRLCAT
|
||||
|
||||
/* Define if you have the strlcpy function. */
|
||||
#undef HAVE_STRLCPY
|
||||
|
||||
/* Define if you have the strstr function. */
|
||||
#define HAVE_STRSTR 1
|
||||
|
||||
/* Define if you have the tcgetattr function. */
|
||||
#undef HAVE_TCGETATTR
|
||||
|
||||
/* Define if you have the tcsetattr function. */
|
||||
#undef HAVE_TCSETATTR
|
||||
|
||||
/* Define if you have the uname function. */
|
||||
#define HAVE_UNAME 1
|
||||
|
||||
/* Define if you have the <alloca.h> header file. */
|
||||
#undef HAVE_ALLOCA_H
|
||||
|
||||
/* Define if you have the <arpa/inet.h> header file. */
|
||||
#undef HAVE_ARPA_INET_H
|
||||
|
||||
/* Define if you have the <crypto.h> header file. */
|
||||
#undef HAVE_CRYPTO_H
|
||||
|
||||
/* Define if you have the <des.h> header file. */
|
||||
#undef HAVE_DES_H
|
||||
|
||||
/* Define if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define if you have the <err.h> header file. */
|
||||
#define HAVE_ERR_H 1
|
||||
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define if you have the <getopt.h> header file. */
|
||||
#define HAVE_GETOPT_H 1
|
||||
|
||||
/* Define if you have the <io.h> header file. */
|
||||
#undef HAVE_IO_H
|
||||
|
||||
/* Define if you have the <krb.h> header file. */
|
||||
#undef HAVE_KRB_H
|
||||
|
||||
/* Define if you have the <malloc.h> header file. */
|
||||
#define HAVE_MALLOC_H 1
|
||||
|
||||
/* Define if you have the <net/if.h> header file. */
|
||||
#define HAVE_NET_IF_H 1
|
||||
|
||||
/* Define if you have the <netdb.h> header file. */
|
||||
#define HAVE_NETDB_H 1
|
||||
|
||||
/* Define if you have the <netinet/if_ether.h> header file. */
|
||||
#define HAVE_NETINET_IF_ETHER_H 1
|
||||
|
||||
/* Define if you have the <netinet/in.h> header file. */
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
|
||||
/* Define if you have the <openssl/crypto.h> header file. */
|
||||
#undef HAVE_OPENSSL_CRYPTO_H
|
||||
|
||||
/* Define if you have the <openssl/err.h> header file. */
|
||||
#undef HAVE_OPENSSL_ERR_H
|
||||
|
||||
/* Define if you have the <openssl/pem.h> header file. */
|
||||
#undef HAVE_OPENSSL_PEM_H
|
||||
|
||||
/* Define if you have the <openssl/rsa.h> header file. */
|
||||
#undef HAVE_OPENSSL_RSA_H
|
||||
|
||||
/* Define if you have the <openssl/ssl.h> header file. */
|
||||
#undef HAVE_OPENSSL_SSL_H
|
||||
|
||||
/* Define if you have the <openssl/x509.h> header file. */
|
||||
#undef HAVE_OPENSSL_X509_H
|
||||
|
||||
/* Define if you have the <pem.h> header file. */
|
||||
#undef HAVE_PEM_H
|
||||
|
||||
/* Define if you have the <pwd.h> header file. */
|
||||
#define HAVE_PWD_H 1
|
||||
|
||||
/* Define if you have the <rsa.h> header file. */
|
||||
#undef HAVE_RSA_H
|
||||
|
||||
/* Define if you have the <sgtty.h> header file. */
|
||||
#define HAVE_SGTTY_H 1
|
||||
|
||||
/* Define if you have the <ssl.h> header file. */
|
||||
#undef HAVE_SSL_H
|
||||
|
||||
/* Define if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define if you have the <sys/param.h> header file. */
|
||||
#undef HAVE_SYS_PARAM_H
|
||||
|
||||
/* Define if you have the <sys/select.h> header file. */
|
||||
#undef HAVE_SYS_SELECT_H
|
||||
|
||||
/* Define if you have the <sys/socket.h> header file. */
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
|
||||
/* Define if you have the <sys/sockio.h> header file. */
|
||||
#undef HAVE_SYS_SOCKIO_H
|
||||
|
||||
/* Define if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define if you have the <termio.h> header file. */
|
||||
#undef HAVE_TERMIO_H
|
||||
|
||||
/* Define if you have the <termios.h> header file. */
|
||||
#define HAVE_TERMIOS_H 1
|
||||
|
||||
/* Define if you have the <time.h> header file. */
|
||||
#define HAVE_TIME_H 1
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define if you have the <winsock.h> header file. */
|
||||
#undef HAVE_WINSOCK_H
|
||||
|
||||
/* Define if you have the <x509.h> header file. */
|
||||
#undef HAVE_X509_H
|
||||
|
||||
/* Define if you have the crypto library (-lcrypto). */
|
||||
#undef HAVE_LIBCRYPTO
|
||||
|
||||
/* Define if you have the dl library (-ldl). */
|
||||
#undef HAVE_LIBDL
|
||||
|
||||
/* Define if you have the nsl library (-lnsl). */
|
||||
#undef HAVE_LIBNSL
|
||||
|
||||
/* Define if you have the resolv library (-lresolv). */
|
||||
#define HAVE_LIBRESOLV 1
|
||||
|
||||
/* Define if you have the resolve library (-lresolve). */
|
||||
#undef HAVE_LIBRESOLVE
|
||||
|
||||
/* Define if you have the socket library (-lsocket). */
|
||||
#define HAVE_LIBSOCKET 1
|
||||
|
||||
/* Define if you have the ssl library (-lssl). */
|
||||
#undef HAVE_LIBSSL
|
||||
|
||||
/* Define if you have the ucb library (-lucb). */
|
||||
#undef HAVE_LIBUCB
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#undef _FILE_OFFSET_BITS
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
#undef _LARGE_FILES
|
||||
|
||||
/* Define if getaddrinfo exists and works */
|
||||
#define HAVE_GETADDRINFO 1
|
||||
|
||||
/* Define if you want to enable IPv6 support */
|
||||
#undef ENABLE_IPV6
|
||||
|
||||
/* Set to explicitly specify we don't want to use thread-safe functions */
|
||||
#undef DISABLED_THREADSAFE
|
||||
|
||||
#define HAVE_TIMEVAL_H 1
|
||||
|
||||
/* Name of this package! */
|
||||
#define PACKAGE "not-used"
|
||||
|
||||
/* Version number of this archive. */
|
||||
#define VERSION "not-used"
|
||||
|
||||
/* Define if you have the getpass function. */
|
||||
#undef HAVE_GETPASS
|
||||
|
||||
/* Define if you have a working OpenSSL installation */
|
||||
#undef OPENSSL_ENABLED
|
||||
|
||||
/* Define if you have the `dlopen' function. */
|
||||
#undef HAVE_DLOPEN
|
||||
|
||||
/* Define if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define if you have the `strtok_r' function. */
|
||||
#undef HAVE_STRTOK_R
|
||||
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
215
config-win32.h
Normal file
215
config-win32.h
Normal file
@ -0,0 +1,215 @@
|
||||
/* config.h. Generated automatically by configure. */
|
||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
/* Define if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
#ifndef _ALL_SOURCE
|
||||
/* #undef _ALL_SOURCE */
|
||||
#endif
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define if you don't have vprintf but do have _doprnt. */
|
||||
/* #undef HAVE_DOPRNT */
|
||||
|
||||
/* Define if you have the vprintf function. */
|
||||
#define HAVE_VPRINTF 1
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
/*#define RETSIGTYPE void */
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* Define this to 'int' if ssize_t is not an available typedefed type */
|
||||
#define ssize_t int
|
||||
|
||||
/* Define this to 'int' if socklen_t is not an available typedefed type */
|
||||
#define socklen_t int
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
||||
/* #define TIME_WITH_SYS_TIME 1 */
|
||||
|
||||
/* Define cpu-machine-OS */
|
||||
#define OS "win32"
|
||||
|
||||
/* The number of bytes in a long double. */
|
||||
#define SIZEOF_LONG_DOUBLE 16
|
||||
|
||||
/* The number of bytes in a long long. */
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
|
||||
/* Define if you have the gethostbyaddr function. */
|
||||
#define HAVE_GETHOSTBYADDR 1
|
||||
|
||||
/* Define if you have the gethostname function. */
|
||||
#define HAVE_GETHOSTNAME 1
|
||||
|
||||
/* Define if you have the getpass function. */
|
||||
/*#define HAVE_GETPASS 1*/
|
||||
|
||||
/* Define if you have the getservbyname function. */
|
||||
#define HAVE_GETSERVBYNAME 1
|
||||
|
||||
/* Define if you have the gettimeofday function. */
|
||||
/* #define HAVE_GETTIMEOFDAY 1 */
|
||||
|
||||
/* Define if you have the inet_addr function. */
|
||||
#define HAVE_INET_ADDR 1
|
||||
|
||||
/* Define if you have the inet_ntoa function. */
|
||||
#define HAVE_INET_NTOA 1
|
||||
|
||||
/* Define if you have the perror function. */
|
||||
#define HAVE_PERROR 1
|
||||
|
||||
/* Define if you have the select function. */
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* Define if you have the socket function. */
|
||||
#define HAVE_SOCKET 1
|
||||
|
||||
/* Define if you have the strcasecmp function. */
|
||||
/*#define HAVE_STRCASECMP 1*/
|
||||
|
||||
/* Define if you have the stricmp function. */
|
||||
#define HAVE_STRICMP 1
|
||||
|
||||
/* Define if you have the strdup function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define if you have the strftime function. */
|
||||
#define HAVE_STRFTIME 1
|
||||
|
||||
/* Define if you have the strstr function. */
|
||||
#define HAVE_STRSTR 1
|
||||
|
||||
/* Define if you have the tcgetattr function. */
|
||||
/*#define HAVE_TCGETATTR 1*/
|
||||
|
||||
/* Define if you have the tcsetattr function. */
|
||||
/*#define HAVE_TCSETATTR 1*/
|
||||
|
||||
/* Define if you have the uname function. */
|
||||
/*#define HAVE_UNAME 1*/
|
||||
|
||||
/* Define if you have the <alloca.h> header file. */
|
||||
/*#define HAVE_ALLOCA_H 1*/
|
||||
|
||||
/* Define if you have the malloc.h file. */
|
||||
#define HAVE_MALLOC_H 1
|
||||
|
||||
/* Define if you have the <arpa/inet.h> header file. */
|
||||
#define HAVE_ARPA_INET_H 1
|
||||
|
||||
/* Define if you have the <crypto.h> header file. */
|
||||
/* #undef HAVE_CRYPTO_H */
|
||||
|
||||
/* Define if you have the <dlfcn.h> header file. */
|
||||
/*#define HAVE_DLFCN_H 1*/
|
||||
|
||||
/* Define if you have the <err.h> header file. */
|
||||
/* #undef HAVE_ERR_H */
|
||||
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define if you have the <getopt.h> header file. */
|
||||
/* #undef HAVE_GETOPT_H */
|
||||
|
||||
/* Define if you have the <netdb.h> header file. */
|
||||
#define HAVE_NETDB_H 1
|
||||
|
||||
/* Define if you have the <netinet/in.h> header file. */
|
||||
/*#define HAVE_NETINET_IN_H 1*/
|
||||
|
||||
/* Define if you have the <sgtty.h> header file. */
|
||||
/*#define HAVE_SGTTY_H 1*/
|
||||
|
||||
/* Define if you have the <ssl.h> header file. */
|
||||
/* #undef HAVE_SSL_H */
|
||||
|
||||
/* Define if you have the <sys/param.h> header file. */
|
||||
/*#define HAVE_SYS_PARAM_H 1*/
|
||||
|
||||
/* Define if you have the <sys/select.h> header file. */
|
||||
/* #define HAVE_SYS_SELECT_H 1 */
|
||||
|
||||
/* Define if you have the <sys/socket.h> header file. */
|
||||
/*#define HAVE_SYS_SOCKET_H 1*/
|
||||
|
||||
/* Define if you have the <sys/sockio.h> header file. */
|
||||
#define HAVE_SYS_SOCKIO_H 1
|
||||
|
||||
/* Define if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define if you have the <termio.h> header file. */
|
||||
#define HAVE_TERMIO_H 1
|
||||
|
||||
/* Define if you have the <termios.h> header file. */
|
||||
#define HAVE_TERMIOS_H 1
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "curl"
|
||||
|
||||
/* Define if you have the <io.h> header file. */
|
||||
#define HAVE_IO_H 1
|
||||
|
||||
/* Define if you have the <time.h> header file. */
|
||||
#define HAVE_TIME_H 1
|
||||
|
||||
/* Define if you have the <winsock.h> header file. */
|
||||
#define HAVE_WINSOCK_H 1
|
||||
|
||||
/* Define if you have the closesocket function. */
|
||||
#define HAVE_CLOSESOCKET 1
|
||||
|
||||
/* Define if you have the setvbuf function. */
|
||||
#define HAVE_SETVBUF 1
|
||||
|
||||
/* Define if you have the RAND_screen function when using SSL */
|
||||
#define HAVE_RAND_SCREEN 1
|
||||
|
||||
/*************************************************
|
||||
* This section is for compiler specific defines.*
|
||||
*************************************************/
|
||||
#ifdef MINGW32 /* Borland and MS don't have this */
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
#endif
|
||||
|
||||
/**************************************************
|
||||
*This is to eliminate the warnings when compiled *
|
||||
* using MS VC++ compiler *
|
||||
**************************************************/
|
||||
#ifdef _MSC_VER
|
||||
|
||||
#pragma warning (disable: 4244) /* truncation from 'const int' to 'char' */
|
||||
#pragma warning (disable: 4127) /* conditional expression is constant */
|
||||
#pragma warning (disable: 4706) /* assignment within conditional expression */
|
||||
#pragma warning (disable: 4761) /* integral size mismatch in argument */
|
||||
#pragma warning (disable: 4101) /* unreferenced local variable */
|
||||
#pragma warning (disable: 4131) /* uses old-style declarator */
|
||||
#pragma warning (disable: 4057) /* const char *' differs in indirection to
|
||||
slightly different base types from
|
||||
'unsigned char [x] */
|
||||
#pragma warning (disable: 4100) /* unreferenced formal parameter */
|
||||
#pragma warning (disable: 4055) /* type cast' : from data pointer 'void *' to
|
||||
function pointer
|
||||
'void *(__cdecl *)(char *,int ) */
|
||||
#pragma warning (disable: 4701) /* local variable may be used without having
|
||||
been initialized */
|
||||
#pragma warning (disable: 4715) /* ToHour' : not all control paths return a
|
||||
value */
|
||||
#endif
|
1317
config.guess
vendored
Executable file
1317
config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1411
config.sub
vendored
Executable file
1411
config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
3916
configure.ac
3916
configure.ac
File diff suppressed because it is too large
Load Diff
582
configure.in
Normal file
582
configure.in
Normal file
@ -0,0 +1,582 @@
|
||||
dnl $Id$
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT
|
||||
AC_CONFIG_SRCDIR([lib/urldata.h])
|
||||
AM_CONFIG_HEADER(config.h src/config.h)
|
||||
|
||||
VERSION=`sed -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curl.h`
|
||||
AM_INIT_AUTOMAKE(curl,$VERSION)
|
||||
|
||||
dnl
|
||||
dnl we extract the numerical version for curl-config only
|
||||
VERSIONNUM=`sed -ne 's/^#define LIBCURL_VERSION_NUM 0x\(.*\)/\1/p' ${srcdir}/include/curl/curl.h`
|
||||
AC_SUBST(VERSIONNUM)
|
||||
|
||||
dnl Solaris pkgadd support definitions
|
||||
PKGADD_PKG="HAXXcurl"
|
||||
PKGADD_NAME="cURL - a client that groks URLs"
|
||||
PKGADD_VENDOR="curl.haxx.se"
|
||||
AC_SUBST(PKGADD_PKG)
|
||||
AC_SUBST(PKGADD_NAME)
|
||||
AC_SUBST(PKGADD_VENDOR)
|
||||
|
||||
|
||||
dnl
|
||||
dnl Detect the canonical host and target build environment
|
||||
dnl
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
dnl Get system canonical name
|
||||
AC_DEFINE_UNQUOTED(OS, "${host}")
|
||||
|
||||
dnl Check for AIX weirdos
|
||||
AC_AIX
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
|
||||
dnl check for how to do large files
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
dnl The install stuff has already been taken care of by the automake stuff
|
||||
dnl AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
dnl ************************************************************
|
||||
dnl lame option to switch on debug options
|
||||
dnl
|
||||
AC_MSG_CHECKING([whether to enable debug options])
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug Enable pedantic debug options
|
||||
--disable-debug Disable debug options],
|
||||
[ case "$enableval" in
|
||||
no)
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
*) AC_MSG_RESULT(yes)
|
||||
|
||||
CPPFLAGS="$CPPFLAGS -DMALLOCDEBUG"
|
||||
CFLAGS="-W -Wall -Wwrite-strings -pedantic -g"
|
||||
;;
|
||||
esac ],
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Checks for IPv6
|
||||
dnl **********************************************************************
|
||||
|
||||
AC_MSG_CHECKING([whether to enable ipv6])
|
||||
AC_ARG_ENABLE(ipv6,
|
||||
[ --enable-ipv6 Enable ipv6 (with ipv4) support
|
||||
--disable-ipv6 Disable ipv6 support],
|
||||
[ case "$enableval" in
|
||||
no)
|
||||
AC_MSG_RESULT(no)
|
||||
ipv6=no
|
||||
;;
|
||||
*) AC_MSG_RESULT(yes)
|
||||
ipv6=yes
|
||||
;;
|
||||
esac ],
|
||||
|
||||
AC_TRY_RUN([ /* is AF_INET6 available? */
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
main()
|
||||
{
|
||||
if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
|
||||
exit(1);
|
||||
else
|
||||
exit(0);
|
||||
}
|
||||
],
|
||||
AC_MSG_RESULT(yes)
|
||||
ipv6=yes,
|
||||
AC_MSG_RESULT(no)
|
||||
ipv6=no,
|
||||
AC_MSG_RESULT(no)
|
||||
ipv6=no
|
||||
))
|
||||
|
||||
if test "$ipv6" = "yes"; then
|
||||
CURL_CHECK_WORKING_GETADDRINFO
|
||||
fi
|
||||
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Checks for libraries.
|
||||
dnl **********************************************************************
|
||||
|
||||
dnl gethostbyname in the nsl lib?
|
||||
AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname))
|
||||
|
||||
if test "$ac_cv_lib_nsl_gethostbyname" != "yes" -a "$ac_cv_func_gethostbyname" != "yes"; then
|
||||
dnl gethostbyname in the socket lib?
|
||||
AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(socket, gethostbyname))
|
||||
fi
|
||||
|
||||
dnl At least one system has been identified to require BOTH nsl and
|
||||
dnl socket libs to link properly.
|
||||
if test "$ac_cv_lib_nsl_gethostbyname" = "$ac_cv_func_gethostbyname"; then
|
||||
AC_MSG_CHECKING([trying both nsl and socket libs])
|
||||
my_ac_save_LIBS=$LIBS
|
||||
LIBS="-lnsl -lsocket $LIBS"
|
||||
AC_TRY_LINK( ,
|
||||
[gethostbyname();],
|
||||
my_ac_link_result=success,
|
||||
my_ac_link_result=failure )
|
||||
|
||||
if test "$my_ac_link_result" = "failure"; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([couldn't find libraries for gethostbyname()])
|
||||
dnl restore LIBS
|
||||
LIBS=$my_ac_save_LIBS
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl resolve lib?
|
||||
AC_CHECK_FUNC(strcasecmp, , AC_CHECK_LIB(resolve, strcasecmp))
|
||||
|
||||
if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then
|
||||
AC_CHECK_LIB(resolve, strcasecmp,
|
||||
[LIBS="-lresolve $LIBS"],
|
||||
,
|
||||
-lnsl)
|
||||
fi
|
||||
|
||||
dnl socket lib?
|
||||
AC_CHECK_FUNC(connect, , AC_CHECK_LIB(socket, connect))
|
||||
|
||||
dnl ucb lib?
|
||||
AC_CHECK_FUNC(gethostname, , AC_CHECK_LIB(ucb, gethostname))
|
||||
|
||||
dnl dl lib?
|
||||
AC_CHECK_FUNC(dlclose, , AC_CHECK_LIB(dl, dlopen))
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Check for the random seed preferences
|
||||
dnl **********************************************************************
|
||||
|
||||
AC_ARG_WITH(egd-socket,
|
||||
[ --with-egd-socket=FILE Entropy Gathering Daemon socket pathname],
|
||||
[ EGD_SOCKET="$withval" ]
|
||||
)
|
||||
if test -n "$EGD_SOCKET" ; then
|
||||
AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET")
|
||||
fi
|
||||
|
||||
dnl Check for user-specified random device
|
||||
AC_ARG_WITH(random,
|
||||
[ --with-random=FILE read randomness from FILE (default=/dev/urandom)],
|
||||
[ RANDOM_FILE="$withval" ],
|
||||
[
|
||||
dnl Check for random device
|
||||
AC_CHECK_FILE("/dev/urandom",
|
||||
[
|
||||
RANDOM_FILE="/dev/urandom";
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
if test -n "$RANDOM_FILE" ; then
|
||||
AC_SUBST(RANDOM_FILE)
|
||||
AC_DEFINE_UNQUOTED(RANDOM_FILE, "$RANDOM_FILE")
|
||||
fi
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Check for the presence of Kerberos4 libraries and headers
|
||||
dnl **********************************************************************
|
||||
|
||||
AC_ARG_WITH(krb4-includes,
|
||||
[ --with-krb4-includes[=DIR] Specify location of kerberos4 headers],[
|
||||
CPPFLAGS="$CPPFLAGS -I$withval"
|
||||
KRB4INC="$withval"
|
||||
want_krb4=yes
|
||||
])
|
||||
|
||||
AC_ARG_WITH(krb4-libs,
|
||||
[ --with-krb4-libs[=DIR] Specify location of kerberos4 libs],[
|
||||
LDFLAGS="$LDFLAGS -L$withval"
|
||||
KRB4LIB="$withval"
|
||||
want_krb4=yes
|
||||
])
|
||||
|
||||
|
||||
OPT_KRB4=off
|
||||
AC_ARG_WITH(krb4,dnl
|
||||
[ --with-krb4[=DIR] where to look for Kerberos4],[
|
||||
OPT_KRB4="$withval"
|
||||
if test X"$OPT_KRB4" != Xyes
|
||||
then
|
||||
LDFLAGS="$LDFLAGS -L$OPT_KRB4/lib"
|
||||
KRB4LIB="$OPT_KRB4/lib"
|
||||
CPPFLAGS="$CPPFLAGS -I$OPT_KRB4/include"
|
||||
KRB4INC="$OPT_KRB4/include"
|
||||
fi
|
||||
want_krb4="yes"
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([if Kerberos4 support is requested])
|
||||
|
||||
if test "$want_krb4" = yes
|
||||
then
|
||||
if test "$ipv6" = "yes"; then
|
||||
echo krb4 is not compatible with IPv6
|
||||
exit 1
|
||||
fi
|
||||
AC_MSG_RESULT(yes)
|
||||
|
||||
dnl Check for & handle argument to --with-krb4
|
||||
|
||||
AC_MSG_CHECKING(where to look for Kerberos4)
|
||||
if test X"$OPT_KRB4" = Xyes
|
||||
then
|
||||
AC_MSG_RESULT([defaults])
|
||||
else
|
||||
AC_MSG_RESULT([libs in $KRB4LIB, headers in $KRB4INC])
|
||||
fi
|
||||
|
||||
dnl Check for DES library
|
||||
AC_CHECK_LIB(des, des_pcbc_encrypt,
|
||||
[
|
||||
AC_CHECK_HEADERS(des.h)
|
||||
|
||||
dnl resolv lib?
|
||||
AC_CHECK_FUNC(res_search, , AC_CHECK_LIB(resolv, res_search))
|
||||
|
||||
dnl Check for the Kerberos4 library
|
||||
AC_CHECK_LIB(krb, krb_net_read,
|
||||
[
|
||||
dnl Check for header files
|
||||
AC_CHECK_HEADERS(krb.h)
|
||||
|
||||
dnl we found the required libraries, add to LIBS
|
||||
LIBS="-lkrb -ldes $LIBS"
|
||||
|
||||
dnl Check for function krb_get_our_ip_for_realm
|
||||
dnl this is needed for NAT networks
|
||||
AC_CHECK_FUNCS(krb_get_our_ip_for_realm)
|
||||
|
||||
dnl add define KRB4
|
||||
AC_DEFINE(KRB4)
|
||||
|
||||
dnl substitute it too!
|
||||
KRB4_ENABLED=1
|
||||
AC_SUBST(KRB4_ENABLED)
|
||||
|
||||
dnl the krb4 stuff needs a strlcpy()
|
||||
AC_CHECK_FUNCS(strlcpy)
|
||||
|
||||
])
|
||||
])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Check for the presence of SSL libraries and headers
|
||||
dnl **********************************************************************
|
||||
|
||||
dnl Default to compiler & linker defaults for SSL files & libraries.
|
||||
OPT_SSL=off
|
||||
AC_ARG_WITH(ssl,dnl
|
||||
[ --with-ssl[=DIR] where to look for SSL [compiler/linker default paths]
|
||||
DIR points to the SSL installation [/usr/local/ssl]],
|
||||
OPT_SSL=$withval
|
||||
)
|
||||
|
||||
if test X"$OPT_SSL" = Xno
|
||||
then
|
||||
AC_MSG_WARN(SSL/https support disabled)
|
||||
else
|
||||
|
||||
dnl Check for and handle argument to --with-ssl.
|
||||
|
||||
dnl save the pre-ssl check flags for a while
|
||||
CLEANLDFLAGS="$LDFLAGS"
|
||||
CLEANCPPFLAGS="$CPPFLAGS"
|
||||
|
||||
case "$OPT_SSL" in
|
||||
yes)
|
||||
EXTRA_SSL=/usr/local/ssl ;;
|
||||
off)
|
||||
EXTRA_SSL= ;;
|
||||
*)
|
||||
dnl check the given spot right away!
|
||||
EXTRA_SSL=$OPT_SSL
|
||||
LDFLAGS="$LDFLAGS -L$EXTRA_SSL/lib"
|
||||
CPPFLAGS="$CPPFLAGS -I$EXTRA_SSL/include/openssl -I$EXTRA_SSL/include"
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_CHECK_LIB(crypto, CRYPTO_lock,[
|
||||
HAVECRYPTO="yes"
|
||||
],[
|
||||
OLDLDFLAGS="$LDFLAGS"
|
||||
OLDCPPFLAGS="$CPPFLAGS"
|
||||
LDFLAGS="$CLEANLDFLAGS -L$EXTRA_SSL/lib"
|
||||
CPPFLAGS="$CLEANCPPFLAGS -I$EXTRA_SSL/include/openssl -I$EXTRA_SSL/include"
|
||||
AC_CHECK_LIB(crypto, CRYPTO_add_lock,[
|
||||
HAVECRYPTO="yes" ], [
|
||||
LDFLAGS="$OLDLDFLAGS"
|
||||
CPPFLAGS="$OLDCPPFLAGS"
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
if test "$HAVECRYPTO" = "yes"; then
|
||||
dnl This is only reasonable to do if crypto actually is there: check for
|
||||
dnl SSL libs NOTE: it is important to do this AFTER the crypto lib
|
||||
|
||||
AC_CHECK_LIB(crypto, CRYPTO_add_lock)
|
||||
AC_CHECK_LIB(ssl, SSL_connect)
|
||||
|
||||
if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
|
||||
dnl we didn't find the SSL lib, try the RSAglue/rsaref stuff
|
||||
AC_MSG_CHECKING(for ssl with RSAglue/rsaref libs in use);
|
||||
OLIBS=$LIBS
|
||||
LIBS="$LIBS -lRSAglue -lrsaref"
|
||||
AC_CHECK_LIB(ssl, SSL_connect)
|
||||
if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
|
||||
dnl still no SSL_connect
|
||||
AC_MSG_RESULT(no)
|
||||
LIBS=$OLIBS
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
dnl Check for SSLeay headers
|
||||
AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
|
||||
openssl/pem.h openssl/ssl.h openssl/err.h,
|
||||
OPENSSL_ENABLED=1)
|
||||
|
||||
if test $ac_cv_header_openssl_x509_h = no; then
|
||||
AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h,
|
||||
OPENSSL_ENABLED=1)
|
||||
fi
|
||||
|
||||
AC_SUBST(OPENSSL_ENABLED)
|
||||
|
||||
fi
|
||||
|
||||
if test X"$OPT_SSL" != Xoff &&
|
||||
test "$OPENSSL_ENABLED" != "1"; then
|
||||
AC_MSG_ERROR([OpenSSL libs and/or directories were not found where specified!])
|
||||
fi
|
||||
|
||||
|
||||
dnl these can only exist if openssl exists
|
||||
|
||||
AC_CHECK_FUNCS( RAND_status \
|
||||
RAND_screen \
|
||||
RAND_egd )
|
||||
|
||||
fi
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Check for the presence of ZLIB libraries and headers
|
||||
dnl **********************************************************************
|
||||
|
||||
dnl Default to compiler & linker defaults for files & libraries.
|
||||
dnl OPT_ZLIB=no
|
||||
dnl AC_ARG_WITH(zlib,dnl
|
||||
dnl [ --with-zlib[=DIR] where to look for ZLIB [compiler/linker default paths]
|
||||
dnl DIR points to the ZLIB installation prefix [/usr/local]],
|
||||
dnl OPT_ZLIB=$withval,
|
||||
dnl )
|
||||
|
||||
dnl Check for & handle argument to --with-zlib.
|
||||
dnl
|
||||
dnl NOTE: We *always* look for ZLIB headers & libraries, all this option
|
||||
dnl does is change where we look (by adjusting LIBS and CPPFLAGS.)
|
||||
dnl
|
||||
|
||||
dnl AC_MSG_CHECKING(where to look for ZLIB)
|
||||
dnl if test X"$OPT_ZLIB" = Xno
|
||||
dnl then
|
||||
dnl AC_MSG_RESULT([defaults (or given in environment)])
|
||||
dnl else
|
||||
dnl test X"$OPT_ZLIB" = Xyes && OPT_ZLIB=/usr/local
|
||||
dnl LIBS="$LIBS -L$OPT_ZLIB/lib"
|
||||
dnl CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
|
||||
dnl AC_MSG_RESULT([$OPT_ZLIB])
|
||||
dnl fi
|
||||
|
||||
dnl z lib?
|
||||
dnl AC_CHECK_FUNC(gzread, , AC_CHECK_LIB(z, gzread))
|
||||
|
||||
|
||||
dnl Default is to try the thread-safe versions of a few functions
|
||||
OPT_THREAD=on
|
||||
AC_ARG_ENABLE(thread,dnl
|
||||
[ --disable-thread tell configure to not look for thread-safe functions],
|
||||
OPT_THREAD=off
|
||||
)
|
||||
|
||||
if test X"$OPT_THREAD" = Xoff
|
||||
then
|
||||
AC_MSG_WARN(libcurl will not get built using thread-safe functions)
|
||||
AC_DEFINE(DISABLED_THREADSAFE, 1, \
|
||||
Set to explicitly specify we don't want to use thread-safe functions)
|
||||
else
|
||||
|
||||
dnl check that 'localhost' resolves first
|
||||
CURL_CHECK_WORKING_RESOLVER
|
||||
|
||||
dnl dig around for gethostbyname_r()
|
||||
CURL_CHECK_GETHOSTBYNAME_R()
|
||||
|
||||
dnl dig around for gethostbyaddr_r()
|
||||
CURL_CHECK_GETHOSTBYADDR_R()
|
||||
|
||||
dnl poke around for inet_ntoa_r()
|
||||
CURL_CHECK_INET_NTOA_R()
|
||||
|
||||
dnl is there a localtime_r()
|
||||
CURL_CHECK_LOCALTIME_R()
|
||||
|
||||
fi
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Back to "normal" configuring
|
||||
dnl **********************************************************************
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS( \
|
||||
unistd.h \
|
||||
malloc.h \
|
||||
stdlib.h \
|
||||
arpa/inet.h \
|
||||
net/if.h \
|
||||
netinet/in.h \
|
||||
netinet/if_ether.h \
|
||||
netdb.h \
|
||||
sys/select.h \
|
||||
sys/socket.h \
|
||||
sys/sockio.h \
|
||||
sys/stat.h \
|
||||
sys/types.h \
|
||||
sys/time.h \
|
||||
getopt.h \
|
||||
sys/param.h \
|
||||
termios.h \
|
||||
termio.h \
|
||||
sgtty.h \
|
||||
fcntl.h \
|
||||
dlfcn.h \
|
||||
alloca.h \
|
||||
winsock.h \
|
||||
time.h \
|
||||
io.h \
|
||||
pwd.h \
|
||||
utime.h \
|
||||
sys/utime.h
|
||||
)
|
||||
|
||||
dnl Check for libz header
|
||||
dnl AC_CHECK_HEADERS(zlib.h)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_TYPE_SIZE_T
|
||||
AC_HEADER_TIME
|
||||
|
||||
# mprintf() checks:
|
||||
|
||||
# check for 'long double'
|
||||
AC_CHECK_SIZEOF(long double, 8)
|
||||
# check for 'long long'
|
||||
AC_CHECK_SIZEOF(long long, 4)
|
||||
|
||||
# check for ssize_t
|
||||
AC_CHECK_TYPE(ssize_t, int)
|
||||
|
||||
TYPE_SOCKLEN_T
|
||||
|
||||
dnl Checks for library functions.
|
||||
dnl AC_PROG_GCC_TRADITIONAL
|
||||
AC_TYPE_SIGNAL
|
||||
dnl AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS( socket \
|
||||
select \
|
||||
strdup \
|
||||
strstr \
|
||||
strtok_r \
|
||||
strftime \
|
||||
uname \
|
||||
strcasecmp \
|
||||
stricmp \
|
||||
strcmpi \
|
||||
gethostname \
|
||||
gethostbyaddr \
|
||||
getservbyname \
|
||||
gettimeofday \
|
||||
inet_addr \
|
||||
inet_ntoa \
|
||||
tcsetattr \
|
||||
tcgetattr \
|
||||
perror \
|
||||
closesocket \
|
||||
setvbuf \
|
||||
sigaction \
|
||||
signal \
|
||||
getpass_r \
|
||||
strlcat \
|
||||
getpwuid \
|
||||
geteuid \
|
||||
dlopen \
|
||||
utime
|
||||
)
|
||||
|
||||
dnl removed 'getpass' check on October 26, 2000
|
||||
|
||||
if test "$ac_cv_func_select" != "yes"; then
|
||||
AC_MSG_ERROR(Can't work without an existing select() function)
|
||||
fi
|
||||
if test "$ac_cv_func_socket" != "yes"; then
|
||||
AC_MSG_ERROR(Can't work without an existing socket() function)
|
||||
fi
|
||||
|
||||
AC_PATH_PROG( PERL, perl, ,
|
||||
$PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin )
|
||||
AC_SUBST(PERL)
|
||||
|
||||
AC_PATH_PROGS( NROFF, gnroff nroff, ,
|
||||
$PATH:/usr/bin/:/usr/local/bin )
|
||||
AC_SUBST(NROFF)
|
||||
|
||||
AC_PROG_YACC
|
||||
|
||||
dnl AC_PATH_PROG( RANLIB, ranlib, /usr/bin/ranlib,
|
||||
dnl $PATH:/usr/bin/:/usr/local/bin )
|
||||
dnl AC_SUBST(RANLIB)
|
||||
|
||||
AC_CONFIG_FILES([Makefile \
|
||||
docs/Makefile \
|
||||
docs/examples/Makefile \
|
||||
include/Makefile \
|
||||
include/curl/Makefile \
|
||||
src/Makefile \
|
||||
lib/Makefile \
|
||||
tests/Makefile \
|
||||
tests/data/Makefile \
|
||||
packages/Makefile \
|
||||
packages/Win32/Makefile \
|
||||
packages/Linux/Makefile \
|
||||
packages/Linux/RPM/Makefile \
|
||||
packages/Linux/RPM/curl.spec \
|
||||
packages/Linux/RPM/curl-ssl.spec \
|
||||
packages/Solaris/Makefile \
|
||||
curl-config
|
||||
])
|
||||
AC_OUTPUT
|
||||
|
150
curl-config.in
150
curl-config.in
@ -1,30 +1,13 @@
|
||||
#! /bin/sh
|
||||
#***************************************************************************
|
||||
# _ _ ____ _
|
||||
# Project ___| | | | _ \| |
|
||||
# / __| | | | |_) | |
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 2001 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# The idea to this kind of setup info script was stolen from numerous
|
||||
# other packages, such as neon, libxml and gnome.
|
||||
#
|
||||
# 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 https://curl.haxx.se/docs/copyright.html.
|
||||
# $Id$
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
includedir=@includedir@
|
||||
cppflag_curl_staticlib=@CPPFLAG_CURL_STATICLIB@
|
||||
|
||||
usage()
|
||||
{
|
||||
@ -33,18 +16,11 @@ Usage: curl-config [OPTION]
|
||||
|
||||
Available values for OPTION include:
|
||||
|
||||
--built-shared says 'yes' if libcurl was built shared
|
||||
--ca ca bundle install path
|
||||
--cc compiler
|
||||
--cflags pre-processor and compiler flags
|
||||
--checkfor [version] check for (lib)curl of the specified version
|
||||
--configure the arguments given to configure when building curl
|
||||
--features newline separated list of enabled features
|
||||
--feature newline separated list of enabled features
|
||||
--help display this help and exit
|
||||
--libs library linking information
|
||||
--prefix curl install prefix
|
||||
--protocols newline separated list of enabled protocols
|
||||
--static-libs static libcurl library linking information
|
||||
--version output version information
|
||||
--vernum output the version information as a number (hexadecimal)
|
||||
EOF
|
||||
@ -66,111 +42,49 @@ while test $# -gt 0; do
|
||||
esac
|
||||
|
||||
case "$1" in
|
||||
--built-shared)
|
||||
echo @ENABLE_SHARED@
|
||||
;;
|
||||
|
||||
--ca)
|
||||
echo @CURL_CA_BUNDLE@
|
||||
;;
|
||||
|
||||
--cc)
|
||||
echo "@CC@"
|
||||
;;
|
||||
|
||||
--prefix)
|
||||
echo "$prefix"
|
||||
;;
|
||||
echo $prefix
|
||||
;;
|
||||
|
||||
--feature|--features)
|
||||
for feature in @SUPPORT_FEATURES@ ""; do
|
||||
test -n "$feature" && echo "$feature"
|
||||
done
|
||||
;;
|
||||
|
||||
--protocols)
|
||||
for protocol in @SUPPORT_PROTOCOLS@; do
|
||||
echo "$protocol"
|
||||
done
|
||||
;;
|
||||
--feature)
|
||||
if test "@OPENSSL_ENABLED@" = "1"; then
|
||||
echo "SSL"
|
||||
fi
|
||||
if test "@KRB4_ENABLED@" = "1"; then
|
||||
echo "KRB4"
|
||||
fi
|
||||
if test "@IPV6_ENABLED@" = "1"; then
|
||||
echo "IPv6"
|
||||
fi
|
||||
;;
|
||||
|
||||
--version)
|
||||
echo libcurl @CURLVERSION@
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--checkfor)
|
||||
checkfor=$2
|
||||
cmajor=`echo $checkfor | cut -d. -f1`
|
||||
cminor=`echo $checkfor | cut -d. -f2`
|
||||
# when extracting the patch part we strip off everything after a
|
||||
# dash as that's used for things like version 1.2.3-CVS
|
||||
cpatch=`echo $checkfor | cut -d. -f3 | cut -d- -f1`
|
||||
checknum=`echo "$cmajor*256*256 + $cminor*256 + ${cpatch:-0}" | bc`
|
||||
numuppercase=`echo @VERSIONNUM@ | tr 'a-f' 'A-F'`
|
||||
nownum=`echo "obase=10; ibase=16; $numuppercase" | bc`
|
||||
|
||||
if test "$nownum" -ge "$checknum"; then
|
||||
# silent success
|
||||
exit 0
|
||||
else
|
||||
echo "requested version $checkfor is newer than existing @CURLVERSION@"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
echo libcurl @VERSION@
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--vernum)
|
||||
echo @VERSIONNUM@
|
||||
exit 0
|
||||
;;
|
||||
echo @VERSIONNUM@
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--help)
|
||||
usage 0
|
||||
;;
|
||||
usage 0
|
||||
;;
|
||||
|
||||
--cflags)
|
||||
if test "X$cppflag_curl_staticlib" = "X-DCURL_STATICLIB"; then
|
||||
CPPFLAG_CURL_STATICLIB="-DCURL_STATICLIB "
|
||||
else
|
||||
CPPFLAG_CURL_STATICLIB=""
|
||||
fi
|
||||
if test "X@includedir@" = "X/usr/include"; then
|
||||
echo "$CPPFLAG_CURL_STATICLIB"
|
||||
else
|
||||
echo "${CPPFLAG_CURL_STATICLIB}-I@includedir@"
|
||||
fi
|
||||
;;
|
||||
echo -I@includedir@
|
||||
;;
|
||||
|
||||
--libs)
|
||||
if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then
|
||||
CURLLIBDIR="-L@libdir@ "
|
||||
else
|
||||
CURLLIBDIR=""
|
||||
fi
|
||||
if test "X@REQUIRE_LIB_DEPS@" = "Xyes"; then
|
||||
echo ${CURLLIBDIR}-lcurl @LIBCURL_LIBS@
|
||||
else
|
||||
echo ${CURLLIBDIR}-lcurl
|
||||
fi
|
||||
;;
|
||||
|
||||
--static-libs)
|
||||
if test "X@ENABLE_STATIC@" != "Xno" ; then
|
||||
echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@
|
||||
else
|
||||
echo "curl was built with static libraries disabled" >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
--configure)
|
||||
echo @CONFIGURE_OPTIONS@
|
||||
;;
|
||||
echo -L@libdir@ -lcurl @LDFLAGS@ @LIBS@
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "unknown option: $1"
|
||||
usage 1
|
||||
;;
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
21
curl-mode.el
Normal file
21
curl-mode.el
Normal file
@ -0,0 +1,21 @@
|
||||
;;;; Emacs Lisp help for writing curl code. ;;;;
|
||||
|
||||
;;; In C files, put something like this to load this file automatically:
|
||||
;;
|
||||
;; /* -----------------------------------------------------------------
|
||||
;; * local variables:
|
||||
;; * eval: (load-file "../curl-mode.el")
|
||||
;; * end:
|
||||
;; */
|
||||
;;
|
||||
;; (note: make sure to get the path right in the argument to load-file).
|
||||
|
||||
|
||||
;;; The curl hacker's C conventions
|
||||
|
||||
;;; we use intent-level 2
|
||||
(setq c-basic-offset 2)
|
||||
;;; never ever use tabs to indent!
|
||||
(setq indent-tabs-mode nil)
|
||||
;;; I like this, stolen from Subversion! ;-)
|
||||
(setq angry-mob-with-torches-and-pitchforks t)
|
2
docs/.gitignore
vendored
2
docs/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
*.html
|
||||
*.pdf
|
260
docs/BINDINGS
260
docs/BINDINGS
@ -1,260 +0,0 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
libcurl bindings
|
||||
|
||||
Creative people have written bindings or interfaces for various environments
|
||||
and programming languages. Using one of these allows you to take advantage of
|
||||
curl powers from within your favourite language or system.
|
||||
|
||||
This is a list of all known interfaces as of this writing.
|
||||
|
||||
The bindings listed below are not part of the curl/libcurl distribution
|
||||
archives, but must be downloaded and installed separately.
|
||||
|
||||
Ada95
|
||||
|
||||
Writtten by Andreas Almroth
|
||||
http://www.almroth.com/adacurl/index.html
|
||||
|
||||
Basic
|
||||
|
||||
ScriptBasic bindings to libcurl. Writtten by Peter Verhas
|
||||
http://scriptbasic.com/
|
||||
|
||||
C
|
||||
libcurl is a C library in itself!
|
||||
https://curl.haxx.se/libcurl/
|
||||
|
||||
C++
|
||||
|
||||
Written by Jean-Philippe Barrette-LaPierre
|
||||
http://curlpp.org/
|
||||
|
||||
Ch
|
||||
|
||||
Written by Stephen Nestinger and Jonathan Rogado
|
||||
http://chcurl.sourceforge.net/
|
||||
|
||||
Cocoa
|
||||
|
||||
BBHTTP: written by Bruno de Carvalho
|
||||
https://github.com/brunodecarvalho/BBHTTP
|
||||
|
||||
curlhandle: Written by Dan Wood
|
||||
http://curlhandle.sourceforge.net/
|
||||
|
||||
D
|
||||
|
||||
Written by Kenneth Bogert
|
||||
http://dlang.org/library/std/net/curl.html
|
||||
|
||||
Dylan
|
||||
|
||||
Written by Chris Double
|
||||
http://dylanlibs.sourceforge.net/
|
||||
|
||||
Eiffel
|
||||
|
||||
Written by Eiffel Software
|
||||
https://room.eiffel.com/library/curl
|
||||
|
||||
Euphoria
|
||||
|
||||
Written by Ray Smith
|
||||
http://rays-web.com/eulibcurl.htm
|
||||
|
||||
Falcon
|
||||
|
||||
http://www.falconpl.org/index.ftd?page_id=prjs&prj_id=curl
|
||||
|
||||
Ferite
|
||||
|
||||
Written by Paul Querna
|
||||
http://www.ferite.org/
|
||||
|
||||
Gambas
|
||||
|
||||
http://gambas.sourceforge.net/
|
||||
|
||||
glib/GTK+
|
||||
|
||||
Written by Richard Atterer
|
||||
http://atterer.net/glibcurl/
|
||||
|
||||
Guile:
|
||||
|
||||
Written by Michael L. Gran
|
||||
http://www.lonelycactus.com/guile-curl.html
|
||||
|
||||
Harbour
|
||||
|
||||
Written by Viktor Szakáts
|
||||
https://github.com/vszakats/harbour-core/tree/master/contrib/hbcurl
|
||||
|
||||
Haskell
|
||||
|
||||
Written by Galois, Inc
|
||||
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/curl
|
||||
|
||||
Java
|
||||
|
||||
https://github.com/pjlegato/curl-java
|
||||
|
||||
Julia
|
||||
|
||||
Written by Paul Howe
|
||||
https://github.com/forio/Curl.jl
|
||||
|
||||
Lisp
|
||||
|
||||
Written by Liam Healy
|
||||
http://common-lisp.net/project/cl-curl/
|
||||
|
||||
Lua
|
||||
|
||||
luacurl by Alexander Marinov
|
||||
http://luacurl.luaforge.net/
|
||||
|
||||
Lua-cURL by Jürgen Hötzel
|
||||
http://luaforge.net/projects/lua-curl/
|
||||
|
||||
Mono
|
||||
|
||||
Written by Jeffrey Phillips
|
||||
http://forge.novell.com/modules/xfmod/project/?libcurl-mono
|
||||
|
||||
.NET
|
||||
|
||||
libcurl-net by Jeffrey Phillips
|
||||
https://sourceforge.net/projects/libcurl-net/
|
||||
|
||||
node.js
|
||||
|
||||
node-libcurl by Jonathan Cardoso Machado
|
||||
https://github.com/JCMais/node-libcurl
|
||||
|
||||
Object-Pascal
|
||||
|
||||
Free Pascal, Delphi and Kylix binding written by Christophe Espern.
|
||||
http://www.tekool.com/opcurl
|
||||
|
||||
O'Caml
|
||||
|
||||
Written by Lars Nilsson
|
||||
https://sourceforge.net/projects/ocurl/
|
||||
|
||||
Pascal
|
||||
|
||||
Free Pascal, Delphi and Kylix binding written by Jeffrey Pohlmeyer.
|
||||
http://houston.quik.com/jkp/curlpas/
|
||||
|
||||
Perl
|
||||
|
||||
Maintained by Cris Bailiff and Bálint Szilakszi
|
||||
https://github.com/szbalint/WWW--Curl
|
||||
|
||||
PHP
|
||||
|
||||
Written by Sterling Hughes
|
||||
https://php.net/curl
|
||||
|
||||
PostgreSQL
|
||||
|
||||
Written by Gian Paolo Ciceri
|
||||
http://gborg.postgresql.org/project/pgcurl/projdisplay.php
|
||||
|
||||
Python
|
||||
|
||||
PycURL by Kjetil Jacobsen
|
||||
http://pycurl.sourceforge.net/
|
||||
|
||||
R
|
||||
|
||||
http://cran.r-project.org/package=curl
|
||||
|
||||
Rexx
|
||||
|
||||
Written Mark Hessling
|
||||
http://rexxcurl.sourceforge.net/
|
||||
|
||||
RPG
|
||||
|
||||
Support for ILE/RPG on OS/400 is included in source distribution
|
||||
https://curl.haxx.se/libcurl/
|
||||
See packages/OS400/README.OS400 and packages/OS400/curl.inc.in
|
||||
|
||||
Ruby
|
||||
|
||||
curb - written by Ross Bamford
|
||||
http://curb.rubyforge.org/
|
||||
|
||||
ruby-curl-multi - written by Kristjan Petursson and Keith Rarick
|
||||
http://curl-multi.rubyforge.org/
|
||||
|
||||
Rust
|
||||
|
||||
curl-rust - by Carl Lerche
|
||||
https://github.com/carllerche/curl-rust
|
||||
|
||||
Scheme
|
||||
|
||||
Bigloo binding by Kirill Lisovsky
|
||||
http://www.metapaper.net/lisovsky/web/curl/
|
||||
|
||||
S-Lang
|
||||
|
||||
S-Lang binding by John E Davis
|
||||
http://www.jedsoft.org/slang/modules/curl.html
|
||||
|
||||
Smalltalk
|
||||
|
||||
Smalltalk binding by Danil Osipchuk
|
||||
http://www.squeaksource.com/CurlPlugin/
|
||||
|
||||
SP-Forth
|
||||
|
||||
SP-Forth binding by ygrek
|
||||
http://www.forth.org.ru/~ac/lib/lin/curl/
|
||||
|
||||
SPL
|
||||
|
||||
SPL binding by Clifford Wolf
|
||||
http://www.clifford.at/spl/
|
||||
|
||||
Tcl
|
||||
|
||||
Tclcurl by Andrés García
|
||||
http://mirror.yellow5.com/tclcurl/
|
||||
|
||||
Visual Basic
|
||||
|
||||
libcurl-vb by Jeffrey Phillips
|
||||
https://sourceforge.net/projects/libcurl-vb/
|
||||
|
||||
Visual Foxpro
|
||||
|
||||
by Carlos Alloatti
|
||||
http://www.ctl32.com.ar/libcurl.asp
|
||||
|
||||
Q
|
||||
The libcurl module is part of the default install
|
||||
http://q-lang.sourceforge.net/
|
||||
|
||||
wxWidgets
|
||||
|
||||
Written by Casey O'Donnell
|
||||
http://wxcode.sourceforge.net/components/wxcurl/
|
||||
|
||||
XBLite
|
||||
|
||||
Written by David Szafranski
|
||||
http://perso.wanadoo.fr/xblite/libraries.html
|
||||
|
||||
Xojo
|
||||
|
||||
Written by Andrew Lambert
|
||||
https://github.com/charonn0/RB-libcURL
|
141
docs/BUGS
141
docs/BUGS
@ -1,146 +1,57 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
BUGS
|
||||
|
||||
1. Bugs
|
||||
1.1 There are still bugs
|
||||
1.2 Where to report
|
||||
1.3 What to report
|
||||
1.4 libcurl problems
|
||||
1.5 Who will fix the problems
|
||||
1.6 How to get a stack trace
|
||||
1.7 Bugs in libcurl bindings
|
||||
|
||||
==============================================================================
|
||||
|
||||
1.1 There are still bugs
|
||||
|
||||
Curl and libcurl have grown substantially since the beginning. At the time
|
||||
of writing (January 2013), there are about 83,000 lines of source code, and
|
||||
by the time you read this it has probably grown even more.
|
||||
of writing (mid March 2001), there are 23000 lines of source code, and by
|
||||
the time you read this it has probably grown even more.
|
||||
|
||||
Of course there are lots of bugs left. And lots of misfeatures.
|
||||
|
||||
To help us make curl the stable and solid product we want it to be, we need
|
||||
bug reports and bug fixes.
|
||||
bug reports and bug fixes. If you can't fix a bug yourself and submit a fix
|
||||
for it, try to report an as detailed report as possible to the curl mailing
|
||||
list to allow one of us to have a go at a solution. You should also post
|
||||
your bug/problem at curl's bug tracking system over at
|
||||
|
||||
1.2 Where to report
|
||||
http://sourceforge.net/bugs/?group_id=976
|
||||
|
||||
If you can't fix a bug yourself and submit a fix for it, try to report an as
|
||||
detailed report as possible to a curl mailing list to allow one of us to
|
||||
have a go at a solution. You can optionally also post your bug/problem at
|
||||
curl's bug tracking system over at
|
||||
|
||||
https://github.com/curl/curl/issues
|
||||
|
||||
Please read the rest of this document below first before doing that!
|
||||
|
||||
If you feel you need to ask around first, find a suitable mailing list and
|
||||
post there. The lists are available on https://curl.haxx.se/mail/
|
||||
|
||||
1.3 What to report
|
||||
|
||||
When reporting a bug, you should include all information that will help us
|
||||
When reporting a bug, you should include information that will help us
|
||||
understand what's wrong, what you expected to happen and how to repeat the
|
||||
bad behavior. You therefore need to tell us:
|
||||
|
||||
- your operating system's name and version number
|
||||
|
||||
- what version of curl you're using (curl -V is fine)
|
||||
|
||||
- versions of the used libraries that libcurl is built to use
|
||||
|
||||
- what URL you were working with (if possible), at least which protocol
|
||||
|
||||
and anything and everything else you think matters. Tell us what you
|
||||
expected to happen, tell use what did happen, tell us how you could make it
|
||||
work another way. Dig around, try out, test. Then include all the tiny bits
|
||||
and pieces in your report. You will benefit from this yourself, as it will
|
||||
enable us to help you quicker and more accurately.
|
||||
|
||||
Since curl deals with networks, it often helps us if you include a protocol
|
||||
debug dump with your bug report. The output you get by using the -v or
|
||||
--trace options.
|
||||
bad behaviour. You therefore need to supply your operating system's name and
|
||||
version number (uname -a under a unix is fine), what version of curl you're
|
||||
using (curl -V is fine), what URL you were working with and anything else
|
||||
you think matters.
|
||||
|
||||
If curl crashed, causing a core dump (in unix), there is hardly any use to
|
||||
send that huge file to anyone of us. Unless we have an exact same system
|
||||
setup as you, we can't do much with it. Instead we ask you to get a stack
|
||||
trace and send that (much smaller) output to us instead!
|
||||
setup as you, we can't do much with it. What we instead ask of you is to get
|
||||
a stack trace and send that (much smaller) output to us instead!
|
||||
|
||||
The address and how to subscribe to the mailing lists are detailed in the
|
||||
The address and how to subscribe to the mailing list is detailed in the
|
||||
MANUAL file.
|
||||
|
||||
1.4 libcurl problems
|
||||
|
||||
First, post all libcurl problems on the curl-library mailing list.
|
||||
|
||||
When you've written your own application with libcurl to perform transfers,
|
||||
it is even more important to be specific and detailed when reporting bugs.
|
||||
|
||||
Tell us the libcurl version and your operating system. Tell us the name and
|
||||
version of all relevant sub-components like for example the SSL library
|
||||
you're using and what name resolving your libcurl uses. If you use SFTP or
|
||||
SCP, the libssh2 version is relevant etc.
|
||||
|
||||
Showing us a real source code example repeating your problem is the best way
|
||||
to get our attention and it will greatly increase our chances to understand
|
||||
your problem and to work on a fix (if we agree it truly is a problem).
|
||||
|
||||
Lots of problems that appear to be libcurl problems are actually just abuses
|
||||
of the libcurl API or other malfunctions in your applications. It is advised
|
||||
that you run your problematic program using a memory debug tool like
|
||||
valgrind or similar before you post memory-related or "crashing" problems to
|
||||
us.
|
||||
|
||||
1.5 Who will fix the problems
|
||||
|
||||
If the problems or bugs you describe are considered to be bugs, we want to
|
||||
have the problems fixed.
|
||||
|
||||
There are no developers in the curl project that are paid to work on bugs.
|
||||
All developers that take on reported bugs do this on a voluntary basis. We
|
||||
do it out of an ambition to keep curl and libcurl excellent products and out
|
||||
of pride.
|
||||
|
||||
But please do not assume that you can just lump over something to us and it
|
||||
will then magically be fixed after some given time. Most often we need
|
||||
feedback and help to understand what you've experienced and how to repeat a
|
||||
problem. Then we may only be able to assist YOU to debug the problem and to
|
||||
track down the proper fix.
|
||||
|
||||
We get reports from many people every month and each report can take a
|
||||
considerable amount of time to really go to the bottom with.
|
||||
|
||||
1.6 How to get a stack trace
|
||||
HOW TO GET A STACK TRACE with a common unix debugger
|
||||
====================================================
|
||||
|
||||
First, you must make sure that you compile all sources with -g and that you
|
||||
don't 'strip' the final executable. Try to avoid optimizing the code as
|
||||
well, remove -O, -O2 etc from the compiler options.
|
||||
don't 'strip' the final executable.
|
||||
|
||||
Run the program until it cores.
|
||||
Run the program until it bangs.
|
||||
|
||||
Run your debugger on the core file, like '<debugger> curl core'. <debugger>
|
||||
should be replaced with the name of your debugger, in most cases that will
|
||||
be 'gdb', but 'dbx' and others also occur.
|
||||
|
||||
When the debugger has finished loading the core file and presents you a
|
||||
prompt, enter 'where' (without the quotes) and press return.
|
||||
prompt, you can give the compiler instructions. Enter 'where' (without the
|
||||
quotes) and press return.
|
||||
|
||||
The list that is presented is the stack trace. If everything worked, it is
|
||||
supposed to contain the chain of functions that were called when curl
|
||||
crashed. Include the stack trace with your detailed bug report. It'll help a
|
||||
lot.
|
||||
crashed.
|
||||
|
||||
1.7 Bugs in libcurl bindings
|
||||
|
||||
There will of course pop up bugs in libcurl bindings. You should then
|
||||
primarily approach the team that works on that particular binding and see
|
||||
what you can do to help them fix the problem.
|
||||
|
||||
If you suspect that the problem exists in the underlying libcurl, then
|
||||
please convert your program over to plain C and follow the steps outlined
|
||||
above.
|
||||
|
@ -1,32 +0,0 @@
|
||||
Contributor Code of Conduct
|
||||
===========================
|
||||
|
||||
As contributors and maintainers of this project, we pledge to respect all
|
||||
people who contribute through reporting issues, posting feature requests,
|
||||
updating documentation, submitting pull requests or patches, and other
|
||||
activities.
|
||||
|
||||
We are committed to making participation in this project a harassment-free
|
||||
experience for everyone, regardless of level of experience, gender, gender
|
||||
identity and expression, sexual orientation, disability, personal appearance,
|
||||
body size, race, ethnicity, age, or religion.
|
||||
|
||||
Examples of unacceptable behavior by participants include the use of sexual
|
||||
language or imagery, derogatory comments or personal attacks, trolling, public
|
||||
or private harassment, insults, or other unprofessional conduct.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct. Project maintainers who do not
|
||||
follow the Code of Conduct may be removed from the project team.
|
||||
|
||||
This code of conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community.
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by opening an issue or contacting one or more of the project
|
||||
maintainers.
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor
|
||||
Covenant](http://contributor-covenant.org), version 1.1.0, available at
|
||||
[http://contributor-covenant.org/version/1/1/0/](http://contributor-covenant.org/version/1/1/0/)
|
@ -1,185 +0,0 @@
|
||||
# cURL C code style
|
||||
|
||||
Source code that has a common style is easier to read than code that uses
|
||||
different styles in different places. It helps making the code feel like one
|
||||
single code base. Easy-to-read is a very important property of code and helps
|
||||
making it easier to review when new things are added and it helps debugging
|
||||
code when developers are trying to figure out why things go wrong. A unified
|
||||
style is more important than individual contributors having their own personal
|
||||
tastes satisfied.
|
||||
|
||||
Our C code has a few style rules. Most of them are verified and upheld by the
|
||||
lib/checksrc.pl script. Invoked with `make checksrc` or even by default by the
|
||||
build system when built after `./configure --enable-debug` has been used.
|
||||
|
||||
It is normally not a problem for anyone to follow the guidelines, as you just
|
||||
need to copy the style already used in the source code and there are no
|
||||
particularly unusual rules in our set of rules.
|
||||
|
||||
We also work hard on writing code that are warning-free on all the major
|
||||
platforms and in general on as many platforms as possible. Code that obviously
|
||||
will cause warnings will not be accepted as-is.
|
||||
|
||||
## Naming
|
||||
|
||||
Try using a non-confusing naming scheme for your new functions and variable
|
||||
names. It doesn't necessarily have to mean that you should use the same as in
|
||||
other places of the code, just that the names should be logical,
|
||||
understandable and be named according to what they're used for. File-local
|
||||
functions should be made static. We like lower case names.
|
||||
|
||||
See the INTERNALS document on how we name non-exported library-global symbols.
|
||||
|
||||
## Indenting
|
||||
|
||||
We use only spaces for indentation, never TABs. We use two spaces for each new
|
||||
open brace.
|
||||
|
||||
if(something_is_true) {
|
||||
while(second_statement == fine) {
|
||||
moo();
|
||||
}
|
||||
}
|
||||
|
||||
## Comments
|
||||
|
||||
Since we write C89 code, `//` comments are not allowed. They weren't
|
||||
introduced in the C standard until C99. We use only `/*` and `*/` comments:
|
||||
|
||||
/* this is a comment */
|
||||
|
||||
## Long lines
|
||||
|
||||
Source code in curl may never be wider than 80 columns and there are two
|
||||
reasons for maintaining this even in the modern era of very large and high
|
||||
resolution screens:
|
||||
|
||||
1. Narrower columns are easier to read than very wide ones. There's a reason
|
||||
newspapers have used columns for decades or centuries.
|
||||
|
||||
2. Narrower columns allow developers to easier show multiple pieces of code
|
||||
next to each other in different windows. I often have two or three source
|
||||
code windows next to each other on the same screen - as well as multiple
|
||||
terminal and debugging windows.
|
||||
|
||||
## Braces
|
||||
|
||||
In if/while/do/for expressions, we write the open brace on the same line as
|
||||
the keyword and we then set the closing brace on the same indentation level as
|
||||
the initial keyword. Like this:
|
||||
|
||||
if(age < 40) {
|
||||
/* clearly a youngster */
|
||||
}
|
||||
|
||||
When we write functions however, the opening brace should be in the first
|
||||
column of the first line:
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
## 'else' on the following line
|
||||
|
||||
When adding an `else` clause to a conditional expression using braces, we add
|
||||
it on a new line after the closing brace. Like this:
|
||||
|
||||
if(age < 40) {
|
||||
/* clearly a youngster */
|
||||
}
|
||||
else {
|
||||
/* probably grumpy */
|
||||
}
|
||||
|
||||
## No space before parentheses
|
||||
|
||||
When writing expressions using if/while/do/for, there shall be no space
|
||||
between the keyword and the open parenthesis. Like this:
|
||||
|
||||
while(1) {
|
||||
/* loop forever */
|
||||
}
|
||||
|
||||
## Use boolean conditions
|
||||
|
||||
Rather than test a conditional value such as a bool against TRUE or FALSE, a
|
||||
pointer against NULL or != NULL and an int against zero or not zero in
|
||||
if/while conditions we prefer:
|
||||
|
||||
result = do_something();
|
||||
if(!result) {
|
||||
/* something went wrong */
|
||||
return result;
|
||||
}
|
||||
|
||||
## No assignments in conditions
|
||||
|
||||
To increase readability and reduce complexity of conditionals, we avoid
|
||||
assigning variables within if/while conditions. We frown upon this style:
|
||||
|
||||
if((ptr = malloc(100)) == NULL)
|
||||
return NULL;
|
||||
|
||||
and instead we encourage the above version to be spelled out more clearly:
|
||||
|
||||
ptr = malloc(100);
|
||||
if(!ptr)
|
||||
return NULL;
|
||||
|
||||
## New block on a new line
|
||||
|
||||
We never write multiple statements on the same source line, even for very
|
||||
short if() conditions.
|
||||
|
||||
if(a)
|
||||
return TRUE;
|
||||
else if(b)
|
||||
return FALSE;
|
||||
|
||||
and NEVER:
|
||||
|
||||
if(a) return TRUE;
|
||||
else if(b) return FALSE;
|
||||
|
||||
## Space around operators
|
||||
|
||||
Please use spaces on both sides of operators in C expressions. Postfix `(),
|
||||
[], ->, ., ++, --` and Unary `+, - !, ~, &` operators excluded they should
|
||||
have no space.
|
||||
|
||||
Examples:
|
||||
|
||||
bla = func();
|
||||
who = name[0];
|
||||
age += 1;
|
||||
true = !false;
|
||||
size += -2 + 3 * (a + b);
|
||||
ptr->member = a++;
|
||||
struct.field = b--;
|
||||
ptr = &address;
|
||||
contents = *pointer;
|
||||
complement = ~bits;
|
||||
|
||||
## Platform dependent code
|
||||
|
||||
Use `#ifdef HAVE_FEATURE` to do conditional code. We avoid checking for
|
||||
particular operating systems or hardware in the #ifdef lines. The HAVE_FEATURE
|
||||
shall be generated by the configure script for unix-like systems and they are
|
||||
hard-coded in the config-[system].h files for the others.
|
||||
|
||||
We also encourage use of macros/functions that possibly are empty or defined
|
||||
to constants when libcurl is built without that feature, to make the code
|
||||
seamless. Like this style where the `magic()` function works differently
|
||||
depending on a build-time conditional:
|
||||
|
||||
#ifdef HAVE_MAGIC
|
||||
void magic(int a)
|
||||
{
|
||||
return a + 2;
|
||||
}
|
||||
#else
|
||||
#define magic(x) 1
|
||||
#endif
|
||||
|
||||
int content = magic(3);
|
260
docs/CONTRIBUTE
260
docs/CONTRIBUTE
@ -1,96 +1,66 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
When Contributing Source Code
|
||||
To Think About When Contributing Source Code
|
||||
|
||||
This document is intended to offer guidelines that can be useful to keep in
|
||||
mind when you decide to contribute to the project. This concerns new features
|
||||
as well as corrections to existing flaws or bugs.
|
||||
This document is intended to offer some guidelines that can be useful to keep
|
||||
in mind when you decide to write a contribution to the project. This concerns
|
||||
new features as well as corrections to existing flaws or bugs.
|
||||
|
||||
1. Learning cURL
|
||||
1.1 Join the Community
|
||||
1.2 License
|
||||
1.3 What To Read
|
||||
Join the Community
|
||||
|
||||
2. Write a good patch
|
||||
2.1 Follow code style
|
||||
2.2 Non-clobbering All Over
|
||||
2.3 Write Separate Patches
|
||||
2.4 Patch Against Recent Sources
|
||||
2.5 Document
|
||||
2.6 Test Cases
|
||||
|
||||
3. Pushing Out Your Changes
|
||||
3.1 Write Access to git Repository
|
||||
3.2 How To Make a Patch with git
|
||||
3.3 How To Make a Patch without git
|
||||
3.4 How to get your changes into the main sources
|
||||
3.5 Write good commit messages
|
||||
3.6 About pull requests
|
||||
|
||||
==============================================================================
|
||||
|
||||
1. Learning cURL
|
||||
|
||||
1.1 Join the Community
|
||||
|
||||
Skip over to https://curl.haxx.se/mail/ and join the appropriate mailing
|
||||
Skip over to http://curl.haxx.se/mail/ and join the appropriate mailing
|
||||
list(s). Read up on details before you post questions. Read this file before
|
||||
you start sending patches! We prefer patches and discussions being held on
|
||||
the mailing list(s), not sent to individuals.
|
||||
you start sending patches!
|
||||
|
||||
Before posting to one of the curl mailing lists, please read up on the mailing
|
||||
list etiquette: https://curl.haxx.se/mail/etiquette.html
|
||||
|
||||
We also hang out on IRC in #curl on irc.freenode.net
|
||||
|
||||
If you're at all interested in the code side of things, consider clicking
|
||||
'watch' on the curl repo at github to get notified on pull requests and new
|
||||
issues posted there.
|
||||
|
||||
1.2. License
|
||||
The License Issue
|
||||
|
||||
When contributing with code, you agree to put your changes and new code under
|
||||
the same license curl and libcurl is already using unless stated and agreed
|
||||
otherwise.
|
||||
the same license curl and libcurl is already using unless stated otherwise.
|
||||
|
||||
If you add a larger piece of code, you can opt to make that file or set of
|
||||
files to use a different license as long as they don't enforce any changes to
|
||||
the rest of the package and they make sense. Such "separate parts" can not be
|
||||
GPL licensed (as we don't want copyleft to affect users of libcurl) but they
|
||||
must use "GPL compatible" licenses (as we want to allow users to use libcurl
|
||||
properly in GPL licensed environments).
|
||||
GPL (as we don't want the GPL virus to attack users of libcurl) but they must
|
||||
use "GPL compatible" licenses.
|
||||
|
||||
When changing existing source code, you do not alter the copyright of the
|
||||
original file(s). The copyright will still be owned by the original
|
||||
creator(s) or those who have been assigned copyright by the original
|
||||
author(s).
|
||||
What To Read
|
||||
|
||||
By submitting a patch to the curl project, you are assumed to have the right
|
||||
to the code and to be allowed by your employer or whatever to hand over that
|
||||
patch/code to us. We will credit you for your changes as far as possible, to
|
||||
give credit but also to keep a trace back to who made what changes. Please
|
||||
always provide us with your full real name when contributing!
|
||||
Source code, the man pages, the INTERALS document, the TODO, the most recent
|
||||
CHANGES. Just lurking on the libcurl mailing list is gonna give you a lot of
|
||||
insights on what's going on right now.
|
||||
|
||||
1.3 What To Read
|
||||
Naming
|
||||
|
||||
Source code, the man pages, the INTERNALS document, TODO, KNOWN_BUGS and the
|
||||
most recent changes in the git log. Just lurking on the curl-library mailing
|
||||
list is gonna give you a lot of insights on what's going on right now. Asking
|
||||
there is a good idea too.
|
||||
Try using a non-confusing naming scheme for your new functions and variable
|
||||
names. It doesn't necessarily have to mean that you should use the same as in
|
||||
other places of the code, just that the names should be logical,
|
||||
understandable and be named according to what they're used for. File-local
|
||||
functions should be made static.
|
||||
|
||||
2. Write a good patch
|
||||
Indenting
|
||||
|
||||
2.1 Follow code style
|
||||
Please try using the same indenting levels and bracing method as all the
|
||||
other code already does. It makes the source code a lot easier to follow if
|
||||
all of it is written using the same style. We don't ask you to like it, we
|
||||
just ask you to follow the tradition! ;-)
|
||||
|
||||
When writing C code, follow the CODE_STYLE already established in the
|
||||
project. Consistent style makes code easier to read and mistakes less likely
|
||||
to happen.
|
||||
Commenting
|
||||
|
||||
2.2 Non-clobbering All Over
|
||||
Comment your source code extensively. Commented code is quality code and
|
||||
enables future modifications much more. Uncommented code much more risk being
|
||||
completely replaced when someone wants to extend things, since other persons'
|
||||
source code can get quite hard to read.
|
||||
|
||||
General Style
|
||||
|
||||
Keep your functions small. If they're small you avoid a lot of mistakes and
|
||||
you don't accidentally mix up variables.
|
||||
|
||||
Non-clobbering All Over
|
||||
|
||||
When you write new functionality or fix bugs, it is important that you don't
|
||||
fiddle all over the source files and functions. Remember that it is likely
|
||||
@ -99,7 +69,7 @@
|
||||
functionality, try writing it in a new source file. If you fix bugs, try to
|
||||
fix one bug at a time and send them as separate patches.
|
||||
|
||||
2.3 Write Separate Patches
|
||||
Separate Patches Doing Different Things
|
||||
|
||||
It is annoying when you get a huge patch from someone that is said to fix 511
|
||||
odd problems, but discussions and opinions don't agree with 510 of them - or
|
||||
@ -110,152 +80,34 @@
|
||||
description exactly what they correct so that all patches can be selectively
|
||||
applied by the maintainer or other interested parties.
|
||||
|
||||
Also, separate patches enable bisecting much better when we track problems in
|
||||
the future.
|
||||
|
||||
2.4 Patch Against Recent Sources
|
||||
Patch Against Recent Sources
|
||||
|
||||
Please try to get the latest available sources to make your patches
|
||||
against. It makes the life of the developers so much easier. The very best is
|
||||
if you get the most up-to-date sources from the git repository, but the
|
||||
if you get the most up-to-date sources from the CVS repository, but the
|
||||
latest release archive is quite OK as well!
|
||||
|
||||
2.5 Document
|
||||
Document
|
||||
|
||||
Writing docs is dead boring and one of the big problems with many open source
|
||||
projects. Someone's gotta do it. It makes it a lot easier if you submit a
|
||||
small description of your fix or your new features with every contribution so
|
||||
that it can be swiftly added to the package documentation.
|
||||
|
||||
The documentation is always made in man pages (nroff formatted) or plain
|
||||
ASCII files. All HTML files on the web site and in the release archives are
|
||||
generated from the nroff/ASCII versions.
|
||||
Write Access to CVS Repository
|
||||
|
||||
2.6 Test Cases
|
||||
If you are a frequent contributor, or have another good reason, you can of
|
||||
course get write access to the CVS repository and then you'll be able to
|
||||
check-in all your changes straight into the CVS tree instead of sending all
|
||||
changes by mail as patches. Just ask if this is what you'd want. You will be
|
||||
required to have posted a few quality patches first, before you can be
|
||||
granted write access.
|
||||
|
||||
Test Cases
|
||||
|
||||
Since the introduction of the test suite, we can quickly verify that the main
|
||||
features are working as they're supposed to. To maintain this situation and
|
||||
improve it, all new features and functions that are added need to be tested
|
||||
in the test suite. Every feature that is added should get at least one valid
|
||||
test case that verifies that it works as documented. If every submitter also
|
||||
posts a few test cases, it won't end up as a heavy burden on a single person!
|
||||
|
||||
If you don't have test cases or perhaps you have done something that is very
|
||||
hard to write tests for, do explain exactly how you have otherwise tested and
|
||||
verified your changes.
|
||||
|
||||
3. Pushing Out Your Changes
|
||||
|
||||
3.1 Write Access to git Repository
|
||||
|
||||
If you are a frequent contributor, or have another good reason, you can of
|
||||
course get write access to the git repository and then you'll be able to push
|
||||
your changes straight into the git repo instead of sending changes by mail as
|
||||
patches. Just ask if this is what you'd want. You will be required to have
|
||||
posted a few quality patches first, before you can be granted push access.
|
||||
|
||||
3.2 How To Make a Patch with git
|
||||
|
||||
You need to first checkout the repository:
|
||||
|
||||
git clone https://github.com/curl/curl.git
|
||||
|
||||
You then proceed and edit all the files you like and you commit them to your
|
||||
local repository:
|
||||
|
||||
git commit [file]
|
||||
|
||||
As usual, group your commits so that you commit all changes that at once that
|
||||
constitutes a logical change. See also section "3.5 Write good commit
|
||||
messages".
|
||||
|
||||
Once you have done all your commits and you're happy with what you see, you
|
||||
can make patches out of your changes that are suitable for mailing:
|
||||
|
||||
git format-patch remotes/origin/master
|
||||
|
||||
This creates files in your local directory named NNNN-[name].patch for each
|
||||
commit.
|
||||
|
||||
Now send those patches off to the curl-library list. You can of course opt to
|
||||
do that with the 'git send-email' command.
|
||||
|
||||
3.3 How To Make a Patch without git
|
||||
|
||||
Keep a copy of the unmodified curl sources. Make your changes in a separate
|
||||
source tree. When you think you have something that you want to offer the
|
||||
curl community, use GNU diff to generate patches.
|
||||
|
||||
If you have modified a single file, try something like:
|
||||
|
||||
diff -u unmodified-file.c my-changed-one.c > my-fixes.diff
|
||||
|
||||
If you have modified several files, possibly in different directories, you
|
||||
can use diff recursively:
|
||||
|
||||
diff -ur curl-original-dir curl-modified-sources-dir > my-fixes.diff
|
||||
|
||||
The GNU diff and GNU patch tools exist for virtually all platforms, including
|
||||
all kinds of Unixes and Windows:
|
||||
|
||||
For unix-like operating systems:
|
||||
|
||||
https://savannah.gnu.org/projects/patch/
|
||||
https://www.gnu.org/software/diffutils/
|
||||
|
||||
For Windows:
|
||||
|
||||
http://gnuwin32.sourceforge.net/packages/patch.htm
|
||||
http://gnuwin32.sourceforge.net/packages/diffutils.htm
|
||||
|
||||
3.4 How to get your changes into the main sources
|
||||
|
||||
Submit your patch to the curl-library mailing list.
|
||||
|
||||
Make the patch against as recent sources as possible.
|
||||
|
||||
Make sure your patch adheres to the source indent and coding style of already
|
||||
existing source code. Failing to do so just adds more work for me.
|
||||
|
||||
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 sign
|
||||
that you're not very anxious to get your patch accepted and I tend to simply
|
||||
drop such patches from my TODO list.
|
||||
|
||||
If you've followed the above paragraphs and your patch still hasn't been
|
||||
incorporated after some weeks, consider resubmitting it to the list.
|
||||
|
||||
3.5 Write good commit messages
|
||||
|
||||
A short guide to how to do fine commit messages in the curl project.
|
||||
|
||||
---- start ----
|
||||
[area]: [short line describing the main effect]
|
||||
|
||||
[separate the above single line from the rest with an empty line]
|
||||
|
||||
[full description, no wider than 72 columns that describe as much as
|
||||
possible as to why this change is made, and possibly what things
|
||||
it fixes and everything else that is related]
|
||||
|
||||
[Bug: link to source of the report or more related discussion]
|
||||
[Reported-by: John Doe - credit the reporter]
|
||||
[whatever-else-by: credit all helpers, finders, doers]
|
||||
---- stop ----
|
||||
|
||||
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
|
||||
before you commit
|
||||
|
||||
3.6 About pull requests
|
||||
|
||||
With git (and especially github) it is easy and tempting to send a pull
|
||||
request to the curl project to have changes merged this way instead of
|
||||
mailing patches to the curl-library mailing list.
|
||||
|
||||
We used to dislike this but we're trying to change that and accept that this
|
||||
is a frictionless way for people to contribute to the project. We now welcome
|
||||
pull requests!
|
||||
|
||||
We will continue to avoid using github's merge tools to make the history
|
||||
linear and to make sure commits follow our style guidelines.
|
||||
post a few test cases, it won't end up as a heavy burden on a single person!
|
||||
|
170
docs/FEATURES
170
docs/FEATURES
@ -1,84 +1,62 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
FEATURES
|
||||
|
||||
curl tool
|
||||
- config file support
|
||||
- multiple URLs in a single command line
|
||||
- range "globbing" support: [0-13], {one,two,three}
|
||||
- multiple file upload on a single command line
|
||||
- custom maximum transfer rate
|
||||
- redirectable stderr
|
||||
- metalink support (*13)
|
||||
|
||||
libcurl
|
||||
- full URL syntax with no length limit
|
||||
Misc
|
||||
- full URL syntax
|
||||
- custom maximum download time
|
||||
- custom least download speed acceptable
|
||||
- custom output result after completion
|
||||
- multiple URLs
|
||||
- guesses protocol from host name unless specified
|
||||
- uses .netrc
|
||||
- progress bar with time statistics while downloading
|
||||
- progress bar/time specs while downloading
|
||||
- "standard" proxy environment variables support
|
||||
- compiles on win32 (reported builds on 40+ operating systems)
|
||||
- selectable network interface for outgoing traffic
|
||||
- IPv6 support on unix and Windows
|
||||
- persistent connections
|
||||
- socks 4 + 5 support, with or without local name resolving
|
||||
- supports user name and password in proxy environment variables
|
||||
- operations through proxy "tunnel" (using CONNECT)
|
||||
- support for large files (>2GB and >4GB) during upload and download
|
||||
- replaceable memory functions (malloc, free, realloc, etc)
|
||||
- asynchronous name resolving (*6)
|
||||
- both a push and a pull style interface
|
||||
- international domain names (*11)
|
||||
- config file support
|
||||
- compiles on win32 (reported built on 29 operating systems)
|
||||
- redirectable stderr
|
||||
- use selected network interface for outgoing traffic
|
||||
- IPv6 support
|
||||
- persistant connections
|
||||
|
||||
HTTP
|
||||
- HTTP/1.1 compliant (optionally uses 1.0)
|
||||
- HTTP/1.1 compliant
|
||||
- GET
|
||||
- PUT
|
||||
- HEAD
|
||||
- POST
|
||||
- Pipelining
|
||||
- multipart formpost (RFC1867-style)
|
||||
- authentication: Basic, Digest, NTLM (*9) and Negotiate (SPNEGO) (*3)
|
||||
to server and proxy
|
||||
- multipart POST
|
||||
- authentication
|
||||
- resume (both GET and PUT)
|
||||
- follow redirects
|
||||
- maximum amount of redirects to follow
|
||||
- custom HTTP request
|
||||
- cookie get/send fully parsed
|
||||
- reads/writes the netscape cookie file format
|
||||
- custom headers (replace/remove internally generated headers)
|
||||
- understands the netscape cookie file format
|
||||
- custom headers (that can replace/remove internally generated headers)
|
||||
- custom user-agent string
|
||||
- custom referrer string
|
||||
- custom referer string
|
||||
- range
|
||||
- proxy authentication
|
||||
- time conditions
|
||||
- via http-proxy
|
||||
- retrieve file modification date
|
||||
- Content-Encoding support for deflate and gzip
|
||||
- "Transfer-Encoding: chunked" support in uploads
|
||||
- data compression (*12)
|
||||
- HTTP/2 (*5)
|
||||
|
||||
HTTPS (*1)
|
||||
- (all the HTTP features)
|
||||
- using client certificates
|
||||
- using certificates
|
||||
- verify server certificate
|
||||
- via http-proxy
|
||||
- select desired encryption
|
||||
- force usage of a specific SSL version (SSLv2 (*7), SSLv3 (*10) or TLSv1)
|
||||
|
||||
FTP
|
||||
- download
|
||||
- authentication
|
||||
- Kerberos 5 (*14)
|
||||
- active/passive using PORT, EPRT, PASV or EPSV
|
||||
- kerberos security
|
||||
- PORT or PASV
|
||||
- single file size information (compare to HTTP HEAD)
|
||||
- 'type=' URL support
|
||||
- dir listing
|
||||
@ -93,23 +71,6 @@ FTP
|
||||
- via http-proxy
|
||||
- all operations can be tunneled through a http-proxy
|
||||
- customizable to retrieve file modification date
|
||||
- no dir depth limit
|
||||
|
||||
FTPS (*1)
|
||||
- implicit ftps:// support that use SSL on both connections
|
||||
- explicit "AUTH TLS" and "AUTH SSL" usage to "upgrade" plain ftp://
|
||||
connection to use SSL for both or one of the connections
|
||||
|
||||
SCP (*8)
|
||||
- both password and public key auth
|
||||
|
||||
SFTP (*8)
|
||||
- both password and public key auth
|
||||
- with custom commands sent before/after the transfer
|
||||
|
||||
TFTP
|
||||
- download
|
||||
- upload
|
||||
|
||||
TELNET
|
||||
- connection negotiation
|
||||
@ -122,85 +83,12 @@ LDAP (*2)
|
||||
DICT
|
||||
- extended DICT URL support
|
||||
|
||||
GOPHER
|
||||
- GET
|
||||
- via http-proxy
|
||||
|
||||
FILE
|
||||
- URL support
|
||||
- upload
|
||||
- resume
|
||||
|
||||
SMB
|
||||
- SMBv1 over TCP and SSL
|
||||
- download
|
||||
- upload
|
||||
- authentication with NTLMv1
|
||||
|
||||
SMTP
|
||||
- authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9), Kerberos 5
|
||||
(*4) and External.
|
||||
- send e-mails
|
||||
- mail from support
|
||||
- mail size support
|
||||
- mail auth support for trusted server-to-server relaying
|
||||
- multiple recipients
|
||||
- via http-proxy
|
||||
|
||||
SMTPS (*1)
|
||||
- implicit smtps:// support
|
||||
- explicit "STARTTLS" usage to "upgrade" plain smtp:// connections to use SSL
|
||||
- via http-proxy
|
||||
|
||||
POP3
|
||||
- authentication: Clear Text, APOP and SASL
|
||||
- SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9),
|
||||
Kerberos 5 (*4) and External.
|
||||
- list e-mails
|
||||
- retrieve e-mails
|
||||
- enhanced command support for: CAPA, DELE, TOP, STAT, UIDL and NOOP via
|
||||
custom requests
|
||||
- via http-proxy
|
||||
|
||||
POP3S (*1)
|
||||
- implicit pop3s:// support
|
||||
- explicit "STLS" usage to "upgrade" plain pop3:// connections to use SSL
|
||||
- via http-proxy
|
||||
|
||||
IMAP
|
||||
- authentication: Clear Text and SASL
|
||||
- SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9),
|
||||
Kerberos 5 (*4) and External.
|
||||
- list the folders of a mailbox
|
||||
- select a mailbox with support for verifying the UIDVALIDITY
|
||||
- fetch e-mails with support for specifying the UID and SECTION
|
||||
- upload e-mails via the append command
|
||||
- enhanced command support for: EXAMINE, CREATE, DELETE, RENAME, STATUS,
|
||||
STORE, COPY and UID via custom requests
|
||||
- via http-proxy
|
||||
|
||||
IMAPS (*1)
|
||||
- implicit imaps:// support
|
||||
- explicit "STARTTLS" usage to "upgrade" plain imap:// connections to use SSL
|
||||
- via http-proxy
|
||||
|
||||
FOOTNOTES
|
||||
=========
|
||||
|
||||
*1 = requires OpenSSL, GnuTLS, NSS, yassl, axTLS, PolarSSL, WinSSL (native
|
||||
Windows), Secure Transport (native iOS/OS X) or GSKit (native IBM i)
|
||||
*2 = requires OpenLDAP
|
||||
*3 = requires a GSS-API implementation (such as Heimdal or MIT Kerberos) or
|
||||
SSPI (native Windows)
|
||||
*4 = requires a GSS-API implementation, however, only Windows SSPI is
|
||||
currently supported
|
||||
*5 = requires nghttp2 and possibly a recent TLS library
|
||||
*6 = requires c-ares
|
||||
*7 = requires OpenSSL, NSS, GSKit, WinSSL or Secure Transport; GnuTLS, for
|
||||
example, only supports SSLv3 and TLSv1
|
||||
*8 = requires libssh2
|
||||
*9 = requires OpenSSL, GnuTLS, NSS, yassl, Secure Transport or SSPI (native
|
||||
Windows)
|
||||
*10 = requires any of the SSL libraries in (*1) above other than axTLS, which
|
||||
does not support SSLv3
|
||||
*11 = requires libidn or Windows
|
||||
*12 = requires libz
|
||||
*13 = requires libmetalink, and either an Apple or Microsoft operating
|
||||
system, or OpenSSL, or GnuTLS, or NSS
|
||||
*14 = requires a GSS-API implementation (such as Heimdal or MIT Kerberos)
|
||||
*1 = requires OpenSSL
|
||||
*2 = requires OpenLDAP
|
||||
|
284
docs/HISTORY
284
docs/HISTORY
@ -1,284 +0,0 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
How cURL Became Like This
|
||||
=========================
|
||||
|
||||
Towards the end of 1996, Daniel Stenberg was spending time writing an IRC bot
|
||||
for an Amiga related channel on EFnet. He then came up with the idea to make
|
||||
currency-exchange calculations available to Internet Relay Chat (IRC)
|
||||
users. All the necessary data are published on the Web; he just needed to
|
||||
automate their retrieval.
|
||||
|
||||
Daniel simply adopted an existing command-line open-source tool, httpget, that
|
||||
Brazilian Rafael Sagula had written and recently release version 0.1 of. After
|
||||
a few minor adjustments, it did just what he needed.
|
||||
|
||||
1997
|
||||
----
|
||||
|
||||
HttpGet 1.0 was released on April 8th 1997 with brand new HTTP proxy support.
|
||||
|
||||
We soon found and fixed support for getting currencies over GOPHER. Once FTP
|
||||
download support was added, the name of the project was changed and urlget 2.0
|
||||
was released in August 1997. The http-only days were already passed.
|
||||
|
||||
1998
|
||||
----
|
||||
|
||||
The project slowly grew bigger. When upload capabilities were added and the
|
||||
name once again was misleading, a second name change was made and on March 20,
|
||||
1998 curl 4 was released. (The version numbering from the previous names was
|
||||
kept.)
|
||||
|
||||
(Unrelated to this project a company called Curl Corporation registered a US
|
||||
trademark on the name "CURL" on May 18 1998. That company had then already
|
||||
registered the curl.com domain back in November of the previous year. All this
|
||||
was revealed to us much later.)
|
||||
|
||||
SSL support was added, powered by the SSLeay library.
|
||||
|
||||
August, first announcement of curl on freshmeat.net.
|
||||
|
||||
October, with the curl 4.9 release and the introduction of cookie support,
|
||||
curl was no longer released under the GPL license. Now we're at 4000 lines of
|
||||
code, we switched over to the MPL license to restrict the effects of
|
||||
"copyleft".
|
||||
|
||||
November, configure script and reported successful compiles on several
|
||||
major operating systems. The never-quite-understood -F option was added and
|
||||
curl could now simulate quite a lot of a browser. TELNET support was added.
|
||||
|
||||
Curl 5 was released in December 1998 and introduced the first ever curl man
|
||||
page. People started making Linux RPM packages out of it.
|
||||
|
||||
1999
|
||||
----
|
||||
|
||||
January, DICT support added.
|
||||
|
||||
OpenSSL took over where SSLeay was abandoned.
|
||||
|
||||
May, first Debian package.
|
||||
|
||||
August, LDAP:// and FILE:// support added. The curl web site gets 1300 visits
|
||||
weekly. Moved site to curl.haxx.nu.
|
||||
|
||||
Released curl 6.0 in September. 15000 lines of code.
|
||||
|
||||
December 28, added the project on Sourceforge and started using its services
|
||||
for managing the project.
|
||||
|
||||
2000
|
||||
----
|
||||
|
||||
Spring 2000, major internal overhaul to provide a suitable library interface.
|
||||
The first non-beta release was named 7.1 and arrived in August. This offered
|
||||
the easy interface and turned out to be the beginning of actually getting
|
||||
other software and programs to get based on and powered by libcurl. Almost
|
||||
20000 lines of code.
|
||||
|
||||
June 2000: the curl site moves to "curl.haxx.se"
|
||||
|
||||
August, the curl web site gets 4000 visits weekly.
|
||||
|
||||
The PHP guys adopted libcurl already the same month, when the first ever third
|
||||
party libcurl binding showed up. CURL has been a supported module in PHP since
|
||||
the release of PHP 4.0.2. This would soon get followers. More than 16
|
||||
different bindings exist at the time of this writing.
|
||||
|
||||
September, kerberos4 support was added.
|
||||
|
||||
In November started the work on a test suite for curl. It was later re-written
|
||||
from scratch again. The libcurl major SONAME number was set to 1.
|
||||
|
||||
2001
|
||||
----
|
||||
|
||||
January, Daniel released curl 7.5.2 under a new license again: MIT (or
|
||||
MPL). The MIT license is extremely liberal and can be used combined with GPL
|
||||
in other projects. This would finally put an end to the "complaints" from
|
||||
people involved in GPLed projects that previously were prohibited from using
|
||||
libcurl while it was released under MPL only. (Due to the fact that MPL is
|
||||
deemed "GPL incompatible".)
|
||||
|
||||
curl supports HTTP 1.1 starting with the release of 7.7, March 22 2001. This
|
||||
also introduced libcurl's ability to do persistent connections. 24000 lines of
|
||||
code. The libcurl major SONAME number was bumped to 2 due to this overhaul.
|
||||
|
||||
The first experimental ftps:// support was added in March 2001.
|
||||
|
||||
August. curl is bundled in Mac OS X, 10.1. It was already becoming more and
|
||||
more of a standard utility of Linux distributions and a regular in the BSD
|
||||
ports collections. The curl web site gets 8000 visits weekly. Curl Corporation
|
||||
contacted Daniel to discuss "the name issue". After Daniel's reply, they have
|
||||
never since got in touch again.
|
||||
|
||||
September, libcurl 7.9 introduces cookie jar and curl_formadd(). During the
|
||||
forthcoming 7.9.x releases, we introduced the multi interface slowly and
|
||||
without much whistles.
|
||||
|
||||
2002
|
||||
----
|
||||
|
||||
June, the curl web site gets 13000 visits weekly. curl and libcurl is
|
||||
35000 lines of code. Reported successful compiles on more than 40 combinations
|
||||
of CPUs and operating systems.
|
||||
|
||||
To estimate number of users of the curl tool or libcurl library is next to
|
||||
impossible. Around 5000 downloaded packages each week from the main site gives
|
||||
a hint, but the packages are mirrored extensively, bundled with numerous OS
|
||||
distributions and otherwise retrieved as part of other software.
|
||||
|
||||
September, with the release of curl 7.10 it is released under the MIT license
|
||||
only.
|
||||
|
||||
2003
|
||||
----
|
||||
|
||||
January. Started working on the distributed curl tests. The autobuilds.
|
||||
|
||||
February, the curl site averages at 20000 visits weekly. At any given moment,
|
||||
there's an average of 3 people browsing the curl.haxx.se site.
|
||||
|
||||
Multiple new authentication schemes are supported: Digest (May), NTLM (June)
|
||||
and Negotiate (June).
|
||||
|
||||
November: curl 7.10.8 is released. 45000 lines of code. ~55000 unique visitors
|
||||
to the curl.haxx.se site. Five official web mirrors.
|
||||
|
||||
December, full-fledged SSL for FTP is supported.
|
||||
|
||||
2004
|
||||
----
|
||||
|
||||
January: curl 7.11.0 introduced large file support.
|
||||
|
||||
June: curl 7.12.0 introduced IDN support. 10 official web mirrors.
|
||||
|
||||
This release bumped the major SONAME to 3 due to the removal of the
|
||||
curl_formparse() function
|
||||
|
||||
August: Curl and libcurl 7.12.1
|
||||
|
||||
Public curl release number: 82
|
||||
Releases counted from the very beginning: 109
|
||||
Available command line options: 96
|
||||
Available curl_easy_setopt() options: 120
|
||||
Number of public functions in libcurl: 36
|
||||
Amount of public web site mirrors: 12
|
||||
Number of known libcurl bindings: 26
|
||||
|
||||
2005
|
||||
----
|
||||
|
||||
April. GnuTLS can now optionally be used for the secure layer when curl is
|
||||
built.
|
||||
|
||||
September: TFTP support was added.
|
||||
|
||||
More than 100,000 unique visitors of the curl web site. 25 mirrors.
|
||||
|
||||
December: security vulnerability: libcurl URL Buffer Overflow
|
||||
|
||||
2006
|
||||
----
|
||||
|
||||
January. We dropped support for Gopher. We found bugs in the implementation
|
||||
that turned out having been introduced years ago, so with the conclusion that
|
||||
nobody had found out in all this time we removed it instead of fixing it.
|
||||
|
||||
March: security vulnerability: libcurl TFTP Packet Buffer Overflow
|
||||
|
||||
April: Added the multi_socket() API
|
||||
|
||||
September: The major SONAME number for libcurl was bumped to 4 due to the
|
||||
removal of ftp third party transfer support.
|
||||
|
||||
November: Added SCP and SFTP support
|
||||
|
||||
2007
|
||||
----
|
||||
|
||||
February: Added support for the Mozilla NSS library to do the SSL/TLS stuff
|
||||
|
||||
July: security vulnerability: libcurl GnuTLS insufficient cert verification
|
||||
|
||||
2008
|
||||
----
|
||||
|
||||
November:
|
||||
|
||||
Command line options: 128
|
||||
curl_easy_setopt() options: 158
|
||||
Public functions in libcurl: 58
|
||||
Known libcurl bindings: 37
|
||||
Contributors: 683
|
||||
|
||||
145,000 unique visitors. >100 GB downloaded.
|
||||
|
||||
2009
|
||||
----
|
||||
|
||||
March: security vulnerability: libcurl Arbitrary File Access
|
||||
|
||||
August: security vulnerability: libcurl embedded zero in cert name
|
||||
|
||||
December: Added support for IMAP, POP3 and SMTP
|
||||
|
||||
2010
|
||||
----
|
||||
|
||||
January: Added support for RTSP
|
||||
|
||||
February: security vulnerability: libcurl data callback excessive length
|
||||
|
||||
March: The project switched over to use git (hosted by github) instead of CVS
|
||||
for source code control
|
||||
|
||||
May: Added support for RTMP
|
||||
|
||||
Added support for PolarSSL to do the SSL/TLS stuff
|
||||
|
||||
August:
|
||||
|
||||
Public curl releases: 117
|
||||
Command line options: 138
|
||||
curl_easy_setopt() options: 180
|
||||
Public functions in libcurl: 58
|
||||
Known libcurl bindings: 39
|
||||
Contributors: 808
|
||||
|
||||
Gopher support added (re-added actually)
|
||||
|
||||
2012
|
||||
----
|
||||
|
||||
July: Added support for Schannel (native Windows TLS backend) and Darwin SSL
|
||||
(Native Mac OS X and iOS TLS backend).
|
||||
|
||||
Supports metalink
|
||||
|
||||
October: SSH-agent support.
|
||||
|
||||
2013
|
||||
----
|
||||
|
||||
February: Cleaned up internals to always uses the "multi" non-blocking
|
||||
approach internally and only expose the blocking API with a wrapper.
|
||||
|
||||
September: First small steps on supporting HTTP/2 with nghttp2.
|
||||
|
||||
October: Removed krb4 support.
|
||||
|
||||
December: Happy eyeballs.
|
||||
|
||||
2014
|
||||
----
|
||||
|
||||
March: first real release supporting HTTP/2
|
||||
|
||||
September: Web site had 245,000 unique visitors and served 236GB data
|
@ -1,123 +0,0 @@
|
||||
Updated: July 3, 2012 (https://curl.haxx.se/docs/http-cookies.html)
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
|
||||
HTTP Cookies
|
||||
|
||||
1. HTTP Cookies
|
||||
1.1 Cookie overview
|
||||
1.2 Cookies saved to disk
|
||||
1.3 Cookies with curl the command line tool
|
||||
1.4 Cookies with libcurl
|
||||
1.5 Cookies with javascript
|
||||
|
||||
==============================================================================
|
||||
|
||||
1. HTTP Cookies
|
||||
|
||||
1.1 Cookie overview
|
||||
|
||||
HTTP cookies are pieces of 'name=contents' snippets that a server tells the
|
||||
client to hold and then the client sends back those the server on subsequent
|
||||
requests to the same domains/paths for which the cookies were set.
|
||||
|
||||
Cookies are either "session cookies" which typically are forgotten when the
|
||||
session is over which is often translated to equal when browser quits, or
|
||||
the cookies aren't session cookies they have expiration dates after which
|
||||
the client will throw them away.
|
||||
|
||||
Cookies are set to the client with the Set-Cookie: header and are sent to
|
||||
servers with the Cookie: header.
|
||||
|
||||
For a very long time, the only spec explaining how to use cookies was the
|
||||
original Netscape spec from 1994: https://curl.haxx.se/rfc/cookie_spec.html
|
||||
|
||||
In 2011, RFC6265 (https://www.ietf.org/rfc/rfc6265.txt) was finally published
|
||||
and details how cookies work within HTTP.
|
||||
|
||||
1.2 Cookies saved to disk
|
||||
|
||||
Netscape once created a file format for storing cookies on disk so that they
|
||||
would survive browser restarts. curl adopted that file format to allow
|
||||
sharing the cookies with browsers, only to see browsers move away from that
|
||||
format. Modern browsers no longer use it, while curl still does.
|
||||
|
||||
The netscape cookie file format stores one cookie per physical line in the
|
||||
file with a bunch of associated meta data, each field separated with
|
||||
TAB. That file is called the cookiejar in curl terminology.
|
||||
|
||||
When libcurl saves a cookiejar, it creates a file header of its own in which
|
||||
there is a URL mention that will link to the web version of this document.
|
||||
|
||||
1.3 Cookies with curl the command line tool
|
||||
|
||||
curl has a full cookie "engine" built in. If you just activate it, you can
|
||||
have curl receive and send cookies exactly as mandated in the specs.
|
||||
|
||||
Command line options:
|
||||
|
||||
-b, --cookie
|
||||
|
||||
tell curl a file to read cookies from and start the cookie engine, or if
|
||||
it isn't a file it will pass on the given string. -b name=var works and so
|
||||
does -b cookiefile.
|
||||
|
||||
-j, --junk-session-cookies
|
||||
|
||||
when used in combination with -b, it will skip all "session cookies" on
|
||||
load so as to appear to start a new cookie session.
|
||||
|
||||
-c, --cookie-jar
|
||||
|
||||
tell curl to start the cookie engine and write cookies to the given file
|
||||
after the request(s)
|
||||
|
||||
1.4 Cookies with libcurl
|
||||
|
||||
libcurl offers several ways to enable and interface the cookie engine. These
|
||||
options are the ones provided by the native API. libcurl bindings may offer
|
||||
access to them using other means.
|
||||
|
||||
CURLOPT_COOKIE
|
||||
|
||||
Is used when you want to specify the exact contents of a cookie header to
|
||||
send to the server.
|
||||
|
||||
CURLOPT_COOKIEFILE
|
||||
|
||||
Tell libcurl to activate the cookie engine, and to read the initial set of
|
||||
cookies from the given file. Read-only.
|
||||
|
||||
CURLOPT_COOKIEJAR
|
||||
|
||||
Tell libcurl to activate the cookie engine, and when the easy handle is
|
||||
closed save all known cookies to the given cookiejar file. Write-only.
|
||||
|
||||
CURLOPT_COOKIELIST
|
||||
|
||||
Provide detailed information about a single cookie to add to the internal
|
||||
storage of cookies. Pass in the cookie as a HTTP header with all the
|
||||
details set, or pass in a line from a netscape cookie file. This option
|
||||
can also be used to flush the cookies etc.
|
||||
|
||||
CURLINFO_COOKIELIST
|
||||
|
||||
Extract cookie information from the internal cookie storage as a linked
|
||||
list.
|
||||
|
||||
1.5 Cookies with javascript
|
||||
|
||||
These days a lot of the web is built up by javascript. The webbrowser loads
|
||||
complete programs that render the page you see. These javascript programs
|
||||
can also set and access cookies.
|
||||
|
||||
Since curl and libcurl are plain HTTP clients without any knowledge of or
|
||||
capability to handle javascript, such cookies will not be detected or used.
|
||||
|
||||
Often, if you want to mimic what a browser does on such web sites, you can
|
||||
record web browser HTTP traffic when using such a site and then repeat the
|
||||
cookie operations using curl or libcurl.
|
111
docs/HTTP2.md
111
docs/HTTP2.md
@ -1,111 +0,0 @@
|
||||
HTTP/2 with curl
|
||||
================
|
||||
|
||||
[HTTP/2 Spec](https://www.rfc-editor.org/rfc/rfc7540.txt)
|
||||
[http2 explained](https://daniel.haxx.se/http2/)
|
||||
|
||||
Build prerequisites
|
||||
-------------------
|
||||
- nghttp2
|
||||
- OpenSSL, NSS, GnutTLS or PolarSSL with a new enough version
|
||||
|
||||
[nghttp2](https://nghttp2.org/)
|
||||
-------------------------------
|
||||
|
||||
libcurl uses this 3rd party library for the low level protocol handling
|
||||
parts. The reason for this is that HTTP/2 is much more complex at that layer
|
||||
than HTTP/1.1 (which we implement on our own) and that nghttp2 is an already
|
||||
existing and well functional library.
|
||||
|
||||
We require at least version 1.0.0.
|
||||
|
||||
Over an http:// URL
|
||||
-------------------
|
||||
|
||||
If `CURLOPT_HTTP_VERSION` is set to `CURL_HTTP_VERSION_2_0`, libcurl will
|
||||
include an upgrade header in the initial request to the host to allow
|
||||
upgrading to HTTP/2.
|
||||
|
||||
Possibly we can later introduce an option that will cause libcurl to fail if
|
||||
not possible to upgrade. Possibly we introduce an option that makes libcurl
|
||||
use HTTP/2 at once over http://
|
||||
|
||||
Over an https:// URL
|
||||
--------------------
|
||||
|
||||
If `CURLOPT_HTTP_VERSION` is set to `CURL_HTTP_VERSION_2_0`, libcurl will use
|
||||
ALPN (or NPN) to negotiate which protocol to continue with. Possibly introduce
|
||||
an option that will cause libcurl to fail if not possible to use HTTP/2.
|
||||
|
||||
`CURL_HTTP_VERSION_2TLS` was added in 7.47.0 as a way to ask libcurl to prefer
|
||||
HTTP/2 for HTTPS but stick to 1.1 by default for plain old HTTP connections.
|
||||
|
||||
ALPN is the TLS extension that HTTP/2 is expected to use. The NPN extension is
|
||||
for a similar purpose, was made prior to ALPN and is used for SPDY so early
|
||||
HTTP/2 servers are implemented using NPN before ALPN support is widespread.
|
||||
|
||||
`CURLOPT_SSL_ENABLE_ALPN` and `CURLOPT_SSL_ENABLE_NPN` are offered to allow
|
||||
applications to explicitly disable ALPN or NPN.
|
||||
|
||||
SSL libs
|
||||
--------
|
||||
|
||||
The challenge is the ALPN and NPN support and all our different SSL
|
||||
backends. You may need a fairly updated SSL library version for it to
|
||||
provide the necessary TLS features. Right now we support:
|
||||
|
||||
- OpenSSL: ALPN and NPN
|
||||
- NSS: ALPN and NPN
|
||||
- GnuTLS: ALPN
|
||||
- PolarSSL: ALPN
|
||||
|
||||
Multiplexing
|
||||
------------
|
||||
|
||||
Starting in 7.43.0, libcurl fully supports HTTP/2 multiplexing, which is the
|
||||
term for doing multiple independent transfers over the same physical TCP
|
||||
connection.
|
||||
|
||||
To take advantage of multiplexing, you need to use the multi interface and set
|
||||
`CURLMOPT_PIPELINING` to `CURLPIPE_MULTIPLEX`. With that bit set, libcurl will
|
||||
attempt to re-use existing HTTP/2 connections and just add a new stream over
|
||||
that when doing subsequent parallel requests.
|
||||
|
||||
While libcurl sets up a connection to a HTTP server there is a period during
|
||||
which it doesn't know if it can pipeline or do multiplexing and if you add new
|
||||
transfers in that period, libcurl will default to start new connections for
|
||||
those transfers. With the new option `CURLOPT_PIPEWAIT` (added in 7.43.0), you
|
||||
can ask that a transfer should rather wait and see in case there's a
|
||||
connection for the same host in progress that might end up being possible to
|
||||
multiplex on. It favours keeping the number of connections low to the cost of
|
||||
slightly longer time to first byte transferred.
|
||||
|
||||
Applications
|
||||
------------
|
||||
|
||||
We hide HTTP/2's binary nature and convert received HTTP/2 traffic to headers
|
||||
in HTTP 1.1 style. This allows applications to work unmodified.
|
||||
|
||||
curl tool
|
||||
---------
|
||||
|
||||
curl offers the `--http2` command line option to enable use of HTTP/2.
|
||||
|
||||
Since 7.47.0, the curl tool enables HTTP/2 by default for HTTPS connections.
|
||||
|
||||
HTTP Alternative Services
|
||||
-------------------------
|
||||
|
||||
Alt-Svc is a suggested extension with a corresponding frame (ALTSVC) in HTTP/2
|
||||
that tells the client about an alternative "route" to the same content for the
|
||||
same origin server that you get the response from. A browser or long-living
|
||||
client can use that hint to create a new connection asynchronously. For
|
||||
libcurl, we may introduce a way to bring such clues to the applicaton and/or
|
||||
let a subsequent request use the alternate route
|
||||
automatically. [Spec](https://tools.ietf.org/html/draft-ietf-httpbis-alt-svc-14)
|
||||
|
||||
TODO
|
||||
----
|
||||
|
||||
- Implement "prior-knowledge" HTTP/2 connections over clear text so that
|
||||
curl can connect with HTTP/2 at once without 1.1+Upgrade.
|
1099
docs/INSTALL
1099
docs/INSTALL
File diff suppressed because it is too large
Load Diff
@ -1,100 +0,0 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
How To Compile with CMake
|
||||
|
||||
Building with CMake
|
||||
==========================
|
||||
This document describes how to compile, build and install curl and libcurl
|
||||
from source code using the CMake build tool. To build with CMake, you will
|
||||
of course have to first install CMake. The minimum required version of
|
||||
CMake is specified in the file CMakeLists.txt found in the top of the curl
|
||||
source tree. Once the correct version of CMake is installed you can follow
|
||||
the instructions below for the platform you are building on.
|
||||
|
||||
CMake builds can be configured either from the command line, or from one
|
||||
of CMake's GUI's.
|
||||
|
||||
Current flaws in the curl CMake build
|
||||
=====================================
|
||||
|
||||
Missing features in the cmake build:
|
||||
|
||||
- Builds libcurl without large file support
|
||||
- Can't select which SSL library to build with, only OpenSSL
|
||||
- Doesn't build with SCP and SFTP support (libssh2)
|
||||
- Doesn't allow different resolver backends (no c-ares build support)
|
||||
- No RTMP support built
|
||||
- Doesn't allow build curl and libcurl debug enabled
|
||||
- Doesn't allow a custom CA bundle path
|
||||
- Doesn't allow you to disable specific protocols from the build
|
||||
- Doesn't find or use krb4 or GSS
|
||||
- Rebuilds test files too eagerly, but still can't run the tests
|
||||
|
||||
|
||||
Important notice
|
||||
==================
|
||||
If you got your curl sources from a distribution tarball, make sure to
|
||||
delete the generic 'include/curl/curlbuild.h' file that comes with it:
|
||||
rm -f curl/include/curl/curlbuild.h
|
||||
|
||||
The purpose of this file is to provide reasonable definitions for systems
|
||||
where autoconfiguration is not available. CMake will create its own
|
||||
version of this file in its build directory. If the "generic" version
|
||||
is not deleted, weird build errors may occur on some systems.
|
||||
|
||||
Command Line CMake
|
||||
==================
|
||||
A CMake build of curl is similar to the autotools build of curl. It
|
||||
consists of the following steps after you have unpacked the source.
|
||||
|
||||
1. Create an out of source build tree parallel to the curl source
|
||||
tree and change into that directory
|
||||
|
||||
$ mkdir curl-build
|
||||
$ cd curl-build
|
||||
|
||||
2. Run CMake from the build tree, giving it the path to the top of
|
||||
the curl source tree. CMake will pick a compiler for you. If you
|
||||
want to specify the compile, you can set the CC environment
|
||||
variable prior to running CMake.
|
||||
|
||||
$ cmake ../curl
|
||||
$ make
|
||||
|
||||
3. Install to default location:
|
||||
|
||||
$ make install
|
||||
|
||||
(The test suite does not work with the cmake build)
|
||||
|
||||
ccmake
|
||||
=========
|
||||
CMake comes with a curses based interface called ccmake. To run ccmake on
|
||||
a curl use the instructions for the command line cmake, but substitute
|
||||
ccmake ../curl for cmake ../curl. This will bring up a curses interface
|
||||
with instructions on the bottom of the screen. You can press the "c" key
|
||||
to configure the project, and the "g" key to generate the project. After
|
||||
the project is generated, you can run make.
|
||||
|
||||
cmake-gui
|
||||
=========
|
||||
CMake also comes with a Qt based GUI called cmake-gui. To configure with
|
||||
cmake-gui, you run cmake-gui and follow these steps:
|
||||
1. Fill in the "Where is the source code" combo box with the path to
|
||||
the curl source tree.
|
||||
2. Fill in the "Where to build the binaries" combo box with the path
|
||||
to the directory for your build tree, ideally this should not be the
|
||||
same as the source tree, but a parallel directory called curl-build or
|
||||
something similar.
|
||||
3. Once the source and binary directories are specified, press the
|
||||
"Configure" button.
|
||||
4. Select the native build tool that you want to use.
|
||||
5. At this point you can change any of the options presented in the
|
||||
GUI. Once you have selected all the options you want, click the
|
||||
"Generate" button.
|
||||
6. Run the native build tool that you used CMake to generate.
|
||||
|
@ -1,302 +0,0 @@
|
||||
DevCpp-Mingw Install & Compilation Sept 2005
|
||||
==================================
|
||||
|
||||
Reference Emails available at curl@haxx.se:
|
||||
|
||||
Libcurl Install and Use Issues
|
||||
Awaiting an Answer for Win 32 Install
|
||||
res = curl_easy_perform(curl); Error
|
||||
Makefile Issues
|
||||
|
||||
|
||||
Having previously done a thorough review of what was available that met my
|
||||
requirements under GPL, I settled for Libcurl as the software of choice for
|
||||
many reasons not the least of which was the support.
|
||||
|
||||
Background
|
||||
----------
|
||||
|
||||
This quest started when I innocently tried to incorporate the libcurl library
|
||||
into my simple source code. I figured that a few easy steps would accomplish
|
||||
this without major headaches. I had no idea that I would be facing an almost
|
||||
insurmountable challenge.
|
||||
|
||||
The main problem lies in two areas. First the bulk of support for libcurl
|
||||
exists for a Unix/linux command line environments. This is of little help when
|
||||
it comes to Windows O/S.
|
||||
|
||||
Secondly the help that does exist for the Windows O/S focused around mingw
|
||||
through a command line argument environment.
|
||||
|
||||
You may ask "Why is this a problem?"
|
||||
|
||||
I'm using a Windows O/S with DevCpp. For those of you who are unfamiliar with
|
||||
DevCpp, it is a window shell GUI that replaces the command line environment
|
||||
for gcc. A definite improvement that I am unwilling to give up. However using
|
||||
DevCpp presented its own set of issues. Inadvertently I also made some
|
||||
careless errors such as compiling the 7.14 version of Makefile with an older
|
||||
version of source code. Thanks to Dan Fandrich for picking this up.
|
||||
|
||||
I did eventually with the help of Daniel, Phillipe and others manage to
|
||||
implement successfully (the only mingw available version)
|
||||
curl-7.13.0-win32-ssl-devel-mingw32 into the DevCpp environment. Only the
|
||||
dynamic libcurl.dll libcurldll.a libraries worked. The static library which I
|
||||
was interested in did not. Furthermore when I tried to implement one of the
|
||||
examples included with the curl package (get info.c) it caused the executable
|
||||
to crash. Tracing the bug I found it in the code and function res =
|
||||
curl_easy_perform(curl);.
|
||||
|
||||
At this point I had to make a choice as to whether invest my limited
|
||||
time-energy resource to fixing the bug or to compile the new version
|
||||
available. After searching the archives I found a very similar or the same bug
|
||||
reported from version 7.12x on. Daniel did inform me that he thought that this
|
||||
bug had been fixed with the latest version. So I proceeded to compile the
|
||||
latest SSL version where I faced other challenges.
|
||||
|
||||
In order to make this process unremarkable for others using the same
|
||||
environment I decided to document the process so that others will find it
|
||||
routine. It would be a shame if newbies could not implement this excellent
|
||||
package for their use.
|
||||
|
||||
I would like to thank the many others in this forum and in the DevCpp forum
|
||||
for their help. Without your help I may either have given up or it would have
|
||||
taken me many times longer to achieve success.
|
||||
|
||||
The Cookbook Approach
|
||||
---------------------
|
||||
|
||||
This discussion will be confined to a SSL static library compilation and
|
||||
installation. Limited mention and comments will be inserted where appropriate
|
||||
to help with non-SSL, dynamic libraries and executables.
|
||||
|
||||
|
||||
Using Makefile from DevCpp to compile Libcurl libraries
|
||||
|
||||
Preamble
|
||||
--------
|
||||
|
||||
Using the latest version release - curl-7.14.0.tar.gz. Curl source code is
|
||||
platform independent. This simply means that the source code can be compiled
|
||||
for any Operating System (Linux/Unix Windows etc. and variations of thereof).
|
||||
|
||||
The first thing to note is that inside curl-7.14.0 you will find two folders
|
||||
lib and src. Both contain Makefile.m32 (required for win mingw library or exe
|
||||
compilation) files which are different. The main difference between these two
|
||||
folders and the makefiles is that the src folder contents are used to compile
|
||||
an executable file(curl.exe) while the lib folder contents are used to compile
|
||||
a static (libcurl.a) and dynamic (libcurl.dll & libcurldll.a) file that can be
|
||||
used to compile libcurl with your own source code so that one can use and
|
||||
access all libcurl functions.
|
||||
|
||||
Before we start please make sure that DevCpp is installed properly. In
|
||||
particular make sure you have no spaces in the name of any of the directories
|
||||
and subdirectories where DevCpp is installed. Failure to comply with the
|
||||
install instructions may produce erratic behaviour in DevCpp. For further info
|
||||
check the following sites
|
||||
|
||||
http://aditsu.freeunixhost.com/dev-cpp-faq.html
|
||||
https://sourceforge.net/p/dev-cpp/discussion/48211/thread/2a85ea46
|
||||
|
||||
As I have mentioned before I will confine this to the SSL Library compilations
|
||||
but the process is very similar for compilation of the executable - curl.exe;
|
||||
just substitute the src folder makefile in its stead.
|
||||
|
||||
First use a text processor Notepad, or your own favourite text processor. To
|
||||
engage your favourite text processor, select Makefile.m32 click once with your
|
||||
mouse on file icon; icon turns blue, press the shift key and right-click on
|
||||
mouse, menu appears select "Open with", select your favourite text processor.
|
||||
|
||||
Next read the contents of Makefile.m32. It includes instructions on its use.
|
||||
|
||||
Method I - DOS Command Line
|
||||
---------------------------
|
||||
|
||||
Note - The only reason I have included this method is that Method II which is
|
||||
the preferred method for compiling does not allow for the setting of option
|
||||
switches (e.g. SSL = 1 or SSL =0). At least that's what they tell me at the
|
||||
Dev-Cpp forum.
|
||||
|
||||
1 - Make a copy of (D:\Dev-Cpp\bin) bin folder and name it "bin Original"
|
||||
place it in the Dev-Cpp installed directory (D:\Dev-Cpp\ for this example)
|
||||
|
||||
2 - Copy the entire contents of the LIB folder of curl-7.14.0.tar.gz or zip
|
||||
version into the bin folder above (D:\Dev-Cpp\bin). The reason being is that
|
||||
the make.exe file resides in this folder. Make.exe will use - Makefile.m32,
|
||||
Makefile.inc, and the source code included in the lib folder to compile the
|
||||
source code. There is a PATH issue with make.exe that remains unresolved at
|
||||
least for me. Unless the entire source code to be compiled is placed entirely
|
||||
within the directory of make.exe an error message will be generated - "file
|
||||
xxxx.yyy not available".
|
||||
|
||||
3- Go to Dev-Cpp\bin and double click on make .exe. You will see a DOS window
|
||||
quickly pop up and close very quickly. Not to worry! Please do not skip this
|
||||
step.
|
||||
|
||||
4- Click on the start button\Programs\MS-DOS Prompt.Once the DOS Window is up
|
||||
Type the disk drive letter (e.g. E: ) engage the enter button. The path should
|
||||
automatically take you to the directory of the make.exe file.
|
||||
|
||||
5- To compile the source code simply type at the DOS prompt make -f
|
||||
Makefile.m32 as per instructions contained in the Makefile.m32 file (use any
|
||||
text processor to read instructions). I don't believe that this makefile
|
||||
allows for the option of non SSL. Ignore any warnings.
|
||||
|
||||
6- Collect and make copies of libcurl.a, libcurl.dll, libcurldll.a and any *.o
|
||||
compilations you might need in another directory outside of the bin directory
|
||||
as you will need this files shortly to set up libcurl for use with
|
||||
Dev-cpp. For most apps *.o is not required. Later on we will show what to do
|
||||
with these files.
|
||||
|
||||
7- You are finished but before closing we need to do cleanup - erase the bin
|
||||
folder and rename the "bin Original" folder created in step 1 to bin.
|
||||
|
||||
Note to compile a curl executable the process is probably similar but instead
|
||||
of using the LIB folder contents use the SRC folder contents and Makefiles in
|
||||
curl-7.14.0.tar.gz. File directories relative placements must be respected for
|
||||
compiling to take place successfully. This may not be possible with the PATH
|
||||
problem that make.exe experiences. If anyone has solved this PATH issue and
|
||||
please make sure it actually works on Win 9x/2000/XP before letting me
|
||||
know. Then please let me or Daniel in on the solution so that it can be
|
||||
included with these instructions. Thanks.
|
||||
|
||||
or
|
||||
|
||||
Method II - Dev-Cpp GUI
|
||||
-----------------------
|
||||
|
||||
1- Copy the entire contents of the LIB folder of curl-7.14.0.tar.gz or zip
|
||||
version into any folder outside of (Dev-Cpp\bin).
|
||||
|
||||
2- Drop the File/New/click on Project.
|
||||
|
||||
3- New Project Dialogue box appears. Double click on the Static Library.
|
||||
|
||||
4- Create Project Dialogue box appears. Select the LIB folder location to
|
||||
place and locate your Project File Name. Placing the Project File Name
|
||||
elsewhere may cause problems (PATH issue problem again).
|
||||
|
||||
5- Drop down the Project/Project Options. Project Options Dialogue box
|
||||
appears.
|
||||
|
||||
6- Select the Makefile tab in the Project Options Dialogue Box. Check Box -
|
||||
Use Custom Makefile. Click on the Folder icon at the extreme right of the
|
||||
Check Box. Select Makefile.m32 in the folder wherever you have placed the
|
||||
contents of the LIB Folder. Press OK and close the Dialogue Box.
|
||||
|
||||
7- Drop the Menu Project/Click on Add to Project. Open File Dialogue Box
|
||||
appears. The Dialogue Box should open in the folder wherever you have placed
|
||||
the contents of the LIB Folder. If not go there.
|
||||
|
||||
8- Select Crtl-A to select all files in the LIB folder. Click on open to add
|
||||
files and close box. Wait till all files are added. This may take 30 seconds
|
||||
or longer.
|
||||
|
||||
9- Drop the Menu Execute/Click on Compile.
|
||||
|
||||
10- That's it.
|
||||
|
||||
|
||||
The following steps must be completed if Curl is to work properly
|
||||
=================================================================
|
||||
|
||||
LIB folder inclusions (*.a placement)
|
||||
-------------------------------------
|
||||
|
||||
1- Refer to Method I - DOS Command Line point # 6 Take libcurl.a, libcurldll.a
|
||||
and install it in the directory C( or whichever drive Dev is installed)
|
||||
:\Dev-Cpp\lib.
|
||||
|
||||
|
||||
Include Folder
|
||||
--------------
|
||||
|
||||
1- Create a new folder by the name of curl (do not change the name curl to
|
||||
some other name as it will cause major issues) in the directory
|
||||
C:\Dev-Cpp\include.
|
||||
|
||||
2- Copy the entire contents of the curl folder of curl-7.14.0.tar.gz or zip
|
||||
version into the newly created curl directory - C:\Dev-Cpp\include\curl.
|
||||
|
||||
Links To Include And Lib Folder
|
||||
-------------------------------
|
||||
|
||||
1- Drop the Menu - Tools\Compiler Options\Directories\Libraries. Make sure
|
||||
that C( or whichever drive Dev is installed):\DEV-CPP\lib is included.
|
||||
|
||||
2- Next select the Menu - Tools\Compiler Options\Directories\C Includes. Make
|
||||
sure that C:\DEV-CPP\include and C:\Dev-Cpp\include\curl are included.
|
||||
|
||||
3- Next select the Menu - Tools\Compiler Options\Directories\C++
|
||||
Includes. Make sure that C:\DEV-CPP\include and C:\Dev-Cpp\include\curl are
|
||||
included.
|
||||
|
||||
Linker Links
|
||||
------------
|
||||
|
||||
1- Drop the Menu - Tools\Compiler Options\Directories\Compiler.
|
||||
|
||||
2- Make sure that the box "Add these commands to the linker command line" is
|
||||
checked.
|
||||
|
||||
3- Include in the white space immediately below the box referred in 2 -lcurl
|
||||
-lws2_32.
|
||||
|
||||
SSL Files
|
||||
---------
|
||||
|
||||
1- Get the latest openSSL (as of time of this writing)
|
||||
openssl-0.9.7e-win32-bin.zip for the minimalist package of the openssl-0.9.7e
|
||||
binaries ported to MS Windows 95/98/NT/XP using the MingW32/GCC-3.1
|
||||
development environment. The file may be downloaded at
|
||||
https://curl.haxx.se/download/.
|
||||
|
||||
2- Open the above zip file. You will find two files - SDL.dll,
|
||||
SDL_mixer.dll. Install them in the directory C:\WINDOWS\SYSTEM32 for Win 9x
|
||||
users and c:\winnt\system32 for NT-family users.
|
||||
|
||||
Multithreading Files
|
||||
--------------------
|
||||
|
||||
To be completed
|
||||
|
||||
#define
|
||||
-------
|
||||
|
||||
1- Make sure that your program includes the following - #define CURL_STATICLIB
|
||||
must be declared FIRST before any other define functions may be
|
||||
added. Otherwise you may experience link errors.
|
||||
|
||||
2- Don't forget to include #include "curl/curl.h".
|
||||
|
||||
e.g.
|
||||
#define CURL_STATICLIB
|
||||
#include <windows.h>
|
||||
#include "curl/curl.h"
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
etc...
|
||||
|
||||
|
||||
Static or Dynamic Library
|
||||
-------------------------
|
||||
|
||||
The above steps apply for the use by a static library. Should you choose to
|
||||
use a dynamic library you will be required to perform these additional steps.
|
||||
|
||||
1- Refer to Method I - DOS Command Line point # 6. Install libcurl.dll in the
|
||||
directory C:\WINDOWS\SYSTEM32 for Win 9x users and c:\winnt\system32 for
|
||||
NT-family users.
|
||||
|
||||
2- Refer to Linker Links point 3 - Replace -lcurl with -lcurldll.
|
||||
|
||||
Voila you're done.
|
||||
|
||||
The non-SSL static Library build may not be possible to use at least as of the
|
||||
time of this writing - v7.14. Check reference emails - Phillipe and I found it
|
||||
impossible to fully compile as certain files were missing for linking. No big
|
||||
loss as SSL is a major plus.
|
||||
|
||||
Hope this Helps
|
||||
|
||||
Tom
|
1091
docs/INTERNALS
1091
docs/INTERNALS
File diff suppressed because it is too large
Load Diff
259
docs/KNOWN_BUGS
259
docs/KNOWN_BUGS
@ -1,259 +0,0 @@
|
||||
These are problems known to exist at the time of this release. Feel free to
|
||||
join in and help us correct one or more of these! Also be sure to check the
|
||||
changelog of the current development status, as one or more of these problems
|
||||
may have been fixed since this was written!
|
||||
|
||||
93. It is not possible to pass a 64-bit value using CURLFORM_CONTENTLEN with
|
||||
CURLFORM_ARRAY, when compiled on 32-bit platforms that support 64-bit
|
||||
integers. This is because the underlying structure 'curl_forms' uses a dual
|
||||
purpose char* for storing these values in via casting. For more information
|
||||
see the now closed related issue:
|
||||
https://github.com/curl/curl/issues/608
|
||||
|
||||
92. curl tool 7.47.1 in Windows will not --output to literal paths \\?\ or to
|
||||
reserved dos device names unless the device prefix \\.\ is used. To send
|
||||
output to a device that has a reserved dos device name you can use the
|
||||
Windows device prefix (eg: --output \\.\NUL). You can also use the
|
||||
redirection operator to send output to a literal path or a reserved device
|
||||
name (eg: > NUL).
|
||||
The next release of curl will support --output in Windows to literal paths
|
||||
and to reserved device names without the device prefix.
|
||||
https://github.com/curl/curl/commit/c3aac48
|
||||
https://github.com/curl/curl/commit/4fc80f3
|
||||
|
||||
91. "curl_easy_perform hangs with imap and PolarSSL"
|
||||
https://github.com/curl/curl/issues/334
|
||||
|
||||
90. IMAP "SEARCH ALL" truncates output on large boxes. "A quick search of the
|
||||
code reveals that pingpong.c contains some truncation code, at line 408,
|
||||
when it deems the server response to be too large truncating it to 40
|
||||
characters"
|
||||
https://curl.haxx.se/bug/view.cgi?id=1366
|
||||
|
||||
89. Disabling HTTP Pipelining when there are ongoing transfers can lead to
|
||||
heap corruption and crash. https://curl.haxx.se/bug/view.cgi?id=1411
|
||||
|
||||
88. libcurl doesn't support CURLINFO_FILETIME for SFTP transfers and thus
|
||||
curl's -R option also doesn't work then.
|
||||
|
||||
87. -J/--remote-header-name doesn't decode %-encoded file names. RFC6266
|
||||
details how it should be done. The can of worm is basically that we have no
|
||||
charset handling in curl and ascii >=128 is a challenge for us. Not to
|
||||
mention that decoding also means that we need to check for nastiness that is
|
||||
attempted, like "../" sequences and the like. Probably everything to the left
|
||||
of any embedded slashes should be cut off.
|
||||
https://curl.haxx.se/bug/view.cgi?id=1294
|
||||
|
||||
86. The disconnect commands (LOGOUT and QUIT) may not be sent by IMAP, POP3
|
||||
and SMTP if a failure occurs during the authentication phase of a
|
||||
connection.
|
||||
|
||||
85. Wrong STARTTRANSFER timer accounting for POST requests
|
||||
Timer works fine with GET requests, but while using POST the time for
|
||||
CURLINFO_STARTTRANSFER_TIME is wrong. While using POST
|
||||
CURLINFO_STARTTRANSFER_TIME minus CURLINFO_PRETRANSFER_TIME is near to zero
|
||||
every time.
|
||||
https://github.com/curl/curl/issues/218
|
||||
https://curl.haxx.se/bug/view.cgi?id=1213
|
||||
|
||||
84. CURLINFO_SSL_VERIFYRESULT is only implemented for the OpenSSL and NSS
|
||||
backends, so relying on this information in a generic app is flaky.
|
||||
|
||||
82. When building with the Windows Borland compiler, it fails because the
|
||||
"tlib" tool doesn't support hyphens (minus signs) in file names and we have
|
||||
such in the build.
|
||||
https://curl.haxx.se/bug/view.cgi?id=1222
|
||||
|
||||
81. When using -J (with -O), automatically resumed downloading together with
|
||||
"-C -" fails. Without -J the same command line works! This happens because
|
||||
the resume logic is worked out before the target file name (and thus its
|
||||
pre-transfer size) has been figured out!
|
||||
https://curl.haxx.se/bug/view.cgi?id=1169
|
||||
|
||||
80. Curl doesn't recognize certificates in DER format in keychain, but it
|
||||
works with PEM.
|
||||
https://curl.haxx.se/bug/view.cgi?id=1065
|
||||
|
||||
79. SMTP. When sending data to multiple recipients, curl will abort and return
|
||||
failure if one of the recipients indicate failure (on the "RCPT TO"
|
||||
command). Ordinary mail programs would proceed and still send to the ones
|
||||
that can receive data. This is subject for change in the future.
|
||||
https://curl.haxx.se/bug/view.cgi?id=1116
|
||||
|
||||
75. NTLM authentication involving unicode user name or password only works
|
||||
properly if built with UNICODE defined together with the WinSSL/schannel
|
||||
backend. The original problem was mentioned in:
|
||||
https://curl.haxx.se/mail/lib-2009-10/0024.html
|
||||
https://curl.haxx.se/bug/view.cgi?id=896
|
||||
|
||||
The WinSSL/schannel version verified to work as mentioned in
|
||||
https://curl.haxx.se/mail/lib-2012-07/0073.html
|
||||
|
||||
73. if a connection is made to a FTP server but the server then just never
|
||||
sends the 220 response or otherwise is dead slow, libcurl will not
|
||||
acknowledge the connection timeout during that phase but only the "real"
|
||||
timeout - which may surprise users as it is probably considered to be the
|
||||
connect phase to most people. Brought up (and is being misunderstood) in:
|
||||
https://curl.haxx.se/bug/view.cgi?id=856
|
||||
|
||||
72. "Pausing pipeline problems."
|
||||
https://curl.haxx.se/mail/lib-2009-07/0214.html
|
||||
|
||||
70. Problem re-using easy handle after call to curl_multi_remove_handle
|
||||
https://curl.haxx.se/mail/lib-2009-07/0249.html
|
||||
|
||||
68. "More questions about ares behavior".
|
||||
https://curl.haxx.se/mail/lib-2009-08/0012.html
|
||||
|
||||
67. When creating multipart formposts. The file name part can be encoded with
|
||||
something beyond ascii but currently libcurl will only pass in the verbatim
|
||||
string the app provides. There are several browsers that already do this
|
||||
encoding. The key seems to be the updated draft to RFC2231:
|
||||
https://tools.ietf.org/html/draft-reschke-rfc2231-in-http-02
|
||||
|
||||
66. When using telnet, the time limitation options don't work.
|
||||
https://curl.haxx.se/bug/view.cgi?id=846
|
||||
|
||||
65. When doing FTP over a socks proxy or CONNECT through HTTP proxy and the
|
||||
multi interface is used, libcurl will fail if the (passive) TCP connection
|
||||
for the data transfer isn't more or less instant as the code does not
|
||||
properly wait for the connect to be confirmed. See test case 564 for a first
|
||||
shot at a test case.
|
||||
|
||||
63. When CURLOPT_CONNECT_ONLY is used, the handle cannot reliably be re-used
|
||||
for any further requests or transfers. The work-around is then to close that
|
||||
handle with curl_easy_cleanup() and create a new. Some more details:
|
||||
https://curl.haxx.se/mail/lib-2009-04/0300.html
|
||||
|
||||
61. If an upload using Expect: 100-continue receives an HTTP 417 response,
|
||||
it ought to be automatically resent without the Expect:. A workaround is
|
||||
for the client application to redo the transfer after disabling Expect:.
|
||||
https://curl.haxx.se/mail/archive-2008-02/0043.html
|
||||
|
||||
60. libcurl closes the connection if an HTTP 401 reply is received while it
|
||||
is waiting for the the 100-continue response.
|
||||
https://curl.haxx.se/mail/lib-2008-08/0462.html
|
||||
|
||||
58. It seems sensible to be able to use CURLOPT_NOBODY and
|
||||
CURLOPT_FAILONERROR with FTP to detect if a file exists or not, but it is
|
||||
not working: https://curl.haxx.se/mail/lib-2008-07/0295.html
|
||||
|
||||
56. When libcurl sends CURLOPT_POSTQUOTE commands when connected to a SFTP
|
||||
server using the multi interface, the commands are not being sent correctly
|
||||
and instead the connection is "cancelled" (the operation is considered done)
|
||||
prematurely. There is a half-baked (busy-looping) patch provided in the bug
|
||||
report but it cannot be accepted as-is. See
|
||||
https://curl.haxx.se/bug/view.cgi?id=748
|
||||
|
||||
55. libcurl fails to build with MIT Kerberos for Windows (KfW) due to KfW's
|
||||
library header files exporting symbols/macros that should be kept private
|
||||
to the KfW library. See ticket #5601 at http://krbdev.mit.edu/rt/
|
||||
|
||||
52. Gautam Kachroo's issue that identifies a problem with the multi interface
|
||||
where a connection can be re-used without actually being properly
|
||||
SSL-negotiated:
|
||||
https://curl.haxx.se/mail/lib-2008-01/0277.html
|
||||
|
||||
49. If using --retry and the transfer timeouts (possibly due to using -m or
|
||||
-y/-Y) the next attempt doesn't resume the transfer properly from what was
|
||||
downloaded in the previous attempt but will truncate and restart at the
|
||||
original position where it was at before the previous failed attempt. See
|
||||
https://curl.haxx.se/mail/lib-2008-01/0080.html and Mandriva bug report
|
||||
https://qa.mandriva.com/show_bug.cgi?id=22565
|
||||
|
||||
48. If a CONNECT response-headers are larger than BUFSIZE (16KB) when the
|
||||
connection is meant to be kept alive (like for NTLM proxy auth), the
|
||||
function will return prematurely and will confuse the rest of the HTTP
|
||||
protocol code. This should be very rare.
|
||||
|
||||
43. There seems to be a problem when connecting to the Microsoft telnet server.
|
||||
https://curl.haxx.se/bug/view.cgi?id=649
|
||||
|
||||
41. When doing an operation over FTP that requires the ACCT command (but not
|
||||
when logging in), the operation will fail since libcurl doesn't detect this
|
||||
and thus fails to issue the correct command:
|
||||
https://curl.haxx.se/bug/view.cgi?id=635
|
||||
|
||||
39. Steffen Rumler's Race Condition in Curl_proxyCONNECT:
|
||||
https://curl.haxx.se/mail/lib-2007-01/0045.html
|
||||
|
||||
38. Kumar Swamy Bhatt's problem in ftp/ssl "LIST" operation:
|
||||
https://curl.haxx.se/mail/lib-2007-01/0103.html
|
||||
|
||||
35. Both SOCKS5 and SOCKS4 proxy connections are done blocking, which is very
|
||||
bad when used with the multi interface.
|
||||
|
||||
34. The SOCKS4 connection codes don't properly acknowledge (connect) timeouts.
|
||||
Also see #12. According to bug #1556528, even the SOCKS5 connect code does
|
||||
not do it right: https://curl.haxx.se/bug/view.cgi?id=604
|
||||
|
||||
31. "curl-config --libs" will include details set in LDFLAGS when configure is
|
||||
run that might be needed only for building libcurl. Further, curl-config
|
||||
--cflags suffers from the same effects with CFLAGS/CPPFLAGS.
|
||||
|
||||
26. NTLM authentication using SSPI (on Windows) when (lib)curl is running in
|
||||
"system context" will make it use wrong(?) user name - at least when compared
|
||||
to what winhttp does. See https://curl.haxx.se/bug/view.cgi?id=535
|
||||
|
||||
23. SOCKS-related problems:
|
||||
B) libcurl doesn't support FTPS over a SOCKS proxy.
|
||||
E) libcurl doesn't support active FTP over a SOCKS proxy
|
||||
|
||||
We probably have even more bugs and lack of features when a SOCKS proxy is
|
||||
used.
|
||||
|
||||
21. FTP ASCII transfers do not follow RFC959. They don't convert the data
|
||||
accordingly (not for sending nor for receiving). RFC 959 section 3.1.1.1
|
||||
clearly describes how this should be done:
|
||||
|
||||
The sender converts the data from an internal character representation to
|
||||
the standard 8-bit NVT-ASCII representation (see the Telnet
|
||||
specification). The receiver will convert the data from the standard
|
||||
form to his own internal form.
|
||||
|
||||
Since 7.15.4 at least line endings are converted.
|
||||
|
||||
16. FTP URLs passed to curl may contain NUL (0x00) in the RFC 1738 <user>,
|
||||
<password>, and <fpath> components, encoded as "%00". The problem is that
|
||||
curl_unescape does not detect this, but instead returns a shortened C
|
||||
string. From a strict FTP protocol standpoint, NUL is a valid character
|
||||
within RFC 959 <string>, so the way to handle this correctly in curl would
|
||||
be to use a data structure other than a plain C string, one that can handle
|
||||
embedded NUL characters. From a practical standpoint, most FTP servers
|
||||
would not meaningfully support NUL characters within RFC 959 <string>,
|
||||
anyway (e.g., Unix pathnames may not contain NUL).
|
||||
|
||||
14. Test case 165 might fail on a system which has libidn present, but with an
|
||||
old iconv version (2.1.3 is a known bad version), since it doesn't recognize
|
||||
the charset when named ISO8859-1. Changing the name to ISO-8859-1 makes the
|
||||
test pass, but instead makes it fail on Solaris hosts that use its native
|
||||
iconv.
|
||||
|
||||
13. curl version 7.12.2 fails on AIX if compiled with --enable-ares.
|
||||
The workaround is to combine --enable-ares with --disable-shared
|
||||
|
||||
12. When connecting to a SOCKS proxy, the (connect) timeout is not properly
|
||||
acknowledged after the actual TCP connect (during the SOCKS "negotiate"
|
||||
phase).
|
||||
|
||||
10. To get HTTP Negotiate (SPNEGO) authentication to work fine, you need to
|
||||
provide a (fake) user name (this concerns both curl and the lib) because the
|
||||
code wrongly only considers authentication if there's a user name provided.
|
||||
https://curl.haxx.se/bug/view.cgi?id=440 How?
|
||||
https://curl.haxx.se/mail/lib-2004-08/0182.html
|
||||
|
||||
8. Doing resumed upload over HTTP does not work with '-C -', because curl
|
||||
doesn't do a HEAD first to get the initial size. This needs to be done
|
||||
manually for HTTP PUT resume to work, and then '-C [index]'.
|
||||
|
||||
6. libcurl ignores empty path parts in FTP URLs, whereas RFC1738 states that
|
||||
such parts should be sent to the server as 'CWD ' (without an argument).
|
||||
The only exception to this rule, is that we knowingly break this if the
|
||||
empty part is first in the path, as then we use the double slashes to
|
||||
indicate that the user wants to reach the root dir (this exception SHALL
|
||||
remain even when this bug is fixed).
|
||||
|
||||
5. libcurl doesn't treat the content-length of compressed data properly, as
|
||||
it seems HTTP servers send the *uncompressed* length in that header and
|
||||
libcurl thinks of it as the *compressed* length. Some explanations are here:
|
||||
https://curl.haxx.se/mail/lib-2003-06/0146.html
|
@ -1,130 +0,0 @@
|
||||
License Mixing with apps, libcurl and Third Party Libraries
|
||||
===========================================================
|
||||
|
||||
libcurl can be built to use a fair amount of various third party libraries,
|
||||
libraries that are written and provided by other parties that are distributed
|
||||
using their own licenses. Even libcurl itself contains code that may cause
|
||||
problems to some. This document attempts to describe what licenses libcurl and
|
||||
the other libraries use and what possible dilemmas linking and mixing them all
|
||||
can lead to for end users.
|
||||
|
||||
I am not a lawyer and this is not legal advice!
|
||||
|
||||
One common dilemma is that GPL[1]-licensed code is not allowed to be linked
|
||||
with code licensed under the Original BSD license (with the announcement
|
||||
clause). You may still build your own copies that use them all, but
|
||||
distributing them as binaries would be to violate the GPL license - unless you
|
||||
accompany your license with an exception[2]. This particular problem was
|
||||
addressed when the Modified BSD license was created, which does not have the
|
||||
announcement clause that collides with GPL.
|
||||
|
||||
libcurl https://curl.haxx.se/docs/copyright.html
|
||||
|
||||
Uses an MIT (or Modified BSD)-style license that is as liberal as
|
||||
possible.
|
||||
|
||||
OpenSSL https://www.openssl.org/source/license.html
|
||||
|
||||
(May be used for SSL/TLS support) Uses an Original BSD-style license
|
||||
with an announcement clause that makes it "incompatible" with GPL. You
|
||||
are not allowed to ship binaries that link with OpenSSL that includes
|
||||
GPL code (unless that specific GPL code includes an exception for
|
||||
OpenSSL - a habit that is growing more and more common). If OpenSSL's
|
||||
licensing is a problem for you, consider using another TLS library.
|
||||
|
||||
GnuTLS http://www.gnutls.org/
|
||||
|
||||
(May be used for SSL/TLS support) Uses the LGPL[3] license. If this is
|
||||
a problem for you, consider using another TLS library. Also note that
|
||||
GnuTLS itself depends on and uses other libs (libgcrypt and
|
||||
libgpg-error) and they too are LGPL- or GPL-licensed.
|
||||
|
||||
WolfSSL https://www.wolfssl.com/
|
||||
|
||||
(May be used for SSL/TLS support) Uses the GPL[1] license or a
|
||||
propietary license. If this is a problem for you, consider using
|
||||
another TLS library.
|
||||
|
||||
NSS https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
|
||||
|
||||
(May be used for SSL/TLS support) Is covered by the MPL[4] license,
|
||||
the GPL[1] license and the LGPL[3] license. You may choose to license
|
||||
the code under MPL terms, GPL terms, or LGPL terms. These licenses
|
||||
grant you different permissions and impose different obligations. You
|
||||
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.
|
||||
|
||||
mbedTLS https://tls.mbed.org/
|
||||
|
||||
(May be used for SSL/TLS support) Uses the GPL[1] license or a
|
||||
propietary license. If this is a problem for you, consider using
|
||||
another TLS library.
|
||||
|
||||
BoringSSL https://boringssl.googlesource.com/
|
||||
|
||||
(May be used for SSL/TLS support) As an OpenSSL fork, it has the same
|
||||
license as that.
|
||||
|
||||
libressl http://www.libressl.org/
|
||||
|
||||
(May be used for SSL/TLS support) As an OpenSSL fork, it has the same
|
||||
license as that.
|
||||
|
||||
c-ares https://daniel.haxx.se/projects/c-ares/license.html
|
||||
|
||||
(Used for asynchronous name resolves) Uses an MIT license that is very
|
||||
liberal and imposes no restrictions on any other library or part you
|
||||
may link with.
|
||||
|
||||
zlib http://www.zlib.net/zlib_license.html
|
||||
|
||||
(Used for compressed Transfer-Encoding support) Uses an MIT-style
|
||||
license that shouldn't collide with any other library.
|
||||
|
||||
MIT Kerberos http://web.mit.edu/kerberos/www/dist/
|
||||
|
||||
(May be used for GSS support) MIT licensed, that shouldn't collide
|
||||
with any other parts.
|
||||
|
||||
Heimdal http://www.h5l.org
|
||||
|
||||
(May be used for GSS support) Heimdal is Original BSD licensed with
|
||||
the announcement clause.
|
||||
|
||||
GNU GSS https://www.gnu.org/software/gss/
|
||||
|
||||
(May be used for GSS support) GNU GSS is GPL licensed. Note that you
|
||||
may not distribute binary curl packages that uses this if you build
|
||||
curl to also link and use any Original BSD licensed libraries!
|
||||
|
||||
libidn http://josefsson.org/libidn/
|
||||
|
||||
(Used for IDNA support) Uses the GNU Lesser General Public
|
||||
License [3]. LGPL is a variation of GPL with slightly less aggressive
|
||||
"copyleft". This license requires more requirements to be met when
|
||||
distributing binaries, see the license for details. Also note that if
|
||||
you distribute a binary that includes this library, you must also
|
||||
include the full LGPL license text. Please properly point out what
|
||||
parts of the distributed package that the license addresses.
|
||||
|
||||
OpenLDAP http://www.openldap.org/software/release/license.html
|
||||
|
||||
(Used for LDAP support) Uses a Modified BSD-style license. Since
|
||||
libcurl uses OpenLDAP as a shared library only, I have not heard of
|
||||
anyone that ships OpenLDAP linked with libcurl in an app.
|
||||
|
||||
libssh2 http://www.libssh2.org/
|
||||
|
||||
(Used for scp and sftp support) libssh2 uses a Modified BSD-style
|
||||
license.
|
||||
|
||||
[1] = GPL - GNU General Public License: https://www.gnu.org/licenses/gpl.html
|
||||
[2] = https://www.gnu.org/licenses/gpl-faq.html#GPLIncompatibleLibs details on
|
||||
how to write such an exception to the GPL
|
||||
[3] = LGPL - GNU Lesser General Public License:
|
||||
https://www.gnu.org/licenses/lgpl.html
|
||||
[4] = MPL - Mozilla Public License:
|
||||
https://www.mozilla.org/MPL/
|
@ -1,265 +0,0 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
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
|
||||
1.7 How to unsubscribe
|
||||
1.8 I posted, now what?
|
||||
|
||||
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
|
||||
https://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
|
||||
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 intentions 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 offenses, 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!
|
||||
|
||||
1.7 How to unsubscribe
|
||||
|
||||
You unsubscribe the same way you subscribed in the first place. You go to
|
||||
the page for the particular mailing list you're subscribed to and you enter
|
||||
your email address and password and press the unsubscribe button.
|
||||
|
||||
Also, this information is included in the headers of every mail that is sent
|
||||
out to all curl related mailing lists and there's footer in each mail that
|
||||
links to the "admin" page on which you can unsubscribe and change other
|
||||
options.
|
||||
|
||||
You NEVER EVER email the mailing list requesting someone else to get you off
|
||||
the list.
|
||||
|
||||
1.8 I posted, now what?
|
||||
|
||||
If you aren't subscribed with the exact same email address that you used to
|
||||
send the email, your post will just be silently discarded.
|
||||
|
||||
If you posted for the first time to the mailing list, you first need to wait
|
||||
for an administrator to allow your email to go through. This normally
|
||||
happens very quickly but in case we're asleep, you may have to wait a few
|
||||
hours.
|
||||
|
||||
Once your email goes through it is sent out to several hundred or even
|
||||
thousand recipients. Your email may cover an area that not that many people
|
||||
know about or are interested in. Or possibly the person who knows about it
|
||||
is on vacation or under a very heavy work load right now. You have to wait
|
||||
for a response and you must not expect to get a response at all, but
|
||||
hopefully you get an answer within a couple of days.
|
||||
|
||||
You do yourself and all of us a service when you include as many details as
|
||||
possible already in your first email. Mention your operating system and
|
||||
environment. Tell us which curl version you're using and tell us what you
|
||||
did, what happened and what you expected would happen. Preferably, show us
|
||||
what you did in details enough to allow others to help point out the problem
|
||||
or repeat the same steps in their places.
|
||||
|
||||
Failing to include details will only delay responses and make people respond
|
||||
and ask for the details and you have to send a follow-up email that includes
|
||||
them.
|
||||
|
||||
Expect the responses to primarily help YOU debug the issue, or ask you
|
||||
questions that can lead you or others towards a solution or explanation to
|
||||
whatever you experience.
|
||||
|
||||
If you are a repeat offender to the guidelines outlined in this document,
|
||||
chances are that people will ignore you at will and your chances to get
|
||||
responses will greatly diminish.
|
||||
|
||||
|
||||
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 someone responds using the mandated 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:
|
||||
|
||||
https://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.
|
||||
|
505
docs/MANUAL
505
docs/MANUAL
@ -3,15 +3,15 @@ LATEST VERSION
|
||||
You always find news about what's going on as well as the latest versions
|
||||
from the curl web pages, located at:
|
||||
|
||||
https://curl.haxx.se
|
||||
http://curl.haxx.se
|
||||
|
||||
SIMPLE USAGE
|
||||
|
||||
Get the main page from Netscape's web-server:
|
||||
Get the main page from netscape's web-server:
|
||||
|
||||
curl http://www.netscape.com/
|
||||
|
||||
Get the README file the user's home directory at funet's ftp-server:
|
||||
Get the root README file from funet's ftp-server:
|
||||
|
||||
curl ftp://ftp.funet.fi/README
|
||||
|
||||
@ -19,10 +19,14 @@ SIMPLE USAGE
|
||||
|
||||
curl http://www.weirdserver.com:8000/
|
||||
|
||||
Get a directory listing of an FTP site:
|
||||
Get a list of the root directory of an FTP site:
|
||||
|
||||
curl ftp://cool.haxx.se/
|
||||
|
||||
Get a gopher document from funet's gopher server:
|
||||
|
||||
curl gopher://gopher.funet.fi
|
||||
|
||||
Get the definition of curl from a dictionary:
|
||||
|
||||
curl dict://dict.org/m:curl
|
||||
@ -31,41 +35,9 @@ SIMPLE USAGE
|
||||
|
||||
curl ftp://cool.haxx.se/ http://www.weirdserver.com:8000/
|
||||
|
||||
Get a file off an FTPS server:
|
||||
|
||||
curl ftps://files.are.secure.com/secrets.txt
|
||||
|
||||
or use the more appropriate FTPS way to get the same file:
|
||||
|
||||
curl --ftp-ssl ftp://files.are.secure.com/secrets.txt
|
||||
|
||||
Get a file from an SSH server using SFTP:
|
||||
|
||||
curl -u username sftp://example.com/etc/issue
|
||||
|
||||
Get a file from an SSH server using SCP using a private key
|
||||
(not password-protected) to authenticate:
|
||||
|
||||
curl -u username: --key ~/.ssh/id_rsa \
|
||||
scp://example.com/~/file.txt
|
||||
|
||||
Get a file from an SSH server using SCP using a private key
|
||||
(password-protected) to authenticate:
|
||||
|
||||
curl -u username: --key ~/.ssh/id_rsa --pass private_key_password \
|
||||
scp://example.com/~/file.txt
|
||||
|
||||
Get the main page from an IPv6 web server:
|
||||
|
||||
curl "http://[2001:1890:1112:1::20]/"
|
||||
|
||||
Get a file from an SMB server:
|
||||
|
||||
curl -u "domain\username:passwd" smb://server.example.com/share/file.txt
|
||||
|
||||
DOWNLOAD TO A FILE
|
||||
|
||||
Get a web page and store in a local file with a specific name:
|
||||
Get a web page and store in a local file:
|
||||
|
||||
curl -o thatpage.html http://www.netscape.com/
|
||||
|
||||
@ -91,29 +63,11 @@ USING PASSWORDS
|
||||
|
||||
curl -u name:passwd ftp://machine.domain:port/full/path/to/file
|
||||
|
||||
FTPS
|
||||
|
||||
It is just like for FTP, but you may also want to specify and use
|
||||
SSL-specific options for certificates etc.
|
||||
|
||||
Note that using FTPS:// as prefix is the "implicit" way as described in the
|
||||
standards while the recommended "explicit" way is done by using FTP:// and
|
||||
the --ftp-ssl option.
|
||||
|
||||
SFTP / SCP
|
||||
|
||||
This is similar to FTP, but you can use the --key option to specify a
|
||||
private key to use instead of a password. Note that the private key may
|
||||
itself be protected by a password that is unrelated to the login password
|
||||
of the remote system; this password is specified using the --pass option.
|
||||
Typically, curl will automatically extract the public key from the private
|
||||
key file, but in cases where curl does not have the proper library support,
|
||||
a matching public key file must be specified using the --pubkey option.
|
||||
|
||||
HTTP
|
||||
|
||||
Curl also supports user and password in HTTP URLs, thus you can pick a file
|
||||
like:
|
||||
The HTTP URL doesn't support user and password in the URL string. Curl
|
||||
does support that anyway to provide a ftp-style interface and thus you can
|
||||
pick a file like:
|
||||
|
||||
curl http://name:passwd@machine.domain/full/path/to/file
|
||||
|
||||
@ -121,34 +75,25 @@ USING PASSWORDS
|
||||
|
||||
curl -u name:passwd http://machine.domain/full/path/to/file
|
||||
|
||||
HTTP offers many different methods of authentication and curl supports
|
||||
several: Basic, Digest, NTLM and Negotiate (SPNEGO). Without telling which
|
||||
method to use, curl defaults to Basic. You can also ask curl to pick the
|
||||
most secure ones out of the ones that the server accepts for the given URL,
|
||||
by using --anyauth.
|
||||
|
||||
NOTE! According to the URL specification, HTTP URLs can not contain a user
|
||||
and password, so that style will not work when using curl via a proxy, even
|
||||
though curl allows it at other times. When using a proxy, you _must_ use
|
||||
the -u style for user and password.
|
||||
NOTE! Since HTTP URLs don't support user and password, you can't use that
|
||||
style when using Curl via a proxy. You _must_ use the -u style fetch
|
||||
during such circumstances.
|
||||
|
||||
HTTPS
|
||||
|
||||
Probably most commonly used with private certificates, as explained below.
|
||||
|
||||
GOPHER
|
||||
|
||||
Curl features no password support for gopher.
|
||||
|
||||
PROXY
|
||||
|
||||
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:
|
||||
Get an ftp file using a proxy named my-proxy that uses port 888:
|
||||
|
||||
curl -x my-proxy:888 ftp://ftp.leachsite.com/README
|
||||
|
||||
Get a file from an HTTP server that requires user and password, using the
|
||||
Get a file from a HTTP server that requires user and password, using the
|
||||
same proxy as above:
|
||||
|
||||
curl -u user:passwd -x my-proxy:888 http://www.get.this/
|
||||
@ -157,36 +102,12 @@ PROXY
|
||||
|
||||
curl -U user:passwd -x my-proxy:888 http://www.get.this/
|
||||
|
||||
A comma-separated list of hosts and domains which do not use the proxy can
|
||||
be specified as:
|
||||
|
||||
curl --noproxy localhost,get.this -x my-proxy:888 http://www.get.this/
|
||||
|
||||
If the proxy is specified with --proxy1.0 instead of --proxy or -x, then
|
||||
curl will use HTTP/1.0 instead of HTTP/1.1 for any CONNECT attempts.
|
||||
|
||||
curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5.
|
||||
|
||||
See also the environment variables Curl supports that offer further proxy
|
||||
See also the environment variables Curl support that offer further proxy
|
||||
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
|
||||
|
||||
HTTP 1.1 introduced byte-ranges. Using this, a client can request
|
||||
With HTTP 1.1 byte-ranges were introduced. Using this, a client can request
|
||||
to get only one or more subparts of a specified document. Curl supports
|
||||
this with the -r flag.
|
||||
|
||||
@ -203,26 +124,26 @@ RANGES
|
||||
|
||||
Get the first 100 bytes of a document using FTP:
|
||||
|
||||
curl -r 0-99 ftp://www.get.this/README
|
||||
curl -r 0-99 ftp://www.get.this/README
|
||||
|
||||
UPLOADING
|
||||
|
||||
FTP / FTPS / SFTP / SCP
|
||||
FTP
|
||||
|
||||
Upload all data on stdin to a specified server:
|
||||
Upload all data on stdin to a specified ftp site:
|
||||
|
||||
curl -T - ftp://ftp.upload.com/myfile
|
||||
curl -t ftp://ftp.upload.com/myfile
|
||||
|
||||
Upload data from a specified file, login with user and password:
|
||||
|
||||
curl -T uploadfile -u user:passwd ftp://ftp.upload.com/myfile
|
||||
|
||||
Upload a local file to the remote site, and use the local file name at the remote
|
||||
site too:
|
||||
|
||||
Upload a local file to the remote site, and use the local file name remote
|
||||
too:
|
||||
|
||||
curl -T uploadfile -u user:passwd ftp://ftp.upload.com/
|
||||
|
||||
Upload a local file to get appended to the remote file:
|
||||
Upload a local file to get appended to the remote file using ftp:
|
||||
|
||||
curl -T localfile -a ftp://ftp.upload.com/remotefile
|
||||
|
||||
@ -232,39 +153,26 @@ UPLOADING
|
||||
|
||||
curl --proxytunnel -x proxy:port -T localfile ftp.upload.com
|
||||
|
||||
SMB / SMBS
|
||||
|
||||
curl -T file.txt -u "domain\username:passwd"
|
||||
smb://server.example.com/share/
|
||||
|
||||
HTTP
|
||||
|
||||
Upload all data on stdin to a specified HTTP site:
|
||||
Upload all data on stdin to a specified http site:
|
||||
|
||||
curl -T - http://www.upload.com/myfile
|
||||
curl -t http://www.upload.com/myfile
|
||||
|
||||
Note that the HTTP server must have been configured to accept PUT before
|
||||
this can be done successfully.
|
||||
Note that the http server must've been configured to accept PUT before this
|
||||
can be done successfully.
|
||||
|
||||
For other ways to do HTTP data upload, see the POST section below.
|
||||
For other ways to do http data upload, see the POST section below.
|
||||
|
||||
VERBOSE / DEBUG
|
||||
|
||||
If curl fails where it isn't supposed to, if the servers don't let you in,
|
||||
if you can't understand the responses: use the -v flag to get verbose
|
||||
fetching. Curl will output lots of info and what it sends and receives in
|
||||
order to let the user see all client-server interaction (but it won't show
|
||||
you the actual data).
|
||||
If curl fails where it isn't supposed to, if the servers don't let you
|
||||
in, if you can't understand the responses: use the -v flag to get VERBOSE
|
||||
fetching. Curl will output lots of info and all data it sends and
|
||||
receives in order to let the user see all client-server interaction.
|
||||
|
||||
curl -v ftp://ftp.upload.com/
|
||||
|
||||
To get even more details and information on what curl does, try using the
|
||||
--trace or --trace-ascii options with a given file name to log to, like
|
||||
this:
|
||||
|
||||
curl --trace trace.txt www.haxx.se
|
||||
|
||||
|
||||
DETAILED INFORMATION
|
||||
|
||||
Different protocols provide different ways of getting detailed information
|
||||
@ -309,7 +217,7 @@ POST (HTTP)
|
||||
The 'variable' names are the names set with "name=" in the <input> tags, and
|
||||
the data is the contents you want to fill in for the inputs. The data *must*
|
||||
be properly URL encoded. That means you replace space with + and that you
|
||||
replace weird letters with %XX where XX is the hexadecimal representation of
|
||||
write weird letters with %XX where XX is the hexadecimal representation of
|
||||
the letter's ASCII code.
|
||||
|
||||
Example:
|
||||
@ -327,7 +235,7 @@ POST (HTTP)
|
||||
|
||||
To post to this, you enter a curl command line like:
|
||||
|
||||
curl -d "user=foobar&pass=12345&id=blablabla&ding=submit" (continues)
|
||||
curl -d "user=foobar&pass=12345&id=blablabla&dig=submit" (continues)
|
||||
http://www.formpost.com/getthis/post.cgi
|
||||
|
||||
|
||||
@ -338,25 +246,25 @@ POST (HTTP)
|
||||
-F accepts parameters like -F "name=contents". If you want the contents to
|
||||
be read from a file, use <@filename> as contents. When specifying a file,
|
||||
you can also specify the file content type by appending ';type=<mime type>'
|
||||
to the file name. You can also post the contents of several files in one
|
||||
field. For example, the field name 'coolfiles' is used to send three files,
|
||||
with different content types using the following syntax:
|
||||
to the file name. You can also post the contents of several files in one field.
|
||||
For example, the field name 'coolfiles' is used to send three files, with
|
||||
different content types using the following syntax:
|
||||
|
||||
curl -F "coolfiles=@fil1.gif;type=image/gif,fil2.txt,fil3.html" \
|
||||
http://www.post.com/postit.cgi
|
||||
|
||||
If the content-type is not specified, curl will try to guess from the file
|
||||
extension (it only knows a few), or use the previously specified type (from
|
||||
an earlier file if several files are specified in a list) or else it will
|
||||
use the default type 'application/octet-stream'.
|
||||
extension (it only knows a few), or use the previously specified type
|
||||
(from an earlier file if several files are specified in a list) or else it
|
||||
will using the default type 'text/plain'.
|
||||
|
||||
Emulate a fill-in form with -F. Let's say you fill in three fields in a
|
||||
form. One field is a file name which to post, one field is your name and one
|
||||
field is a file description. We want to post the file we have written named
|
||||
"cooltext.txt". To let curl do the posting of this data instead of your
|
||||
favourite browser, you have to read the HTML source of the form page and
|
||||
find the names of the input fields. In our example, the input field names
|
||||
are 'file', 'yourname' and 'filedescription'.
|
||||
favourite browser, you have to read the HTML source of the form page and find
|
||||
the names of the input fields. In our example, the input field names are
|
||||
'file', 'yourname' and 'filedescription'.
|
||||
|
||||
curl -F "file=@cooltext.txt" -F "yourname=Daniel" \
|
||||
-F "filedescription=Cool text file with cool text inside" \
|
||||
@ -365,35 +273,28 @@ POST (HTTP)
|
||||
To send two files in one post you can do it in two ways:
|
||||
|
||||
1. Send multiple files in a single "field" with a single field name:
|
||||
|
||||
curl -F "pictures=@dog.gif,cat.gif"
|
||||
|
||||
2. Send two fields with two field names:
|
||||
|
||||
curl -F "pictures=@dog.gif,cat.gif"
|
||||
|
||||
2. Send two fields with two field names:
|
||||
|
||||
curl -F "docpicture=@dog.gif" -F "catpicture=@cat.gif"
|
||||
|
||||
To send a field value literally without interpreting a leading '@'
|
||||
or '<', or an embedded ';type=', use --form-string instead of
|
||||
-F. This is recommended when the value is obtained from a user or
|
||||
some other unpredictable source. Under these circumstances, using
|
||||
-F instead of --form-string would allow a user to trick curl into
|
||||
uploading a file.
|
||||
curl -F "docpicture=@dog.gif" -F "catpicture=@cat.gif"
|
||||
|
||||
REFERRER
|
||||
|
||||
An HTTP request has the option to include information about which address
|
||||
referred it to the actual page. Curl allows you to specify the
|
||||
A HTTP request has the option to include information about which address
|
||||
that referred to actual page. Curl allows you to specify the
|
||||
referrer to be used on the command line. It is especially useful to
|
||||
fool or trick stupid servers or CGI scripts that rely on that information
|
||||
being available or contain certain data.
|
||||
|
||||
curl -e www.coolsite.com http://www.showme.com/
|
||||
|
||||
NOTE: The Referer: [sic] field is defined in the HTTP spec to be a full URL.
|
||||
NOTE: The referer field is defined in the HTTP spec to be a full URL.
|
||||
|
||||
USER AGENT
|
||||
|
||||
An HTTP request has the option to include information about the browser
|
||||
A HTTP request has the option to include information about the browser
|
||||
that generated the request. Curl allows it to be specified on the command
|
||||
line. It is especially useful to fool or trick stupid servers or CGI
|
||||
scripts that only accept certain browsers.
|
||||
@ -449,13 +350,6 @@ COOKIES
|
||||
|
||||
curl -b headers www.example.com
|
||||
|
||||
While saving headers to a file is a working way to store cookies, it is
|
||||
however error-prone and not the preferred way to do this. Instead, make curl
|
||||
save the incoming cookies using the well-known netscape cookie format like
|
||||
this:
|
||||
|
||||
curl -c cookies.txt www.example.com
|
||||
|
||||
Note that by specifying -b you enable the "cookie awareness" and with -L
|
||||
you can make curl follow a location: (which often is used in combination
|
||||
with cookies). So that if a site sends cookies and a location, you can
|
||||
@ -468,12 +362,8 @@ COOKIES
|
||||
file contents. In the above command, curl will parse the header and store
|
||||
the cookies received from www.example.com. curl will send to the server the
|
||||
stored cookies which match the request as it follows the location. The
|
||||
file "empty.txt" may be a nonexistent file.
|
||||
|
||||
To read and write cookies from a netscape cookie file, you can set both -b
|
||||
and -c to use the same file:
|
||||
|
||||
curl -b cookies.txt -c cookies.txt www.example.com
|
||||
file "empty.txt" may be a non-existant file.
|
||||
|
||||
|
||||
PROGRESS METER
|
||||
|
||||
@ -497,7 +387,7 @@ PROGRESS METER
|
||||
Upload - the average transfer speed of the upload
|
||||
Time Total - expected time to complete the operation
|
||||
Time Current - time passed since the invoke
|
||||
Time Left - expected time left to completion
|
||||
Time Left - expected time left to completetion
|
||||
Curr.Speed - the average transfer speed the last 5 seconds (the first
|
||||
5 seconds of a transfer is based on less time of course.)
|
||||
|
||||
@ -514,34 +404,12 @@ SPEED LIMIT
|
||||
To have curl abort the download if the speed is slower than 3000 bytes per
|
||||
second for 1 minute, run:
|
||||
|
||||
curl -Y 3000 -y 60 www.far-away-site.com
|
||||
curl -y 3000 -Y 60 www.far-away-site.com
|
||||
|
||||
This can very well be used in combination with the overall time limit, so
|
||||
that the above operation must be completed in whole within 30 minutes:
|
||||
that the above operatioin must be completed in whole within 30 minutes:
|
||||
|
||||
curl -m 1800 -Y 3000 -y 60 www.far-away-site.com
|
||||
|
||||
Forcing curl not to transfer data faster than a given rate is also possible,
|
||||
which might be useful if you're using a limited bandwidth connection and you
|
||||
don't want your transfer to use all of it (sometimes referred to as
|
||||
"bandwidth throttle").
|
||||
|
||||
Make curl transfer data no faster than 10 kilobytes per second:
|
||||
|
||||
curl --limit-rate 10K www.far-away-site.com
|
||||
|
||||
or
|
||||
|
||||
curl --limit-rate 10240 www.far-away-site.com
|
||||
|
||||
Or prevent curl from uploading data faster than 1 megabyte per second:
|
||||
|
||||
curl -T upload --limit-rate 1M ftp://uploadshereplease.com
|
||||
|
||||
When using the --limit-rate option, the transfer rate is regulated on a
|
||||
per-second basis, which will cause the total transfer speed to become lower
|
||||
than the given number. Sometimes of course substantially lower, if your
|
||||
transfer stalls during periods.
|
||||
curl -m 1800 -y 3000 -Y 60 www.far-away-site.com
|
||||
|
||||
CONFIG FILE
|
||||
|
||||
@ -552,9 +420,9 @@ CONFIG FILE
|
||||
can also specify the long options without the dashes to make it more
|
||||
readable. You can separate the options and the parameter with spaces, or
|
||||
with = or :. Comments can be used within the file. If the first letter on a
|
||||
line is a '#'-symbol the rest of the line is treated as a comment.
|
||||
line is a '#'-letter the rest of the line is treated as a comment.
|
||||
|
||||
If you want the parameter to contain spaces, you must enclose the entire
|
||||
If you want the parameter to contain spaces, you must inclose the entire
|
||||
parameter within double quotes ("). Within those quotes, you specify a
|
||||
quote as \".
|
||||
|
||||
@ -622,32 +490,24 @@ FTP and PATH NAMES
|
||||
|
||||
(I.e with an extra slash in front of the file name.)
|
||||
|
||||
SFTP and SCP and PATH NAMES
|
||||
|
||||
With sftp: and scp: URLs, the path name given is the absolute name on the
|
||||
server. To access a file relative to the remote user's home directory,
|
||||
prefix the file with /~/ , such as:
|
||||
|
||||
curl -u $USER sftp://home.example.com/~/.bashrc
|
||||
|
||||
FTP and firewalls
|
||||
|
||||
The FTP protocol requires one of the involved parties to open a second
|
||||
connection as soon as data is about to get transferred. There are two ways to
|
||||
connction as soon as data is about to get transfered. There are two ways to
|
||||
do this.
|
||||
|
||||
The default way for curl is to issue the PASV command which causes the
|
||||
server to open another port and await another connection performed by the
|
||||
client. This is good if the client is behind a firewall that doesn't allow
|
||||
client. This is good if the client is behind a firewall that don't allow
|
||||
incoming connections.
|
||||
|
||||
curl ftp.download.com
|
||||
|
||||
If the server, for example, is behind a firewall that doesn't allow connections
|
||||
on ports other than 21 (or if it just doesn't support the PASV command), the
|
||||
If the server for example, is behind a firewall that don't allow connections
|
||||
on other ports than 21 (or if it just doesn't support the PASV command), the
|
||||
other way to do it is to use the PORT command and instruct the server to
|
||||
connect to the client on the given IP number and port (as parameters to the
|
||||
PORT command).
|
||||
connect to the client on the given (as parameters to the PORT command) IP
|
||||
number and port.
|
||||
|
||||
The -P flag to curl supports a few different options. Your machine may have
|
||||
several IP-addresses and/or network interfaces and curl allows you to select
|
||||
@ -668,17 +528,17 @@ NETWORK INTERFACE
|
||||
|
||||
Get a web page from a server using a specified port for the interface:
|
||||
|
||||
curl --interface eth0:1 http://www.netscape.com/
|
||||
curl --interface eth0:1 http://www.netscape.com/
|
||||
|
||||
or
|
||||
|
||||
curl --interface 192.168.1.10 http://www.netscape.com/
|
||||
curl --interface 192.168.1.10 http://www.netscape.com/
|
||||
|
||||
HTTPS
|
||||
|
||||
Secure HTTP requires SSL libraries to be installed and used when curl is
|
||||
built. If that is done, curl is capable of retrieving and posting documents
|
||||
using the HTTPS protocol.
|
||||
using the HTTPS procotol.
|
||||
|
||||
Example:
|
||||
|
||||
@ -688,7 +548,7 @@ HTTPS
|
||||
from sites that require valid certificates. The only drawback is that the
|
||||
certificate needs to be in PEM-format. PEM is a standard and open format to
|
||||
store certificates with, but it is not used by the most commonly used
|
||||
browsers (Netscape and MSIE both use the so called PKCS#12 format). If you
|
||||
browsers (Netscape and MSEI both use the so called PKCS#12 format). If you
|
||||
want curl to use the certificates you use with your (favourite) browser, you
|
||||
may need to download/compile a converter that can convert your browser's
|
||||
formatted certificates to PEM formatted ones. This kind of converter is
|
||||
@ -705,62 +565,53 @@ HTTPS
|
||||
If you neglect to specify the password on the command line, you will be
|
||||
prompted for the correct password before any data can be received.
|
||||
|
||||
Many older SSL-servers have problems with SSLv3 or TLS, which newer versions
|
||||
of OpenSSL etc use, therefore it is sometimes useful to specify what
|
||||
SSL-version curl should use. Use -3, -2 or -1 to specify that exact SSL
|
||||
version to use (for SSLv3, SSLv2 or TLSv1 respectively):
|
||||
Many older SSL-servers have problems with SSLv3 or TLS, that newer versions
|
||||
of OpenSSL etc is using, therefore it is sometimes useful to specify what
|
||||
SSL-version curl should use. Use -3 or -2 to specify that exact SSL version
|
||||
to use:
|
||||
|
||||
curl -2 https://secure.site.com/
|
||||
|
||||
Otherwise, curl will first attempt to use v3 and then v2.
|
||||
|
||||
To use OpenSSL to convert your favourite browser's certificate into a PEM
|
||||
formatted one that curl can use, do something like this:
|
||||
formatted one that curl can use, do something like this (assuming netscape,
|
||||
but IE is likely to work similarly):
|
||||
|
||||
In Netscape, you start with hitting the 'Security' menu button.
|
||||
You start with hitting the 'security' menu button in netscape.
|
||||
|
||||
Select 'certificates->yours' and then pick a certificate in the list
|
||||
Select 'certificates->yours' and then pick a certificate in the list
|
||||
|
||||
Press the 'Export' button
|
||||
Press the 'export' button
|
||||
|
||||
enter your PIN code for the certs
|
||||
enter your PIN code for the certs
|
||||
|
||||
select a proper place to save it
|
||||
select a proper place to save it
|
||||
|
||||
Run the 'openssl' application to convert the certificate. If you cd to the
|
||||
openssl installation, you can do it like:
|
||||
|
||||
# ./apps/openssl pkcs12 -in [file you saved] -clcerts -out [PEMfile]
|
||||
|
||||
In Firefox, select Options, then Advanced, then the Encryption tab,
|
||||
View Certificates. This opens the Certificate Manager, where you can
|
||||
Export. Be sure to select PEM for the Save as type.
|
||||
|
||||
In Internet Explorer, select Internet Options, then the Content tab, then
|
||||
Certificates. Then you can Export, and depending on the format you may
|
||||
need to convert to PEM.
|
||||
|
||||
In Chrome, select Settings, then Show Advanced Settings. Under HTTPS/SSL
|
||||
select Manage Certificates.
|
||||
|
||||
RESUMING FILE TRANSFERS
|
||||
|
||||
To continue a file transfer where it was previously aborted, curl supports
|
||||
resume on HTTP(S) downloads as well as FTP uploads and downloads.
|
||||
resume on http(s) downloads as well as ftp uploads and downloads.
|
||||
|
||||
Continue downloading a document:
|
||||
|
||||
curl -C - -o file ftp://ftp.server.com/path/file
|
||||
curl -c -o file ftp://ftp.server.com/path/file
|
||||
|
||||
Continue uploading a document(*1):
|
||||
|
||||
curl -C - -T file ftp://ftp.server.com/path/file
|
||||
curl -c -T file ftp://ftp.server.com/path/file
|
||||
|
||||
Continue downloading a document from a web server(*2):
|
||||
|
||||
curl -C - -o file http://www.server.com/
|
||||
curl -c -o file http://www.server.com/
|
||||
|
||||
(*1) = This requires that the FTP server supports the non-standard command
|
||||
(*1) = This requires that the ftp server supports the non-standard command
|
||||
SIZE. If it doesn't, curl will say so.
|
||||
|
||||
(*2) = This requires that the web server supports at least HTTP/1.1. If it
|
||||
@ -769,7 +620,7 @@ RESUMING FILE TRANSFERS
|
||||
TIME CONDITIONS
|
||||
|
||||
HTTP allows a client to specify a time condition for the document it
|
||||
requests. It is If-Modified-Since or If-Unmodified-Since. Curl allows you to
|
||||
requests. It is If-Modified-Since or If-Unmodified-Since. Curl allow you to
|
||||
specify them with the -z/--time-cond flag.
|
||||
|
||||
For example, you can easily make a download that only gets performed if the
|
||||
@ -783,9 +634,9 @@ TIME CONDITIONS
|
||||
curl -z -local.html http://remote.server.com/remote.html
|
||||
|
||||
You can specify a "free text" date as condition. Tell curl to only download
|
||||
the file if it was updated since January 12, 2012:
|
||||
the file if it was updated since yesterday:
|
||||
|
||||
curl -z "Jan 12 2012" http://remote.server.com/remote.html
|
||||
curl -z yesterday http://remote.server.com/remote.html
|
||||
|
||||
Curl will then accept a wide range of date formats. You always make the date
|
||||
check the other way around by prepending it with a dash '-'.
|
||||
@ -817,16 +668,10 @@ LDAP
|
||||
and offer ldap:// support.
|
||||
|
||||
LDAP is a complex thing and writing an LDAP query is not an easy task. I do
|
||||
advise you to dig up the syntax description for that elsewhere. Two places
|
||||
that might suit you are:
|
||||
advice you to dig up the syntax description for that elsewhere, RFC 1959 if
|
||||
no other place is better.
|
||||
|
||||
Netscape's "Netscape Directory SDK 3.0 for C Programmer's Guide Chapter 10:
|
||||
Working with LDAP URLs":
|
||||
http://developer.netscape.com/docs/manuals/dirsdk/csdk30/url.htm
|
||||
|
||||
RFC 2255, "The LDAP URL Format" https://curl.haxx.se/rfc/rfc2255.txt
|
||||
|
||||
To show you an example, this is how I can get all people from my local LDAP
|
||||
To show you an example, this is now I can get all people from my local LDAP
|
||||
server that has a certain sub-domain in their email address:
|
||||
|
||||
curl -B "ldap://ldap.frontec.se/o=frontec??sub?mail=*sth.frontec.se"
|
||||
@ -838,11 +683,11 @@ ENVIRONMENT VARIABLES
|
||||
|
||||
Curl reads and understands the following environment variables:
|
||||
|
||||
http_proxy, HTTPS_PROXY, FTP_PROXY
|
||||
HTTP_PROXY, HTTPS_PROXY, FTP_PROXY, GOPHER_PROXY
|
||||
|
||||
They should be set for protocol-specific proxies. General proxy should be
|
||||
set with
|
||||
|
||||
|
||||
ALL_PROXY
|
||||
|
||||
A comma-separated list of host names that shouldn't go through any proxy is
|
||||
@ -850,9 +695,8 @@ ENVIRONMENT VARIABLES
|
||||
|
||||
NO_PROXY
|
||||
|
||||
If the host name matches one of these strings, or the host is within the
|
||||
domain of one of these strings, transactions with that node will not be
|
||||
proxied.
|
||||
If a tail substring of the domain-path for a host matches one of these
|
||||
strings, transactions with that node will not be proxied.
|
||||
|
||||
|
||||
The usage of the -x/--proxy flag overrides the environment variables.
|
||||
@ -860,15 +704,15 @@ ENVIRONMENT VARIABLES
|
||||
NETRC
|
||||
|
||||
Unix introduced the .netrc concept a long time ago. It is a way for a user
|
||||
to specify name and password for commonly visited FTP sites in a file so
|
||||
to specify name and password for commonly visited ftp sites in a file so
|
||||
that you don't have to type them in each time you visit those sites. You
|
||||
realize this is a big security risk if someone else gets hold of your
|
||||
passwords, so therefore most unix programs won't read this file unless it is
|
||||
passwords, so therefor most unix programs won't read this file unless it is
|
||||
only readable by yourself (curl doesn't care though).
|
||||
|
||||
Curl supports .netrc files if told to (using the -n/--netrc and
|
||||
--netrc-optional options). This is not restricted to just FTP,
|
||||
so curl can use it for all protocols where authentication is used.
|
||||
Curl supports .netrc files if told so (using the -n/--netrc option). This is
|
||||
not restricted to only ftp, but curl can use it for all protocols where
|
||||
authentication is used.
|
||||
|
||||
A very simple .netrc file could look something like:
|
||||
|
||||
@ -885,19 +729,18 @@ CUSTOM OUTPUT
|
||||
|
||||
curl -w 'We downloaded %{size_download} bytes\n' www.download.com
|
||||
|
||||
KERBEROS FTP TRANSFER
|
||||
KERBEROS4 FTP TRANSFER
|
||||
|
||||
Curl supports kerberos4 and kerberos5/GSSAPI for FTP transfers. You need
|
||||
the kerberos package installed and used at curl build time for it to be
|
||||
available.
|
||||
Curl supports kerberos4 for FTP transfers. You need the kerberos package
|
||||
installed and used at curl build time for it to be used.
|
||||
|
||||
First, get the krb-ticket the normal way, like with the kinit/kauth tool.
|
||||
Then use curl in way similar to:
|
||||
First, get the krb-ticket the normal way, like with the kauth tool. Then use
|
||||
curl in way similar to:
|
||||
|
||||
curl --krb private ftp://krb4site.com -u username:fakepwd
|
||||
curl --krb4 private ftp://krb4site.com -u username:fakepwd
|
||||
|
||||
There's no use for a password on the -u switch, but a blank one will make
|
||||
curl ask for one and you already entered the real password to kinit/kauth.
|
||||
curl ask for one and you already entered the real password to kauth.
|
||||
|
||||
TELNET
|
||||
|
||||
@ -913,130 +756,46 @@ TELNET
|
||||
You might want the -N/--no-buffer option to switch off the buffered output
|
||||
for slow connections or similar.
|
||||
|
||||
Pass options to the telnet protocol negotiation, by using the -t option. To
|
||||
tell the server we use a vt100 terminal, try something like:
|
||||
|
||||
curl -tTTYPE=vt100 telnet://remote.server.com
|
||||
|
||||
Other interesting options for it -t include:
|
||||
|
||||
- XDISPLOC=<X display> Sets the X display location.
|
||||
|
||||
- NEW_ENV=<var,val> Sets an environment variable.
|
||||
|
||||
NOTE: The telnet protocol does not specify any way to login with a specified
|
||||
NOTE: the telnet protocol does not specify any way to login with a specified
|
||||
user and password so curl can't do that automatically. To do that, you need
|
||||
to track when the login prompt is received and send the username and
|
||||
password accordingly.
|
||||
|
||||
PERSISTENT CONNECTIONS
|
||||
PERSISTANT CONNECTIONS
|
||||
|
||||
Specifying multiple files on a single command line will make curl transfer
|
||||
all of them, one after the other in the specified order.
|
||||
|
||||
libcurl will attempt to use persistent connections for the transfers so that
|
||||
libcurl will attempt to use persistant connections for the transfers so that
|
||||
the second transfer to the same host can use the same connection that was
|
||||
already initiated and was left open in the previous transfer. This greatly
|
||||
decreases connection time for all but the first transfer and it makes a far
|
||||
better use of the network.
|
||||
|
||||
Note that curl cannot use persistent connections for transfers that are used
|
||||
Note that curl cannot use persistant connections for transfers that are used
|
||||
in subsequence curl invokes. Try to stuff as many URLs as possible on the
|
||||
same command line if they are using the same host, as that'll make the
|
||||
transfers faster. If you use an HTTP proxy for file transfers, practically
|
||||
all transfers will be persistent.
|
||||
transfers faster. If you use a http proxy for file transfers, practicly
|
||||
all transfers will be persistant.
|
||||
|
||||
MULTIPLE TRANSFERS WITH A SINGLE COMMAND LINE
|
||||
|
||||
As is mentioned above, you can download multiple files with one command line
|
||||
by simply adding more URLs. If you want those to get saved to a local file
|
||||
instead of just printed to stdout, you need to add one save option for each
|
||||
URL you specify. Note that this also goes for the -O option (but not
|
||||
--remote-name-all).
|
||||
|
||||
For example: get two files and use -O for the first and a custom file
|
||||
name for the second:
|
||||
|
||||
curl -O http://url.com/file.txt ftp://ftp.com/moo.exe -o moo.jpg
|
||||
|
||||
You can also upload multiple files in a similar fashion:
|
||||
|
||||
curl -T local1 ftp://ftp.com/moo.exe -T local2 ftp://ftp.com/moo2.txt
|
||||
|
||||
IPv6
|
||||
|
||||
curl will connect to a server with IPv6 when a host lookup returns an IPv6
|
||||
address and fall back to IPv4 if the connection fails. The --ipv4 and --ipv6
|
||||
options can specify which address to use when both are available. IPv6
|
||||
addresses can also be specified directly in URLs using the syntax:
|
||||
|
||||
http://[2001:1890:1112:1::20]/overview.html
|
||||
|
||||
When this style is used, the -g option must be given to stop curl from
|
||||
interpreting the square brackets as special globbing characters. Link local
|
||||
and site local addresses including a scope identifier, such as fe80::1234%1,
|
||||
may also be used, but the scope portion must be numeric or match an existing
|
||||
network interface on Linux and the percent character must be URL escaped. The
|
||||
previous example in an SFTP URL might look like:
|
||||
|
||||
sftp://[fe80::1234%251]/
|
||||
|
||||
IPv6 addresses provided other than in URLs (e.g. to the --proxy, --interface
|
||||
or --ftp-port options) should not be URL encoded.
|
||||
|
||||
METALINK
|
||||
|
||||
Curl supports Metalink (both version 3 and 4 (RFC 5854) are supported), a way
|
||||
to list multiple URIs and hashes for a file. Curl will make use of the mirrors
|
||||
listed within for failover if there are errors (such as the file or server not
|
||||
being available). It will also verify the hash of the file after the download
|
||||
completes. The Metalink file itself is downloaded and processed in memory and
|
||||
not stored in the local file system.
|
||||
|
||||
Example to use a remote Metalink file:
|
||||
|
||||
curl --metalink http://www.example.com/example.metalink
|
||||
|
||||
To use a Metalink file in the local file system, use FILE protocol (file://):
|
||||
|
||||
curl --metalink file://example.metalink
|
||||
|
||||
Please note that if FILE protocol is disabled, there is no way to use a local
|
||||
Metalink file at the time of this writing. Also note that if --metalink and
|
||||
--include are used together, --include will be ignored. This is because including
|
||||
headers in the response will break Metalink parser and if the headers are included
|
||||
in the file described in Metalink file, hash check will fail.
|
||||
Persistant connections were introduced in curl 7.7.
|
||||
|
||||
MAILING LISTS
|
||||
|
||||
For your convenience, we have several open mailing lists to discuss curl,
|
||||
its development and things relevant to this. Get all info at
|
||||
https://curl.haxx.se/mail/. Some of the lists available are:
|
||||
its development and things relevant to this.
|
||||
|
||||
curl-users
|
||||
To subscribe to the main curl list, mail curl-request@contactor.se with
|
||||
"subscribe <fill in your email address>" in the body.
|
||||
|
||||
Users of the command line tool. How to use it, what doesn't work, new
|
||||
features, related tools, questions, news, installations, compilations,
|
||||
running, porting etc.
|
||||
To subscribe to the curl-library users/deverlopers list, follow the
|
||||
instructions at http://curl.haxx.se/mail/
|
||||
|
||||
curl-library
|
||||
To subscribe to the curl-announce list, to only get information about new
|
||||
releases, follow the instructions at http://curl.haxx.se/mail/
|
||||
|
||||
Developers using or developing libcurl. Bugs, extensions, improvements.
|
||||
|
||||
curl-announce
|
||||
|
||||
Low-traffic. Only receives announcements of new public versions. At worst,
|
||||
that makes something like one or two mails per month, but usually only one
|
||||
mail every second month.
|
||||
|
||||
curl-and-php
|
||||
|
||||
Using the curl functions in PHP. Everything curl with a PHP angle. Or PHP
|
||||
with a curl angle.
|
||||
|
||||
curl-and-python
|
||||
|
||||
Python hackers using curl with or without the python binding pycurl.
|
||||
To subscribe to the curl-and-PHP list in which curl using with PHP is
|
||||
discussed, follow the instructions at http://curl.haxx.se/mail/
|
||||
|
||||
Please direct curl questions, feature requests and trouble reports to one of
|
||||
these mailing lists instead of mailing any individual.
|
||||
|
106
docs/Makefile.am
106
docs/Makefile.am
@ -1,62 +1,76 @@
|
||||
#***************************************************************************
|
||||
# _ _ ____ _
|
||||
# Project ___| | | | _ \| |
|
||||
# / __| | | | |_) | |
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# $Id$
|
||||
#
|
||||
# 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 https://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
|
||||
|
||||
man_MANS = curl.1 curl-config.1
|
||||
noinst_man_MANS = mk-ca-bundle.1
|
||||
GENHTMLPAGES = curl.html curl-config.html mk-ca-bundle.html
|
||||
PDFPAGES = curl.pdf curl-config.pdf mk-ca-bundle.pdf
|
||||
man_MANS = \
|
||||
curl.1 \
|
||||
curl-config.1 \
|
||||
curl_easy_cleanup.3 \
|
||||
curl_easy_getinfo.3 \
|
||||
curl_easy_init.3 \
|
||||
curl_easy_perform.3 \
|
||||
curl_easy_setopt.3 \
|
||||
curl_easy_duphandle.3 \
|
||||
curl_formparse.3 \
|
||||
curl_formadd.3 \
|
||||
curl_formfree.3 \
|
||||
curl_getdate.3 \
|
||||
curl_getenv.3 \
|
||||
curl_slist_append.3 \
|
||||
curl_slist_free_all.3 \
|
||||
curl_version.3 \
|
||||
curl_escape.3 \
|
||||
curl_unescape.3 \
|
||||
curl_strequal.3 \
|
||||
curl_strnequal.3 \
|
||||
curl_mprintf.3 \
|
||||
curl_global_init.3 \
|
||||
curl_global_cleanup.3 \
|
||||
libcurl.3
|
||||
|
||||
HTMLPAGES = $(GENHTMLPAGES) index.html
|
||||
SUBDIRS = examples
|
||||
|
||||
SUBDIRS = examples libcurl
|
||||
HTMLPAGES = \
|
||||
curl.html \
|
||||
curl-config.html \
|
||||
curl_easy_cleanup.html \
|
||||
curl_easy_getinfo.html \
|
||||
curl_easy_init.html \
|
||||
curl_easy_perform.html \
|
||||
curl_easy_setopt.html \
|
||||
curl_easy_duphandle.html \
|
||||
curl_formadd.html \
|
||||
curl_formparse.html \
|
||||
curl_formfree.html \
|
||||
curl_getdate.html \
|
||||
curl_getenv.html \
|
||||
curl_slist_append.html \
|
||||
curl_slist_free_all.html \
|
||||
curl_version.html \
|
||||
curl_escape.html \
|
||||
curl_unescape.html \
|
||||
curl_strequal.html \
|
||||
curl_strnequal.html \
|
||||
curl_mprintf.html \
|
||||
curl_global_init.html \
|
||||
curl_global_cleanup.html \
|
||||
libcurl.html
|
||||
|
||||
CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES)
|
||||
EXTRA_DIST = $(man_MANS) \
|
||||
MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS \
|
||||
README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS \
|
||||
$(HTMLPAGES)
|
||||
|
||||
EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS \
|
||||
README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS \
|
||||
KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) HISTORY INSTALL \
|
||||
$(PDFPAGES) LICENSE-MIXING README.netware INSTALL.devcpp \
|
||||
MAIL-ETIQUETTE HTTP-COOKIES SECURITY RELEASE-PROCEDURE SSL-PROBLEMS \
|
||||
HTTP2.md ROADMAP.md CODE_OF_CONDUCT.md CODE_STYLE.md
|
||||
MAN2HTML= gnroff -man $< | man2html >$@
|
||||
|
||||
MAN2HTML= roffit < $< >$@
|
||||
|
||||
SUFFIXES = .1 .html .pdf
|
||||
SUFFIXES = .1 .3 .html
|
||||
|
||||
html: $(HTMLPAGES)
|
||||
cd libcurl && make html
|
||||
|
||||
pdf: $(PDFPAGES)
|
||||
cd libcurl && make pdf
|
||||
.3.html:
|
||||
$(MAN2HTML)
|
||||
|
||||
.1.html:
|
||||
$(MAN2HTML)
|
||||
|
||||
.1.pdf:
|
||||
@(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
|
||||
groff -Tps -man $< >$$foo.ps; \
|
||||
ps2pdf $$foo.ps $@; \
|
||||
rm $$foo.ps; \
|
||||
echo "converted $< to $@")
|
||||
|
||||
|
@ -1,16 +0,0 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
README.cmake
|
||||
Read the README file first.
|
||||
|
||||
Curl contains CMake build files that provide a way to build Curl with the
|
||||
CMake build tool (www.cmake.org). CMake is a cross platform meta build tool
|
||||
that generates native makefiles and IDE project files. The CMake build
|
||||
system can be used to build Curl on any of its supported platforms.
|
||||
|
||||
Read the INSTALL.cmake file for instructions on how to compile curl with
|
||||
CMake.
|
@ -1,27 +0,0 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
README.netware
|
||||
|
||||
Read the README file first.
|
||||
|
||||
Curl has been successfully compiled with gcc / nlmconv on different flavours
|
||||
of Linux as well as with the official Metrowerks CodeWarrior compiler.
|
||||
While not being the main development target, a continuously growing share of
|
||||
curl users are NetWare-based, specially also consuming the lib from PHP.
|
||||
|
||||
The unix-style man pages are tricky to read on windows, so therefore are all
|
||||
those pages converted to HTML as well as pdf, and included in the release
|
||||
archives.
|
||||
|
||||
The main curl.1 man page is also "built-in" in the command line tool. Use a
|
||||
command line similar to this in order to extract a separate text file:
|
||||
|
||||
curl -M >manual.txt
|
||||
|
||||
Read the INSTALL file for instructions how to compile curl self.
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
README.win32
|
||||
@ -12,15 +12,18 @@ README.win32
|
||||
systems. While not being the main develop target, a fair share of curl users
|
||||
are win32-based.
|
||||
|
||||
The unix-style man pages are tricky to read on windows, so therefore are all
|
||||
those pages converted to HTML as well as pdf, and included in the release
|
||||
archives.
|
||||
Some documentation in this archive will be tricky to read for Windows
|
||||
people, as they come in unix-style man pages. You can either download a
|
||||
freely available nroff binary for win32 (*pointers appriciated*), convert
|
||||
the files into plain-text on your neighbor's unix machine or run over to the
|
||||
curl web site and view them as plain HTML.
|
||||
|
||||
The main curl.1 man page is also "built-in" in the command line tool. Use a
|
||||
command line similar to this in order to extract a separate text file:
|
||||
The main curl.1 man page is "built-in". Use a command line similar to this
|
||||
in order to extract a separate text file:
|
||||
|
||||
curl -M >manual.txt
|
||||
|
||||
Read the INSTALL file for instructions how to compile curl self.
|
||||
|
||||
Download all the libcurl man pages in HTML format using the link on the
|
||||
bottom of this page:
|
||||
|
||||
http://curl.haxx.se/libcurl/c/
|
||||
|
@ -1,87 +0,0 @@
|
||||
curl release procedure - how to do a release
|
||||
============================================
|
||||
|
||||
in the source code repo
|
||||
-----------------------
|
||||
|
||||
- edit `RELEASE-NOTES` to be accurate
|
||||
|
||||
- update `docs/THANKS`
|
||||
|
||||
- make sure all relevant changes are committed on the master branch
|
||||
|
||||
- tag the git repo in this style: `git tag -a curl-7_34_0`. -a annotates the
|
||||
tag and we use underscores instead of dots in the version number.
|
||||
|
||||
- run "./maketgz 7.34.0" to build the release tarballs. It is important that
|
||||
you run this on a machine with the correct set of autotools etc installed
|
||||
as this is what then will be shipped and used by most users on *nix like
|
||||
systems.
|
||||
|
||||
- push the git commits and the new tag
|
||||
|
||||
- gpg sign the 4 tarballs as maketgz suggests
|
||||
|
||||
- upload the 8 resulting files to the primary download directory
|
||||
|
||||
in the curl-www repo
|
||||
--------------------
|
||||
|
||||
- edit `Makefile` (version number and date),
|
||||
|
||||
- edit `_newslog.html` (announce the new release) and
|
||||
|
||||
- edit `_changes.html` (insert changes+bugfixes from RELEASE-NOTES)
|
||||
|
||||
- commit all local changes
|
||||
|
||||
- tag the repo with the same tag as used for the source repo
|
||||
|
||||
- make sure all relevant changes are committed and pushed on the master branch
|
||||
|
||||
(the web site then updates its contents automatically)
|
||||
|
||||
inform
|
||||
------
|
||||
|
||||
- send an email to curl-users, curl-announce and curl-library. Insert the
|
||||
RELEASE-NOTES into the mail.
|
||||
|
||||
celebrate
|
||||
---------
|
||||
|
||||
- suitable beverage intake is encouraged for the festivities
|
||||
|
||||
curl release scheduling
|
||||
=======================
|
||||
|
||||
Basics
|
||||
------
|
||||
|
||||
We do releases every 8 weeks on Wednesdays. If critical problems arise, we can
|
||||
insert releases outside of the schedule or we can move the release date - but
|
||||
this is very rare.
|
||||
|
||||
Each 8 week release cycle is split in two 4-week periods.
|
||||
|
||||
- During the first 4 weeks after a release, we allow new features and changes
|
||||
to curl and libcurl. If we accept any such changes, we bump the minor number
|
||||
used for the next release.
|
||||
|
||||
- During the second 4-week period we do not merge any features or changes, we
|
||||
then only focus on fixing bugs and polishing things to make a solid coming
|
||||
release.
|
||||
|
||||
Coming dates
|
||||
------------
|
||||
|
||||
Based on the description above, here are some planned release dates (at the
|
||||
time of this writing):
|
||||
|
||||
- October 7, 2015 (version 7.45.0)
|
||||
- December 2, 2015
|
||||
- January 27, 2016
|
||||
- March 23, 2016
|
||||
- May 18, 2016
|
||||
- July 13, 2016
|
||||
- September 7, 2016
|
@ -1,13 +1,19 @@
|
||||
_ _ ____ _
|
||||
Project ___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
_ _ ____ _
|
||||
Project ___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
|
||||
This document lists documents and standards used by curl.
|
||||
This document has been introduced in order to let you find documents that
|
||||
specify standards used by curl, software that extends curl, web pages with
|
||||
"competing" utilities and information pages that describe some of the tools
|
||||
that we use to build/compile/develop curl.
|
||||
|
||||
RFC 959 - The FTP protocol
|
||||
Standards
|
||||
---------
|
||||
|
||||
RFC 959 - Defines how FTP works
|
||||
|
||||
RFC 1635 - How to Use Anonymous FTP
|
||||
|
||||
@ -32,16 +38,12 @@ This document lists documents and standards used by curl.
|
||||
|
||||
RFC 2068 - HTTP 1.1 (obsoleted by RFC 2616)
|
||||
|
||||
RFC 2104 - Keyed-Hashing for Message Authentication
|
||||
|
||||
RFC 2109 - HTTP State Management Mechanism (cookie stuff)
|
||||
- Also, read Netscape's specification at
|
||||
https://curl.haxx.se/rfc/cookie_spec.html
|
||||
http://curl.haxx.se/rfc/cookie_spec.html
|
||||
|
||||
RFC 2183 - The Content-Disposition Header Field
|
||||
|
||||
RFC 2195 - CRAM-MD5 authentication
|
||||
|
||||
RFC 2229 - A Dictionary Server Protocol
|
||||
|
||||
RFC 2255 - Newer LDAP URL syntax document.
|
||||
@ -50,7 +52,7 @@ This document lists documents and standards used by curl.
|
||||
Character Sets, Languages, and Continuations
|
||||
|
||||
RFC 2388 - "Returning Values from Forms: multipart/form-data"
|
||||
Use this as an addition to the RFC1867
|
||||
Use this as an addition to the RFC1867
|
||||
|
||||
RFC 2396 - "Uniform Resource Identifiers: Generic Syntax and Semantics" This
|
||||
one obsoletes RFC 1738, but since RFC 1738 is often mentioned
|
||||
@ -65,19 +67,59 @@ This document lists documents and standards used by curl.
|
||||
RFC 2617 - HTTP Authentication
|
||||
|
||||
RFC 2718 - Guidelines for new URL Schemes
|
||||
|
||||
|
||||
RFC 2732 - Format for Literal IPv6 Addresses in URL's
|
||||
|
||||
|
||||
RFC 2818 - HTTP Over TLS (TLS is the successor to SSL)
|
||||
|
||||
RFC 2821 - SMTP protocol
|
||||
|
||||
|
||||
RFC 2964 - Use of HTTP State Management
|
||||
|
||||
|
||||
RFC 2965 - HTTP State Management Mechanism. Cookies. Obsoletes RFC2109
|
||||
|
||||
RFC 3207 - SMTP over TLS
|
||||
Compilers
|
||||
---------
|
||||
MingW32 - http://www.mingw.org/
|
||||
|
||||
RFC 4616 - PLAIN authentication
|
||||
gcc - http://www.gnu.org/software/gcc/gcc.html
|
||||
|
||||
RFC 4954 - SMTP Authentication
|
||||
Software
|
||||
--------
|
||||
OpenSSL - http://www.openssl.org/
|
||||
|
||||
OpenLDAP - http://www.openldap.org/
|
||||
|
||||
zlib - http://www.cdrom.com/pub/infozip/zlib/
|
||||
|
||||
Similar Tools
|
||||
-------------
|
||||
wget - http://sunsite.dk/wget/
|
||||
|
||||
snarf - http://www.xach.com/snarf/
|
||||
|
||||
lynx - http://lynx.browser.org/ (well at least when -dump is used)
|
||||
|
||||
swebget - http://www.uni-hildesheim.de/~smol0075/swebget/
|
||||
|
||||
Kermit - http://www.columbia.edu/kermit/ftpclient
|
||||
|
||||
Pavuk - http://www.idata.sk/~ondrej/pavuk/
|
||||
|
||||
httpr - http://zwolak.dhs.org/httpr/
|
||||
|
||||
puf - http://www.inf.tu-dresden.de/~ob6/sw/puf.html
|
||||
|
||||
Related Software
|
||||
----------------
|
||||
ftpparse - http://cr.yp.to/ftpparse.html parses FTP LIST responses
|
||||
|
||||
autoconf - http://www.gnu.org/software/autoconf/autoconf.html
|
||||
|
||||
automake - http://www.gnu.org/software/automake/automake.html
|
||||
|
||||
bison - http://www.gnu.org/software/bison/bison.html
|
||||
|
||||
gzip - http://www.gnu.org/software/gzip/gzip.html
|
||||
|
||||
tar - http://www.gnu.org/software/tar/tar.html
|
||||
|
||||
libtool - http://www.gnu.org/software/libtool/libtool.html
|
||||
|
133
docs/ROADMAP.md
133
docs/ROADMAP.md
@ -1,133 +0,0 @@
|
||||
curl the next few years - perhaps
|
||||
=================================
|
||||
|
||||
Roadmap of things Daniel Stenberg and Steve Holme want to work on next. It is
|
||||
intended to serve as a guideline for others for information, feedback and
|
||||
possible participation.
|
||||
|
||||
HTTP/2
|
||||
------
|
||||
|
||||
- test suite
|
||||
|
||||
Base this on existing nghttp2 server to start with to make functional
|
||||
tests. Later on we can adopt that code or work with nghttp2 to provide ways
|
||||
to have the http2 server respond with broken responses to make sure we deal
|
||||
with that nicely as well.
|
||||
|
||||
To decide: if we need to bundle parts of the nghttp2 stuff that probably
|
||||
won't be shipped by many distros.
|
||||
|
||||
- provide option for HTTP/2 "prior knowledge" over clear text
|
||||
|
||||
As it would avoid the roundtrip-heavy Upgrade: procedures when you _know_
|
||||
it speaks HTTP/2.
|
||||
|
||||
HTTP cookies
|
||||
------------
|
||||
|
||||
Two cookie drafts have been adopted by the httpwg in IETF and we should
|
||||
support them as the popular browsers will as well:
|
||||
|
||||
[Deprecate modification of 'secure' cookies from non-secure
|
||||
origins](https://tools.ietf.org/html/draft-ietf-httpbis-cookie-alone-00)
|
||||
|
||||
[Cookie Prefixes](https://tools.ietf.org/html/draft-ietf-httpbis-cookie-prefixes-00)
|
||||
|
||||
[Firefox bug report about secure cookies](https://bugzilla.mozilla.org/show_bug.cgi?id=976073)
|
||||
|
||||
SRV records
|
||||
-----------
|
||||
|
||||
How to find services for specific domains/hosts.
|
||||
|
||||
HTTPS to proxy
|
||||
--------------
|
||||
|
||||
To avoid network traffic to/from the proxy getting snooped on. There's a git
|
||||
branch in the public git repository for this that we need to make sure works
|
||||
for all TLS backends and then merge!
|
||||
|
||||
curl_formadd()
|
||||
--------------
|
||||
|
||||
make sure there's an easy handle passed in to `curl_formadd()`,
|
||||
`curl_formget()` and `curl_formfree()` by adding replacement functions and
|
||||
deprecating the old ones to allow custom mallocs and more
|
||||
|
||||
third-party SASL
|
||||
----------------
|
||||
|
||||
add support for third-party SASL libraries such as Cyrus SASL - may need to
|
||||
move existing native and SSPI based authentication into vsasl folder after
|
||||
reworking HTTP and SASL code
|
||||
|
||||
SASL authentication in LDAP
|
||||
---------------------------
|
||||
|
||||
...
|
||||
|
||||
Simplify the SMTP email
|
||||
-----------------------
|
||||
|
||||
Simplify the SMTP email interface so that programmers don't have to
|
||||
construct the body of an email that contains all the headers, alternative
|
||||
content, images and attachments - maintain raw interface so that
|
||||
programmers that want to do this can
|
||||
|
||||
email capabilities
|
||||
------------------
|
||||
|
||||
Allow the email protocols to return the capabilities before
|
||||
authenticating. This will allow an application to decide on the best
|
||||
authentication mechanism
|
||||
|
||||
Win32 pthreads
|
||||
--------------
|
||||
|
||||
Allow Windows threading model to be replaced by Win32 pthreads port
|
||||
|
||||
dynamic buffer size
|
||||
-------------------
|
||||
|
||||
Implement a dynamic buffer size to allow SFTP to use much larger buffers and
|
||||
possibly allow the size to be customizable by applications. Use less memory
|
||||
when handles are not in use?
|
||||
|
||||
New stuff - curl
|
||||
----------------
|
||||
|
||||
1. Embed a language interpreter (lua?). For that middle ground where curl
|
||||
isn’t enough and a libcurl binding feels “too much”. Build-time conditional
|
||||
of course.
|
||||
|
||||
2. Simplify the SMTP command line so that the headers and multi-part content
|
||||
don't have to be constructed before calling curl
|
||||
|
||||
Improve
|
||||
-------
|
||||
|
||||
1. build for windows (considered hard by many users)
|
||||
|
||||
2. curl -h output (considered overwhelming to users)
|
||||
|
||||
3. we have > 170 command line options, is there a way to redo things to
|
||||
simplify or improve the situation as we are likely to keep adding
|
||||
features/options in the future too
|
||||
|
||||
4. docs (considered "bad" by users but how do we make it better?)
|
||||
|
||||
- split up curl.1
|
||||
|
||||
5. authentication framework (consider merging HTTP and SASL authentication to
|
||||
give one API for protocols to call)
|
||||
|
||||
6. Perform some of the clean up from the TODO document, removing old
|
||||
definitions and such like that are currently earmarked to be removed years
|
||||
ago
|
||||
|
||||
Remove
|
||||
------
|
||||
|
||||
1. makefile.vc files as there is no point in maintaining two sets of Windows
|
||||
makefiles. Note: These are currently being used by the Windows autobuilds
|
107
docs/SECURITY
107
docs/SECURITY
@ -1,107 +0,0 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
curl security for developers
|
||||
============================
|
||||
|
||||
This document is intended to provide guidance to curl developers on how
|
||||
security vulnerabilities should be handled.
|
||||
|
||||
Publishing Information
|
||||
----------------------
|
||||
|
||||
All known and public curl or libcurl related vulnerabilities are listed on
|
||||
[the curl web site security page](https://curl.haxx.se/docs/security.html).
|
||||
|
||||
Security vulnerabilities should not be entered in the project's public bug
|
||||
tracker unless the necessary configuration is in place to limit access to the
|
||||
issue to only the reporter and the project's security team.
|
||||
|
||||
Vulnerability Handling
|
||||
----------------------
|
||||
|
||||
The typical process for handling a new security vulnerability is as follows.
|
||||
|
||||
No information should be made public about a vulnerability until it is
|
||||
formally announced at the end of this process. That means, for example that a
|
||||
bug tracker entry must NOT be created to track the issue since that will make
|
||||
the issue public and it should not be discussed on any of the project's public
|
||||
mailing lists. Also messages associated with any commits should not make
|
||||
any reference to the security nature of the commit if done prior to the public
|
||||
announcement.
|
||||
|
||||
- The person discovering the issue, the reporter, reports the vulnerability
|
||||
privately to `curl-security@haxx.se`. That's an email alias that reaches a
|
||||
handful of selected and trusted people.
|
||||
|
||||
- Messages that do not relate to the reporting or managing of an undisclosed
|
||||
security vulnerability in curl or libcurl are ignored and no further action
|
||||
is required.
|
||||
|
||||
- A person in the security team sends an e-mail to the original reporter to
|
||||
acknowledge the report.
|
||||
|
||||
- The security team investigates the report and either rejects it or accepts
|
||||
it.
|
||||
|
||||
- If the report is rejected, the team writes to the reporter to explain why.
|
||||
|
||||
- If the report is accepted, the team writes to the reporter to let him/her
|
||||
know it is accepted and that they are working on a fix.
|
||||
|
||||
- The security team discusses the problem, works out a fix, considers the
|
||||
impact of the problem and suggests a release schedule. This discussion
|
||||
should involve the reporter as much as possible.
|
||||
|
||||
- The release of the information should be "as soon as possible" and is most
|
||||
often synced with an upcoming release that contains the fix. If the
|
||||
reporter, or anyone else, thinks the next planned release is too far away
|
||||
then a separate earlier release for security reasons should be considered.
|
||||
|
||||
- Write a security advisory draft about the problem that explains what the
|
||||
problem is, its impact, which versions it affects, solutions or
|
||||
workarounds, when the release is out and make sure to credit all
|
||||
contributors properly.
|
||||
|
||||
- Request a CVE number from distros@openwall[1] when also informing and
|
||||
preparing them for the upcoming public security vulnerability announcement -
|
||||
attach the advisory draft for information. Note that 'distros' won't accept
|
||||
an embargo longer than 19 days.
|
||||
|
||||
- Update the "security advisory" with the CVE number.
|
||||
|
||||
- The security team commits the fix in a private branch. The commit message
|
||||
should ideally contain the CVE number. This fix is usually also distributed
|
||||
to the 'distros' mailing list to allow them to use the fix prior to the
|
||||
public announcement.
|
||||
|
||||
- At the day of the next release, the private branch is merged into the master
|
||||
branch and pushed. Once pushed, the information is accessible to the public
|
||||
and the actual release should follow suit immediately afterwards.
|
||||
|
||||
- The project team creates a release that includes the fix.
|
||||
|
||||
- The project team announces the release and the vulnerability to the world in
|
||||
the same manner we always announce releases. It gets sent to the
|
||||
curl-announce, curl-library and curl-users mailing lists.
|
||||
|
||||
- The security web page on the web site should get the new vulnerability
|
||||
mentioned.
|
||||
|
||||
[1] = http://oss-security.openwall.org/wiki/mailing-lists/distros
|
||||
|
||||
CURL-SECURITY (at haxx dot se)
|
||||
------------------------------
|
||||
|
||||
Who is on this list? There are a couple of criteria you must meet, and then we
|
||||
might ask you to join the list or you can ask to join it. It really isn't very
|
||||
formal. We basically only require that you have a long-term presence in the
|
||||
curl project and you have shown an understanding for the project and its way
|
||||
of working. You must've been around for a good while and you should have no
|
||||
plans in vanishing in the near future.
|
||||
|
||||
We do not make the list of partipants public mostly because it tends to vary
|
||||
somewhat over time and a list somewhere will only risk getting outdated.
|
@ -1,87 +0,0 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
SSL problems
|
||||
|
||||
First, let's establish that we often refer to TLS and SSL interchangeably as
|
||||
SSL here. The current protocol is called TLS, it was called SSL a long time
|
||||
ago.
|
||||
|
||||
There are several known reasons why a connection that involves SSL might
|
||||
fail. This is a document that attempts to details the most common ones and
|
||||
how to mitigate them.
|
||||
|
||||
CA certs
|
||||
|
||||
CA certs are used to digitally verify the server's certificate. You need a
|
||||
"ca bundle" for this. See lots of more details on this in the SSLCERTS
|
||||
document.
|
||||
|
||||
CA bundle missing intermediate certificates
|
||||
|
||||
When using said CA bundle to verify a server cert, you will experience
|
||||
problems if your CA cert does not have the certificates for the
|
||||
intermediates in the whole trust chain.
|
||||
|
||||
Protocol version
|
||||
|
||||
Some broken servers fail to support the protocol negotiation properly that
|
||||
SSL servers are supposed to handle. This may cause the connection to fail
|
||||
completely. Sometimes you may need to explicitly select a SSL version to use
|
||||
when connecting to make the connection succeed.
|
||||
|
||||
An additional complication can be that modern SSL libraries sometimes are
|
||||
built with support for older SSL and TLS versions disabled!
|
||||
|
||||
All versions of SSL are considered insecure and should be avoided. Use TLS.
|
||||
|
||||
Ciphers
|
||||
|
||||
Clients give servers a list of ciphers to select from. If the list doesn't
|
||||
include any ciphers the server wants/can use, the connection handshake
|
||||
fails.
|
||||
|
||||
curl has recently disabled the user of a whole bunch of seriously insecure
|
||||
ciphers from its default set (slightly depending on SSL backend in use).
|
||||
|
||||
You may have to explicitly provide an alternative list of ciphers for curl
|
||||
to use to allow the server to use a WEAK cipher for you.
|
||||
|
||||
Note that these weak ciphers are identified as flawed. For example, this
|
||||
includes symmetric ciphers with less than 128 bit keys and RC4.
|
||||
|
||||
WinSSL in Windows XP is not able to connect to servers that no longer
|
||||
support the legacy handshakes and algorithms used by those versions, so we
|
||||
advice against building curl to use WinSSL on really old Windows versions.
|
||||
|
||||
References:
|
||||
|
||||
https://tools.ietf.org/html/draft-popov-tls-prohibiting-rc4-01
|
||||
|
||||
Allow BEAST
|
||||
|
||||
BEAST is the name of a TLS 1.0 attack that surfaced 2011. When adding means
|
||||
to mitigate this attack, it turned out that some broken servers out there in
|
||||
the wild didn't work properly with the BEAST mitigation in place.
|
||||
|
||||
To make such broken servers work, the --ssl-allow-beast option was
|
||||
introduced. Exactly as it sounds, it re-introduces the BEAST vulnerability
|
||||
but on the other hand it allows curl to connect to that kind of strange
|
||||
servers.
|
||||
|
||||
Disabling certificate revocation checks
|
||||
|
||||
Some SSL backends may do certificate revocation checks (CRL, OCSP, etc)
|
||||
depending on the OS or build configuration. The --ssl-no-revoke option was
|
||||
introduced in 7.44.0 to disable revocation checking but currently is only
|
||||
supported for WinSSL (the native Windows SSL library), with an exception in
|
||||
the case of Windows' Untrusted Publishers blacklist which it seems can't be
|
||||
bypassed. This option may have broader support to accommodate other SSL
|
||||
backends in the future.
|
||||
|
||||
References:
|
||||
|
||||
https://curl.haxx.se/docs/ssl-compared.html
|
163
docs/SSLCERTS
163
docs/SSLCERTS
@ -1,163 +0,0 @@
|
||||
SSL Certificate Verification
|
||||
============================
|
||||
|
||||
SSL is TLS
|
||||
----------
|
||||
|
||||
SSL is the old name. It is called TLS these days.
|
||||
|
||||
|
||||
Native SSL
|
||||
----------
|
||||
|
||||
If libcurl was built with Schannel or Secure Transport support (the native SSL
|
||||
libraries included in Windows and Mac OS X), then this does not apply to
|
||||
you. Scroll down for details on how the OS-native engines handle SSL
|
||||
certificates. If you're not sure, then run "curl -V" and read the results. If
|
||||
the version string says "WinSSL" in it, then it was built with Schannel
|
||||
support.
|
||||
|
||||
It is about trust
|
||||
-----------------
|
||||
|
||||
This system is about trust. In your local CA certificate store you have certs
|
||||
from *trusted* Certificate Authorities that you then can use to verify that the
|
||||
server certificates you see are valid. They're signed by one of the CAs you
|
||||
trust.
|
||||
|
||||
Which CAs do you trust? You can decide to trust the same set of companies your
|
||||
operating system trusts, or the set one of the known browsers trust. That's
|
||||
basically trust via someone else you trust. You should just be aware that
|
||||
modern operating systems and browsers are setup to trust *hundreds* of
|
||||
companies and recent years several such CAs have been found untrustworthy.
|
||||
|
||||
Certificate Verification
|
||||
------------------------
|
||||
|
||||
libcurl performs peer SSL certificate verification by default. This is done
|
||||
by using a CA certificate store that the SSL library can use to make sure the
|
||||
peer's server certificate is valid.
|
||||
|
||||
If you communicate with HTTPS, FTPS or other TLS-using servers using
|
||||
certificates that are signed by CAs present in the store, you can be sure
|
||||
that the remote server really is the one it claims to be.
|
||||
|
||||
If the remote server uses a self-signed certificate, if you don't install a CA
|
||||
cert store, if the server uses a certificate signed by a CA that isn't
|
||||
included in the store you use or if the remote host is an impostor
|
||||
impersonating your favorite site, and you want to transfer files from this
|
||||
server, do one of the following:
|
||||
|
||||
1. Tell libcurl to *not* verify the peer. With libcurl you disable this with
|
||||
`curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);`
|
||||
|
||||
With the curl command line tool, you disable this with -k/--insecure.
|
||||
|
||||
2. Get a CA certificate that can verify the remote server and use the proper
|
||||
option to point out this CA cert for verification when connecting. For
|
||||
libcurl hackers: `curl_easy_setopt(curl, CURLOPT_CAPATH, capath);`
|
||||
|
||||
With the curl command line tool: --cacert [file]
|
||||
|
||||
3. Add the CA cert for your server to the existing default CA certificate
|
||||
store. The default CA certificate store can changed at compile time with the
|
||||
following configure options:
|
||||
|
||||
--with-ca-bundle=FILE: use the specified file as CA certificate store. CA
|
||||
certificates need to be concatenated in PEM format into this file.
|
||||
|
||||
--with-ca-path=PATH: use the specified path as CA certificate store. CA
|
||||
certificates need to be stored as individual PEM files in this directory.
|
||||
You may need to run c_rehash after adding files there.
|
||||
|
||||
If neither of the two options is specified, configure will try to auto-detect
|
||||
a setting. It's also possible to explicitly not hardcode any default store
|
||||
but rely on the built in default the crypto library may provide instead.
|
||||
You can achieve that by passing both --without-ca-bundle and
|
||||
--without-ca-path to the configure script.
|
||||
|
||||
If you use Internet Explorer, this is one way to get extract the CA cert
|
||||
for a particular server:
|
||||
|
||||
- View the certificate by double-clicking the padlock
|
||||
- Find out where the CA certificate is kept (Certificate>
|
||||
Authority Information Access>URL)
|
||||
- Get a copy of the crt file using curl
|
||||
- Convert it from crt to PEM using the openssl tool:
|
||||
openssl x509 -inform DES -in yourdownloaded.crt \
|
||||
-out outcert.pem -text
|
||||
- Add the 'outcert.pem' to the CA certificate store or use it stand-alone
|
||||
as described below.
|
||||
|
||||
If you use the 'openssl' tool, this is one way to get extract the CA cert
|
||||
for a particular server:
|
||||
|
||||
- `openssl s_client -connect xxxxx.com:443 |tee logfile`
|
||||
- type "QUIT", followed by the "ENTER" key
|
||||
- The certificate will have "BEGIN CERTIFICATE" and "END CERTIFICATE"
|
||||
markers.
|
||||
- If you want to see the data in the certificate, you can do: "openssl
|
||||
x509 -inform PEM -in certfile -text -out certdata" where certfile is
|
||||
the cert you extracted from logfile. Look in certdata.
|
||||
- If you want to trust the certificate, you can add it to your CA
|
||||
certificate store or use it stand-alone as described. Just remember that
|
||||
the security is no better than the way you obtained the certificate.
|
||||
|
||||
4. If you're using the curl command line tool, you can specify your own CA
|
||||
cert path by setting the environment variable `CURL_CA_BUNDLE` to the path
|
||||
of your choice.
|
||||
|
||||
If you're using the curl command line tool on Windows, curl will search
|
||||
for a CA cert file named "curl-ca-bundle.crt" in these directories and in
|
||||
this order:
|
||||
1. application's directory
|
||||
2. current working directory
|
||||
3. Windows System directory (e.g. C:\windows\system32)
|
||||
4. Windows Directory (e.g. C:\windows)
|
||||
5. all directories along %PATH%
|
||||
|
||||
5. Get a better/different/newer CA cert bundle! One option is to extract the
|
||||
one a recent Firefox browser uses by running 'make ca-bundle' in the curl
|
||||
build tree root, or possibly download a version that was generated this
|
||||
way for you: [CA Extract](https://curl.haxx.se/docs/caextract.html)
|
||||
|
||||
Neglecting to use one of the above methods when dealing with a server using a
|
||||
certificate that isn't signed by one of the certificates in the installed CA
|
||||
certificate store, will cause SSL to report an error ("certificate verify
|
||||
failed") during the handshake and SSL will then refuse further communication
|
||||
with that server.
|
||||
|
||||
Certificate Verification with NSS
|
||||
---------------------------------
|
||||
|
||||
If libcurl was built with NSS support, then depending on the OS distribution,
|
||||
it is probably required to take some additional steps to use the system-wide
|
||||
CA cert db. RedHat ships with an additional module, libnsspem.so, which
|
||||
enables NSS to read the OpenSSL PEM CA bundle. On openSUSE you can install
|
||||
p11-kit-nss-trust which makes NSS use the system wide CA certificate store. NSS
|
||||
also has a new [database format](https://wiki.mozilla.org/NSS_Shared_DB).
|
||||
|
||||
Starting with version 7.19.7, libcurl automatically adds the 'sql:' prefix to
|
||||
the certdb directory (either the hardcoded default /etc/pki/nssdb or the
|
||||
directory configured with SSL_DIR environment variable). To check which certdb
|
||||
format your distribution provides, examine the default certdb location:
|
||||
/etc/pki/nssdb; the new certdb format can be identified by the filenames
|
||||
cert9.db, key4.db, pkcs11.txt; filenames of older versions are cert8.db,
|
||||
key3.db, secmod.db.
|
||||
|
||||
Certificate Verification with Schannel and Secure Transport
|
||||
-----------------------------------------------------------
|
||||
|
||||
If libcurl was built with Schannel (Microsoft's native TLS engine) or Secure
|
||||
Transport (Apple's native TLS engine) support, then libcurl will still perform
|
||||
peer certificate verification, but instead of using a CA cert bundle, it will
|
||||
use the certificates that are built into the OS. These are the same
|
||||
certificates that appear in the Internet Options control panel (under Windows)
|
||||
or Keychain Access application (under OS X). Any custom security rules for
|
||||
certificates will be honored.
|
||||
|
||||
Schannel will run CRL checks on certificates unless peer verification is
|
||||
disabled. Secure Transport on iOS will run OCSP checks on certificates unless
|
||||
peer verification is disabled. Secure Transport on OS X will run either OCSP
|
||||
or CRL checks on certificates if those features are enabled, and this behavior
|
||||
can be adjusted in the preferences of Keychain Access.
|
1445
docs/THANKS
1445
docs/THANKS
File diff suppressed because it is too large
Load Diff
@ -1,55 +0,0 @@
|
||||
# This is a list of names we have recorded that already are thanked
|
||||
# appropriately in THANKS. This list contains variations of their names and
|
||||
# their "canonical" name. This file is used for scripting purposes to avoid
|
||||
# duplicate entries and will not be included in release tarballs.
|
||||
# When removing dupes that aren't identical names from THANKS, add a line
|
||||
# here!
|
||||
#
|
||||
# Used-by: contributor.sh
|
||||
s/Andres Garcia/Andrés García/
|
||||
s/Chris Conroy/Christopher Conroy/
|
||||
s/Francois Charlier/François Charlier/
|
||||
s/Gokhan Sengun/Gökhan Şengün/
|
||||
s/John Malmberg/John E. Malmberg/
|
||||
s/Luca Alteas/Luca Altea/
|
||||
s/Michal Gorny/Michał Górny/
|
||||
s/Michal Górny/Michał Górny/
|
||||
s/Moonesamy/S. Moonesamy/
|
||||
s/Pete Su$/Peter Su/
|
||||
s/Sam Listopad/Samuel Listopad/
|
||||
s/Sebastien Willemijns/Sébastien Willemijns/
|
||||
s/YAMADA Yasuharu/Yasuharu Yamada/
|
||||
s/Karl M$/Karl Moerder/
|
||||
s/Bjorn Stenberg/Björn Stenberg/
|
||||
s/upstream tests 305 and 404//
|
||||
s/Gaël PORTAY/Gaël Portay/
|
||||
s/Romulo Ceccon/Romulo A. Ceccon/
|
||||
s/Nach M. S$/Nach M. S./
|
||||
s/Jay Satiro/Ray Satiro/
|
||||
s/Richard J. Moore/Richard Moore/
|
||||
s/Sergey Nikulov/Sergei Nikulov/
|
||||
s/Petr Písař/Petr Pisar/
|
||||
s/Nick Zitzmann (originally)/Nick Zitzmann/
|
||||
s/product-security at Apple//
|
||||
s/IT DOES NOT WORK//
|
||||
s/Albert Chin/Albert Chin-A-Young/
|
||||
s/Paras S\z/Paras Sethia/
|
||||
s/Paras Sethiaethia/Paras Sethia/
|
||||
s/Дмитрий Фалько/Dmitry Falko/
|
||||
s/byte_bucket in the #curl IRC channel//
|
||||
s/Michal Górny and Anthony G. Basile//
|
||||
s/Alejandro Alvarez$/Alejandro Alvarez Ayllon/
|
||||
s/Ant Bryan/Anthony Bryan/
|
||||
s/Cédric Deltheil/Cédric Deltheil/
|
||||
s/Christian Hagele/Christian Hägele/
|
||||
s/douglas steinwand/Douglas Steinwand/
|
||||
s/Frank Van Uffelen and Fabian Hiernaux//
|
||||
s/Rodrigo Silva (MestreLion)/Rodrigo Silva/
|
||||
s/tetetest tetetest//
|
||||
s/Jiří Hruška/Jiri Hruska/
|
||||
s/Viktor Szakats/Viktor Szakáts/
|
||||
s/Jonathan Cardoso/Jonathan Cardoso Machado/
|
||||
s/Linus Nielsen/Linus Nielsen Feltzing/
|
||||
s/Todd Ouska$/Todd A Ouska/
|
||||
s/Tim Ruehsen/Tim Rühsen/
|
||||
s/Michael Koenig/Michael König/
|
965
docs/TODO
965
docs/TODO
@ -1,916 +1,97 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
Things that could be nice to do in the future
|
||||
TODO
|
||||
|
||||
Things to do in project cURL. Please tell us what you think, contribute and
|
||||
send us patches that improve things!
|
||||
Things to do in project cURL. Please tell me what you think, contribute and
|
||||
send me patches that improve things! Also check the http://curl.haxx.se/dev
|
||||
web section for various development notes.
|
||||
|
||||
Be aware that these are things that we could do, or have once been considered
|
||||
things we could do. If you want to work on any of these areas, please
|
||||
consider bringing it up for discussions first on the mailing list so that we
|
||||
all agree it is still a good idea for the project!
|
||||
To do in a future release (random order):
|
||||
|
||||
All bugs documented in the KNOWN_BUGS document are subject for fixing!
|
||||
* FTP ASCII upload does not follow RFC959 section 3.1.1.1:
|
||||
"The sender converts the data from an internal character representation to
|
||||
the standard 8-bit NVT-ASCII representation (see the Telnet
|
||||
specification). The receiver will convert the data from the standard form
|
||||
to his own internal form."
|
||||
|
||||
1. libcurl
|
||||
1.2 More data sharing
|
||||
1.3 struct lifreq
|
||||
1.4 signal-based resolver timeouts
|
||||
1.5 get rid of PATH_MAX
|
||||
1.6 Modified buffer size approach
|
||||
1.7 Detect when called from within callbacks
|
||||
1.8 Allow SSL (HTTPS) to proxy
|
||||
1.9 Cache negative name resolves
|
||||
1.10 Support IDNA2008
|
||||
1.11 minimize dependencies with dynamicly loaded modules
|
||||
1.12 have form functions use CURL handle argument
|
||||
1.13 Add CURLOPT_MAIL_CLIENT option
|
||||
1.14 Typesafe curl_easy_setopt()
|
||||
1.15 TCP Fast Open
|
||||
1.16 Try to URL encode given URL
|
||||
* Make the connect non-blocking so that timeouts work for connect in
|
||||
multi-threaded programs
|
||||
|
||||
2. libcurl - multi interface
|
||||
2.1 More non-blocking
|
||||
2.2 Better support for same name resolves
|
||||
2.3 Non-blocking curl_multi_remove_handle()
|
||||
2.4 Split connect and authentication process
|
||||
* Consider an interface to libcurl that allows applications to easier get to
|
||||
know what cookies that are sent back in the response headers.
|
||||
|
||||
3. Documentation
|
||||
3.1 Update date and version in man pages
|
||||
* HTTP PUT for files passed on stdin *OR* when the --crlf option is
|
||||
used. Requires libcurl to send the file with chunked content
|
||||
encoding. http://curl.haxx.se/dev/HTTP-PUT-stdin.txt
|
||||
|
||||
4. FTP
|
||||
4.1 HOST
|
||||
4.2 Alter passive/active on failure and retry
|
||||
4.3 Earlier bad letter detection
|
||||
4.4 REST for large files
|
||||
4.5 ASCII support
|
||||
4.6 GSSAPI via Windows SSPI
|
||||
4.7 STAT for LIST without data connection
|
||||
* Introduce another callback interface for upload/download that makes one
|
||||
less copy of data and thus a faster operation.
|
||||
http://curl.haxx.se/dev/no_copy_callbacks.txt
|
||||
|
||||
5. HTTP
|
||||
5.1 Better persistency for HTTP 1.0
|
||||
5.2 support FF3 sqlite cookie files
|
||||
5.3 Rearrange request header order
|
||||
5.4 SPDY
|
||||
5.5 auth= in URLs
|
||||
5.6 Refuse "downgrade" redirects
|
||||
5.7 More compressions
|
||||
* An option to only download remote FTP files if they're newer than the local
|
||||
one is a good idea, and it would fit right into the same syntax as the
|
||||
already working http dito works. It of course requires that 'MDTM' works,
|
||||
and it isn't a standard FTP command.
|
||||
|
||||
6. TELNET
|
||||
6.1 ditch stdin
|
||||
6.2 ditch telnet-specific select
|
||||
6.3 feature negotiation debug data
|
||||
6.4 send data in chunks
|
||||
* Suggested on the mailing list: CURLOPT_FTP_MKDIR...!
|
||||
|
||||
7. SMTP
|
||||
7.1 Pipelining
|
||||
7.2 Enhanced capability support
|
||||
* Add configure options that disables certain protocols in libcurl to
|
||||
decrease footprint. '--disable-[protocol]' where protocol is http, ftp,
|
||||
telnet, ldap, dict or file.
|
||||
|
||||
8. POP3
|
||||
8.1 Pipelining
|
||||
8.2 Enhanced capability support
|
||||
* Extend the test suite to include telnet. The telnet could just do ftp or
|
||||
http operations (for which we have test servers).
|
||||
|
||||
9. IMAP
|
||||
9.1 Enhanced capability support
|
||||
* Make TELNET work on windows!
|
||||
|
||||
10. LDAP
|
||||
10.1 SASL based authentication mechanisms
|
||||
* Make curl's SSL layer option capable of using other free SSL libraries.
|
||||
Such as the Mozilla Security Services
|
||||
(http://www.mozilla.org/projects/security/pki/nss/) and GNUTLS
|
||||
(http://gnutls.hellug.gr/)
|
||||
|
||||
11. SMB
|
||||
11.1 File listing support
|
||||
11.2 Honor file timestamps
|
||||
11.3 Use NTLMv2
|
||||
11.4 Create remote directories
|
||||
* Add asynchronous name resolving, as this enables full timeout support for
|
||||
fork() systems. http://curl.haxx.se/dev/async-resolver.txt
|
||||
|
||||
12. New protocols
|
||||
12.1 RSYNC
|
||||
* Move non-URL related functions that are used by both the lib and the curl
|
||||
application to a separate "portability lib".
|
||||
|
||||
13. SSL
|
||||
13.1 Disable specific versions
|
||||
13.2 Provide mutex locking API
|
||||
13.3 Evaluate SSL patches
|
||||
13.4 Cache OpenSSL contexts
|
||||
13.5 Export session ids
|
||||
13.6 Provide callback for cert verification
|
||||
13.7 improve configure --with-ssl
|
||||
13.8 Support DANE
|
||||
* Add libcurl support/interfaces for more languages. C++ wrapper perhaps?
|
||||
|
||||
14. GnuTLS
|
||||
14.1 SSL engine stuff
|
||||
14.2 check connection
|
||||
* "Content-Encoding: compress/gzip/zlib" HTTP 1.1 clearly defines how to get
|
||||
and decode compressed documents. There is the zlib that is pretty good at
|
||||
decompressing stuff. This work was started in October 1999 but halted again
|
||||
since it proved more work than we thought. It is still a good idea to
|
||||
implement though.
|
||||
|
||||
15. WinSSL/SChannel
|
||||
15.1 Add support for client certificate authentication
|
||||
15.2 Add support for custom server certificate validation
|
||||
15.3 Add support for the --ciphers option
|
||||
* Authentication: NTLM. Support for that MS crap called NTLM
|
||||
authentication. MS proxies and servers sometime require that. Since that
|
||||
protocol is a proprietary one, it involves reverse engineering and network
|
||||
sniffing. This should however be a library-based functionality. There are a
|
||||
few different efforts "out there" to make open source HTTP clients support
|
||||
this and it should be possible to take advantage of other people's hard
|
||||
work. http://modntlm.sourceforge.net/ is one. There's a web page at
|
||||
http://www.innovation.ch/java/ntlm.html that contains detailed reverse-
|
||||
engineered info.
|
||||
|
||||
16. SASL
|
||||
16.1 Other authentication mechanisms
|
||||
16.2 Add QOP support to GSSAPI authentication
|
||||
* RFC2617 compliance, "Digest Access Authentication"
|
||||
A valid test page seem to exist at:
|
||||
http://hopf.math.nwu.edu/testpage/digest/
|
||||
And some friendly person's server source code is available at
|
||||
http://hopf.math.nwu.edu/digestauth/index.html
|
||||
Then there's the Apache mod_digest source code too of course. It seems as
|
||||
if Netscape doesn't support this, and not many servers do. Although this is
|
||||
a lot better authentication method than the more common "Basic". Basic
|
||||
sends the password in cleartext over the network, this "Digest" method uses
|
||||
a challange-response protocol which increases security quite a lot.
|
||||
|
||||
17. Command line tool
|
||||
17.1 sync
|
||||
17.2 glob posts
|
||||
17.3 prevent file overwriting
|
||||
17.4 simultaneous parallel transfers
|
||||
17.5 provide formpost headers
|
||||
17.6 warning when setting an option
|
||||
17.7 warning when sending binary output to terminal
|
||||
17.8 offer color-coded HTTP header output
|
||||
17.9 Choose the name of file in braces for complex URLs
|
||||
17.10 improve how curl works in a windows console window
|
||||
17.11 -w output to stderr
|
||||
17.12 keep running, read instructions from pipe/socket
|
||||
* Other proxies
|
||||
Ftp-kind proxy, Socks5, whatever kind of proxies are there?
|
||||
|
||||
18. Build
|
||||
18.1 roffit
|
||||
* Full IPv6 Awareness and support. (This is partly done.) RFC 2428 "FTP
|
||||
Extensions for IPv6 and NATs" is interesting. PORT should be replaced with
|
||||
EPRT for IPv6 (done), and EPSV instead of PASV.
|
||||
|
||||
19. Test suite
|
||||
19.1 SSL tunnel
|
||||
19.2 nicer lacking perl message
|
||||
19.3 more protocols supported
|
||||
19.4 more platforms supported
|
||||
19.5 Add support for concurrent connections
|
||||
19.6 Use the RFC6265 test suite
|
||||
|
||||
20. Next SONAME bump
|
||||
20.1 http-style HEAD output for FTP
|
||||
20.2 combine error codes
|
||||
20.3 extend CURLOPT_SOCKOPTFUNCTION prototype
|
||||
|
||||
21. Next major release
|
||||
21.1 cleanup return codes
|
||||
21.2 remove obsolete defines
|
||||
21.3 size_t
|
||||
21.4 remove several functions
|
||||
21.5 remove CURLOPT_FAILONERROR
|
||||
21.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
|
||||
21.7 remove progress meter from libcurl
|
||||
21.8 remove 'curl_httppost' from public
|
||||
|
||||
==============================================================================
|
||||
|
||||
1. libcurl
|
||||
|
||||
1.2 More data sharing
|
||||
|
||||
curl_share_* functions already exist and work, and they can be extended to
|
||||
share more. For example, enable sharing of the ares channel and the
|
||||
connection cache.
|
||||
|
||||
1.3 struct lifreq
|
||||
|
||||
Use 'struct lifreq' and SIOCGLIFADDR instead of 'struct ifreq' and
|
||||
SIOCGIFADDR on newer Solaris versions as they claim the latter is obsolete.
|
||||
To support IPv6 interface addresses for network interfaces properly.
|
||||
|
||||
1.4 signal-based resolver timeouts
|
||||
|
||||
libcurl built without an asynchronous resolver library uses alarm() to time
|
||||
out DNS lookups. When a timeout occurs, this causes libcurl to jump from the
|
||||
signal handler back into the library with a sigsetjmp, which effectively
|
||||
causes libcurl to continue running within the signal handler. This is
|
||||
non-portable and could cause problems on some platforms. A discussion on the
|
||||
problem is available at https://curl.haxx.se/mail/lib-2008-09/0197.html
|
||||
|
||||
Also, alarm() provides timeout resolution only to the nearest second. alarm
|
||||
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.
|
||||
|
||||
1.6 Modified buffer size approach
|
||||
|
||||
Current libcurl allocates a fixed 16K size buffer for download and an
|
||||
additional 16K for upload. They are always unconditionally part of the easy
|
||||
handle. If CRLF translations are requested, an additional 32K "scratch
|
||||
buffer" is allocated. A total of 64K transfer buffers in the worst case.
|
||||
|
||||
First, while the handles are not actually in use these buffers could be freed
|
||||
so that lingering handles just kept in queues or whatever waste less memory.
|
||||
|
||||
Secondly, SFTP is a protocol that needs to handle many ~30K blocks at once
|
||||
since each need to be individually acked and therefore libssh2 must be
|
||||
allowed to send (or receive) many separate ones in parallel to achieve high
|
||||
transfer speeds. A current libcurl build with a 16K buffer makes that
|
||||
impossible, but one with a 512K buffer will reach MUCH faster transfers. But
|
||||
allocating 512K unconditionally for all buffers just in case they would like
|
||||
to do fast SFTP transfers at some point is not a good solution either.
|
||||
|
||||
Dynamically allocate buffer size depending on protocol in use in combination
|
||||
with freeing it after each individual transfer? Other suggestions?
|
||||
|
||||
1.7 Detect when called from within callbacks
|
||||
|
||||
We should set a state variable before calling callbacks, so that we
|
||||
subsequently can add code within libcurl that returns error if called within
|
||||
callbacks for when that's not supported.
|
||||
|
||||
1.8 Allow SSL (HTTPS) to proxy
|
||||
|
||||
To prevent local users from snooping on your traffic to the proxy. Supported
|
||||
by Chrome already:
|
||||
https://www.chromium.org/developers/design-documents/secure-web-proxy
|
||||
|
||||
...and by Firefox soon:
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=378637
|
||||
|
||||
1.9 Cache negative name resolves
|
||||
|
||||
A name resolve that has failed is likely to fail when made again within a
|
||||
short period of time. Currently we only cache positive responses.
|
||||
|
||||
1.10 Support IDNA2008
|
||||
|
||||
International Domain Names are supported in libcurl since years back, powered
|
||||
by libidn. libidn implements IDNA2003 which has been superseded by IDNA2008.
|
||||
libidn2 is an existing library offering support for IDNA2008.
|
||||
|
||||
1.11 minimize dependencies with dynamicly loaded modules
|
||||
|
||||
We can create a system with loadable modules/plug-ins, where these modules
|
||||
would be the ones that link to 3rd party libs. That would allow us to avoid
|
||||
having to load ALL dependencies since only the necessary ones for this
|
||||
app/invoke/used protocols would be necessary to load. See
|
||||
https://github.com/curl/curl/issues/349
|
||||
|
||||
1.12 have form functions use CURL handle argument
|
||||
|
||||
curl_formadd() and curl_formget() both currently have no CURL handle
|
||||
argument, but both can use a callback that is set in the easy handle, and
|
||||
thus curl_formget() with callback cannot function without first having
|
||||
curl_easy_perform() (or similar) called - which is hard to grasp and a design
|
||||
mistake.
|
||||
|
||||
The curl_formadd() design can probably also be reconsidered to make it easier
|
||||
to use and less error-prone. Probably easiest by splitting it into several
|
||||
function calls.
|
||||
|
||||
1.13 Add CURLOPT_MAIL_CLIENT option
|
||||
|
||||
Rather than use the URL to specify the mail client string to present in the
|
||||
HELO and EHLO commands, libcurl should support a new CURLOPT specifically for
|
||||
specifying this data as the URL is non-standard and to be honest a bit of a
|
||||
hack ;-)
|
||||
|
||||
Please see the following thread for more information:
|
||||
https://curl.haxx.se/mail/lib-2012-05/0178.html
|
||||
|
||||
1.14 Typesafe curl_easy_setopt()
|
||||
|
||||
One of the most common problems in libcurl using applications is the lack of
|
||||
type checks for curl_easy_setopt() which happens because it accepts varargs
|
||||
and thus can take any type.
|
||||
|
||||
One possible solution to this is to introduce a few different versions of the
|
||||
setopt version for the different kinds of data you can set.
|
||||
|
||||
curl_easy_set_num() - sets a long value
|
||||
|
||||
curl_easy_set_large() - sets a curl_off_t value
|
||||
|
||||
curl_easy_set_ptr() - sets a pointer
|
||||
|
||||
curl_easy_set_cb() - sets a callback PLUS its callback data
|
||||
|
||||
1.15 TCP Fast Open
|
||||
|
||||
RFC 7413 defines how to include data already in the TCP SYN handshake to
|
||||
reduce latency.
|
||||
|
||||
1.16 Try to URL encode given URL
|
||||
|
||||
Given a URL that for example contains spaces, libcurl could have an option
|
||||
that would try somewhat harder than it does now and convert spaces to %20 and
|
||||
perhaps URL encoded byte values over 128 etc (basically do what the redirect
|
||||
following code already does).
|
||||
|
||||
https://github.com/curl/curl/issues/514
|
||||
|
||||
2. libcurl - multi interface
|
||||
|
||||
2.1 More non-blocking
|
||||
|
||||
Make sure we don't ever loop because of non-blocking sockets returning
|
||||
EWOULDBLOCK or similar. Blocking cases include:
|
||||
|
||||
- Name resolves on non-windows unless c-ares is used
|
||||
- NSS SSL connections
|
||||
- HTTP proxy CONNECT operations
|
||||
- SOCKS proxy handshakes
|
||||
- file:// transfers
|
||||
- TELNET transfers
|
||||
- The "DONE" operation (post transfer protocol-specific actions) for the
|
||||
protocols SFTP, SMTP, FTP. Fixing Curl_done() for this is a worthy task.
|
||||
|
||||
2.2 Better support for same name resolves
|
||||
|
||||
If a name resolve has been initiated for name NN and a second easy handle
|
||||
wants to resolve that name as well, make it wait for the first resolve to end
|
||||
up in the cache instead of doing a second separate resolve. This is
|
||||
especially needed when adding many simultaneous handles using the same host
|
||||
name when the DNS resolver can get flooded.
|
||||
|
||||
2.3 Non-blocking curl_multi_remove_handle()
|
||||
|
||||
The multi interface has a few API calls that assume a blocking behavior, like
|
||||
add_handle() and remove_handle() which limits what we can do internally. The
|
||||
multi API need to be moved even more into a single function that "drives"
|
||||
everything in a non-blocking manner and signals when something is done. A
|
||||
remove or add would then only ask for the action to get started and then
|
||||
multi_perform() etc still be called until the add/remove is completed.
|
||||
|
||||
2.4 Split connect and authentication process
|
||||
|
||||
The multi interface treats the authentication process as part of the connect
|
||||
phase. As such any failures during authentication won't trigger the relevant
|
||||
QUIT or LOGOFF for protocols such as IMAP, POP3 and SMTP.
|
||||
|
||||
3. Documentation
|
||||
|
||||
3.1 Update date and version in man pages
|
||||
|
||||
'maketgz' or another suitable script could update the .TH sections of the man
|
||||
pages at release time to use the current date and curl/libcurl version
|
||||
number.
|
||||
|
||||
4. FTP
|
||||
|
||||
4.1 HOST
|
||||
|
||||
HOST is a command for a client to tell which host name to use, to offer FTP
|
||||
servers named-based virtual hosting:
|
||||
|
||||
https://tools.ietf.org/html/rfc7151
|
||||
|
||||
4.2 Alter passive/active on failure and retry
|
||||
|
||||
When trying to connect passively to a server which only supports active
|
||||
connections, libcurl returns CURLE_FTP_WEIRD_PASV_REPLY and closes the
|
||||
connection. There could be a way to fallback to an active connection (and
|
||||
vice versa). https://curl.haxx.se/bug/feature.cgi?id=1754793
|
||||
|
||||
4.3 Earlier bad letter detection
|
||||
|
||||
Make the detection of (bad) %0d and %0a codes in FTP URL parts earlier in the
|
||||
process to avoid doing a resolve and connect in vain.
|
||||
|
||||
4.4 REST for large files
|
||||
|
||||
REST fix for servers not behaving well on >2GB requests. This should fail if
|
||||
the server doesn't set the pointer to the requested index. The tricky
|
||||
(impossible?) part is to figure out if the server did the right thing or not.
|
||||
|
||||
4.5 ASCII support
|
||||
|
||||
FTP ASCII transfers do not follow RFC959. They don't convert the data
|
||||
accordingly.
|
||||
|
||||
4.6 GSSAPI via Windows SSPI
|
||||
|
||||
In addition to currently supporting the SASL GSSAPI mechanism (Kerberos V5)
|
||||
via third-party GSS-API libraries, such as Heimdal or MIT Kerberos, also add
|
||||
support for GSSAPI authentication via Windows SSPI.
|
||||
|
||||
4.7 STAT for LIST without data connection
|
||||
|
||||
Some FTP servers allow STAT for listing directories instead of using LIST, and
|
||||
the response is then sent over the control connection instead of as the
|
||||
otherwise usedw data connection: http://www.nsftools.com/tips/RawFTP.htm#STAT
|
||||
|
||||
This is not detailed in any FTP specification.
|
||||
|
||||
5. HTTP
|
||||
|
||||
5.1 Better persistency for HTTP 1.0
|
||||
|
||||
"Better" support for persistent connections over HTTP 1.0
|
||||
https://curl.haxx.se/bug/feature.cgi?id=1089001
|
||||
|
||||
5.2 support FF3 sqlite cookie files
|
||||
|
||||
Firefox 3 is changing from its former format to a a sqlite database instead.
|
||||
We should consider how (lib)curl can/should support this.
|
||||
https://curl.haxx.se/bug/feature.cgi?id=1871388
|
||||
|
||||
5.3 Rearrange request header order
|
||||
|
||||
Server implementors often make an effort to detect browser and to reject
|
||||
clients it can detect to not match. One of the last details we cannot yet
|
||||
control in libcurl's HTTP requests, which also can be exploited to detect
|
||||
that libcurl is in fact used even when it tries to impersonate a browser, is
|
||||
the order of the request headers. I propose that we introduce a new option in
|
||||
which you give headers a value, and then when the HTTP request is built it
|
||||
sorts the headers based on that number. We could then have internally created
|
||||
headers use a default value so only headers that need to be moved have to be
|
||||
specified.
|
||||
|
||||
5.4 SPDY
|
||||
|
||||
Chrome and Firefox already support SPDY and lots of web services do. There's
|
||||
a library for us to use for this (spdylay) that has a similar API and the
|
||||
same author as nghttp2.
|
||||
|
||||
spdylay: https://github.com/tatsuhiro-t/spdylay
|
||||
|
||||
5.5 auth= in URLs
|
||||
|
||||
Add the ability to specify the preferred authentication mechanism to use by
|
||||
using ;auth=<mech> in the login part of the URL.
|
||||
|
||||
For example:
|
||||
|
||||
http://test:pass;auth=NTLM@example.com would be equivalent to specifying --user
|
||||
test:pass;auth=NTLM or --user test:pass --ntlm from the command line.
|
||||
|
||||
Additionally this should be implemented for proxy base URLs as well.
|
||||
|
||||
5.6 Refuse "downgrade" redirects
|
||||
|
||||
See https://github.com/curl/curl/issues/226
|
||||
|
||||
Consider a way to tell curl to refuse to "downgrade" protocol with a redirect
|
||||
and/or possibly a bit that refuses redirect to change protocol completely.
|
||||
|
||||
5.7 More compressions
|
||||
|
||||
Compression algorithms that perform better than gzip are being considered for
|
||||
use and inclusion in existing browsers. For example 'brotli'. If servers
|
||||
follow along it is a good reason for us to also allow users to take advantage
|
||||
of this. The algorithm: https://github.com/google/brotli The Firefox bug:
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=366559
|
||||
|
||||
|
||||
6. TELNET
|
||||
|
||||
6.1 ditch stdin
|
||||
|
||||
Reading input (to send to the remote server) on stdin is a crappy solution for
|
||||
library purposes. We need to invent a good way for the application to be able
|
||||
to provide the data to send.
|
||||
|
||||
6.2 ditch telnet-specific select
|
||||
|
||||
Move the telnet support's network select() loop go away and merge the code
|
||||
into the main transfer loop. Until this is done, the multi interface won't
|
||||
work for telnet.
|
||||
|
||||
6.3 feature negotiation debug data
|
||||
|
||||
Add telnet feature negotiation data to the debug callback as header data.
|
||||
|
||||
6.4 send data in chunks
|
||||
|
||||
Currently, telnet sends data one byte at a time. This is fine for interactive
|
||||
use, but inefficient for any other. Sent data should be sent in larger
|
||||
chunks.
|
||||
|
||||
7. SMTP
|
||||
|
||||
7.1 Pipelining
|
||||
|
||||
Add support for pipelining emails.
|
||||
|
||||
7.2 Enhanced capability support
|
||||
|
||||
Add the ability, for an application that uses libcurl, to obtain the list of
|
||||
capabilities returned from the EHLO command.
|
||||
|
||||
8. POP3
|
||||
|
||||
8.1 Pipelining
|
||||
|
||||
Add support for pipelining commands.
|
||||
|
||||
8.2 Enhanced capability support
|
||||
|
||||
Add the ability, for an application that uses libcurl, to obtain the list of
|
||||
capabilities returned from the CAPA command.
|
||||
|
||||
9. IMAP
|
||||
|
||||
9.1 Enhanced capability support
|
||||
|
||||
Add the ability, for an application that uses libcurl, to obtain the list of
|
||||
capabilities returned from the CAPABILITY command.
|
||||
|
||||
10. LDAP
|
||||
|
||||
10.1 SASL based authentication mechanisms
|
||||
|
||||
Currently the LDAP module only supports ldap_simple_bind_s() in order to bind
|
||||
to an LDAP server. However, this function sends username and password details
|
||||
using the simple authentication mechanism (as clear text). However, it should
|
||||
be possible to use ldap_bind_s() instead specifying the security context
|
||||
information ourselves.
|
||||
|
||||
11. SMB
|
||||
|
||||
11.1 File listing support
|
||||
|
||||
Add support for listing the contents of a SMB share. The output should probably
|
||||
be the same as/similar to FTP.
|
||||
|
||||
11.2 Honor file timestamps
|
||||
|
||||
The timestamp of the transferred file should reflect that of the original file.
|
||||
|
||||
11.3 Use NTLMv2
|
||||
|
||||
Currently the SMB authentication uses NTLMv1.
|
||||
|
||||
11.4 Create remote directories
|
||||
|
||||
Support for creating remote directories when uploading a file to a directory
|
||||
that doesn't exist on the server, just like --ftp-create-dirs.
|
||||
|
||||
12. New protocols
|
||||
|
||||
12.1 RSYNC
|
||||
|
||||
There's no RFC for the protocol or an URI/URL format. An implementation
|
||||
should most probably use an existing rsync library, such as librsync.
|
||||
|
||||
13. SSL
|
||||
|
||||
13.1 Disable specific versions
|
||||
|
||||
Provide an option that allows for disabling specific SSL versions, such as
|
||||
SSLv2 https://curl.haxx.se/bug/feature.cgi?id=1767276
|
||||
|
||||
13.2 Provide mutex locking API
|
||||
|
||||
Provide a libcurl API for setting mutex callbacks in the underlying SSL
|
||||
library, so that the same application code can use mutex-locking
|
||||
independently of OpenSSL or GnutTLS being used.
|
||||
|
||||
13.3 Evaluate SSL patches
|
||||
|
||||
Evaluate/apply Gertjan van Wingerde's SSL patches:
|
||||
https://curl.haxx.se/mail/lib-2004-03/0087.html
|
||||
|
||||
13.4 Cache OpenSSL contexts
|
||||
|
||||
"Look at SSL cafile - quick traces look to me like these are done on every
|
||||
request as well, when they should only be necessary once per SSL context (or
|
||||
once per handle)". The major improvement we can rather easily do is to make
|
||||
sure we don't create and kill a new SSL "context" for every request, but
|
||||
instead make one for every connection and re-use that SSL context in the same
|
||||
style connections are re-used. It will make us use slightly more memory but
|
||||
it will libcurl do less creations and deletions of SSL contexts.
|
||||
|
||||
13.5 Export session ids
|
||||
|
||||
Add an interface to libcurl that enables "session IDs" to get
|
||||
exported/imported. Cris Bailiff said: "OpenSSL has functions which can
|
||||
serialise the current SSL state to a buffer of your choice, and recover/reset
|
||||
the state from such a buffer at a later date - this is used by mod_ssl for
|
||||
apache to implement and SSL session ID cache".
|
||||
|
||||
13.6 Provide callback for cert verification
|
||||
|
||||
OpenSSL supports a callback for customised verification of the peer
|
||||
certificate, but this doesn't seem to be exposed in the libcurl APIs. Could
|
||||
it be? There's so much that could be done if it were!
|
||||
|
||||
13.7 improve configure --with-ssl
|
||||
|
||||
make the configure --with-ssl option first check for OpenSSL, then GnuTLS,
|
||||
then NSS...
|
||||
|
||||
13.8 Support DANE
|
||||
|
||||
DNS-Based Authentication of Named Entities (DANE) is a way to provide SSL
|
||||
keys and certs over DNS using DNSSEC as an alternative to the CA model.
|
||||
https://www.rfc-editor.org/rfc/rfc6698.txt
|
||||
|
||||
An initial patch was posted by Suresh Krishnaswamy on March 7th 2013
|
||||
(https://curl.haxx.se/mail/lib-2013-03/0075.html) but it was a too simple
|
||||
approach. See Daniel's comments:
|
||||
https://curl.haxx.se/mail/lib-2013-03/0103.html . libunbound may be the
|
||||
correct library to base this development on.
|
||||
|
||||
14. GnuTLS
|
||||
|
||||
14.1 SSL engine stuff
|
||||
|
||||
Is this even possible?
|
||||
|
||||
14.2 check connection
|
||||
|
||||
Add a way to check if the connection seems to be alive, to correspond to the
|
||||
SSL_peak() way we use with OpenSSL.
|
||||
|
||||
15. WinSSL/SChannel
|
||||
|
||||
15.1 Add support for client certificate authentication
|
||||
|
||||
WinSSL/SChannel currently makes use of the OS-level system and user
|
||||
certificate and private key stores. This does not allow the application
|
||||
or the user to supply a custom client certificate using curl or libcurl.
|
||||
|
||||
Therefore support for the existing -E/--cert and --key options should be
|
||||
implemented by supplying a custom certificate to the SChannel APIs, see:
|
||||
- Getting a Certificate for Schannel
|
||||
https://msdn.microsoft.com/en-us/library/windows/desktop/aa375447.aspx
|
||||
|
||||
15.2 Add support for custom server certificate validation
|
||||
|
||||
WinSSL/SChannel currently makes use of the OS-level system and user
|
||||
certificate trust store. This does not allow the application or user to
|
||||
customize the server certificate validation process using curl or libcurl.
|
||||
|
||||
Therefore support for the existing --cacert or --capath options should be
|
||||
implemented by supplying a custom certificate to the SChannel APIs, see:
|
||||
- Getting a Certificate for Schannel
|
||||
https://msdn.microsoft.com/en-us/library/windows/desktop/aa375447.aspx
|
||||
|
||||
15.3 Add support for the --ciphers option
|
||||
|
||||
The cipher suites used by WinSSL/SChannel are configured on an OS-level
|
||||
instead of an application-level. This does not allow the application or
|
||||
the user to customize the configured cipher suites using curl or libcurl.
|
||||
|
||||
Therefore support for the existing --ciphers option should be implemented
|
||||
by mapping the OpenSSL/GnuTLS cipher suites to the SChannel APIs, see
|
||||
- Specifying Schannel Ciphers and Cipher Strengths
|
||||
https://msdn.microsoft.com/en-us/library/windows/desktop/aa380161.aspx
|
||||
|
||||
16. SASL
|
||||
|
||||
16.1 Other authentication mechanisms
|
||||
|
||||
Add support for other authentication mechanisms such as OLP,
|
||||
GSS-SPNEGO and others.
|
||||
|
||||
16.2 Add QOP support to GSSAPI authentication
|
||||
|
||||
Currently the GSSAPI authentication only supports the default QOP of auth
|
||||
(Authentication), whilst Kerberos V5 supports both auth-int (Authentication
|
||||
with integrity protection) and auth-conf (Authentication with integrity and
|
||||
privacy protection).
|
||||
|
||||
17. Command line tool
|
||||
|
||||
17.1 sync
|
||||
|
||||
"curl --sync http://example.com/feed[1-100].rss" or
|
||||
"curl --sync http://example.net/{index,calendar,history}.html"
|
||||
|
||||
Downloads a range or set of URLs using the remote name, but only if the
|
||||
remote file is newer than the local file. A Last-Modified HTTP date header
|
||||
should also be used to set the mod date on the downloaded file.
|
||||
|
||||
17.2 glob posts
|
||||
|
||||
Globbing support for -d and -F, as in 'curl -d "name=foo[0-9]" URL'.
|
||||
This is easily scripted though.
|
||||
|
||||
17.3 prevent file overwriting
|
||||
|
||||
Add an option that prevents cURL from overwriting existing local files. When
|
||||
used, and there already is an existing file with the target file name
|
||||
(either -O or -o), a number should be appended (and increased if already
|
||||
existing). So that index.html becomes first index.html.1 and then
|
||||
index.html.2 etc.
|
||||
|
||||
17.4 simultaneous parallel transfers
|
||||
|
||||
The client could be told to use maximum N simultaneous parallel transfers and
|
||||
then just make sure that happens. It should of course not make more than one
|
||||
connection to the same remote host. This would require the client to use the
|
||||
multi interface. https://curl.haxx.se/bug/feature.cgi?id=1558595
|
||||
|
||||
17.5 provide formpost headers
|
||||
|
||||
Extending the capabilities of the multipart formposting. How about leaving
|
||||
the ';type=foo' syntax as it is and adding an extra tag (headers) which
|
||||
works like this: curl -F "coolfiles=@fil1.txt;headers=@fil1.hdr" where
|
||||
fil1.hdr contains extra headers like
|
||||
|
||||
Content-Type: text/plain; charset=KOI8-R"
|
||||
Content-Transfer-Encoding: base64
|
||||
X-User-Comment: Please don't use browser specific HTML code
|
||||
|
||||
which should overwrite the program reasonable defaults (plain/text,
|
||||
8bit...)
|
||||
|
||||
17.6 warning when setting an option
|
||||
|
||||
Display a warning when libcurl returns an error when setting an option.
|
||||
This can be useful to tell when support for a particular feature hasn't been
|
||||
compiled into the library.
|
||||
|
||||
17.7 warning when sending binary output to terminal
|
||||
|
||||
Provide a way that prompts the user for confirmation before binary data is
|
||||
sent to the terminal, much in the style 'less' does it.
|
||||
|
||||
17.8 offer color-coded HTTP header output
|
||||
|
||||
By offering different color output on the header name and the header
|
||||
contents, they could be made more readable and thus help users working on
|
||||
HTTP services.
|
||||
|
||||
17.9 Choose the name of file in braces for complex URLs
|
||||
|
||||
When using braces to download a list of URLs and you use complicated names
|
||||
in the list of alternatives, it could be handy to allow curl to use other
|
||||
names when saving.
|
||||
|
||||
Consider a way to offer that. Possibly like
|
||||
{partURL1:name1,partURL2:name2,partURL3:name3} where the name following the
|
||||
colon is the output name.
|
||||
|
||||
See https://github.com/curl/curl/issues/221
|
||||
|
||||
17.10 improve how curl works in a windows console window
|
||||
|
||||
If you pull the scrollbar when transferring with curl in a Windows console
|
||||
window, the transfer is interrupted and can get disconnected. This can
|
||||
probably be improved. See https://github.com/curl/curl/issues/322
|
||||
|
||||
17.11 -w output to stderr
|
||||
|
||||
-w is quite useful, but not to those of us who use curl without -o or -O
|
||||
(such as for scripting through a higher level language). It would be nice to
|
||||
have an option that is exactly like -w but sends it to stderr
|
||||
instead. Proposed name: --write-stderr. See
|
||||
https://github.com/curl/curl/issues/613
|
||||
|
||||
17.12 keep running, read instructions from pipe/socket
|
||||
|
||||
Provide an option that makes curl not exit after the last URL (or even work
|
||||
without a given URL), and then make it read instructions passed on a pipe or
|
||||
over a socket to make further instructions so that a second subsequent curl
|
||||
invoke can talk to the still running instance and ask for transfers to get
|
||||
done, and thus maintain its connection pool, DNS cache and more.
|
||||
|
||||
18. Build
|
||||
|
||||
18.1 roffit
|
||||
|
||||
Consider extending 'roffit' to produce decent ASCII output, and use that
|
||||
instead of (g)nroff when building src/tool_hugehelp.c
|
||||
|
||||
19. Test suite
|
||||
|
||||
19.1 SSL tunnel
|
||||
|
||||
Make our own version of stunnel for simple port forwarding to enable HTTPS
|
||||
and FTP-SSL tests without the stunnel dependency, and it could allow us to
|
||||
provide test tools built with either OpenSSL or GnuTLS
|
||||
|
||||
19.2 nicer lacking perl message
|
||||
|
||||
If perl wasn't found by the configure script, don't attempt to run the tests
|
||||
but explain something nice why it doesn't.
|
||||
|
||||
19.3 more protocols supported
|
||||
|
||||
Extend the test suite to include more protocols. The telnet could just do FTP
|
||||
or http operations (for which we have test servers).
|
||||
|
||||
19.4 more platforms supported
|
||||
|
||||
Make the test suite work on more platforms. OpenBSD and Mac OS. Remove
|
||||
fork()s and it should become even more portable.
|
||||
|
||||
19.5 Add support for concurrent connections
|
||||
|
||||
Tests 836, 882 and 938 were designed to verify that separate connections aren't
|
||||
used when using different login credentials in protocols that shouldn't re-use
|
||||
a connection under such circumstances.
|
||||
|
||||
Unfortunately, ftpserver.pl doesn't appear to support multiple concurrent
|
||||
connections. The read while() loop seems to loop until it receives a disconnect
|
||||
from the client, where it then enters the waiting for connections loop. When
|
||||
the client opens a second connection to the server, the first connection hasn't
|
||||
been dropped (unless it has been forced - which we shouldn't do in these tests)
|
||||
and thus the wait for connections loop is never entered to receive the second
|
||||
connection.
|
||||
|
||||
19.6 Use the RFC6265 test suite
|
||||
|
||||
A test suite made for HTTP cookies (RFC 6265) by Adam Barth is available at
|
||||
https://github.com/abarth/http-state/tree/master/tests
|
||||
|
||||
It'd be really awesome if someone would write a script/setup that would run
|
||||
curl with that test suite and detect deviances. Ideally, that would even be
|
||||
incorporated into our regular test suite.
|
||||
|
||||
|
||||
20. Next SONAME bump
|
||||
|
||||
20.1 http-style HEAD output for FTP
|
||||
|
||||
#undef CURL_FTP_HTTPSTYLE_HEAD in lib/ftp.c to remove the HTTP-style headers
|
||||
from being output in NOBODY requests over FTP
|
||||
|
||||
20.2 combine error codes
|
||||
|
||||
Combine some of the error codes to remove duplicates. The original
|
||||
numbering should not be changed, and the old identifiers would be
|
||||
macroed to the new ones in an CURL_NO_OLDIES section to help with
|
||||
backward compatibility.
|
||||
|
||||
Candidates for removal and their replacements:
|
||||
|
||||
CURLE_FILE_COULDNT_READ_FILE => CURLE_REMOTE_FILE_NOT_FOUND
|
||||
|
||||
CURLE_FTP_COULDNT_RETR_FILE => CURLE_REMOTE_FILE_NOT_FOUND
|
||||
|
||||
CURLE_FTP_COULDNT_USE_REST => CURLE_RANGE_ERROR
|
||||
|
||||
CURLE_FUNCTION_NOT_FOUND => CURLE_FAILED_INIT
|
||||
|
||||
CURLE_LDAP_INVALID_URL => CURLE_URL_MALFORMAT
|
||||
|
||||
CURLE_TFTP_NOSUCHUSER => CURLE_TFTP_ILLEGAL
|
||||
|
||||
CURLE_TFTP_NOTFOUND => CURLE_REMOTE_FILE_NOT_FOUND
|
||||
|
||||
CURLE_TFTP_PERM => CURLE_REMOTE_ACCESS_DENIED
|
||||
|
||||
20.3 extend CURLOPT_SOCKOPTFUNCTION prototype
|
||||
|
||||
The current prototype only provides 'purpose' that tells what the
|
||||
connection/socket is for, but not any protocol or similar. It makes it hard
|
||||
for applications to differentiate on TCP vs UDP and even HTTP vs FTP and
|
||||
similar.
|
||||
|
||||
21. Next major release
|
||||
|
||||
21.1 cleanup return codes
|
||||
|
||||
curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a
|
||||
CURLMcode. These should be changed to be the same.
|
||||
|
||||
21.2 remove obsolete defines
|
||||
|
||||
remove obsolete defines from curl/curl.h
|
||||
|
||||
21.3 size_t
|
||||
|
||||
make several functions use size_t instead of int in their APIs
|
||||
|
||||
21.4 remove several functions
|
||||
|
||||
remove the following functions from the public API:
|
||||
|
||||
curl_getenv
|
||||
|
||||
curl_mprintf (and variations)
|
||||
|
||||
curl_strequal
|
||||
|
||||
curl_strnequal
|
||||
|
||||
They will instead become curlx_ - alternatives. That makes the curl app
|
||||
still capable of using them, by building with them from source.
|
||||
|
||||
These functions have no purpose anymore:
|
||||
|
||||
curl_multi_socket
|
||||
|
||||
curl_multi_socket_all
|
||||
|
||||
21.5 remove CURLOPT_FAILONERROR
|
||||
|
||||
Remove support for CURLOPT_FAILONERROR, it has gotten too kludgy and weird
|
||||
internally. Let the app judge success or not for itself.
|
||||
|
||||
21.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
|
||||
|
||||
Remove support for a global DNS cache. Anything global is silly, and we
|
||||
already offer the share interface for the same functionality but done
|
||||
"right".
|
||||
|
||||
21.7 remove progress meter from libcurl
|
||||
|
||||
The internally provided progress meter output doesn't belong in the library.
|
||||
Basically no application wants it (apart from curl) but instead applications
|
||||
can and should do their own progress meters using the progress callback.
|
||||
|
||||
The progress callback should then be bumped as well to get proper 64bit
|
||||
variable types passed to it instead of doubles so that big files work
|
||||
correctly.
|
||||
|
||||
21.8 remove 'curl_httppost' from public
|
||||
|
||||
curl_formadd() was made to fill in a public struct, but the fact that the
|
||||
struct is public is never really used by application for their own advantage
|
||||
but instead often restricts how the form functions can or can't be modified.
|
||||
|
||||
Changing them to return a private handle will benefit the implementation and
|
||||
allow us much greater freedoms while still maintaining a solid API and ABI.
|
||||
|
@ -1,73 +1,18 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
Online: http://curl.haxx.se/docs/httpscripting.shtml
|
||||
Author: Daniel Stenberg <daniel@haxx.se>
|
||||
Date: August 20, 2001
|
||||
Version: 0.4
|
||||
|
||||
The Art Of Scripting HTTP Requests Using Curl
|
||||
=============================================
|
||||
|
||||
The Art Of Scripting HTTP Requests Using Curl
|
||||
This document will assume that you're familiar with HTML and general
|
||||
networking.
|
||||
|
||||
1. HTTP Scripting
|
||||
1.1 Background
|
||||
1.2 The HTTP Protocol
|
||||
1.3 See the Protocol
|
||||
1.4 See the Timing
|
||||
1.5 See the Response
|
||||
2. URL
|
||||
2.1 Spec
|
||||
2.2 Host
|
||||
2.3 Port number
|
||||
2.4 User name and password
|
||||
2.5 Path part
|
||||
3. Fetch a page
|
||||
3.1 GET
|
||||
3.2 HEAD
|
||||
3.3 Multiple URLs in a single command line
|
||||
3.4 Multiple HTTP methods in a single command line
|
||||
4. HTML forms
|
||||
4.1 Forms explained
|
||||
4.2 GET
|
||||
4.3 POST
|
||||
4.4 File Upload POST
|
||||
4.5 Hidden Fields
|
||||
4.6 Figure Out What A POST Looks Like
|
||||
5. HTTP upload
|
||||
5.1 PUT
|
||||
6. HTTP Authentication
|
||||
6.1 Basic Authentication
|
||||
6.2 Other Authentication
|
||||
6.3 Proxy Authentication
|
||||
6.4 Hiding credentials
|
||||
7. More HTTP Headers
|
||||
7.1 Referer
|
||||
7.2 User Agent
|
||||
8. Redirects
|
||||
8.1 Location header
|
||||
8.2 Other redirects
|
||||
9. Cookies
|
||||
9.1 Cookie Basics
|
||||
9.2 Cookie options
|
||||
10. HTTPS
|
||||
10.1 HTTPS is HTTP secure
|
||||
10.2 Certificates
|
||||
11. Custom Request Elements
|
||||
11.1 Modify method and headers
|
||||
11.2 More on changed methods
|
||||
12. Web Login
|
||||
12.1 Some login tricks
|
||||
13. Debug
|
||||
13.1 Some debug tricks
|
||||
14. References
|
||||
14.1 Standards
|
||||
14.2 Sites
|
||||
|
||||
==============================================================================
|
||||
|
||||
1. HTTP Scripting
|
||||
|
||||
1.1 Background
|
||||
|
||||
This document assumes that you're familiar with HTML and general networking.
|
||||
The possibility to write scripts is essential to make a good computer
|
||||
system. Unix' capability to be extended by shell scripts and various tools to
|
||||
run various automated commands and scripts is one reason why it has succeeded
|
||||
so well.
|
||||
|
||||
The increasing amount of applications moving to the web has made "HTTP
|
||||
Scripting" more frequently requested and wanted. To be able to automatically
|
||||
@ -84,7 +29,7 @@ The Art Of Scripting HTTP Requests Using Curl
|
||||
to glue everything together using some kind of script language or repeated
|
||||
manual invokes.
|
||||
|
||||
1.2 The HTTP Protocol
|
||||
1. The HTTP Protocol
|
||||
|
||||
HTTP is the protocol used to fetch data from web servers. It is a very simple
|
||||
protocol that is built upon TCP/IP. The protocol also allows information to
|
||||
@ -95,178 +40,34 @@ The Art Of Scripting HTTP Requests Using Curl
|
||||
request a particular action, and then the server replies a few text lines
|
||||
before the actual requested content is sent to the client.
|
||||
|
||||
The client, curl, sends a HTTP request. The request contains a method (like
|
||||
GET, POST, HEAD etc), a number of request headers and sometimes a request
|
||||
body. The HTTP server responds with a status line (indicating if things went
|
||||
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.3 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/
|
||||
|
||||
1.4 See the Timing
|
||||
|
||||
Many times you may wonder what exactly is taking all the time, or you just
|
||||
want to know the amount of milliseconds between two points in a
|
||||
transfer. For those, and other similar situations, the --trace-time option
|
||||
is what you need. It'll prepend the time to each trace output line:
|
||||
|
||||
curl --trace-ascii d.txt --trace-time http://example.com/
|
||||
|
||||
1.5 See the Response
|
||||
|
||||
By default curl sends the response to stdout. You need to redirect it
|
||||
somewhere to avoid that, most often that is done with -o or -O.
|
||||
Using curl's option -v will display what kind of commands curl sends to the
|
||||
server, as well as a few other informational texts. -v is the single most
|
||||
useful option when it comes to debug or even understand the curl<->server
|
||||
interaction.
|
||||
|
||||
2. URL
|
||||
|
||||
2.1 Spec
|
||||
|
||||
The Uniform Resource Locator format is how you specify the address of a
|
||||
particular resource on the Internet. You know these, you've seen URLs like
|
||||
https://curl.haxx.se or https://yourbank.com a million times. RFC 3986 is the
|
||||
canonical spec. And yeah, the formal name is not URL, it is URI.
|
||||
particular resource on the internet. You know these, you've seen URLs like
|
||||
http://curl.haxx.se or https://yourbank.com a million times.
|
||||
|
||||
2.2 Host
|
||||
|
||||
The host name is usually resolved using DNS or your /etc/hosts file to an IP
|
||||
address and that's what curl will communicate with. Alternatively you specify
|
||||
the IP address directly in the URL instead of a name.
|
||||
|
||||
For development and other trying out situation, you can point out a different
|
||||
IP address for a host name than what would otherwise be used, by using curl's
|
||||
--resolve option:
|
||||
|
||||
curl --resolve www.example.org:80:127.0.0.1 http://www.example.org/
|
||||
|
||||
2.3 Port number
|
||||
|
||||
Each protocol curl supports operate on a default port number, be it over TCP
|
||||
or in some cases UDP. Normally you don't have to take that into
|
||||
consideration, but at times you run test servers on other ports or
|
||||
similar. Then you can specify the port number in the URL with a colon and a
|
||||
number immediately following the host name. Like when doing HTTP to port
|
||||
1234:
|
||||
|
||||
curl http://www.example.org:1234/
|
||||
|
||||
The port number you specify in the URL is the number that the server uses to
|
||||
offer its services. Sometimes you may use a local proxy, and then you may
|
||||
need to specify that proxy's port number separate on what curl needs to
|
||||
connect to locally. Like when using a HTTP proxy on port 4321:
|
||||
|
||||
curl --proxy http://proxy.example.org:4321 http://remote.example.org/
|
||||
|
||||
2.4 User name and password
|
||||
|
||||
Some services are setup to require HTTP authentication and then you need to
|
||||
provide name and password which then is transferred to the remote site in
|
||||
various ways depending on the exact authentication protocol used.
|
||||
|
||||
You can opt to either insert the user and password in the URL or you can
|
||||
provide them separately:
|
||||
|
||||
curl http://user:password@example.org/
|
||||
|
||||
or
|
||||
|
||||
curl -u user:password http://example.org/
|
||||
|
||||
You need to pay attention that this kind of HTTP authentication is not what
|
||||
is usually done and requested by user-oriented web sites these days. They
|
||||
tend to use forms and cookies instead.
|
||||
|
||||
2.5 Path part
|
||||
|
||||
The path part is just sent off to the server to request that it sends back
|
||||
the associated response. The path is what is to the right side of the slash
|
||||
that follows the host name and possibly port number.
|
||||
|
||||
3. Fetch a page
|
||||
|
||||
3.1 GET
|
||||
3. GET a page
|
||||
|
||||
The simplest and most common request/operation made using HTTP is to get a
|
||||
URL. The URL could itself refer to a web page, an image or a file. The client
|
||||
issues a GET request to the server and receives the document it asked for.
|
||||
If you issue the command line
|
||||
If you isse the command line
|
||||
|
||||
curl https://curl.haxx.se
|
||||
curl http://curl.haxx.se
|
||||
|
||||
you get a web page returned in your terminal window. The entire HTML document
|
||||
that that URL holds.
|
||||
|
||||
All HTTP replies contain a set of response headers that are normally hidden,
|
||||
use curl's --include (-i) option to display them as well as the rest of the
|
||||
document.
|
||||
All HTTP replies contain a set of headers that are normally hidden, use
|
||||
curl's -i option to display them as well as the rest of the document. You can
|
||||
also ask the remote server for ONLY the headers by using the -I option.
|
||||
|
||||
3.2 HEAD
|
||||
|
||||
You can ask the remote server for ONLY the headers by using the --head (-I)
|
||||
option which will make curl issue a HEAD request. In some special cases
|
||||
servers deny the HEAD method while others still work, which is a particular
|
||||
kind of annoyance.
|
||||
|
||||
The HEAD method is defined and made so that the server returns the headers
|
||||
exactly the way it would do for a GET, but without a body. It means that you
|
||||
may see a Content-Length: in the response headers, but there must not be an
|
||||
actual body in the HEAD response.
|
||||
|
||||
3.3 Multiple URLs in a single command line
|
||||
|
||||
A single curl command line may involve one or many URLs. The most common case
|
||||
is probably to just use one, but you can specify any amount of URLs. Yes
|
||||
any. No limits. You'll then get requests repeated over and over for all the
|
||||
given URLs.
|
||||
|
||||
Example, send two GETs:
|
||||
|
||||
curl http://url1.example.com http://url2.example.com
|
||||
|
||||
If you use --data to POST to the URL, using multiple URLs means that you send
|
||||
that same POST to all the given URLs.
|
||||
|
||||
Example, send two POSTs:
|
||||
|
||||
curl --data name=curl http://url1.example.com http://url2.example.com
|
||||
|
||||
|
||||
3.4 Multiple HTTP methods in a single command line
|
||||
|
||||
Sometimes you need to operate on several URLs in a single command line and do
|
||||
different HTTP methods on each. For this, you'll enjoy the --next option. It
|
||||
is basically a separator that separates a bunch of options from the next. All
|
||||
the URLs before --next will get the same method and will get all the POST
|
||||
data merged into one.
|
||||
|
||||
When curl reaches the --next on the command line, it'll sort of reset the
|
||||
method and the POST data and allow a new set.
|
||||
|
||||
Perhaps this is best shown with a few examples. To send first a HEAD and then
|
||||
a GET:
|
||||
|
||||
curl -I http://example.com --next http://example.com
|
||||
|
||||
To first send a POST and then a GET:
|
||||
|
||||
curl -d score=10 http://example.com/post.cgi --next http://example.com/results.html
|
||||
|
||||
|
||||
4. HTML forms
|
||||
|
||||
4.1 Forms explained
|
||||
4. Forms
|
||||
|
||||
Forms are the general way a web site can present a HTML page with fields for
|
||||
the user to enter data in, and then press some kind of 'OK' or 'submit'
|
||||
@ -279,7 +80,7 @@ The Art Of Scripting HTTP Requests Using Curl
|
||||
Of course there has to be some kind of program in the server end to receive
|
||||
the data you send. You cannot just invent something out of the air.
|
||||
|
||||
4.2 GET
|
||||
4.1 GET
|
||||
|
||||
A GET-form uses the method GET, as specified in HTML like:
|
||||
|
||||
@ -288,7 +89,7 @@ The Art Of Scripting HTTP Requests Using Curl
|
||||
<input type=submit name=press value="OK">
|
||||
</form>
|
||||
|
||||
In your favorite browser, this form will appear with a text box to fill in
|
||||
In your favourite browser, this form will appear with a text box to fill in
|
||||
and a press-button labeled "OK". If you fill in '1905' and press the OK
|
||||
button, your browser will then create a new URL to get for you. The URL will
|
||||
get "junk.cgi?birthyear=1905&press=OK" appended to the path part of the
|
||||
@ -303,9 +104,9 @@ The Art Of Scripting HTTP Requests Using Curl
|
||||
To make curl do the GET form post for you, just enter the expected created
|
||||
URL:
|
||||
|
||||
curl "http://www.hotmail.com/when/junk.cgi?birthyear=1905&press=OK"
|
||||
curl "www.hotmail.com/when/junk.cgi?birthyear=1905&press=OK"
|
||||
|
||||
4.3 POST
|
||||
4.2 POST
|
||||
|
||||
The GET method makes all input field names get displayed in the URL field of
|
||||
your browser. That's generally a good thing when you want to be able to
|
||||
@ -321,36 +122,22 @@ The Art Of Scripting HTTP Requests Using Curl
|
||||
|
||||
<form method="POST" action="junk.cgi">
|
||||
<input type=text name="birthyear">
|
||||
<input type=submit name=press value=" OK ">
|
||||
<input type=submit name=press value="OK">
|
||||
</form>
|
||||
|
||||
And to use curl to post this form with the same data filled in as before, we
|
||||
could do it like:
|
||||
|
||||
curl --data "birthyear=1905&press=%20OK%20" \
|
||||
http://www.example.com/when.cgi
|
||||
curl -d "birthyear=1905&press=OK" www.hotmail.com/when/junk.cgi
|
||||
|
||||
This kind of POST will use the Content-Type
|
||||
application/x-www-form-urlencoded and is the most widely used POST kind.
|
||||
|
||||
The data you send to the server MUST already be properly encoded, curl will
|
||||
not do that for you. For example, if you want the data to contain a space,
|
||||
you need to replace that space with %20 etc. Failing to comply with this
|
||||
will most likely cause your data to be received wrongly and messed up.
|
||||
4.3 FILE UPLOAD POST
|
||||
|
||||
Recent curl versions can in fact url-encode POST data for you, like this:
|
||||
|
||||
curl --data-urlencode "name=I am Daniel" http://www.example.com
|
||||
|
||||
If you repeat --data several times on the command line, curl will
|
||||
concatenate all the given data pieces - and put a '&' symbol between each
|
||||
data segment.
|
||||
|
||||
4.4 File Upload POST
|
||||
|
||||
Back in late 1995 they defined an additional way to post data over HTTP. It
|
||||
is documented in the RFC 1867, why this method sometimes is referred to as
|
||||
RFC1867-posting.
|
||||
Back in late 1995 they defined a new way to post data over HTTP. It was
|
||||
documented in the RFC 1867, why this method sometimes is refered to as
|
||||
a rfc1867-posting.
|
||||
|
||||
This method is mainly designed to better support file uploads. A form that
|
||||
allows a user to upload a file could be written like this in HTML:
|
||||
@ -365,9 +152,9 @@ The Art Of Scripting HTTP Requests Using Curl
|
||||
|
||||
To post to a form like this with curl, you enter a command line like:
|
||||
|
||||
curl --form upload=@localfilename --form press=OK [URL]
|
||||
curl -F upload=@localfilename -F press=OK [URL]
|
||||
|
||||
4.5 Hidden Fields
|
||||
4.4 HIDDEN FIELDS
|
||||
|
||||
A very common way for HTML based application to pass state information
|
||||
between pages is to add hidden fields to the forms. Hidden fields are
|
||||
@ -386,24 +173,22 @@ The Art Of Scripting HTTP Requests Using Curl
|
||||
To post this with curl, you won't have to think about if the fields are
|
||||
hidden or not. To curl they're all the same:
|
||||
|
||||
curl --data "birthyear=1905&press=OK&person=daniel" [URL]
|
||||
curl -d "birthyear=1905&press=OK&person=daniel" [URL]
|
||||
|
||||
4.6 Figure Out What A POST Looks Like
|
||||
4.5 FIGURE OUT WHAT A POST LOOKS LIKE
|
||||
|
||||
When you're about fill in a form and send to a server by using curl instead
|
||||
of a browser, you're of course very interested in sending a POST exactly the
|
||||
way your browser does.
|
||||
|
||||
An easy way to get to see this, is to save the HTML page with the form on
|
||||
your local disk, modify the 'method' to a GET, and press the submit button
|
||||
your local disk, mofidy the 'method' to a GET, and press the submit button
|
||||
(you could also change the action URL if you want to).
|
||||
|
||||
You will then clearly see the data get appended to the URL, separated with a
|
||||
'?'-letter as GET forms are supposed to.
|
||||
|
||||
5. HTTP upload
|
||||
|
||||
5.1 PUT
|
||||
5. PUT
|
||||
|
||||
The perhaps best way to upload data to a HTTP server is to use PUT. Then
|
||||
again, this of course requires that someone put a program or script on the
|
||||
@ -411,72 +196,51 @@ The Art Of Scripting HTTP Requests Using Curl
|
||||
|
||||
Put a file to a HTTP server with curl:
|
||||
|
||||
curl --upload-file uploadfile http://www.example.com/receive.cgi
|
||||
curl -T uploadfile www.uploadhttp.com/receive.cgi
|
||||
|
||||
6. HTTP Authentication
|
||||
6. AUTHENTICATION
|
||||
|
||||
6.1 Basic Authentication
|
||||
|
||||
HTTP Authentication is the ability to tell the server your username and
|
||||
password so that it can verify that you're allowed to do the request you're
|
||||
doing. The Basic authentication used in HTTP (which is the type curl uses by
|
||||
default) is *plain* *text* based, which means it sends username and password
|
||||
only slightly obfuscated, but still fully readable by anyone that sniffs on
|
||||
the network between you and the remote server.
|
||||
Authentication is the ability to tell the server your username and password
|
||||
so that it can verify that you're allowed to do the request you're doing. The
|
||||
basic authentication used in HTTP is *plain* *text* based, which means it
|
||||
sends username and password only slightly obfuscated, but still fully
|
||||
readable by anyone that sniffs on the network between you and the remote
|
||||
server.
|
||||
|
||||
To tell curl to use a user and password for authentication:
|
||||
|
||||
curl --user name:password http://www.example.com
|
||||
|
||||
6.2 Other Authentication
|
||||
|
||||
The site might require a different authentication method (check the headers
|
||||
returned by the server), and then --ntlm, --digest, --negotiate or even
|
||||
--anyauth might be options that suit you.
|
||||
|
||||
6.3 Proxy Authentication
|
||||
|
||||
curl -u name:password www.secrets.com
|
||||
|
||||
Sometimes your HTTP access is only available through the use of a HTTP
|
||||
proxy. This seems to be especially common at various companies. A HTTP proxy
|
||||
may require its own user and password to allow the client to get through to
|
||||
the Internet. To specify those with curl, run something like:
|
||||
the internet. To specify those with curl, run something like:
|
||||
|
||||
curl --proxy-user proxyuser:proxypassword curl.haxx.se
|
||||
|
||||
If your proxy requires the authentication to be done using the NTLM method,
|
||||
use --proxy-ntlm, if it requires Digest use --proxy-digest.
|
||||
curl -U proxyuser:proxypassword curl.haxx.se
|
||||
|
||||
If you use any one these user+password options but leave out the password
|
||||
part, curl will prompt for the password interactively.
|
||||
|
||||
6.4 Hiding credentials
|
||||
Do note that when a program is run, its parameters are possible to see when
|
||||
listing the running processes of the system. Thus, other users may be able to
|
||||
watch your passwords if you pass them as plain command line options. There
|
||||
are ways to circumvent this.
|
||||
|
||||
Do note that when a program is run, its parameters might be possible to see
|
||||
when listing the running processes of the system. Thus, other users may be
|
||||
able to watch your passwords if you pass them as plain command line
|
||||
options. There are ways to circumvent this.
|
||||
7. REFERER
|
||||
|
||||
It is worth noting that while this is how HTTP Authentication works, very
|
||||
many web sites will not use this concept when they provide logins etc. See
|
||||
the Web Login chapter further below for more details on that.
|
||||
|
||||
7. More HTTP Headers
|
||||
|
||||
7.1 Referer
|
||||
|
||||
A HTTP request may include a 'referer' field (yes it is misspelled), which
|
||||
can be used to tell from which URL the client got to this particular
|
||||
resource. Some programs/scripts check the referer field of requests to verify
|
||||
that this wasn't arriving from an external site or an unknown page. While
|
||||
this is a stupid way to check something so easily forged, many scripts still
|
||||
do it. Using curl, you can put anything you want in the referer-field and
|
||||
thus more easily be able to fool the server into serving your request.
|
||||
A HTTP request may include a 'referer' field, which can be used to tell from
|
||||
which URL the client got to this particular resource. Some programs/scripts
|
||||
check the referer field of requests to verify that this wasn't arriving from
|
||||
an external site or an unknown page. While this is a stupid way to check
|
||||
something so easily forged, many scripts still do it. Using curl, you can put
|
||||
anything you want in the referer-field and thus more easily be able to fool
|
||||
the server into serving your request.
|
||||
|
||||
Use curl to set the referer field with:
|
||||
|
||||
curl --referer http://www.example.come http://www.example.com
|
||||
curl -e http://curl.haxx.se daniel.haxx.se
|
||||
|
||||
7.2 User Agent
|
||||
8. USER AGENT
|
||||
|
||||
Very similar to the referer field, all HTTP requests may set the User-Agent
|
||||
field. It names what user agent (client) that is being used. Many
|
||||
@ -490,17 +254,15 @@ The Art Of Scripting HTTP Requests Using Curl
|
||||
is time to set the User Agent field to fool the server into thinking you're
|
||||
one of those browsers.
|
||||
|
||||
To make curl look like Internet Explorer 5 on a Windows 2000 box:
|
||||
To make curl look like Internet Explorer on a Windows 2000 box:
|
||||
|
||||
curl --user-agent "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" [URL]
|
||||
curl -A "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" [URL]
|
||||
|
||||
Or why not look like you're using Netscape 4.73 on an old Linux box:
|
||||
Or why not look like you're using Netscape 4.73 on a Linux (PIII) box:
|
||||
|
||||
curl --user-agent "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" [URL]
|
||||
curl -A "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" [URL]
|
||||
|
||||
8. Redirects
|
||||
|
||||
8.1 Location header
|
||||
9. REDIRECTS
|
||||
|
||||
When a resource is requested from a server, the reply from the server may
|
||||
include a hint about where the browser should go next to find this page, or a
|
||||
@ -511,25 +273,15 @@ The Art Of Scripting HTTP Requests Using Curl
|
||||
such pages in the same manner it display all HTTP replies. It does however
|
||||
feature an option that will make it attempt to follow the Location: pointers.
|
||||
|
||||
To tell curl to follow a Location:
|
||||
|
||||
curl --location http://www.example.com
|
||||
To tell curl to follow a Location:
|
||||
|
||||
curl -L www.sitethatredirects.com
|
||||
|
||||
If you use curl to POST to a site that immediately redirects you to another
|
||||
page, you can safely use --location (-L) and --data/--form together. Curl will
|
||||
only use POST in the first request, and then revert to GET in the following
|
||||
operations.
|
||||
page, you can safely use -L and -d/-F together. Curl will only use POST in
|
||||
the first request, and then revert to GET in the following operations.
|
||||
|
||||
8.2 Other redirects
|
||||
|
||||
Browser typically support at least two other ways of redirects that curl
|
||||
doesn't: first the html may contain a meta refresh tag that asks the browser
|
||||
to load a specific URL after a set number of seconds, or it may use
|
||||
javascript to do it.
|
||||
|
||||
9. Cookies
|
||||
|
||||
9.1 Cookie Basics
|
||||
10. COOKIES
|
||||
|
||||
The way the web browsers do "client side state control" is by using
|
||||
cookies. Cookies are just names with associated contents. The cookies are
|
||||
@ -542,55 +294,38 @@ The Art Of Scripting HTTP Requests Using Curl
|
||||
contents to the server, unless of course they are expired.
|
||||
|
||||
Many applications and servers use this method to connect a series of requests
|
||||
into a single logical session. To be able to use curl in such occasions, we
|
||||
into a single logical session. To be able to use curl in such occations, we
|
||||
must be able to record and send back cookies the way the web application
|
||||
expects them. The same way browsers deal with them.
|
||||
|
||||
9.2 Cookie options
|
||||
|
||||
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 --cookie "name=Daniel" http://www.example.com
|
||||
curl -b "name=Daniel" www.cookiesite.com
|
||||
|
||||
Cookies are sent as common HTTP headers. This is practical as it allows curl
|
||||
to record cookies simply by recording headers. Record cookies with curl by
|
||||
using the --dump-header (-D) option like:
|
||||
using the -D option like:
|
||||
|
||||
curl --dump-header headers_and_cookies http://www.example.com
|
||||
|
||||
(Take note that the --cookie-jar option described below is a better way to
|
||||
store cookies.)
|
||||
curl -D headers_and_cookies www.cookiesite.com
|
||||
|
||||
Curl has a full blown cookie parsing engine built-in that comes to use if you
|
||||
want to reconnect to a server and use cookies that were stored from a
|
||||
previous connection (or hand-crafted manually to fool the server into
|
||||
previous connection (or handicrafted manually to fool the server into
|
||||
believing you had a previous connection). To use previously stored cookies,
|
||||
you run curl like:
|
||||
|
||||
curl --cookie stored_cookies_in_file http://www.example.com
|
||||
curl -b stored_cookies_in_file www.cookiesite.com
|
||||
|
||||
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
|
||||
doesn't exist. Example, if you want to let curl understand cookies from a
|
||||
page and follow a location (and thus possibly send back cookies it received),
|
||||
you can invoke it like:
|
||||
Curl's "cookie engine" gets enabled when you use the -b option. If you only
|
||||
want curl to understand received cookies, use -b with a file that doesn't
|
||||
exist. Example, if you want to let curl understand cookies from a page and
|
||||
follow a location (and thus possibly send back cookies it received), you can
|
||||
invoke it like:
|
||||
|
||||
curl --cookie nada --location http://www.example.com
|
||||
curl -b nada -L www.cookiesite.com
|
||||
|
||||
Curl has the ability to read and write cookie files that use the same file
|
||||
format that Netscape and Mozilla once used. It is a convenient way to share
|
||||
cookies between scripts or invokes. The --cookie (-b) switch automatically
|
||||
detects if a given file is such a cookie file and parses it, and by using the
|
||||
--cookie-jar (-c) option you'll make curl write a new cookie file at the end
|
||||
of an operation:
|
||||
|
||||
curl --cookie cookies.txt --cookie-jar newcookies.txt \
|
||||
http://www.example.com
|
||||
|
||||
10. HTTPS
|
||||
|
||||
10.1 HTTPS is HTTP secure
|
||||
11. HTTPS
|
||||
|
||||
There are a few ways to do secure HTTP transfers. The by far most common
|
||||
protocol for doing this is what is generally known as HTTPS, HTTP over
|
||||
@ -601,158 +336,32 @@ The Art Of Scripting HTTP Requests Using Curl
|
||||
truckload of advanced features to allow all those encryptions and key
|
||||
infrastructure mechanisms encrypted HTTP requires.
|
||||
|
||||
Curl supports encrypted fetches when built to use a TLS library and it can be
|
||||
built to use one out of a fairly large set of libraries - "curl -V" will show
|
||||
which one your curl was built to use (if any!). To get a page from a HTTPS
|
||||
server, simply run curl like:
|
||||
Curl supports encrypted fetches thanks to the freely available OpenSSL
|
||||
libraries. To get a page from a HTTPS server, simply run curl like:
|
||||
|
||||
curl https://secure.example.com
|
||||
curl https://that.secure.server.com
|
||||
|
||||
10.2 Certificates
|
||||
11.1 CERTIFICATES
|
||||
|
||||
In the HTTPS world, you use certificates to validate that you are the one
|
||||
you claim to be, as an addition to normal passwords. Curl supports client-
|
||||
side certificates. All certificates are locked with a pass phrase, which you
|
||||
need to enter before the certificate can be used by curl. The pass phrase
|
||||
can be specified on the command line or if not, entered interactively when
|
||||
curl queries for it. Use a certificate with curl on a HTTPS server like:
|
||||
you you claim to be, as an addition to normal passwords. Curl supports
|
||||
client-side certificates. All certificates are locked with a PIN-code, why
|
||||
you need to enter the unlock-code before the certificate can be used by
|
||||
curl. The PIN-code 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 --cert mycert.pem https://secure.example.com
|
||||
curl -E mycert.pem https://that.secure.server.com
|
||||
|
||||
curl also tries to verify that the server is who it claims to be, by
|
||||
verifying the server's certificate against a locally stored CA cert
|
||||
bundle. Failing the verification will cause curl to deny the connection. You
|
||||
must then use --insecure (-k) in case you want to tell curl to ignore that
|
||||
the server can't be verified.
|
||||
12. REFERENCES
|
||||
|
||||
More about server certificate verification and ca cert bundles can be read
|
||||
in the SSLCERTS document, available online here:
|
||||
RFC 2616 is a must to read if you want in-depth understanding of the HTTP
|
||||
protocol.
|
||||
|
||||
https://curl.haxx.se/docs/sslcerts.html
|
||||
RFC 2396 explains the URL syntax
|
||||
|
||||
At times you may end up with your own CA cert store and then you can tell
|
||||
curl to use that to verify the server's certificate:
|
||||
RFC 2109 defines how cookies are supposed to work.
|
||||
|
||||
curl --cacert ca-bundle.pem https://example.com/
|
||||
http://www.openssl.org is the home of the OpenSSL project
|
||||
|
||||
|
||||
11. Custom Request Elements
|
||||
|
||||
11.1 Modify method and headers
|
||||
|
||||
Doing fancy stuff, you may need to add or change elements of a single curl
|
||||
request.
|
||||
|
||||
For example, you can change the POST request to a PROPFIND and send the data
|
||||
as "Content-Type: text/xml" (instead of the default Content-Type) like this:
|
||||
|
||||
curl --data "<xml>" --header "Content-Type: text/xml" \
|
||||
--request PROPFIND url.com
|
||||
|
||||
You can delete a default header by providing one without content. Like you
|
||||
can ruin the request by chopping off the Host: header:
|
||||
|
||||
curl --header "Host:" http://www.example.com
|
||||
|
||||
You can add headers the same way. Your server may want a "Destination:"
|
||||
header, and you can add it:
|
||||
|
||||
curl --header "Destination: http://nowhere" http://example.com
|
||||
|
||||
11.2 More on changed methods
|
||||
|
||||
It should be noted that curl selects which methods to use on its own
|
||||
depending on what action to ask for. -d will do POST, -I will do HEAD and so
|
||||
on. If you use the --request / -X option you can change the method keyword
|
||||
curl selects, but you will not modify curl's behavior. This means that if you
|
||||
for example use -d "data" to do a POST, you can modify the method to a
|
||||
PROPFIND with -X and curl will still think it sends a POST. You can change
|
||||
the normal GET to a POST method by simply adding -X POST in a command line
|
||||
like:
|
||||
|
||||
curl -X POST http://example.org/
|
||||
|
||||
... but curl will still think and act as if it sent a GET so it won't send any
|
||||
request body etc.
|
||||
|
||||
|
||||
12. Web Login
|
||||
|
||||
12.1 Some login tricks
|
||||
|
||||
While not strictly just HTTP related, it still cause a lot of people problems
|
||||
so here's the executive run-down of how the vast majority of all login forms
|
||||
work and how to login to them using curl.
|
||||
|
||||
It can also be noted that to do this properly in an automated fashion, you
|
||||
will most certainly need to script things and do multiple curl invokes etc.
|
||||
|
||||
First, servers mostly use cookies to track the logged-in status of the
|
||||
client, so you will need to capture the cookies you receive in the
|
||||
responses. Then, many sites also set a special cookie on the login page (to
|
||||
make sure you got there through their login page) so you should make a habit
|
||||
of first getting the login-form page to capture the cookies set there.
|
||||
|
||||
Some web-based login systems features various amounts of javascript, and
|
||||
sometimes they use such code to set or modify cookie contents. Possibly they
|
||||
do that to prevent programmed logins, like this manual describes how to...
|
||||
Anyway, if reading the code isn't enough to let you repeat the behavior
|
||||
manually, capturing the HTTP requests done by your browsers and analyzing the
|
||||
sent cookies is usually a working method to work out how to shortcut the
|
||||
javascript need.
|
||||
|
||||
In the actual <form> tag for the login, lots of sites fill-in random/session
|
||||
or otherwise secretly generated hidden tags and you may need to first capture
|
||||
the HTML code for the login form and extract all the hidden fields to be able
|
||||
to do a proper login POST. Remember that the contents need to be URL encoded
|
||||
when sent in a normal POST.
|
||||
|
||||
13. Debug
|
||||
|
||||
13.1 Some debug tricks
|
||||
|
||||
Many times when you run curl on a site, you'll notice that the site doesn't
|
||||
seem to respond the same way to your curl requests as it does to your
|
||||
browser's.
|
||||
|
||||
Then you need to start making your curl requests more similar to your
|
||||
browser's requests:
|
||||
|
||||
* Use the --trace-ascii option to store fully detailed logs of the requests
|
||||
for easier analyzing and better understanding
|
||||
|
||||
* Make sure you check for and use cookies when needed (both reading with
|
||||
--cookie and writing with --cookie-jar)
|
||||
|
||||
* Set user-agent to one like a recent popular browser does
|
||||
|
||||
* Set referer like it is set by the browser
|
||||
|
||||
* If you use POST, make sure you send all the fields and in the same order as
|
||||
the browser does it.
|
||||
|
||||
A very good helper to make sure you do this right, is the LiveHTTPHeader tool
|
||||
that lets you view all headers you send and receive with Mozilla/Firefox
|
||||
(even when using HTTPS). Chrome features similar functionality out of the box
|
||||
among the developer's tools.
|
||||
|
||||
A more raw approach is to capture the HTTP traffic on the network with tools
|
||||
such as ethereal or tcpdump and check what headers that were sent and
|
||||
received by the browser. (HTTPS makes this technique inefficient.)
|
||||
|
||||
14. References
|
||||
|
||||
14.1 Standards
|
||||
|
||||
RFC 7230 is a must to read if you want in-depth understanding of the HTTP
|
||||
protocol
|
||||
|
||||
RFC 3986 explains the URL syntax
|
||||
|
||||
RFC 1867 defines the HTTP post upload format
|
||||
|
||||
RFC 6525 defines how HTTP cookies work
|
||||
|
||||
14.2 Sites
|
||||
|
||||
https://curl.haxx.se is the home of the cURL project
|
||||
http://curl.haxx.se is the home of the cURL project
|
||||
|
@ -1,56 +0,0 @@
|
||||
Version Numbers and Releases
|
||||
============================
|
||||
|
||||
Curl is not only curl. Curl is also libcurl. They're actually individually
|
||||
versioned, but they mostly follow each other rather closely.
|
||||
|
||||
The version numbering is always built up using the same system:
|
||||
|
||||
X.Y.Z
|
||||
|
||||
- X is main version number
|
||||
- Y is release number
|
||||
- Z is patch number
|
||||
|
||||
## Bumping numbers
|
||||
|
||||
One of these numbers will get bumped in each new release. The numbers to the
|
||||
right of a bumped number will be reset to zero. If Z is zero, it may not be
|
||||
included in the version number.
|
||||
|
||||
The main version number will get bumped when *really* big, world colliding
|
||||
changes are made. The release number is bumped when changes are performed or
|
||||
things/features are added. The patch number is bumped when the changes are
|
||||
mere bugfixes.
|
||||
|
||||
It means that after release 1.2.3, we can release 2.0 if something really big
|
||||
has been made, 1.3 if not that big changes were made or 1.2.4 if mostly bugs
|
||||
were fixed.
|
||||
|
||||
Bumping, as in increasing the number with 1, is unconditionally only
|
||||
affecting one of the numbers (except the ones to the right of it, that may be
|
||||
set to zero). 1 becomes 2, 3 becomes 4, 9 becomes 10, 88 becomes 89 and 99
|
||||
becomes 100. So, after 1.2.9 comes 1.2.10. After 3.99.3, 3.100 might come.
|
||||
|
||||
All original curl source release archives are named according to the libcurl
|
||||
version (not according to the curl client version that, as said before, might
|
||||
differ).
|
||||
|
||||
As a service to any application that might want to support new libcurl
|
||||
features while still being able to build with older versions, all releases
|
||||
have the libcurl version stored in the curl/curlver.h file using a static
|
||||
numbering scheme that can be used for comparison. The version number is
|
||||
defined as:
|
||||
|
||||
#define LIBCURL_VERSION_NUM 0xXXYYZZ
|
||||
|
||||
Where XX, YY and ZZ are the main version, release and patch numbers in
|
||||
hexadecimal. All three number fields are always represented using two digits
|
||||
(eight bits each). 1.2 would appear as "0x010200" while version 9.11.7
|
||||
appears as "0x090b07".
|
||||
|
||||
This 6-digit hexadecimal number is always a greater number in a more recent
|
||||
release. It makes comparisons with greater than and less than work.
|
||||
|
||||
This number is also available as three separate defines:
|
||||
`LIBCURL_VERSION_MAJOR`, `LIBCURL_VERSION_MINOR` and `LIBCURL_VERSION_PATCH`.
|
@ -1,53 +1,24 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2012, 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 https://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.
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\" You can view this file with:
|
||||
.\" nroff -man curl-config.1
|
||||
.\" Written by Daniel Stenberg
|
||||
.\"
|
||||
.TH curl-config 1 "25 Oct 2007" "Curl 7.17.1" "curl-config manual"
|
||||
.TH curl-config 1 "16 August 2001" "Curl 7.8.1" "curl-config manual"
|
||||
.SH NAME
|
||||
curl-config \- Get information about a libcurl installation
|
||||
.SH SYNOPSIS
|
||||
.B curl-config [options]
|
||||
.SH DESCRIPTION
|
||||
.B curl-config
|
||||
displays information about the curl and libcurl installation.
|
||||
displays information about a previous curl and libcurl installation.
|
||||
.SH OPTIONS
|
||||
.IP "--ca"
|
||||
Displays the built-in path to the CA cert bundle this libcurl uses.
|
||||
.IP "--cc"
|
||||
Displays the compiler used to build libcurl.
|
||||
.IP "--cflags"
|
||||
Set of compiler options (CFLAGS) to use when compiling files that use
|
||||
libcurl. Currently that is only the include path to the curl include files.
|
||||
.IP "--checkfor [version]"
|
||||
Specify the oldest possible libcurl version string you want, and this
|
||||
script will return 0 if the current installation is new enough or it
|
||||
returns 1 and outputs a text saying that the current version is not new
|
||||
enough. (Added in 7.15.4)
|
||||
.IP "--configure"
|
||||
Displays the arguments given to configure when building curl.
|
||||
libcurl. Currently that is only thw include path to the curl include files.
|
||||
.IP "--feature"
|
||||
Lists what particular main features the installed libcurl was built with. At
|
||||
the time of writing, this list may include SSL, KRB4 or IPv6. Do not assume
|
||||
any particular order. The keywords will be separated by newlines. There may be
|
||||
none, one, or several keywords in the list.
|
||||
none, one or several keywords in the list.
|
||||
.IP "--help"
|
||||
Displays the available options.
|
||||
.IP "--libs"
|
||||
@ -57,42 +28,28 @@ to link your application with libcurl.
|
||||
This is the prefix used when libcurl was installed. Libcurl is then installed
|
||||
in $prefix/lib and its header files are installed in $prefix/include and so
|
||||
on. The prefix is set with "configure --prefix".
|
||||
.IP "--protocols"
|
||||
Lists what particular protocols the installed libcurl was built to support. At
|
||||
the time of writing, this list may include HTTP, HTTPS, FTP, FTPS, FILE,
|
||||
TELNET, LDAP, DICT. Do not assume any particular order. The protocols will
|
||||
be listed using uppercase and are separated by newlines. There may be none,
|
||||
one, or several protocols in the list. (Added in 7.13.0)
|
||||
.IP "--static-libs"
|
||||
Shows the complete set of libs and other linker options you will need in order
|
||||
to link your application with libcurl statically. (Added in 7.17.1)
|
||||
.IP "--version"
|
||||
Outputs version information about the installed libcurl.
|
||||
.IP "--vernum"
|
||||
Outputs version information about the installed libcurl, in numerical mode.
|
||||
This outputs the version number, in hexadecimal, with 8 bits for each part;
|
||||
major, minor, patch. So that libcurl 7.7.4 would appear as 070704 and libcurl
|
||||
12.13.14 would appear as 0c0d0e... Note that the initial zero might be
|
||||
omitted. (This option was broken in the 7.15.0 release.)
|
||||
12.13.14 would appear as 0c0d0e...
|
||||
.SH "EXAMPLES"
|
||||
What linker options do I need when I link with libcurl?
|
||||
|
||||
$ curl-config --libs
|
||||
curl-config --libs
|
||||
|
||||
What compiler options do I need when I compile using libcurl functions?
|
||||
|
||||
$ curl-config --cflags
|
||||
curl-config --cflags
|
||||
|
||||
How do I know if libcurl was built with SSL support?
|
||||
|
||||
$ curl-config --feature | grep SSL
|
||||
curl-config --feature | grep SSL
|
||||
|
||||
What's the installed libcurl version?
|
||||
|
||||
$ curl-config --version
|
||||
|
||||
How do I build a single file with a one-line command?
|
||||
|
||||
$ `curl-config --cc --cflags` -o example example.c `curl-config --libs`
|
||||
curl-config --version
|
||||
.SH "SEE ALSO"
|
||||
.BR curl (1)
|
||||
|
2552
docs/curl.1
2552
docs/curl.1
File diff suppressed because it is too large
Load Diff
29
docs/curl_easy_cleanup.3
Normal file
29
docs/curl_easy_cleanup.3
Normal file
@ -0,0 +1,29 @@
|
||||
.\" You can view this file with:
|
||||
.\" nroff -man [file]
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH curl_easy_cleanup 3 "5 March 2001" "libcurl 7.7" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_easy_cleanup - End a libcurl session
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "void curl_easy_cleanup(CURL *" handle ");"
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
This function must be the last function to call for a curl session. It is the
|
||||
opposite of the
|
||||
.I curl_easy_init
|
||||
function and must be called with the same
|
||||
.I handle
|
||||
as input as the curl_easy_init call returned.
|
||||
|
||||
This will effectively close all connections libcurl has been used and possibly
|
||||
has kept open until now. Don't call this function if you intend to transfer
|
||||
more files (libcurl 7.7 or later).
|
||||
.SH RETURN VALUE
|
||||
None
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_init "(3), "
|
||||
.SH BUGS
|
||||
Surely there are some, you tell me!
|
37
docs/curl_easy_duphandle.3
Normal file
37
docs/curl_easy_duphandle.3
Normal file
@ -0,0 +1,37 @@
|
||||
.\" You can view this file with:
|
||||
.\" nroff -man [file]
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH curl_easy_duphandle 3 "18 September 2001" "libcurl 7.9" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_easy_duphandle - Clone a libcurl session handle
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "CURL *curl_easy_duphandle(CURL *"handle ");"
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
This function will return a new curl handle, a duplicate, using all the
|
||||
options previously set in the input curl \fIhandle\fP. Both handles can
|
||||
subsequently be used independently and they must both be freed with
|
||||
\fIcurl_easy_cleanup()\fP.
|
||||
|
||||
All strings that the input handle has been told to point to (as opposed to
|
||||
copy) with previous calls to \fIcurl_easy_setopt\fP using char * inputs, will
|
||||
be pointed to by the new handle as well. You must therefore make sure to keep
|
||||
the data around until both handles have been cleaned up.
|
||||
|
||||
The new handle will \fBnot\fP inherit any state information, no connections,
|
||||
no SSL sessions and no cookies.
|
||||
|
||||
\fBNote\fP that even in multi-threaded programs, this function must be called
|
||||
in a synchronous way, the input handle may not be in use when cloned.
|
||||
|
||||
This function was added in libcurl 7.9.
|
||||
.SH RETURN VALUE
|
||||
If this function returns NULL, something went wrong and no valid handle was
|
||||
returned.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_init "(3)," curl_easy_cleanup "(3)," curl_global_init "(3)
|
||||
.SH BUGS
|
||||
Surely there are some, you tell me!
|
100
docs/curl_easy_getinfo.3
Normal file
100
docs/curl_easy_getinfo.3
Normal file
@ -0,0 +1,100 @@
|
||||
.\" You can view this file with:
|
||||
.\" nroff -man [file]
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH curl_easy_init 3 "5 March 2001" "libcurl 7.6.1" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_easy_getinfo - Extract information from a curl session (added in 7.4)
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ... );"
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
Request internal information from the curl session with this function. The
|
||||
third argument
|
||||
.B MUST
|
||||
be a pointer to a long, a pointer to a char * or a pointer to a double (as
|
||||
this documentation describes further down). The data pointed-to will be
|
||||
filled in accordingly and can be relied upon only if the function returns
|
||||
CURLE_OK. This function is intended to get used *AFTER* a performed transfer,
|
||||
all results from this function are undefined until the transfer is completed.
|
||||
.SH AVAILABLE INFORMATION
|
||||
These are informations that can be extracted:
|
||||
.TP 0.8i
|
||||
.B CURLINFO_EFFECTIVE_URL
|
||||
Pass a pointer to a 'char *' to receive the last used effective URL.
|
||||
.TP
|
||||
.B CURLINFO_HTTP_CODE
|
||||
Pass a pointer to a long to receive the last received HTTP code.
|
||||
.TP
|
||||
.B CURLINFO_FILETIME
|
||||
Pass a pointer to a long to receive the remote time of the retrieved
|
||||
document. If you get 0, it can be because of many reasons (unknown, the server
|
||||
hides it or the server doesn't support the command that tells document time
|
||||
etc) and the time of the document is unknown. (Added in 7.5)
|
||||
.TP
|
||||
.B CURLINFO_TOTAL_TIME
|
||||
Pass a pointer to a double to receive the total transaction time in seconds
|
||||
for the previous transfer.
|
||||
.TP
|
||||
.B CURLINFO_NAMELOOKUP_TIME
|
||||
Pass a pointer to a double to receive the time, in seconds, it took from the
|
||||
start until the name resolving was completed.
|
||||
.TP
|
||||
.B CURLINFO_CONNECT_TIME
|
||||
Pass a pointer to a double to receive the time, in seconds, it took from the
|
||||
start until the connect to the remote host (or proxy) was completed.
|
||||
.TP
|
||||
.B CURLINFO_PRETRANSFER_TIME
|
||||
Pass a pointer to a double to receive the time, in seconds, it took from the
|
||||
start until the file transfer is just about to begin. This includes all
|
||||
pre-transfer commands and negotiations that are specific to the particular
|
||||
protocol(s) involved.
|
||||
.TP
|
||||
.B CURLINFO_SIZE_UPLOAD
|
||||
Pass a pointer to a double to receive the total amount of bytes that were
|
||||
uploaded.
|
||||
.TP
|
||||
.B CURLINFO_SIZE_DOWNLOAD
|
||||
Pass a pointer to a double to receive the total amount of bytes that were
|
||||
downloaded.
|
||||
.TP
|
||||
.B CURLINFO_SPEED_DOWNLOAD
|
||||
Pass a pointer to a double to receive the average download speed that curl
|
||||
measured for the complete download.
|
||||
.TP
|
||||
.B CURLINFO_SPEED_UPLOAD
|
||||
Pass a pointer to a double to receive the average upload speed that curl
|
||||
measured for the complete upload.
|
||||
.TP
|
||||
.B CURLINFO_HEADER_SIZE
|
||||
Pass a pointer to a long to receive the total size of all the headers
|
||||
received.
|
||||
.TP
|
||||
.B CURLINFO_REQUEST_SIZE
|
||||
Pass a pointer to a long to receive the total size of the issued
|
||||
requests. This is so far only for HTTP requests. Note that this may be more
|
||||
than one request if FOLLOWLOCATION is true.
|
||||
.TP
|
||||
.B CURLINFO_SSL_VERIFYRESULT
|
||||
Pass a pointer to a long to receive the result of the certification
|
||||
verification that was requested (using the CURLOPT_SSL_VERIFYPEER option to
|
||||
curl_easy_setopt). (Added in 7.4.2)
|
||||
.TP
|
||||
.B CURLINFO_CONTENT_LENGTH_DOWNLOAD
|
||||
Pass a pointer to a double to receive the content-length of the download. This
|
||||
is the value read from the Content-Length: field. (Added in 7.6.1)
|
||||
.TP
|
||||
.B CURLINFO_CONTENT_LENGTH_UPLOAD
|
||||
Pass a pointer to a double to receive the specified size of the upload.
|
||||
(Added in 7.6.1)
|
||||
.PP
|
||||
|
||||
.SH RETURN VALUE
|
||||
If the operation was successful, CURLE_OK is returned. Otherwise an
|
||||
appropriate error code will be returned.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_setopt "(3)"
|
||||
.SH BUGS
|
||||
Surely there are some, you tell me!
|
34
docs/curl_easy_init.3
Normal file
34
docs/curl_easy_init.3
Normal file
@ -0,0 +1,34 @@
|
||||
.\" You can view this file with:
|
||||
.\" nroff -man [file]
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH curl_easy_init 3 "14 August 2001" "libcurl 7.8.1" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_easy_init - Start a libcurl session
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "CURL *curl_easy_init( );"
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
This function must be the first function to call, and it returns a CURL handle
|
||||
that you shall use as input to the other easy-functions. The init calls
|
||||
intializes curl and this call MUST have a corresponding call to
|
||||
.I curl_easy_cleanup
|
||||
when the operation is complete.
|
||||
|
||||
On win32 systems, if you want to init the winsock stuff manually, libcurl will
|
||||
not do that for you. WSAStartup() and WSACleanup() should then be called
|
||||
accordingly. If you want libcurl to handle this, use the CURL_GLOBAL_WIN32
|
||||
flag in the initial curl_global_init() call.
|
||||
|
||||
Using libcurl 7.7 and later, you should perform all your sequential file
|
||||
transfers using the same curl handle. This enables libcurl to use persistant
|
||||
connections where possible.
|
||||
.SH RETURN VALUE
|
||||
If this function returns NULL, something went wrong and you cannot use the
|
||||
other curl functions.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_cleanup "(3), " curl_global_init "(3)
|
||||
.SH BUGS
|
||||
Surely there are some, you tell me!
|
46
docs/curl_easy_perform.3
Normal file
46
docs/curl_easy_perform.3
Normal file
@ -0,0 +1,46 @@
|
||||
.\" You can view this file with:
|
||||
.\" nroff -man [file]
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH curl_easy_perform 3 "5 Mar 2001" "libcurl 7.7" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_easy_perform - Perform a file transfer
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "CURLcode curl_easy_perform(CURL *" handle ");
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
This function is called after the init and all the curl_easy_setopt() calls
|
||||
are made, and will perform the transfer as described in the options.
|
||||
It must be called with the same
|
||||
.I handle
|
||||
as input as the curl_easy_init call returned.
|
||||
|
||||
libcurl version 7.7 or later (for older versions see below): You can do any
|
||||
amount of calls to curl_easy_perform() while using the same handle. If you
|
||||
intend to transfer more than one file, you are even encouraged to do
|
||||
so. libcurl will then attempt to re-use the same connection for the following
|
||||
transfers, thus making the operations faster, less CPU intense and using less
|
||||
network resources. Just note that you will have to use
|
||||
.I curl_easy_setopt
|
||||
between the invokes to set options for the following curl_easy_perform.
|
||||
|
||||
You must never call this function simultaneously from two places using the
|
||||
same handle. Let the function return first before invoking it another time. If
|
||||
you want parallel transfers, you must use several curl handles.
|
||||
|
||||
Before libcurl version 7.7: You are only allowed to call this function once
|
||||
using the same handle. If you want to do repeated calls, you must call
|
||||
curl_easy_cleanup and curl_easy_init again first.
|
||||
.SH RETURN VALUE
|
||||
0 means everything was ok, non-zero means an error occurred as
|
||||
.I <curl/curl.h>
|
||||
defines. If the CURLOPT_ERRORBUFFER was set with
|
||||
.I curl_easy_setopt
|
||||
there will be a readable error message in the error buffer when non-zero is
|
||||
returned.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_init "(3), " curl_easy_setopt "(3), "
|
||||
.SH BUGS
|
||||
Surely there are some, you tell me!
|
544
docs/curl_easy_setopt.3
Normal file
544
docs/curl_easy_setopt.3
Normal file
@ -0,0 +1,544 @@
|
||||
.\" You can view this file with:
|
||||
.\" nroff -man [file]
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH curl_easy_setopt 3 "12 Sep 2001" "libcurl 7.9" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_easy_setopt - Set curl easy-session options
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "CURLcode curl_easy_setopt(CURL *" handle ", CURLoption "option ", ...);"
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
curl_easy_setopt() is called to tell libcurl how to behave in a number of
|
||||
ways. Most operations in libcurl have default actions, and by using the
|
||||
appropriate options you can make them behave differently (as documented). All
|
||||
options are set with the
|
||||
.I option
|
||||
followed by a parameter. That parameter can be a long, a function pointer or
|
||||
an object pointer, all depending on what the option in question expects. Read
|
||||
this manual carefully as bad input values may cause libcurl to behave badly!
|
||||
You can only set one option in each function call. A typical application uses
|
||||
many curl_easy_setopt() calls in the setup phase.
|
||||
|
||||
NOTE: strings passed to libcurl as 'char *' arguments, will not be copied by
|
||||
the library. Instead you should keep them available until libcurl no longer
|
||||
needs them. Failing to do so will cause very odd behaviour or even crashes.
|
||||
|
||||
More note: the options set with this function call are valid for the
|
||||
forthcoming data transfers that are performed when you invoke
|
||||
.I curl_easy_perform .
|
||||
The options are not in any way reset between transfers, so if you want
|
||||
subsequent transfers with different options, you must change them between the
|
||||
transfers.
|
||||
|
||||
The
|
||||
.I "handle"
|
||||
is the return code from the
|
||||
.I "curl_easy_init"
|
||||
call.
|
||||
.SH OPTIONS
|
||||
These options are in a bit of random order, but you'll figure it out!
|
||||
.TP 0.8i
|
||||
.B CURLOPT_FILE
|
||||
Data pointer to pass to file write function. Note that if you specify the
|
||||
.I CURLOPT_WRITEFUNCTION
|
||||
, this is the pointer you'll get as input. If you don't use a callback, you
|
||||
must pass a 'FILE *' as libcurl passes it to fwrite() when writing data.
|
||||
|
||||
NOTE: If you're using libcurl as a win32 DLL, you MUST use the
|
||||
\fICURLOPT_WRITEFUNCTION\fP if you set this option.
|
||||
.TP
|
||||
.B CURLOPT_WRITEFUNCTION
|
||||
Function pointer that should match the following prototype:
|
||||
.BI "size_t function( void *ptr, size_t size, size_t nmemb, void *stream);"
|
||||
This function gets called by libcurl as soon as there is received data that
|
||||
needs to be written down. The size of the data pointed to by \fIptr\fP is
|
||||
\fIsize\fP multiplied with \fInmemb\fP. Return the number of bytes actually
|
||||
written or return -1 to signal error to the library (it will cause it to abort
|
||||
the transfer with CURLE_WRITE_ERROR).
|
||||
|
||||
Set the \fIstream\fP argument with the \fBCURLOPT_FILE\fP option.
|
||||
.TP
|
||||
.B CURLOPT_INFILE
|
||||
Data pointer to pass to the file read function. Note that if you specify the
|
||||
\fICURLOPT_READFUNCTION\fP, this is the pointer you'll get as input. If you
|
||||
don't specify a read callback, this must be a valid FILE *.
|
||||
|
||||
NOTE: If you're using libcurl as a win32 DLL, you MUST use a
|
||||
\fICURLOPT_READFUNCTION\fP if you set this option.
|
||||
.TP
|
||||
.B CURLOPT_READFUNCTION
|
||||
Function pointer that should match the following prototype:
|
||||
.BI "size_t function( void *ptr, size_t size, size_t nmemb, void *stream);"
|
||||
This function gets called by libcurl as soon as it needs to read data in order
|
||||
to send it to the peer. The data area pointed at by the pointer \fIptr\fP may
|
||||
be filled with at most \fIsize\fP multiplied with \fInmemb\fP number of
|
||||
bytes. Your function must return the actual number of bytes that you stored in
|
||||
that memory area. Returning -1 will signal an error to the library and cause
|
||||
it to abort the current transfer immediately (with a CURLE_READ_ERROR return
|
||||
code).
|
||||
.TP
|
||||
.B CURLOPT_INFILESIZE
|
||||
When uploading a file to a remote site, this option should be used to tell
|
||||
libcurl what the expected size of the infile is.
|
||||
.TP
|
||||
.B CURLOPT_URL
|
||||
The actual URL to deal with. The parameter should be a char * to a zero
|
||||
terminated string. The string must remain present until curl no longer needs
|
||||
it, as it doesn't copy the string. NOTE: this option is required to be set
|
||||
before curl_easy_perform() is called.
|
||||
.TP
|
||||
.B CURLOPT_PROXY
|
||||
If you need libcurl to use a http proxy to access the outside world, set the
|
||||
proxy string with this option. The parameter should be a char * to a zero
|
||||
terminated string. To specify port number in this string, append :[port] to
|
||||
the end of the host name. The proxy string may be prefixed with
|
||||
[protocol]:// since any such prefix will be ignored.
|
||||
.TP
|
||||
.B CURLOPT_PROXYPORT
|
||||
Set this long with this option to set the proxy port to use unless it is
|
||||
specified in the proxy string CURLOPT_PROXY.
|
||||
.TP
|
||||
.B CURLOPT_HTTPPROXYTUNNEL
|
||||
Set the parameter to non-zero to get the library to tunnel all non-HTTP
|
||||
operations through the given HTTP proxy. Do note that there is a big
|
||||
difference to use a proxy and to tunnel through it. If you don't know what
|
||||
this means, you probably don't want this tunnel option. (Added in libcurl 7.3)
|
||||
.TP
|
||||
.B CURLOPT_VERBOSE
|
||||
Set the parameter to non-zero to get the library to display a lot of verbose
|
||||
information about its operations. Very useful for libcurl and/or protocl
|
||||
debugging and understanding.
|
||||
.TP
|
||||
.B CURLOPT_HEADER
|
||||
A non-zero parameter tells the library to include the header in the
|
||||
output. This is only relevant for protocols that actually has a header
|
||||
preceeding the data (like HTTP).
|
||||
.TP
|
||||
.B CURLOPT_NOPROGRESS
|
||||
A non-zero parameter tells the library to shut of the built-in progress meter
|
||||
completely. (NOTE: future versions of the lib is likely to not have any
|
||||
built-in progress meter at all).
|
||||
.TP
|
||||
.B CURLOPT_NOBODY
|
||||
A non-zero parameter tells the library to not include the body-part in the
|
||||
output. This is only relevant for protocols that have a separate header and
|
||||
body part.
|
||||
.TP
|
||||
.B CURLOPT_FAILONERROR
|
||||
A non-zero parameter tells the library to fail silently if the HTTP code
|
||||
returned is equal or larger than 300. The default action would be to return
|
||||
the page normally, ignoring that code.
|
||||
.TP
|
||||
.B CURLOPT_UPLOAD
|
||||
A non-zero parameter tells the library to prepare for an upload. The
|
||||
CURLOPT_INFILE and CURLOPT_INFILESIZE are also interesting for uploads.
|
||||
.TP
|
||||
.B CURLOPT_POST
|
||||
A non-zero parameter tells the library to do a regular HTTP post. This is a
|
||||
normal application/x-www-form-urlencoded kind, which is the most commonly used
|
||||
one by HTML forms. See the CURLOPT_POSTFIELDS option for how to specify the
|
||||
data to post and CURLOPT_POSTFIELDSIZE in how to set the data size. Starting
|
||||
with libcurl 7.8, this option is obsolete. Using the CURLOPT_POSTFIELDS option
|
||||
will imply this option.
|
||||
.TP
|
||||
.B CURLOPT_FTPLISTONLY
|
||||
A non-zero parameter tells the library to just list the names of an ftp
|
||||
directory, instead of doing a full directory listin that would include file
|
||||
sizes, dates etc.
|
||||
.TP
|
||||
.B CURLOPT_FTPAPPEND
|
||||
A non-zero parameter tells the library to append to the remote file instead of
|
||||
overwrite it. This is only useful when uploading to a ftp site.
|
||||
.TP
|
||||
.B CURLOPT_NETRC
|
||||
A non-zero parameter tells the library to scan your
|
||||
.I ~/.netrc
|
||||
file to find user name and password for the remote site you are about to
|
||||
access. Do note that curl does not verify that the file has the correct
|
||||
properties set (as the standard unix ftp client does), and that only machine
|
||||
name, user name and password is taken into account (init macros and similar
|
||||
things aren't supported).
|
||||
.TP
|
||||
.B CURLOPT_FOLLOWLOCATION
|
||||
A non-zero parameter tells the library to follow any Location: header that the
|
||||
server sends as part of a HTTP header. NOTE that this means that the library
|
||||
will resend the same request on the new location and follow new Location:
|
||||
headers all the way until no more such headers are returned.
|
||||
.TP
|
||||
.B CURLOPT_TRANSFERTEXT
|
||||
A non-zero parameter tells the library to use ASCII mode for ftp transfers,
|
||||
instead of the default binary transfer. For LDAP transfers it gets the data in
|
||||
plain text instead of HTML and for win32 systems it does not set the stdout to
|
||||
binary mode. This option can be useable when transfering text data between
|
||||
system with different views on certain characters, such as newlines or
|
||||
similar.
|
||||
.TP
|
||||
.B CURLOPT_PUT
|
||||
A non-zero parameter tells the library to use HTTP PUT a file. The file to put
|
||||
must be set with CURLOPT_INFILE and CURLOPT_INFILESIZE.
|
||||
.TP
|
||||
.B CURLOPT_USERPWD
|
||||
Pass a char * as parameter, which should be [username]:[password] to use for
|
||||
the connection. If the password is left out, you will be prompted for it.
|
||||
.TP
|
||||
.B CURLOPT_PROXYUSERPWD
|
||||
Pass a char * as parameter, which should be [username]:[password] to use for
|
||||
the connection to the HTTP proxy. If the password is left out, you will be
|
||||
prompted for it.
|
||||
.TP
|
||||
.B CURLOPT_RANGE
|
||||
Pass a char * as parameter, which should contain the specified range you
|
||||
want. It should be in the format "X-Y", where X or Y may be left out. HTTP
|
||||
transfers also support several intervals, separated with commas as in
|
||||
.I "X-Y,N-M"
|
||||
. Using this kind of multiple intervals will cause the HTTP server to send the
|
||||
response document in pieces.
|
||||
.TP
|
||||
.B CURLOPT_ERRORBUFFER
|
||||
Pass a char * to a buffer that the libcurl may store human readable error
|
||||
messages in. This may be more helpful than just the return code from the
|
||||
library. The buffer must be at least CURL_ERROR_SIZE big.
|
||||
.TP
|
||||
.B CURLOPT_TIMEOUT
|
||||
Pass a long as parameter containing the maximum time in seconds that you allow
|
||||
the libcurl transfer operation to take. Normally, name lookups can take a
|
||||
considerable time and limiting operations to less than a few minutes risk
|
||||
aborting perfectly normal operations. This option will cause curl to use the
|
||||
SIGALRM to enable timeouting system calls.
|
||||
.B NOTE
|
||||
that this does not work in multi-threaded programs!
|
||||
.TP
|
||||
.B CURLOPT_POSTFIELDS
|
||||
Pass a char * as parameter, which should be the full data to post in a HTTP
|
||||
post operation. See also the CURLOPT_POST. Since 7.8, using CURLOPT_POSTFIELDS
|
||||
implies CURLOPT_POST.
|
||||
.TP
|
||||
.B CURLOPT_POSTFIELDSIZE
|
||||
If you want to post data to the server without letting libcurl do a strlen()
|
||||
to measure the data size, this option must be used. Also, when this option is
|
||||
used, you can post fully binary data which otherwise is likely to fail. If
|
||||
this size is set to zero, the library will use strlen() to get the data
|
||||
size. (Added in libcurl 7.2)
|
||||
.TP
|
||||
.B CURLOPT_REFERER
|
||||
Pass a pointer to a zero terminated string as parameter. It will be used to
|
||||
set the referer: header in the http request sent to the remote server. This
|
||||
can be used to fool servers or scripts.
|
||||
.TP
|
||||
.B CURLOPT_USERAGENT
|
||||
Pass a pointer to a zero terminated string as parameter. It will be used to
|
||||
set the user-agent: header in the http request sent to the remote server. This
|
||||
can be used to fool servers or scripts.
|
||||
.TP
|
||||
.B CURLOPT_FTPPORT
|
||||
Pass a pointer to a zero terminated string as parameter. It will be used to
|
||||
get the IP address to use for the ftp PORT instruction. The PORT instruction
|
||||
tells the remote server to connect to our specified IP address. The string may
|
||||
be a plain IP address, a host name, an network interface name (under unix) or
|
||||
just a '-' letter to let the library use your systems default IP address.
|
||||
.TP
|
||||
.B CURLOPT_LOW_SPEED_LIMIT
|
||||
Pass a long as parameter. It contains the transfer speed in bytes per second
|
||||
that the transfer should be below during CURLOPT_LOW_SPEED_TIME seconds for
|
||||
the library to consider it too slow and abort.
|
||||
.TP
|
||||
.B CURLOPT_LOW_SPEED_TIME
|
||||
Pass a long as parameter. It contains the time in seconds that the transfer
|
||||
should be below the CURLOPT_LOW_SPEED_LIMIT for the library to consider it too
|
||||
slow and abort.
|
||||
.TP
|
||||
.B CURLOPT_RESUME_FROM
|
||||
Pass a long as parameter. It contains the offset in number of bytes that you
|
||||
want the transfer to start from.
|
||||
.TP
|
||||
.B CURLOPT_COOKIE
|
||||
Pass a pointer to a zero terminated string as parameter. It will be used to
|
||||
set a cookie in the http request. The format of the string should be
|
||||
[NAME]=[CONTENTS]; Where NAME is the cookie name.
|
||||
.TP
|
||||
.B CURLOPT_HTTPHEADER
|
||||
Pass a pointer to a linked list of HTTP headers to pass to the server in your
|
||||
HTTP request. The linked list should be a fully valid list of 'struct
|
||||
curl_slist' structs properly filled in. Use
|
||||
.I curl_slist_append(3)
|
||||
to create the list and
|
||||
.I curl_slist_free_all(3)
|
||||
to clean up an entire list. If you add a header that is otherwise generated
|
||||
and used by libcurl internally, your added one will be used instead. If you
|
||||
add a header with no contents as in 'Accept:', the internally used header will
|
||||
just get disabled. Thus, using this option you can add new headers, replace
|
||||
internal headers and remove internal headers.
|
||||
.TP
|
||||
.B CURLOPT_HTTPPOST
|
||||
Tells libcurl you want a multipart/formdata HTTP POST to be made and you
|
||||
instruct what data to pass on to the server. Pass a pointer to a linked list
|
||||
of HTTP post structs as parameter. The linked list should be a fully valid
|
||||
list of 'struct HttpPost' structs properly filled in. The best and most
|
||||
elegant way to do this, is to use
|
||||
.I curl_formadd(3)
|
||||
as documented. The data in this list must remained intact until you close this
|
||||
curl handle again with curl_easy_cleanup().
|
||||
.TP
|
||||
.B CURLOPT_SSLCERT
|
||||
Pass a pointer to a zero terminated string as parameter. The string should be
|
||||
the file name of your certficicate in PEM format.
|
||||
.TP
|
||||
.B CURLOPT_SSLCERTPASSWD
|
||||
Pass a pointer to a zero terminated string as parameter. It will be used as
|
||||
the password required to use the CURLOPT_SSLCERT certificate. If the password
|
||||
is not supplied, you will be prompted for it.
|
||||
.TP
|
||||
.B CURLOPT_CRLF
|
||||
Convert unix newlines to CRLF newlines on FTP uploads.
|
||||
.TP
|
||||
.B CURLOPT_QUOTE
|
||||
Pass a pointer to a linked list of FTP commands to pass to the server prior to
|
||||
your ftp request. The linked list should be a fully valid list of 'struct
|
||||
curl_slist' structs properly filled in. Use
|
||||
.I curl_slist_append(3)
|
||||
to append strings (commands) to the list, and clear the entire list afterwards
|
||||
with
|
||||
.I curl_slist_free_all(3)
|
||||
.TP
|
||||
.B CURLOPT_POSTQUOTE
|
||||
Pass a pointer to a linked list of FTP commands to pass to the server after
|
||||
your ftp transfer request. The linked list should be a fully valid list of
|
||||
struct curl_slist structs properly filled in as described for
|
||||
.I "CURLOPT_QUOTE"
|
||||
.TP
|
||||
.B CURLOPT_WRITEHEADER
|
||||
Pass a pointer to be used to write the header part of the received data to. If
|
||||
you don't use a callback to take care of the writing, this must be a FILE
|
||||
*. The headers are guaranteed to be written one-by-one and only complete lines
|
||||
are written. Parsing headers should be easy enough using this. See also the
|
||||
\fICURLOPT_HEADERFUNCTION\fP option.
|
||||
.TP
|
||||
.B CURLOPT_HEADERFUNCTION
|
||||
Function pointer that should match the following prototype:
|
||||
.BI "size_t function( void *ptr, size_t size, size_t nmemb, void *stream);"
|
||||
This function gets called by libcurl as soon as there is received header data
|
||||
that needs to be written down. The function will be called once for each
|
||||
header with a complete header line in each invoke. The size of the data
|
||||
pointed to by
|
||||
.I ptr
|
||||
is
|
||||
.I size
|
||||
multiplied with
|
||||
.I nmemb.
|
||||
The pointer named
|
||||
.I stream
|
||||
will be the one you passed to libcurl with the
|
||||
.I CURLOPT_WRITEHEADER
|
||||
option.
|
||||
Return the number of bytes actually written or return -1 to signal error to
|
||||
the library (it will cause it to abort the transfer with a
|
||||
.I CURLE_WRITE_ERROR
|
||||
return code). (Added in libcurl 7.7.2)
|
||||
.TP
|
||||
.B CURLOPT_COOKIEFILE
|
||||
Pass a pointer to a zero terminated string as parameter. It should contain the
|
||||
name of your file holding cookie data. The cookie data may be in Netscape /
|
||||
Mozilla cookie data format or just regular HTTP-style headers dumped to a
|
||||
file.
|
||||
.TP
|
||||
.B CURLOPT_SSLVERSION
|
||||
Pass a long as parameter. Set what version of SSL to attempt to use, 2 or
|
||||
3. By default, the SSL library will try to solve this by itself although some
|
||||
servers make this difficult why you at times will have to use this option.
|
||||
.TP
|
||||
.B CURLOPT_TIMECONDITION
|
||||
Pass a long as parameter. This defines how the CURLOPT_TIMEVALUE time value is
|
||||
treated. You can set this parameter to TIMECOND_IFMODSINCE or
|
||||
TIMECOND_IFUNMODSINCE. This is aa HTTP-only feature. (TBD)
|
||||
.TP
|
||||
.B CURLOPT_TIMEVALUE
|
||||
Pass a long as parameter. This should be the time in seconds since 1 jan 1970,
|
||||
and the time will be used as specified in CURLOPT_TIMECONDITION or if that
|
||||
isn't used, it will be TIMECOND_IFMODSINCE by default.
|
||||
.TP
|
||||
.B CURLOPT_CUSTOMREQUEST
|
||||
Pass a pointer to a zero terminated string as parameter. It will be user
|
||||
instead of GET or HEAD when doing the HTTP request. This is useful for doing
|
||||
DELETE or other more obscure HTTP requests. Don't do this at will, make sure
|
||||
your server supports the command first.
|
||||
.TP
|
||||
.B CURLOPT_STDERR
|
||||
Pass a FILE * as parameter. This is the stream to use instead of stderr
|
||||
internally when reporting errors.
|
||||
.TP
|
||||
.B CURLOPT_INTERFACE
|
||||
Pass a char * as parameter. This set the interface name to use as outgoing
|
||||
network interface. The name can be an interface name, an IP address or a host
|
||||
name. (Added in libcurl 7.3)
|
||||
.TP
|
||||
.B CURLOPT_KRB4LEVEL
|
||||
Pass a char * as parameter. Set the krb4 security level, this also enables
|
||||
krb4 awareness. This is a string, 'clear', 'safe', 'confidential' or
|
||||
\&'private'. If the string is set but doesn't match one of these, 'private'
|
||||
will be used. Set the string to NULL to disable kerberos4. The kerberos
|
||||
support only works for FTP. (Added in libcurl 7.3)
|
||||
.TP
|
||||
.B CURLOPT_WRITEINFO
|
||||
(NOT PRESENT IN 7.4 or later!)
|
||||
Pass a pointer to a zero terminated string as parameter. It will be used to
|
||||
report information after a successful request. This string may contain
|
||||
variables that will be substituted by their contents when output. Described
|
||||
elsewhere.
|
||||
.TP
|
||||
.B CURLOPT_PROGRESSFUNCTION
|
||||
Function pointer that should match the
|
||||
.BI curl_progress_callback
|
||||
prototype found in
|
||||
.I <curl/curl.h>
|
||||
This function gets called by libcurl instead of its internal
|
||||
equivalent. Unknown/unused argument values will be set to zero (like if you
|
||||
only download data, the upload size will remain 0). Returning a non-zero value
|
||||
from this callback will cause libcurl to abort the transfer and return
|
||||
CURLE_ABORTED_BY_CALLBACK.
|
||||
.TP
|
||||
.B CURLOPT_PROGRESSDATA
|
||||
Pass a pointer that will be untouched by libcurl and passed as the first
|
||||
argument in the progress callback set with
|
||||
.I CURLOPT_PROGRESSFUNCTION
|
||||
.
|
||||
.TP
|
||||
.B CURLOPT_SSL_VERIFYPEER
|
||||
Pass a long that is set to a non-zero value to make curl verify the peer's
|
||||
certificate. The certificate to verify against must be specified with the
|
||||
CURLOPT_CAINFO option. (Added in 7.4.2)
|
||||
.TP
|
||||
.B CURLOPT_CAINFO
|
||||
Pass a char * to a zero terminated file naming holding the certificate to
|
||||
verify the peer with. This only makes sense when used in combination with the
|
||||
CURLOPT_SSL_VERIFYPEER option. (Added in 7.4.2)
|
||||
.TP
|
||||
.B CURLOPT_PASSWDFUNCTION
|
||||
Pass a pointer to a curl_passwd_callback function that will then be called
|
||||
instead of the internal one if libcurl requests a password. The function must
|
||||
match this prototype:
|
||||
.BI "int my_getpass(void *client, char *prompt, char* buffer, int buflen );"
|
||||
If set to NULL, it equals to making the function always fail. If the function
|
||||
returns a non-zero value, it will abort the operation and an error
|
||||
(CURLE_BAD_PASSWORD_ENTERED) will be returned.
|
||||
.I client
|
||||
is a generic pointer, see CURLOPT_PASSWDDATA.
|
||||
.I prompt
|
||||
is a zero-terminated string that is text that prefixes the input request.
|
||||
.I buffer
|
||||
is a pointer to data where the entered password should be stored and
|
||||
.I buflen
|
||||
is the maximum number of bytes that may be written in the buffer.
|
||||
(Added in 7.4.2)
|
||||
.TP
|
||||
.B CURLOPT_PASSWDDATA
|
||||
Pass a void * to whatever data you want. The passed pointer will be the first
|
||||
argument sent to the specifed CURLOPT_PASSWDFUNCTION function. (Added in
|
||||
7.4.2)
|
||||
.TP
|
||||
.B CURLOPT_FILETIME
|
||||
Pass a long. If it is a non-zero value, libcurl will attempt to get the
|
||||
modification date of the remote document in this operation. This requires that
|
||||
the remote server sends the time or replies to a time querying command. The
|
||||
curl_easy_getinfo() function with the CURLINFO_FILETIME argument can be used
|
||||
after a transfer to extract the received time (if any). (Added in 7.5)
|
||||
.TP
|
||||
.B CURLOPT_MAXREDIRS
|
||||
Pass a long. The set number will be the redirection limit. If that many
|
||||
redirections have been followed, the next redirect will cause an error. This
|
||||
option only makes sense if the CURLOPT_FOLLOWLOCATION is used at the same
|
||||
time. (Added in 7.5)
|
||||
.TP
|
||||
.B CURLOPT_MAXCONNECTS
|
||||
Pass a long. The set number will be the persistant connection cache size. The
|
||||
set amount will be the maximum amount of simultaneous connections that libcurl
|
||||
may cache between file transfers. Default is 5, and there isn't much point in
|
||||
changing this value unless you are perfectly aware of how this work and
|
||||
changes libcurl's behaviour. Note: if you have already performed transfers
|
||||
with this curl handle, setting a smaller MAXCONNECTS than before may cause
|
||||
open connections to unnecessarily get closed. (Added in 7.7)
|
||||
.TP
|
||||
.B CURLOPT_CLOSEPOLICY
|
||||
Pass a long. This option sets what policy libcurl should use when the
|
||||
connection cache is filled and one of the open connections has to be closed to
|
||||
make room for a new connection. This must be one of the CURLCLOSEPOLICY_*
|
||||
defines. Use CURLCLOSEPOLICY_LEAST_RECENTLY_USED to make libcurl close the
|
||||
connection that was least recently used, that connection is also least likely
|
||||
to be capable of re-use. Use CURLCLOSEPOLICY_OLDEST to make libcurl close the
|
||||
oldest connection, the one that was created first among the ones in the
|
||||
connection cache. The other close policies are not support yet. (Added in 7.7)
|
||||
.TP
|
||||
.B CURLOPT_FRESH_CONNECT
|
||||
Pass a long. Set to non-zero to make the next transfer use a new connection by
|
||||
force. If the connection cache is full before this connection, one of the
|
||||
existinf connections will be closed as according to the set policy. This
|
||||
option should be used with caution and only if you understand what it
|
||||
does. Set to 0 to have libcurl attempt re-use of an existing connection.
|
||||
(Added in 7.7)
|
||||
.TP
|
||||
.B CURLOPT_FORBID_REUSE
|
||||
Pass a long. Set to non-zero to make the next transfer explicitly close the
|
||||
connection when done. Normally, libcurl keep all connections alive when done
|
||||
with one transfer in case there comes a succeeding one that can re-use them.
|
||||
This option should be used with caution and only if you understand what it
|
||||
does. Set to 0 to have libcurl keep the connection open for possibly later
|
||||
re-use. (Added in 7.7)
|
||||
.TP
|
||||
.B 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 will the SSL connection become.
|
||||
.TP
|
||||
.B 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.
|
||||
.TP
|
||||
.B CURLOPT_CONNECTTIMEOUT
|
||||
Pass a long. It should contain the maximum time in seconds that you allow the
|
||||
connection to the server to take. This only limits the connection phase, once
|
||||
it has connected, this option is of no more use. Set to zero to disable
|
||||
connection timeout (it will then only timeout on the system's internal
|
||||
timeouts). See also the
|
||||
.I CURLOPT_TIMEOUT
|
||||
option.
|
||||
.B NOTE
|
||||
that this does not work in multi-threaded programs!
|
||||
.TP
|
||||
.B CURLOPT_HTTPGET
|
||||
Pass a long. If the long is non-zero, this forces the HTTP request to get back
|
||||
to GET. Only really usable if POST, PUT or a custom request have been used
|
||||
previously using the same curl handle. (Added in 7.8.1)
|
||||
.TP
|
||||
.B CURLOPT_SSL_VERIFYHOST
|
||||
Pass a long. Set if we should verify the Common name from the peer certificate
|
||||
in the SSL handshake, set 1 to check existence, 2 to ensure that it matches
|
||||
the provided hostname. (Added in 7.8.1)
|
||||
.TP
|
||||
.B CURLOPT_COOKIEJAR
|
||||
Pass a file name as char *, zero terminated. This will make libcurl dump all
|
||||
internally known cookies to the specified file when curl_easy_cleanup() is
|
||||
called. If no cookies are known, no file will be created. Specify "-" to
|
||||
instead have the cookies written to stdout.
|
||||
.TP
|
||||
.B CURLOPT_SSL_CIPHER_LIST
|
||||
Pass a char *, pointing to a zero terminated string holding the list of
|
||||
ciphers to use for the SSL connection. The list must be syntactly correct, it
|
||||
consists of one or more cipher strings separated by colons. Commas or spaces
|
||||
are also acceptable separators but colons are normally used, \!, \- and \+ can
|
||||
be used as operators. Valid examples of cipher lists include 'RC4-SHA',
|
||||
\'SHA1+DES\', 'TLSv1' and 'DEFAULT'. The default list is normally set when you
|
||||
compile OpenSSL.
|
||||
|
||||
You'll find all details about cipher lists on this URL:
|
||||
.I http://www.openssl.org/docs/apps/ciphers.html
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
0 means the option was set properly, non-zero means an error as
|
||||
.I <curl/curl.h>
|
||||
defines
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_init "(3), " curl_easy_cleanup "(3), "
|
||||
.SH BUGS
|
||||
Surely there are some, you tell me!
|
28
docs/curl_escape.3
Normal file
28
docs/curl_escape.3
Normal file
@ -0,0 +1,28 @@
|
||||
.\" You can view this file with:
|
||||
.\" nroff -man [file]
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH curl_escape 3 "22 March 2001" "libcurl 7.7" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_escape - URL encodes the given string
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "char *curl_escape( char *" url ", int "length " );"
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
This function will convert the given input string to an URL encoded string and
|
||||
return that as a new allocated string. All input characters that are not a-z,
|
||||
A-Z or 0-9 will be converted to their "URL escaped" version. If a sequence of
|
||||
%NN (where NN is a two-digit hexadecimal number) is found in the string to
|
||||
encode, that 3-letter combination will be copied to the output unmodifed,
|
||||
assuming that it is an already encoded piece of data.
|
||||
|
||||
If the 'length' argument is set to 0, curl_escape() will use strlen() on the
|
||||
input 'url' string to find out the size.
|
||||
|
||||
You must free() the returned string when you're done with it.
|
||||
.SH RETURN VALUE
|
||||
A pointer to a zero terminated string or NULL if it failed.
|
||||
.SH "SEE ALSO"
|
||||
.I curl_unescape(), RFC 2396
|
121
docs/curl_formadd.3
Normal file
121
docs/curl_formadd.3
Normal file
@ -0,0 +1,121 @@
|
||||
.\" You can view this file with:
|
||||
.\" nroff -man [file]
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH curl_formadd 3 "27 August 2001" "libcurl 7.9" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_formadd - add a section to a multipart/formdata HTTP POST
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "CURLcode curl_formadd(struct HttpPost ** " firstitem,
|
||||
.BI "struct HttpPost ** " lastitem, " ...);"
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
curl_formadd() is used to append sections when building a multipart/formdata
|
||||
HTTP POST (sometimes refered to as rfc1867-style posts). Append one section at
|
||||
a time until you've added all the sections you want included and then you pass
|
||||
the \fIfirstitem\fP pointer as parameter to \fBCURLOPT_HTTPPOST\fP.
|
||||
\fIlastitem\fP is set after each call and on repeated invokes it should be
|
||||
left as set to allow repeated invokes to find the end of the list in a faster
|
||||
way.
|
||||
|
||||
After \fIlastitem\fP follow the real arguments that constitute the
|
||||
new section (if the following description confuses you jump directly
|
||||
to the examples):
|
||||
|
||||
CURLFORM_COPYNAME or CURLFORM_PTRNAME followed by a string is used for
|
||||
the name of the section. Optionally one may use CURLFORM_NAMELENGTH to
|
||||
specify the length of the name (allowing null characters within the name).
|
||||
|
||||
The three options for providing values are: CURLFORM_COPYCONTENTS,
|
||||
CURLFORM_PTRCONTENTS, or CURLFORM_FILE, followed by a char or void
|
||||
pointer (allowed for PTRCONTENTS).
|
||||
|
||||
Other arguments may be CURLFORM_CONTENTTYPE if the
|
||||
user wishes to specify one (for FILE if no type is given the library
|
||||
tries to provide the correct one; for CONTENTS no Content-Type is sent
|
||||
in this case)
|
||||
|
||||
For CURLFORM_PTRCONTENTS or CURLFORM_COPYNAME the user may also add
|
||||
CURLFORM_CONTENTSLENGTH followed by the length as a long (if not given
|
||||
the library will use strlen to determine the length).
|
||||
|
||||
For CURLFORM_FILE the user may send multiple files in one section by
|
||||
providing multiple CURLFORM_FILE arguments each followed by the filename
|
||||
(and each FILE is allowed to have a CONTENTTYPE).
|
||||
|
||||
The last argument always is CURLFORM_END.
|
||||
|
||||
The pointers \fI*firstitem\fP and \fI*lastitem\fP should both be pointing to
|
||||
NULL in the first call to this function. All list-data will be allocated by
|
||||
the function itself. You must call \fIcurl_formfree\fP after the form post has
|
||||
been done to free the resources again.
|
||||
|
||||
This function will copy all input data except the data pointed to by
|
||||
the arguments after CURLFORM_PTRNAME and CURLFORM_PTRCONTENTS and keep
|
||||
its own version of it allocated until you call \fIcurl_formfree\fP. When
|
||||
you've passed the pointer to \fIcurl_easy_setopt\fP, you must not free
|
||||
the list until after you've called \fIcurl_easy_cleanup\fP for the
|
||||
curl handle. If you provide a pointer as an arguments after
|
||||
CURLFORM_PTRNAME or CURLFORM_PTRCONTENTS you must ensure that the pointer
|
||||
stays valid until you call \fIcurl_form_free\fP and \fIcurl_easy_cleanup\fP.
|
||||
|
||||
See example below.
|
||||
.SH RETURN VALUE
|
||||
Returns non-zero if an error occurs.
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
|
||||
HttpPost* post = NULL;
|
||||
HttpPost* last = NULL;
|
||||
char namebuffer[] = "name buffer";
|
||||
long namelength = strlen(namebuffer);
|
||||
char buffer[] = "test buffer";
|
||||
char htmlbuffer[] = "<HTML>test buffer</HTML>";
|
||||
long htmlbufferlength = strlen(htmlbuffer);
|
||||
/* add null character into htmlbuffer, to demonstrate that
|
||||
transfers of buffers containing null characters actually work
|
||||
*/
|
||||
htmlbuffer[8] = '\\0';
|
||||
|
||||
/* Add simple name/content section */
|
||||
curl_formadd(&post, &last, CURLFORM_COPYNAME, "name",
|
||||
CURLFORM_COPYCONTENTS, "content", CURLFORM_END);
|
||||
/* Add simple name/content/contenttype section */
|
||||
curl_formadd(&post, &last, CURLFORM_COPYNAME, "htmlcode",
|
||||
CURLFORM_COPYCONTENTS, "<HTML></HTML>",
|
||||
CURLFORM_CONTENTTYPE, "text/html", CURLFORM_END);
|
||||
/* Add name/ptrcontent section */
|
||||
curl_formadd(&post, &last, CURLFORM_COPYNAME, "name_for_ptrcontent",
|
||||
CURLFORM_PTRCONTENTS, buffer, CURLFORM_END);
|
||||
/* Add ptrname/ptrcontent section */
|
||||
curl_formadd(&post, &last, CURLFORM_PTRNAME, namebuffer,
|
||||
CURLFORM_PTRCONTENTS, buffer, CURLFORM_NAMELENGTH,
|
||||
namelength, CURLFORM_END);
|
||||
/* Add name/ptrcontent/contenttype section */
|
||||
curl_formadd(&post, &last, CURLFORM_COPYNAME, "html_code_with_hole",
|
||||
CURLFORM_PTRCONTENTS, htmlbuffer,
|
||||
CURLFORM_CONTENTSLENGTH, htmlbufferlength,
|
||||
CURLFORM_CONTENTTYPE, "text/html", CURLFORM_END);
|
||||
/* Add simple file section */
|
||||
curl_formadd(&post, &last, CURLFORM_COPYNAME, "picture",
|
||||
CURLFORM_FILE, "my-face.jpg", CURLFORM_END);
|
||||
/* Add file/contenttype section */
|
||||
curl_formadd(&post, &last, CURLFORM_COPYNAME, "picture",
|
||||
CURLFORM_FILE, "my-face.jpg",
|
||||
CURLFORM_CONTENTTYPE, "image/jpeg", CURLFORM_END);
|
||||
/* Add two file section */
|
||||
curl_formadd(&post, &last, CURLFORM_COPYNAME, "pictures",
|
||||
CURLFORM_FILE, "my-face.jpg",
|
||||
CURLFORM_FILE, "your-face.jpg", CURLFORM_END);
|
||||
/* Set the form info */
|
||||
curl_easy_setopt(curl, CURLOPT_HTTPPOST, post);
|
||||
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_setopt "(3), "
|
||||
.BR curl_formparse "(3) [deprecated], "
|
||||
.BR curl_formfree "(3)
|
||||
.SH BUGS
|
||||
Surely there are some, you tell me!
|
||||
|
27
docs/curl_formfree.3
Normal file
27
docs/curl_formfree.3
Normal file
@ -0,0 +1,27 @@
|
||||
.\" You can view this file with:
|
||||
.\" nroff -man [file]
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH curl_formfree 3 "6 April 2001" "libcurl 7.7.1" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_formfree - free a previously build multipart/formdata HTTP POST chain
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "void curl_formfree(struct HttpPost *" form);
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
curl_formfree() is used to clean up data previously built/appended with
|
||||
curl_formadd()/curl_formparse(). This must be called when the data has
|
||||
been used, which typically means after the curl_easy_perform() has
|
||||
been called.
|
||||
.SH RETURN VALUE
|
||||
None
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_formparse "(3) [deprecated], "
|
||||
.BR curl_formadd "(3) "
|
||||
.SH BUGS
|
||||
libcurl 7.7.1 and earlier versions does not allow a NULL pointer to be used as
|
||||
argument.
|
||||
|
||||
|
87
docs/curl_formparse.3
Normal file
87
docs/curl_formparse.3
Normal file
@ -0,0 +1,87 @@
|
||||
.\" You can view this file with:
|
||||
.\" nroff -man [file]
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH curl_formparse 3 "21 May 2001" "libcurl 7.7.4" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_formparse - add a section to a multipart/formdata HTTP POST:
|
||||
deprecated (use curl_formadd instead)
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "CURLcode curl_formparse(char * " string, " struct HttpPost ** " firstitem,
|
||||
.BI "struct HttpPost ** " lastitem ");"
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
curl_formparse() is used to append sections when building a multipart/formdata
|
||||
HTTP POST (sometimes refered to as rfc1867-style posts). Append one section at
|
||||
a time until you've added all the sections you want included and then you pass
|
||||
the \fIfirstitem\fP pointer as parameter to \fBCURLOPT_HTTPPOST\fP.
|
||||
\fIlastitem\fP is set after each call and on repeated invokes it should be
|
||||
left as set to allow repeated invokes to find the end of the list in a faster
|
||||
way. \fIstring\fP must be a zero terminated string abiding to the syntax
|
||||
described in a section below
|
||||
|
||||
The pointers \fI*firstitem\fP and \fI*lastitem\fP should both be pointing to
|
||||
NULL in the first call to this function. All list-data will be allocated by
|
||||
the function itself. You must call \fIcurl_formfree\fP after the form post has
|
||||
been done to free the resources again.
|
||||
|
||||
This function will copy all input data and keep its own version of it
|
||||
allocated until you call \fIcurl_formfree\fP. When you've passed the pointer
|
||||
to \fIcurl_easy_setopt\fP, you must not free the list until after you've
|
||||
called \fIcurl_easy_cleanup\fP for the curl handle.
|
||||
|
||||
See example below.
|
||||
.SH "FORM PARSE STRINGS"
|
||||
The
|
||||
.I string
|
||||
parameter must be using one of the following patterns. Note that the []
|
||||
letters should not be included in the real-life string.
|
||||
.TP 0.8i
|
||||
.B [name]=[contents]
|
||||
Add a form field named 'name' with the contents 'contents'. This is the
|
||||
typcial contents of the HTML tag <input type=text>.
|
||||
.TP
|
||||
.B [name]=@[filename]
|
||||
Add a form field named 'name' with the contents as read from the local file
|
||||
named 'filename'. This is the typcial contents of the HTML tag <input
|
||||
type=file>.
|
||||
.TP
|
||||
.B [name]=@[filename1,filename2,...]
|
||||
Add a form field named 'name' with the contents as read from the local files
|
||||
named 'filename1' and 'filename2'. This is identical to the upper, except that
|
||||
you get the contents of several files in one section.
|
||||
.TP
|
||||
.B [name]=@[filename];[type=<content-type>]
|
||||
Whenever you specify a file to read from, you can optionally specify the
|
||||
content-type as well. The content-type is passed to the server together with
|
||||
the contents of the file. curl_formparse() will guess content-type for a
|
||||
number of well-known extensions and otherwise it will set it to binary. You
|
||||
can override the internal decision by using this option.
|
||||
.TP
|
||||
.B [name]=@[filename1,filename2,...];[type=<content-type>]
|
||||
When you specify several files to read the contents from, you can set the
|
||||
content-type for all of them in the same way as with a single file.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
Returns non-zero if an error occurs.
|
||||
.SH EXAMPLE
|
||||
|
||||
HttpPost* post = NULL;
|
||||
HttpPost* last = NULL;
|
||||
|
||||
/* Add an image section */
|
||||
curl_formparse("picture=@my-face.jpg", &post, &last);
|
||||
/* Add a normal text section */
|
||||
curl_formparse("name=FooBar", &post, &last);
|
||||
/* Set the form info */
|
||||
curl_easy_setopt(curl, CURLOPT_HTTPPOST, post);
|
||||
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_setopt "(3), "
|
||||
.BR curl_formadd "(3), "
|
||||
.BR curl_formfree "(3)
|
||||
.SH BUGS
|
||||
Surely there are some, you tell me!
|
||||
|
80
docs/curl_getdate.3
Normal file
80
docs/curl_getdate.3
Normal file
@ -0,0 +1,80 @@
|
||||
.\" You can view this file with:
|
||||
.\" nroff -man [file]
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH curl_getdate 3 "5 March 2001" "libcurl 7.0" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_getdate - Convert an date in a ASCII string to number of seconds since
|
||||
January 1, 1970
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "time_t curl_getdate(char *" datestring ", time_t *"now" );
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
This function returns the number of seconds since January 1st 1970, for the
|
||||
date and time that the
|
||||
.I datestring
|
||||
parameter specifies. The
|
||||
.I now
|
||||
parameter is there and should hold the current time to allow the datestring to
|
||||
specify relative dates/times. Read further in the date string parser section
|
||||
below.
|
||||
.SH PARSING DATES AND TIMES
|
||||
A "date" is a string, possibly empty, containing many items separated by
|
||||
whitespace. The whitespace may be omitted when no ambiguity arises. The
|
||||
empty string means the beginning of today (i.e., midnight). Order of the
|
||||
items is immaterial. A date string may contain many flavors of items:
|
||||
.TP 0.8i
|
||||
.B calendar date items
|
||||
This can be specified in a number of different ways. Including 1970-09-17, 70-9-17, 70-09-17, 9/17/72, 24 September 1972, 24 Sept 72, 24 Sep 72, Sep 24, 1972, 24-sep-72, 24sep72.
|
||||
The year can also be omitted, for example: 9/17 or "sep 17".
|
||||
.TP
|
||||
.B time of the day items
|
||||
This string specifies the time on a given day. Syntax supported includes:
|
||||
18:19:0, 18:19, 6:19pm, 18:19-0500 (for specifying the time zone as well).
|
||||
.TP
|
||||
.B time zone items
|
||||
Specifies international time zone. There are a few acronyms supported, but in
|
||||
general you should instead use the specific realtive time compared to
|
||||
UTC. Supported formats include: -1200, MST, +0100.
|
||||
.TP
|
||||
.B day of the week items
|
||||
Specifies a day of the week. If this is mentioned alone it means that day of
|
||||
the week in the future.
|
||||
|
||||
Days of the week may be spelled out in full: `Sunday', `Monday', etc or they
|
||||
may be abbreviated to their first three letters, optionally followed by a
|
||||
period. The special abbreviations `Tues' for `Tuesday', `Wednes' for
|
||||
`Wednesday' and `Thur' or `Thurs' for `Thursday' are also allowed.
|
||||
|
||||
A number may precede a day of the week item to move forward supplementary
|
||||
weeks. It is best used in expression like `third monday'. In this context,
|
||||
`last DAY' or `next DAY' is also acceptable; they move one week before or
|
||||
after the day that DAY by itself would represent.
|
||||
.TP
|
||||
.B relative items
|
||||
A relative item adjusts a date (or the current date if none) forward or
|
||||
backward. Example syntax includes: "1 year", "1 year ago", "2 days", "4
|
||||
weeks".
|
||||
|
||||
The string `tomorrow' is worth one day in the future (equivalent to `day'),
|
||||
the string `yesterday' is worth one day in the past (equivalent to `day ago').
|
||||
.TP
|
||||
.B pure numbers
|
||||
If the decimal number is of the form YYYYMMDD and no other calendar date item
|
||||
appears before it in the date string, then YYYY is read as the year, MM as the
|
||||
month number and DD as the day of the month, for the specified calendar date.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
This function returns zero when it fails to parse the date string. Otherwise
|
||||
it returns the number of seconds as described.
|
||||
.SH AUTHORS
|
||||
Originally written by Steven M. Bellovin <smb@research.att.com> while at the
|
||||
University of North Carolina at Chapel Hill. Later tweaked by a couple of
|
||||
people on Usenet. Completely overhauled by Rich $alz <rsalz@bbn.com> and Jim
|
||||
Berets <jberets@bbn.com> in August, 1990.
|
||||
.SH "SEE ALSO"
|
||||
.BR
|
||||
.SH BUGS
|
||||
Surely there are some, you tell me!
|
32
docs/curl_getenv.3
Normal file
32
docs/curl_getenv.3
Normal file
@ -0,0 +1,32 @@
|
||||
.\" You can view this file with:
|
||||
.\" nroff -man [file]
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH curl_getenv 3 "15 August 2001" "libcurl 7.8.1" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_getenv - return value for environment name
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "char *curl_getenv(const char *" name ");
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
curl_getenv() is a portable wrapper for the getenv() function, meant to
|
||||
emulate its behaviour and provide an identical interface for all operating
|
||||
systems libcurl builds on (including win32).
|
||||
.SH RETURN VALUE
|
||||
If successful, curl_getenv() returns a pointer to the value of the specified
|
||||
environment. The memory it refers to is malloc()ed why the application must
|
||||
free() this when the data has completed to serve its purpose. When
|
||||
.I curl_getenv()
|
||||
fails to find the specified name, it returns a null pointer.
|
||||
.SH NOTE
|
||||
Under unix operating systems, there isn't any point in returning an allocated
|
||||
memory, although other systems won't work properly if this isn't done. The
|
||||
unix implementation thus have to suffer slightly from the drawbacks of other
|
||||
systems.
|
||||
.SH "SEE ALSO"
|
||||
.BR getenv "(3C), "
|
||||
.SH BUGS
|
||||
Surely there are some, you tell me!
|
||||
|
27
docs/curl_global_cleanup.3
Normal file
27
docs/curl_global_cleanup.3
Normal file
@ -0,0 +1,27 @@
|
||||
.\" You can view this file with:
|
||||
.\" nroff -man [file]
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH curl_global_cleanup 3 "28 May 2001" "libcurl 7.8" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_global_cleanup - Global libcurl cleanup
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "void curl_global_cleanup(void);"
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
curl_global_cleanup must be called once (no matter how many threads or libcurl
|
||||
sessions that'll be used) by every application that uses libcurl, after all
|
||||
uses of libcurl is complete.
|
||||
|
||||
This is the opposite of \fIcurl_global_init\fP.
|
||||
|
||||
Not calling this function may result in memory leaks.
|
||||
|
||||
This function was added in libcurl 7.8.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_global_init "(3), "
|
||||
.SH BUGS
|
||||
None?
|
||||
|
47
docs/curl_global_init.3
Normal file
47
docs/curl_global_init.3
Normal file
@ -0,0 +1,47 @@
|
||||
.\" You can view this file with:
|
||||
.\" nroff -man [file]
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH curl_global_init 3 "14 August 2001" "libcurl 7.8.1" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_global_init - Global libcurl initialisation
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "CURLcode curl_global_init(long " flags ");"
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
This function should be called once (no matter how many threads or libcurl
|
||||
sessions that'll be used) by every application that uses libcurl.
|
||||
|
||||
If this function hasn't been invoked when \fIcurl_easy_init\fP is called, it
|
||||
will be done automatically by libcurl.
|
||||
|
||||
The flags option is a bit pattern that tells libcurl exact what features to
|
||||
init, as described below. Set the desired bits by ORing the values together.
|
||||
|
||||
You must however \fBalways\fP use the \fIcurl_global_cleanup\fP function, as
|
||||
that cannot be called automatically for you by libcurl.
|
||||
|
||||
This function was added in libcurl 7.8.
|
||||
.SH FLAGS
|
||||
.TP 5
|
||||
.B CURL_GLOBAL_ALL
|
||||
Initialize everything possible. This sets all known bits.
|
||||
.TP
|
||||
.B CURL_GLOBAL_SSL
|
||||
Initialize SSL
|
||||
.TP
|
||||
.B CURL_GLOBAL_WIN32
|
||||
Initialize the Win32 socket libraries. (added in libcurl 7.8.1)
|
||||
.TP
|
||||
.B CURL_GLOBAL_NOTHING
|
||||
Initialise nothing extra. This sets no bit.
|
||||
.SH RETURN VALUE
|
||||
If this function returns non-zero, something went wrong and you cannot use the
|
||||
other curl functions.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_global_cleanup "(3), "
|
||||
.SH BUGS
|
||||
None.
|
||||
|
@ -1,25 +1,8 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * 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 https://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"
|
||||
.\" You can view this file with:
|
||||
.\" nroff -man [file]
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH curl_printf 3 "20 April 2001" "libcurl 7.7.2" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_maprintf, curl_mfprintf, curl_mprintf, curl_msnprintf, curl_msprintf
|
||||
curl_mvaprintf, curl_mvfprintf, curl_mvprintf, curl_mvsnprintf,
|
||||
@ -47,7 +30,7 @@ curl_mvsprintf - formatted output conversion
|
||||
.br
|
||||
.BI "char *curl_mvaprintf(const char *" format ", va_list " args ");"
|
||||
.SH DESCRIPTION
|
||||
These are all functions that produce output according to a format string and
|
||||
These are all functions that produces output according to a format string and
|
||||
given arguments. These are mostly clones of the well-known C-style functions
|
||||
and there will be no detailed explanation of all available formatting rules
|
||||
and usage here.
|
||||
@ -59,7 +42,7 @@ See this table for notable exceptions.
|
||||
Normal printf() clone.
|
||||
.TP
|
||||
.B curl_mfprintf()
|
||||
Normal fprintf() clone.
|
||||
Normal fprinf() clone.
|
||||
.TP
|
||||
.B curl_msprintf()
|
||||
Normal sprintf() clone.
|
||||
@ -96,14 +79,10 @@ To easily use all these cloned functions instead of the normal ones, #define
|
||||
_MPRINTF_REPLACE before you include the <curl/mprintf.h> file. Then all the
|
||||
normal names like printf, fprintf, sprintf etc will use the curl-functions
|
||||
instead.
|
||||
.SH AVAILABILITY
|
||||
These function will be removed from the public libcurl API in a near
|
||||
future. They will instead be made "available" by source code access only, and
|
||||
then as curlx_-prefixed functions. See lib/README.curlx for further details.
|
||||
.SH RETURN VALUE
|
||||
The \fBcurl_maprintf\fP and \fBcurl_mvaprintf\fP functions return a pointer to
|
||||
a newly allocated string, or NULL if it failed.
|
||||
a newly allocated string, or NULL it it failed.
|
||||
|
||||
All other functions return the number of characters they actually outputted.
|
||||
All other functions return the number of character they actually outputed.
|
||||
.SH "SEE ALSO"
|
||||
.BR printf "(3), " sprintf "(3), " fprintf "(3), " vprintf "(3) "
|
29
docs/curl_slist_append.3
Normal file
29
docs/curl_slist_append.3
Normal file
@ -0,0 +1,29 @@
|
||||
.\" You can view this file with:
|
||||
.\" nroff -man [file]
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH curl_slist_append 3 "5 March 2001" "libcurl 7.0" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_slist_append - add a string to an slist
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "struct curl_slist *curl_slist_append(struct curl_slist *" list,
|
||||
.BI "const char * "string ");"
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
curl_slist_append() appends a specified string to a linked list of
|
||||
strings. The existing
|
||||
.I list
|
||||
should be passed as the first argument while the new list is returned from
|
||||
this function. The specified
|
||||
.I string
|
||||
has been appended when this function returns.
|
||||
.SH RETURN VALUE
|
||||
A null pointer is returned if anything went wrong, otherwise the new list
|
||||
pointer is returned.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_slist_free_all "(3), "
|
||||
.SH BUGS
|
||||
Surely there are some, you tell me!
|
||||
|
22
docs/curl_slist_free_all.3
Normal file
22
docs/curl_slist_free_all.3
Normal file
@ -0,0 +1,22 @@
|
||||
.\" You can view this file with:
|
||||
.\" nroff -man [file]
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH curl_slist_free_all 3 "5 March 2001" "libcurl 7.0" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_slist_free_all - free an entire curl_slist list
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "void curl_slist_free_all(struct curl_slist *" list);
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
curl_slist_free_all() removes all traces of a previously built curl_slist
|
||||
linked list.
|
||||
.SH RETURN VALUE
|
||||
Nothing.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_slist_append "(3), "
|
||||
.SH BUGS
|
||||
Surely there are some, you tell me!
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user