Macros | Functions | Variables
url.c File Reference
#include "curl_setup.h"
#include "urldata.h"
#include "netrc.h"
#include "formdata.h"
#include "mime.h"
#include "vtls/vtls.h"
#include "hostip.h"
#include "transfer.h"
#include "sendf.h"
#include "progress.h"
#include "cookie.h"
#include "strcase.h"
#include "strerror.h"
#include "escape.h"
#include "strtok.h"
#include "share.h"
#include "content_encoding.h"
#include "http_digest.h"
#include "http_negotiate.h"
#include "select.h"
#include "multiif.h"
#include "easyif.h"
#include "speedcheck.h"
#include "warnless.h"
#include "non-ascii.h"
#include "inet_pton.h"
#include "getinfo.h"
#include "ftp.h"
#include "dict.h"
#include "telnet.h"
#include "tftp.h"
#include "http.h"
#include "http2.h"
#include "file.h"
#include "curl_ldap.h"
#include "ssh.h"
#include "imap.h"
#include "url.h"
#include "connect.h"
#include "inet_ntop.h"
#include "http_ntlm.h"
#include "curl_ntlm_wb.h"
#include "socks.h"
#include "curl_rtmp.h"
#include "gopher.h"
#include "http_proxy.h"
#include "conncache.h"
#include "multihandle.h"
#include "pipeline.h"
#include "dotdot.h"
#include "strdup.h"
#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"

Go to the source code of this file.

Macros

#define C_SSLVERSION_MAX_VALUE(x)   (x & 0xffff0000)
 
#define C_SSLVERSION_VALUE(x)   (x & 0xffff)
 
#define conn_reset_all_postponed_data(c)   do {} WHILE_FALSE
 
#define LEAST_PATH_ALLOC   256
 
#define READBUFFER_MAX   CURL_MAX_READ_SIZE
 
#define READBUFFER_MIN   1024
 
#define READBUFFER_SIZE   CURL_MAX_WRITE_SIZE
 
#define SSL_EXTRA   0
 
#define STARTS_WITH_DRIVE_PREFIX(str)
 

Functions

static struct connectdataallocate_conn (struct Curl_easy *data)
 
static int call_disconnect_if_dead (struct connectdata *conn, void *param)
 
static bool check_noproxy (const char *name, const char *no_proxy)
 
static void conn_free (struct connectdata *conn)
 
static bool ConnectionExists (struct Curl_easy *data, struct connectdata *needle, struct connectdata **usethis, bool *force_reuse, bool *waitpipe)
 
static CURLcode create_conn (struct Curl_easy *data, struct connectdata **in_connect, bool *async)
 create_conn() sets up a new connectdata struct, or re-uses an already existing one, and resolves host name. More...
 
static CURLcode create_conn_helper_init_proxy (struct connectdata *conn)
 
CURLcode Curl_close (struct Curl_easy *data)
 
CURLcode Curl_connect (struct Curl_easy *data, struct connectdata **in_connect, bool *asyncp, bool *protocol_done)
 
CURLcode Curl_connected_proxy (struct connectdata *conn, int sockindex)
 
CURLcode Curl_disconnect (struct connectdata *conn, bool dead_connection)
 
int Curl_doing_getsock (struct connectdata *conn, curl_socket_t *socks, int numsocks)
 
CURLcode Curl_dupset (struct Curl_easy *dst, struct Curl_easy *src)
 
void Curl_free_request_state (struct Curl_easy *data)
 
void Curl_freeset (struct Curl_easy *data)
 
void Curl_getoff_all_pipelines (struct Curl_easy *data, struct connectdata *conn)
 
CURLcode Curl_init_do (struct Curl_easy *data, struct connectdata *conn)
 
CURLcode Curl_init_userdefined (struct UserDefined *set)
 
struct connectdataCurl_oldest_idle_connection (struct Curl_easy *data)
 
CURLcode Curl_open (struct Curl_easy **curl)
 Curl_open() More...
 
CURLcode Curl_protocol_connect (struct connectdata *conn, bool *protocol_done)
 
CURLcode Curl_protocol_connecting (struct connectdata *conn, bool *done)
 
CURLcode Curl_protocol_doing (struct connectdata *conn, bool *done)
 
int Curl_protocol_getsock (struct connectdata *conn, curl_socket_t *socks, int numsocks)
 
int Curl_removeHandleFromPipeline (struct Curl_easy *handle, struct curl_llist *pipeline)
 
CURLcode Curl_setopt (struct Curl_easy *data, CURLoption option, va_list param)
 
CURLcode Curl_setup_conn (struct connectdata *conn, bool *protocol_done)
 
