33 #include <sys/types.h>
38 #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
42 #ifdef HAVE_SYS_SOCKET_H
43 #include <sys/socket.h>
45 #include <netinet/in.h>
51 #ifdef HAVE_ARPA_INET_H
52 #include <arpa/inet.h>
57 #include <sys/ioctl.h>
60 #ifdef HAVE_SYS_PARAM_H
61 #include <sys/param.h>
64 #ifdef HAVE_SYS_SELECT_H
65 #include <sys/select.h>
78 #error "We can't compile without select() support!"
81 #error "We can't compile without socket() support!"
87 #ifdef HAVE_OPENSSL_ENGINE_H
88 #include <openssl/engine.h>
123 #if defined(HAVE_INET_NTOA_R) && !defined(HAVE_INET_NTOA_R_DECL)
127 #define _MPRINTF_REPLACE
146 static bool safe_strequal(
char* str1,
char* str2);
151 #if !defined(WIN32) || defined(__CYGWIN32__)
154 #define RETSIGTYPE void
156 #ifdef HAVE_SIGSETJMP
157 extern sigjmp_buf curl_jmpenv;
164 #ifdef HAVE_SIGSETJMP
165 siglongjmp(curl_jmpenv, 1);
190 while(-1 != ConnectionKillOne(data));
214 #ifndef CURL_DISABLE_HTTP
219 infof(data,
"WARNING: failed to save cookies in %s\n",
238 ares_destroy(data->
state.areschannel);
281 data->
set.
in = stdin;
331 #ifdef CURL_CA_BUNDLE
348 va_start(param, option);
351 case CURLOPT_DNS_CACHE_TIMEOUT:
354 case CURLOPT_DNS_USE_GLOBAL_CACHE:
356 int use_cache = va_arg(param,
int);
364 case CURLOPT_SSL_CIPHER_LIST:
369 case CURLOPT_RANDOM_FILE:
376 case CURLOPT_EGDSOCKET:
382 case CURLOPT_MAXCONNECTS:
388 long newconnects= va_arg(param,
long);
391 if(newconnects < data->state.numconnects) {
425 case CURLOPT_FORBID_REUSE:
432 case CURLOPT_FRESH_CONNECT:
439 case CURLOPT_VERBOSE:
450 data->
set.http_include_header = va_arg(param,
long)?
TRUE:
FALSE;
452 case CURLOPT_NOPROGRESS:
468 case CURLOPT_FAILONERROR:
484 case CURLOPT_FILETIME:
491 case CURLOPT_FTP_CREATE_MISSING_DIRS:
498 case CURLOPT_FTP_RESPONSE_TIMEOUT:
505 case CURLOPT_FTPLISTONLY:
512 case CURLOPT_FTPAPPEND:
524 case CURLOPT_NETRC_FILE:
530 case CURLOPT_FOLLOWLOCATION:
536 case CURLOPT_UNRESTRICTED_AUTH:
544 case CURLOPT_HTTP_VERSION:
551 case CURLOPT_TRANSFERTEXT:
565 if(va_arg(param,
long))
568 case CURLOPT_TIMECONDITION:
575 case CURLOPT_TIMEVALUE:
582 case CURLOPT_SSLVERSION:
590 case CURLOPT_COOKIESESSION:
609 #ifndef CURL_DISABLE_HTTP
610 case CURLOPT_COOKIEFILE:
614 cookiefile = (
char *)va_arg(param,
void *);
622 case CURLOPT_COOKIEJAR:
637 case CURLOPT_WRITEHEADER:
647 data->
set.
cookie = va_arg(param,
char *);
649 case CURLOPT_ERRORBUFFER:
660 data->
set.
out = va_arg(param, FILE *);
662 case CURLOPT_FTPPORT:
670 case CURLOPT_FTP_USE_EPRT:
674 case CURLOPT_FTP_USE_EPSV:
678 case CURLOPT_HTTPHEADER:
684 case CURLOPT_CUSTOMREQUEST:
695 case CURLOPT_HTTPPOST:
704 case CURLOPT_HTTPGET:
708 if(va_arg(param,
long)) {
719 data->
set.
in = va_arg(param, FILE *);
721 case CURLOPT_INFILESIZE:
728 case CURLOPT_INFILESIZE_LARGE:
735 case CURLOPT_LOW_SPEED_LIMIT:
742 case CURLOPT_LOW_SPEED_TIME:
772 if(va_arg(param,
long))
775 case CURLOPT_POSTFIELDS:
783 case CURLOPT_POSTFIELDSIZE:
790 case CURLOPT_POSTFIELDSIZE_LARGE:
797 case CURLOPT_REFERER:
808 case CURLOPT_AUTOREFERER:
834 case CURLOPT_HTTPPROXYTUNNEL:
840 case CURLOPT_PROXYPORT:
846 case CURLOPT_TIMEOUT:
853 case CURLOPT_CONNECTTIMEOUT:
859 case CURLOPT_MAXREDIRS:
866 case CURLOPT_USERAGENT:
872 case CURLOPT_ENCODING:
887 case CURLOPT_HTTPAUTH:
892 long auth = va_arg(param,
long);
907 case CURLOPT_PROXYAUTH:
912 long auth = va_arg(param,
long);
927 case CURLOPT_USERPWD:
933 case CURLOPT_POSTQUOTE:
939 case CURLOPT_PREQUOTE:
951 case CURLOPT_PROGRESSFUNCTION:
962 case CURLOPT_PROGRESSDATA:
968 case CURLOPT_PROXYUSERPWD:
980 case CURLOPT_RESUME_FROM:
986 case CURLOPT_RESUME_FROM_LARGE:
992 case CURLOPT_DEBUGFUNCTION:
1001 case CURLOPT_DEBUGDATA:
1008 case CURLOPT_STDERR:
1013 data->
set.
err = va_arg(param, FILE *);
1017 case CURLOPT_HEADERFUNCTION:
1023 case CURLOPT_WRITEFUNCTION:
1032 case CURLOPT_READFUNCTION:
1041 case CURLOPT_SSLCERT:
1045 data->
set.
cert = va_arg(param,
char *);
1047 case CURLOPT_SSLCERTTYPE:
1053 case CURLOPT_SSLKEY:
1057 data->
set.
key = va_arg(param,
char *);
1059 case CURLOPT_SSLKEYTYPE:
1065 case CURLOPT_SSLKEYPASSWD:
1071 case CURLOPT_SSLENGINE:
1075 #ifdef HAVE_OPENSSL_ENGINE_H
1077 const char *cpTemp = va_arg(param,
char *);
1079 if (cpTemp && cpTemp[0]) {
1080 e = ENGINE_by_id(cpTemp);
1083 ENGINE_free(data->engine);
1088 failf(data,
"SSL Engine '%s' not found", cpTemp);
1097 case CURLOPT_SSLENGINE_DEFAULT:
1101 #ifdef HAVE_OPENSSL_ENGINE_H
1103 if (ENGINE_set_default(data->engine, ENGINE_METHOD_ALL) > 0) {
1105 fprintf(stderr,
"set default crypto engine\n");
1110 failf(data,
"set default crypto engine failed");
1123 case CURLOPT_INTERFACE:
1128 data->
set.
device = va_arg(param,
char *);
1130 case CURLOPT_KRB4LEVEL:
1137 case CURLOPT_SSL_VERIFYPEER:
1143 case CURLOPT_SSL_VERIFYHOST:
1149 case CURLOPT_SSL_CTX_FUNCTION:
1155 case CURLOPT_SSL_CTX_DATA:
1161 case CURLOPT_CAINFO:
1167 case CURLOPT_CAPATH:
1175 case CURLOPT_TELNETOPTIONS:
1182 case CURLOPT_BUFFERSIZE:
1195 case CURLOPT_NOSIGNAL:
1260 case CURLOPT_PROXYTYPE:
1267 case CURLOPT_PRIVATE:
1274 case CURLOPT_HTTP200ALIASES:
1281 case CURLOPT_MAXFILESIZE:
1288 case CURLOPT_FTP_SSL:
1295 case CURLOPT_IPRESOLVE:
1299 case CURLOPT_MAXFILESIZE_LARGE:
1370 #if defined(USE_ARES) || defined(USE_THREADING_GETHOSTBYNAME)
1391 bool ret_val =
TRUE;
1395 FD_ZERO(&check_set);
1396 FD_SET(sock, &check_set);
1401 sval =
select(sock + 1, &check_set, 0, 0, &to);
1486 infof(data,
"Connection %d seems to be dead!\n", i);
1546 if(score > highscore) {
1551 if(connindex >= 0) {
1582 i = ConnectionKillOne(data);
1583 infof(data,
"Connection (#%d) was killed to make room\n", i);
1601 static int handleSock5Proxy(
const char *proxy_name,
1602 const char *proxy_password,
1622 unsigned char socksreq[600];
1632 socksreq[1] = (char)(proxy_name ? 2 : 1);
1636 code =
Curl_write(conn, sock, (
char *)socksreq, (2 + (
int)socksreq[1]),
1638 if ((code !=
CURLE_OK) || (written != (2 + (
int)socksreq[1]))) {
1639 failf(conn->
data,
"Unable to send initial SOCKS5 request.");
1643 result=
Curl_read(conn, sock, (
char *)socksreq, 2, &actualread);
1644 if ((result !=
CURLE_OK) || (actualread != 2)) {
1645 failf(conn->
data,
"Unable to receive initial SOCKS5 response.");
1649 if (socksreq[0] != 5) {
1650 failf(conn->
data,
"Received invalid version in initial SOCKS5 response.");
1653 if (socksreq[1] == 0) {
1657 else if (socksreq[1] == 2) {
1659 int userlen, pwlen,
len;
1661 userlen = strlen(proxy_name);
1662 pwlen = proxy_password?strlen(proxy_password):0;
1672 socksreq[len++] = 1;
1673 socksreq[len++] = (char) userlen;
1674 memcpy(socksreq + len, proxy_name, (
int) userlen);
1676 socksreq[len++] = (char) pwlen;
1677 memcpy(socksreq + len, proxy_password, (
int) pwlen);
1680 code =
Curl_write(conn, sock, (
char *)socksreq, len, &written);
1681 if ((code !=
CURLE_OK) || (len != written)) {
1682 failf(conn->
data,
"Failed to send SOCKS5 sub-negotiation request.");
1686 result=
Curl_read(conn, sock, (
char *)socksreq, 2, &actualread);
1687 if ((result !=
CURLE_OK) || (actualread != 2)) {
1688 failf(conn->
data,
"Unable to receive SOCKS5 sub-negotiation response.");
1692 if ((socksreq[0] != 5) ||
1693 (socksreq[1] != 0)) {
1694 failf(conn->
data,
"User was rejected by the SOCKS5 server (%d %d).",
1695 socksreq[0], socksreq[1]);
1703 if (socksreq[1] == 1) {
1705 "SOCKS5 GSSAPI per-message authentication is not supported.");
1708 else if (socksreq[1] == 255) {
1709 if (proxy_name[0] == 0) {
1711 "No authentication method was acceptable. (It is quite likely"
1712 " that the SOCKS5 server wanted a username/password, since none"
1713 " was supplied to the server on this connection.)");
1716 failf(conn->
data,
"No authentication method was acceptable.");
1722 "Undocumented SOCKS5 mode attempted to be used by server.");
1752 if (hp && hp->h_addr_list[0]) {
1753 socksreq[4] = ((
char*)hp->h_addr_list[0])[0];
1754 socksreq[5] = ((
char*)hp->h_addr_list[0])[1];
1755 socksreq[6] = ((
char*)hp->h_addr_list[0])[2];
1756 socksreq[7] = ((
char*)hp->h_addr_list[0])[3];
1761 failf(conn->
data,
"Failed to resolve \"%s\" for SOCKS5 connect.",
1767 "%s:%d has an internal error an needs to be fixed to work",
1768 __FILE__, __LINE__);
1773 *((
unsigned short*)&socksreq[8]) = htons(conn->
remote_port);
1776 const int packetsize = 10;
1778 code =
Curl_write(conn, sock, (
char *)socksreq, packetsize, &written);
1779 if ((code !=
CURLE_OK) || (written != packetsize)) {
1780 failf(conn->
data,
"Failed to send SOCKS5 connect request.");
1784 result =
Curl_read(conn, sock, (
char *)socksreq, packetsize, &actualread);
1785 if ((result !=
CURLE_OK) || (actualread != packetsize)) {
1786 failf(conn->
data,
"Failed to receive SOCKS5 connect request ack.");
1790 if (socksreq[0] != 5) {
1792 "SOCKS5 reply has wrong version, version should be 5.");
1795 if (socksreq[1] != 0) {
1797 "Can't complete SOCKS5 connection to %d.%d.%d.%d:%d. (%d)",
1798 (
unsigned char)socksreq[4], (
unsigned char)socksreq[5],
1799 (
unsigned char)socksreq[6], (
unsigned char)socksreq[7],
1800 (
unsigned int)ntohs(*(
unsigned short*)(&socksreq[8])),
1836 memcpy((
char *)&(conn->
serv_addr.sin_addr),
1837 (
struct in_addr *)addr,
sizeof(
struct in_addr));
1839 conn->
serv_addr.sin_port = htons((
unsigned short)conn->
port);
1843 return handleSock5Proxy(conn->
proxyuser,
1852 failf(conn->
data,
"unknown proxytype option given");
1863 static void verboseconnect(
struct connectdata *conn,
1871 char hbuf[NI_MAXHOST];
1872 #ifdef NI_WITHSCOPEID
1873 #define NIFLAGS NI_NUMERICHOST | NI_WITHSCOPEID
1875 #define NIFLAGS NI_NUMERICHOST
1878 struct addrinfo *ai = dns->
addr;
1883 if (getnameinfo(ai->ai_addr, ai->ai_addrlen, hbuf,
sizeof(hbuf),
NULL, 0,
1885 snprintf(hbuf,
sizeof(hbuf),
"unknown");
1888 if (ai->ai_canonname) {
1889 infof(data,
"Connected to %s (%s) port %d\n", ai->ai_canonname, hbuf,
1896 snprintf(hbuf,
sizeof(hbuf),
"same host");
1899 infof(data,
"Connected to %s port %d\n", hbuf, conn->
port);
1903 #ifdef HAVE_INET_NTOA_R
1909 infof(data,
"Connected to %s (%s) port %d\n",
1910 hostaddr?hostaddr->h_name:
"",
1911 #
if defined(HAVE_INET_NTOA_R)
1946 verboseconnect(conn, hostaddr);
1979 char resumerange[40]=
"";
1985 unsigned int prev_alarm=0;
1993 #ifdef HAVE_SIGACTION
1994 struct sigaction keep_sigact;
1995 bool keep_copysig=
FALSE;
2070 #define LEAST_PATH_ALLOC 256
2075 conn->
path=(
char *)malloc(urllen);
2087 if((2 == sscanf(data->
change.
url,
"%64[^:]:%[^\n]",
2090 if(conn->
path[0] ==
'/' && conn->
path[1] ==
'/') {
2098 memmove(conn->
path, conn->
path + 2, strlen(conn->
path + 2)+1);
2105 if(conn->
path[0] !=
'/') {
2108 char *ptr=strchr(conn->
path,
'/');
2125 if(ptr[1] && (
'/' == ptr[1]))
2131 memmove(conn->
path, ptr, strlen(ptr)+1);
2139 strcpy(conn->
gname,
"curl.haxx.se");
2140 strcpy(conn->
path,
"/");
2147 "%64[^\n:]://%512[^\n/?]%[^\n]",
2154 if((1 > sscanf(data->
change.
url,
"%512[^\n/?]%[^\n]",
2159 failf(data,
"<url> malformed");
2199 if(conn->
path[0] ==
'?') {
2203 memmove(&conn->
path[1], conn->
path, strlen(conn->
path)+1);
2204 conn->
path[0] =
'/';
2224 proxyuser, proxypasswd);
2264 char *no_proxy=
NULL;
2265 char *no_proxy_tok_buf;
2267 char proxy_env[128];
2273 if(!no_proxy || !
strequal(
"*", no_proxy)) {
2277 nope=no_proxy?
strtok_r(no_proxy,
", ", &no_proxy_tok_buf):
NULL;
2279 unsigned int namelen;
2280 char *endptr = strchr(conn->
name,
':');
2282 namelen=endptr-conn->
name;
2284 namelen=strlen(conn->
name);
2286 if(strlen(nope) <= namelen) {
2288 conn->
name + namelen - strlen(nope);
2299 char *envp = proxy_env;
2304 *envp++ = tolower(*protop++);
2307 strcpy(envp,
"_proxy");
2324 if(!prox && !
strequal(
"http_proxy", proxy_env)) {
2326 for(envp = proxy_env; *envp; envp++)
2327 *envp = toupper(*envp);
2340 if(proxy && *proxy) {
2347 ptr=strstr(proxy,
"://");
2354 ptr = strchr(ptr,
'@');
2357 proxyuser, proxypasswd))) {
2408 #ifndef CURL_DISABLE_HTTP
2434 #ifndef CURL_DISABLE_HTTP
2445 " was built with HTTP disabled, http: not supported!");
2450 #if defined(USE_SSLEAY) && !defined(CURL_DISABLE_HTTP)
2464 " was built with SSL disabled, https: not supported!");
2469 #ifndef CURL_DISABLE_GOPHER
2474 if (isdigit((
int)conn->
path[1])) {
2475 conn->
ppath = strchr(&conn->
path[1],
'/');
2485 " was built with GOPHER disabled, gopher: not supported!");
2492 #ifndef CURL_DISABLE_FTP
2503 " was built with SSL disabled, ftps: not supported!");
2521 failf(data,
"ftps does not work through http proxy!");
2524 #ifndef CURL_DISABLE_HTTP
2528 failf(data,
"FTP over http proxy requires HTTP support built-in!");
2544 type=strstr(conn->
ppath,
";type=");
2546 type=strstr(conn->
gname,
";type=");
2551 command = toupper(type[6]);
2570 " was built with FTP disabled, ftp/ftps: not supported!");
2575 #ifndef CURL_DISABLE_TELNET
2586 " was built with TELNET disabled!");
2590 #ifndef CURL_DISABLE_DICT
2599 " was built with DICT disabled!");
2603 #ifndef CURL_DISABLE_LDAP
2612 " was built with LDAP disabled!");
2616 #ifndef CURL_DISABLE_FILE
2636 " was built with FILE disabled!");
2658 if((1 == sscanf(conn->
name,
"[%*39[0-9a-fA-F:.]%c", &endbracket)) &&
2659 (
']' == endbracket)) {
2665 tmp = strchr(conn->
name,
']');
2672 tmp = strrchr(conn->
name,
':');
2678 port=strtoul(tmp+1, &rest, 10);
2680 if (rest != (tmp+1) && *rest ==
'\0') {
2684 if (port > 0xffff) {
2686 failf(data,
"Port number too large: %lu", port);
2708 char *proxyptr=proxydup;
2710 if(
NULL == proxydup) {
2711 failf(data,
"memory shortage");
2721 endofprot=strstr(proxyptr,
"://");
2723 proxyptr = endofprot+3;
2727 prox_portno = strchr (proxyptr,
':');
2732 conn->
port = atoi(prox_portno);
2779 char *ptr=strchr(conn->
name,
'@');
2780 char *userpass = conn->
name;
2797 if(*userpass !=
':') {
2799 sscanf(userpass,
"%127[^:@]:%127[^@]",
2804 sscanf(userpass,
":%127[^@]", passwd);
2808 if(strlen(newname) <
sizeof(user)) {
2809 strcpy(user, newname);
2818 if(strlen(newpasswd) <
sizeof(passwd)) {
2819 strcpy(passwd, newpasswd);
2848 infof(data,
"Couldn't find host %s in the .netrc file, using defaults\n",
2888 reuse = ConnectionExists(data, conn, &conn_temp);
2941 free(old_conn->
range);
2979 ConnectionStore(data, conn);
3011 #ifdef HAVE_SIGACTION
3012 struct sigaction sigact;
3013 sigaction(SIGALRM,
NULL, &sigact);
3014 keep_sigact = sigact;
3015 keep_copysig =
TRUE;
3016 sigact.sa_handler = alarmfunc;
3019 sigact.sa_flags &= ~SA_RESTART;
3022 sigaction(SIGALRM, &sigact,
NULL);
3026 keep_sigact = signal(SIGALRM, alarmfunc);
3068 else if(!hostaddr) {
3069 failf(data,
"Couldn't resolve host '%s'", conn->
name);
3083 else if(!hostaddr) {
3091 #if defined(HAVE_ALARM) && defined(SIGALRM)
3093 #ifdef HAVE_SIGACTION
3097 sigaction(SIGALRM, &keep_sigact,
NULL);
3102 signal(SIGALRM, keep_sigact);
3114 alarm_set = prev_alarm - elapsed_ms/1000;
3122 failf(data,
"Previous alarm fired off!");
3161 aprintf(
"User-Agent: %s\015\012", data->
set.
useragent);
3168 aprintf(
"Accept-Encoding: %s\015\012", data->
set.
encoding);
3178 result = ConnectPlease(conn, hostaddr, &connected);
3196 verboseconnect(conn, hostaddr);
3210 _fsetmode(stdout,
"b");
3227 code = CreateConnection(data, in_connect, &dns, asyncp);
3235 code = SetupConnection(*in_connect, dns);
3256 #if defined(USE_ARES) || defined(USE_THREADING_GETHOSTBYNAME)
3257 CURLcode code = SetupConnection(conn, conn->async.dns);
3293 #if defined(CURLDEBUG) && defined(AGGRESIVE_TEST)
3351 infof(data,
"Re-used connection seems dead, get a new one\n");
3398 static bool safe_strequal(
char* str1,
char* str2)
3405 return (!str1 && !str2);
void Curl_hash_apply(curl_hash *h, void *user, void(*cb)(void *user, void *ptr))
struct ssl_connect_data ssl[2]
struct CookieInfo * cookies
CURLcode Curl_file_connect(struct connectdata *conn)
struct connectdata ** connects
char * curl_unescape(const char *string, int length)
union connectdata::@11 proto
bool http_disable_hostname_check_before_authentication
curl_closepolicy closepolicy
CURLcode Curl_open(struct SessionHandle **curl)
int Curl_resolv(struct connectdata *conn, char *hostname, int port, struct Curl_dns_entry **entry)
curl_write_callback fwrite_header
CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,...)
void Curl_pgrsTime(struct SessionHandle *data, timerid timer)
char * curl_getenv(const char *variable)
void Curl_pgrsDone(struct connectdata *conn)
struct ssl_config_data ssl
CURLcode Curl_dict(struct connectdata *conn)
volatile unsigned int dirty
struct DynamicStatic change
CURLcode Curl_http_done(struct connectdata *conn)
struct curl_slist * http200aliases
CURLcode(* curl_disconnect)(struct connectdata *)
CURLcode Curl_connect(struct SessionHandle *data, struct connectdata **in_connect, bool *asyncp)
CURLcode Curl_telnet(struct connectdata *conn)
bool Curl_clone_ssl_config(struct ssl_config_data *source, struct ssl_config_data *dest)
CURLcode(* curl_done)(struct connectdata *)
#define MAX_CURL_USER_LENGTH_TXT
#define CURLAUTH_GSSNEGOTIATE
#define MAX_CURL_PASSWORD_LENGTH
struct in_addr Curl_ipconnect
#define MAX_CURL_PASSWORD_LENGTH_TXT
struct curl_slist * quote
GLuint GLuint GLsizei GLenum type
unsigned short remote_port
CURLcode Curl_do(struct connectdata **connp)
size_t(* curl_write_callback)(char *buffer, size_t size, size_t nitems, void *outstream)
int Curl_read(struct connectdata *conn, curl_socket_t sockfd, char *buf, size_t buffersize, ssize_t *n)
long ftp_response_timeout
CURLcode Curl_ftp(struct connectdata *conn)
struct ssl_config_data ssl_config
#define CURL_DEFAULT_PASSWORD
curl_off_t set_resume_from
enum CURL_NETRC_OPTION use_netrc
CURLcode(* curl_do_more)(struct connectdata *)
int Curl_nonblock(curl_socket_t sockfd, int nonblock)
CURLcode Curl_write(struct connectdata *conn, curl_socket_t sockfd, void *mem, size_t len, ssize_t *written)
CURLcode Curl_ldap(struct connectdata *conn)
bool tunnel_thru_httpproxy
void Curl_global_host_cache_init(void)
CURLcode(* curl_connect)(struct connectdata *)
int(* curl_debug_callback)(CURL *handle, curl_infotype type, char *data, size_t size, void *userptr)
GLsizei GLsizei GLcharARB * source
char * inet_ntoa_r(const struct in_addr in, char *buffer, int buflen)
struct ntlmdata proxyntlm
void Curl_resolv_unlock(struct SessionHandle *data, struct Curl_dns_entry *dns)
struct curl_slist * headers
bool ftp_create_missing_dirs
CURLcode Curl_protocol_connect(struct connectdata *conn, struct Curl_dns_entry *hostaddr)
GLsizei GLsizei GLenum GLenum const GLvoid * data
struct Curl_share * share
CURLcode Curl_http_connect(struct connectdata *conn)
CURLcode Curl_http(struct connectdata *conn)
CURLcode Curl_async_resolved(struct connectdata *conn)
curl_debug_callback fdebug
CURLcode Curl_Transfer(struct connectdata *c_conn, int sockindex, curl_off_t size, bool getheader, curl_off_t *bytecountp, int writesockindex, curl_off_t *writecountp)
curl_ssl_ctx_callback fsslctx
long Curl_tvdiff(struct timeval newer, struct timeval older)
void Curl_hash_destroy(curl_hash *h)
GLenum const GLvoid * addr
struct SessionHandle * data
#define CURL_DEFAULT_USER
#define checkprefix(a, b)
#define ALL_CONTENT_ENCODINGS
struct curl_slist * telnet_options
struct CookieInfo * cookies
struct curl_slist * cookielist
curl_progress_callback fprogress
CURLcode Curl_close(struct SessionHandle *data)
#define MAX_CURL_USER_LENGTH
void Curl_digest_cleanup(struct SessionHandle *data)
CURLcode Curl_connecthost(struct connectdata *conn, struct Curl_dns_entry *remotehost, int port, curl_socket_t *sockconn, Curl_ipconnect **addr, bool *connected)
CURLcode Curl_ftp_done(struct connectdata *conn)
CURLcode Curl_disconnect(struct connectdata *conn)
struct curl_slist * postquote
CURLcode Curl_file(struct connectdata *conn)
struct Curl_dns_entry * connect_addr
CURLcode Curl_do_more(struct connectdata *conn)
struct curl_slist * curl_slist_append(struct curl_slist *, const char *)
bool Curl_ssl_config_matches(struct ssl_config_data *data, struct ssl_config_data *needle)
CURLcode Curl_wait_for_resolv(struct connectdata *conn, struct Curl_dns_entry **entry)
curl_write_callback fwrite
void Curl_hostcache_prune(struct SessionHandle *data)
void Curl_scan_cache_used(void *user, void *ptr)
void Curl_safefree(void *ptr)
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
struct timeval Curl_tvnow(void)
CURLcode Curl_telnet_done(struct connectdata *conn)
CURLSHcode Curl_share_lock(struct SessionHandle *data, curl_lock_data type, curl_lock_access accesstype)
int(* curl_progress_callback)(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow)
struct hostent Curl_addrinfo
void Curl_free_ssl_config(struct ssl_config_data *sslc)
CURLcode(* curl_ssl_ctx_callback)(CURL *curl, void *ssl_ctx, void *userptr)
void curl_slist_free_all(struct curl_slist *)
void Curl_cookie_cleanup(struct CookieInfo *c)
CURLcode Curl_ftp_nextconnect(struct connectdata *conn)
int Curl_parsenetrc(char *host, char *login, char *password, char *netrcfile)
struct curl_slist * prequote
bool http_follow_location
int Curl_SSL_Close_All(struct SessionHandle *data)
void Curl_SSL_Close(struct connectdata *conn)
struct CookieInfo * Curl_cookie_init(struct SessionHandle *data, char *file, struct CookieInfo *inc, bool newsession)
if(!ValidDisplayID(prefInfo.prefDisplayID)) prefInfo.prefDisplayID
struct connectdata::dynamically_allocated_data allocptr
size_t(* curl_read_callback)(char *buffer, size_t size, size_t nitems, void *instream)
CURLcode(* curl_do)(struct connectdata *)
struct curl_httppost * httppost
curl_TimeCond timecondition
CURLcode Curl_ftp_disconnect(struct connectdata *conn)
CURLSHcode Curl_share_unlock(struct SessionHandle *data, curl_lock_data type)
CURLcode Curl_ftp_connect(struct connectdata *conn)
int Curl_cookie_output(struct CookieInfo *c, char *dumphere)
CURLcode Curl_done(struct connectdata *conn)
struct sockaddr_in serv_addr