void Curl_verboseconnect (struct connectdata *conn)
 
static char * detect_proxy (struct connectdata *conn)
 
static bool disconnect_if_dead (struct connectdata *conn, struct Curl_easy *data)
 
static struct connectdatafind_oldest_idle_connection_in_bundle (struct Curl_easy *data, struct connectbundle *bundle)
 
static CURLcode findprotocol (struct Curl_easy *data, struct connectdata *conn, const char *protostr)
 
static void fix_hostname (struct connectdata *conn, struct hostname *host)
 
static void free_fixed_hostname (struct hostname *host)
 
static unsigned int get_protocol_family (unsigned int protocol)
 
static struct Curl_easygethandleathead (struct curl_llist *pipeline)
 
static bool is_ASCII_name (const char *hostname)
 
static int IsPipeliningPossible (const struct Curl_easy *handle, const struct connectdata *conn)
 
static void llist_dtor (void *user, void *element)
 
static size_t max_pipeline_length (struct Curl_multi *multi)
 
static CURLcode override_login (struct Curl_easy *data, struct connectdata *conn, char **userp, char **passwdp, char **optionsp)
 
static CURLcode parse_connect_to_host_port (struct Curl_easy *data, const char *host, char **hostname_result, int *port_result)
 
static CURLcode parse_connect_to_slist (struct Curl_easy *data, struct connectdata *conn, struct curl_slist *conn_to_host)
 
static CURLcode parse_connect_to_string (struct Curl_easy *data, struct connectdata *conn, const char *conn_to_host, char **host_result, int *port_result)
 
static CURLcode parse_login_details (const char *login, const size_t len, char **userptr, char **passwdptr, char **optionsptr)
 
static CURLcode parse_proxy (struct Curl_easy *data, struct connectdata *conn, char *proxy, curl_proxytype proxytype)
 
static CURLcode parse_proxy_auth (struct Curl_easy *data, struct connectdata *conn)
 
static CURLcode parse_remote_port (struct Curl_easy *data, struct connectdata *conn)
 
static CURLcode parse_url_login (struct Curl_easy *data, struct connectdata *conn, char **userptr, char **passwdptr, char **optionsptr)
 
static CURLcode parseurlandfillconn (struct Curl_easy *data, struct connectdata *conn, bool *prot_missing, char **userp, char **passwdp, char **optionsp)
 
static bool proxy_info_matches (const struct proxy_info *data, const struct proxy_info *needle)
 
static void prune_dead_connections (struct Curl_easy *data)
 
static CURLcode resolve_server (struct Curl_easy *data, struct connectdata *conn, bool *async)
 
static void reuse_conn (struct connectdata *old_conn, struct connectdata *conn)
 
static CURLcode set_login (struct connectdata *conn, const char *user, const char *passwd, const char *options)
 
static CURLcode setstropt (char **charp, const char *s)
 
static CURLcode setstropt_userpwd (char *option, char **userp, char **passwdp)
 
static CURLcode setup_connection_internals (struct connectdata *conn)
 
static CURLcode setup_range (struct Curl_easy *data)
 
static void signalPipeClose (struct curl_llist *pipeline, bool pipe_broke)
 
static bool SocketIsDead (curl_socket_t sock)
 

Variables

static const struct Curl_handler Curl_handler_dummy
 
static const struct Curl_handler *const protocols []
 

Macro Definition Documentation

#define C_SSLVERSION_MAX_VALUE (   x)    (x & 0xffff0000)

Definition at line 716 of file url.c.

#define C_SSLVERSION_VALUE (   x)    (x & 0xffff)

Definition at line 715 of file url.c.

#define conn_reset_all_postponed_data (   c)    do {} WHILE_FALSE

Definition at line 3013 of file url.c.

#define LEAST_PATH_ALLOC   256
#define READBUFFER_MAX   CURL_MAX_READ_SIZE

Definition at line 145 of file url.c.

#define READBUFFER_MIN   1024

Definition at line 146 of file url.c.

#define READBUFFER_SIZE   CURL_MAX_WRITE_SIZE

Definition at line 144 of file url.c.

#define SSL_EXTRA   0
#define STARTS_WITH_DRIVE_PREFIX (   str)
Value:
((('a' <= str[0] && str[0] <= 'z') || \
('A' <= str[0] && str[0] <= 'Z')) && \
(str[1] == ':'))
const char * str
Definition: unit1398.c:33

Function Documentation

static struct connectdata* allocate_conn ( struct Curl_easy data)
static

Definition at line 4197 of file url.c.

static int call_disconnect_if_dead ( struct connectdata conn,
void *  param 
)
static

Definition at line 3444 of file url.c.

static bool check_noproxy ( const char *  name,
const char *  no_proxy 
)
static

Definition at line 4935 of file url.c.

static void conn_free ( struct connectdata conn)
static

Definition at line 3016 of file url.c.

static bool ConnectionExists ( struct Curl_easy data,
struct connectdata needle,
struct connectdata **  usethis,
bool force_reuse,
bool waitpipe 
)
static

Definition at line 3489 of file url.c.

static CURLcode create_conn ( struct Curl_easy data,
struct connectdata **  in_connect,
bool async 
)
static

create_conn() sets up a new connectdata struct, or re-uses an already existing one, and resolves host name.

if this function returns CURLE_OK and *async is set to TRUE, the resolve response will be coming asynchronously. If *async is FALSE, the name is already resolved.

Parameters
dataThe sessionhandle pointer
in_connectis set to the next connection data pointer
asyncis set TRUE when an async DNS resolution is pending
See also
Curl_setup_conn()

NOTE this function assigns the conn->data pointer!

Definition at line 6383 of file url.c.

static CURLcode create_conn_helper_init_proxy ( struct connectdata conn)
static

Definition at line 5315 of file url.c.

CURLcode Curl_close ( struct Curl_easy data)

Definition at line 405 of file url.c.

CURLcode Curl_connect ( struct Curl_easy data,
struct connectdata **  in_connect,
bool asyncp,
bool protocol_done 
)

Definition at line 7011 of file url.c.

CURLcode Curl_connected_proxy ( struct connectdata conn,
int  sockindex 
)

Definition at line 3911 of file url.c.

CURLcode Curl_disconnect ( struct connectdata conn,
bool  dead_connection 
)

Definition at line 3097 of file url.c.

int Curl_doing_getsock ( struct connectdata conn,
curl_socket_t socks,
int  numsocks 
)

Definition at line 3982 of file url.c.

CURLcode Curl_dupset ( struct Curl_easy dst,
struct Curl_easy src 
)

Definition at line 362 of file url.c.

void Curl_free_request_state ( struct Curl_easy data)

Definition at line 4923 of file url.c.

void Curl_freeset ( struct Curl_easy data)

Definition at line 284 of file url.c.

void Curl_getoff_all_pipelines ( struct Curl_easy data,
struct connectdata conn 
)

Definition at line 3251 of file url.c.

CURLcode Curl_init_do ( struct Curl_easy data,
struct connectdata conn 
)

Definition at line 7061 of file url.c.

CURLcode Curl_init_userdefined ( struct UserDefined set)

Definition at line 507 of file url.c.

struct connectdata* Curl_oldest_idle_connection ( struct Curl_easy data)

Definition at line 3300 of file url.c.

CURLcode Curl_open ( struct Curl_easy **  curl)

Curl_open()

Parameters
curlis a pointer to a sessionhandle pointer that gets set by this function.
Returns
CURLcode

Definition at line 644 of file url.c.

CURLcode Curl_protocol_connect ( struct connectdata conn,
bool protocol_done 
)

Definition at line 4036 of file url.c.

CURLcode Curl_protocol_connecting ( struct connectdata conn,
bool done 
)

Definition at line 3997 of file url.c.

CURLcode Curl_protocol_doing ( struct connectdata conn,
bool done 
)

Definition at line 4017 of file url.c.

int Curl_protocol_getsock ( struct connectdata conn,
curl_socket_t socks,
int  numsocks 
)

Definition at line 3973 of file url.c.

int Curl_removeHandleFromPipeline ( struct Curl_easy handle,
struct curl_llist pipeline 
)

Definition at line 3206 of file url.c.

CURLcode Curl_setopt ( struct Curl_easy data,
CURLoption  option,
va_list  param 
)

Definition at line 718 of file url.c.

CURLcode Curl_setup_conn ( struct connectdata conn,
bool protocol_done 
)

Definition at line 6933 of file url.c.

void Curl_verboseconnect ( struct connectdata conn)

Definition at line 3961 of file url.c.

static char* detect_proxy ( struct connectdata conn)
static

Definition at line 5011 of file url.c.

static bool disconnect_if_dead ( struct connectdata conn,
struct Curl_easy data 
)
static

Definition at line 3404 of file url.c.

static struct connectdata * find_oldest_idle_connection_in_bundle ( struct Curl_easy data,
struct connectbundle bundle 
)
static

Definition at line 3365 of file url.c.

static CURLcode findprotocol ( struct Curl_easy data,
struct connectdata conn,
const char *  protostr 
)
static

Definition at line 4354 of file url.c.

static void fix_hostname ( struct connectdata conn,
struct hostname host 
)
static

Definition at line 4107 of file url.c.

static void free_fixed_hostname ( struct hostname host)
static

Definition at line 4170 of file url.c.

static unsigned int get_protocol_family ( unsigned int  protocol)
static

Definition at line 7113 of file url.c.

static struct Curl_easy* gethandleathead ( struct curl_llist pipeline)
static

Definition at line 3239 of file url.c.

static bool is_ASCII_name ( const char *  hostname)
static

Definition at line 4093 of file url.c.

static int IsPipeliningPossible ( const struct Curl_easy handle,
const struct connectdata conn 
)
static

Definition at line 3182 of file url.c.

static void llist_dtor ( void *  user,
void *  element 
)
static

Definition at line 4187 of file url.c.

static size_t max_pipeline_length ( struct Curl_multi multi)
static

Definition at line 3470 of file url.c.

static CURLcode override_login ( struct Curl_easy data,
struct connectdata conn,
char **  userp,
char **  passwdp,
char **  optionsp 
)
static

Definition at line 5854 of file url.c.

static CURLcode parse_connect_to_host_port ( struct Curl_easy data,
const char *  host,
char **  hostname_result,
int *  port_result 
)
static

Definition at line 5957 of file url.c.

static CURLcode parse_connect_to_slist ( struct Curl_easy data,
struct connectdata conn,
struct curl_slist conn_to_host 
)
static

Definition at line 6122 of file url.c.

static CURLcode parse_connect_to_string ( struct Curl_easy data,
struct connectdata conn,
const char *  conn_to_host,
char **  host_result,
int *  port_result 
)
static

Definition at line 6052 of file url.c.

static CURLcode parse_login_details ( const char *  login,
const size_t  len,
char **  userptr,
char **  passwdptr,
char **  optionsptr 
)
static

Definition at line 5624 of file url.c.

static CURLcode parse_proxy ( struct Curl_easy data,
struct connectdata conn,
char *  proxy,
curl_proxytype  proxytype 
)
static

Definition at line 5082 of file url.c.

static CURLcode parse_proxy_auth ( struct Curl_easy data,
struct connectdata conn 
)
static

Definition at line 5287 of file url.c.

static CURLcode parse_remote_port ( struct Curl_easy data,
struct connectdata conn 
)
static

Definition at line 5736 of file url.c.

static CURLcode parse_url_login ( struct Curl_easy data,
struct connectdata conn,
char **  userptr,
char **  passwdptr,
char **  optionsptr 
)
static

Definition at line 5494 of file url.c.

static CURLcode parseurlandfillconn ( struct Curl_easy data,
struct connectdata conn,
bool prot_missing,
char **  userp,
char **  passwdp,
char **  optionsp 
)
static

Definition at line 4399 of file url.c.

static bool proxy_info_matches ( const struct proxy_info data,
const struct proxy_info needle 
)
static

Definition at line 3345 of file url.c.

static void prune_dead_connections ( struct Curl_easy data)
static

Definition at line 3457 of file url.c.

static CURLcode resolve_server ( struct Curl_easy data,
struct connectdata conn,
bool async 
)
static

Definition at line 6169 of file url.c.

static void reuse_conn ( struct connectdata old_conn,
struct connectdata conn 
)
static

Definition at line 6284 of file url.c.

static CURLcode set_login ( struct connectdata conn,
const char *  user,
const char *  passwd,
const char *  options 
)
static

Definition at line 5908 of file url.c.

static CURLcode setstropt ( char **  charp,
const char *  s 
)
static

Definition at line 304 of file url.c.

static CURLcode setstropt_userpwd ( char *  option,
char **  userp,
char **  passwdp 
)
static

Definition at line 323 of file url.c.

static CURLcode setup_connection_internals ( struct connectdata conn)
static

Definition at line 4880 of file url.c.

static CURLcode setup_range ( struct Curl_easy data)
static

Definition at line 4843 of file url.c.

static void signalPipeClose ( struct curl_llist pipeline,
bool  pipe_broke 
)
static

Definition at line 3265 of file url.c.

static bool SocketIsDead ( curl_socket_t  sock)
static

Definition at line 3163 of file url.c.

Variable Documentation

const struct Curl_handler Curl_handler_dummy
static
Initial value:

Definition at line 263 of file url.c.

const struct Curl_handler* const protocols[]
static

Definition at line 161 of file url.c.



rc_tagdetect_client
Author(s): Monika Florek-Jasinska , Raphael Schaller
autogenerated on Sat Feb 13 2021 03:42:17