2011-07-26 23:23:27 +08:00
|
|
|
#ifndef HEADER_CURL_URL_H
|
|
|
|
#define HEADER_CURL_URL_H
|
2002-09-03 19:52:59 +08:00
|
|
|
/***************************************************************************
|
2004-05-17 16:05:46 +08:00
|
|
|
* _ _ ____ _
|
|
|
|
* Project ___| | | | _ \| |
|
|
|
|
* / __| | | | |_) | |
|
|
|
|
* | (__| |_| | _ <| |___
|
2000-05-22 22:12:12 +08:00
|
|
|
* \___|\___/|_| \_\_____|
|
|
|
|
*
|
2021-01-09 00:58:15 +08:00
|
|
|
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
|
2000-05-22 22:12:12 +08:00
|
|
|
*
|
2002-09-03 19:52:59 +08:00
|
|
|
* This software is licensed as described in the file COPYING, which
|
|
|
|
* you should have received as part of this distribution. The terms
|
2020-11-04 21:02:01 +08:00
|
|
|
* are also available at https://curl.se/docs/copyright.html.
|
2004-05-17 16:05:46 +08:00
|
|
|
*
|
2001-01-03 17:29:33 +08:00
|
|
|
* 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
|
2002-09-03 19:52:59 +08:00
|
|
|
* furnished to do so, under the terms of the COPYING file.
|
2000-05-22 22:12:12 +08:00
|
|
|
*
|
2001-01-03 17:29:33 +08:00
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
2000-05-22 22:12:12 +08:00
|
|
|
*
|
2002-09-03 19:52:59 +08:00
|
|
|
***************************************************************************/
|
2013-01-07 02:06:49 +08:00
|
|
|
#include "curl_setup.h"
|
2001-01-05 18:11:41 +08:00
|
|
|
|
2001-08-15 14:53:34 +08:00
|
|
|
/*
|
2013-01-04 09:50:28 +08:00
|
|
|
* Prototypes for library-wide functions provided by url.c
|
2001-08-15 14:53:34 +08:00
|
|
|
*/
|
|
|
|
|
2016-06-21 21:47:12 +08:00
|
|
|
CURLcode Curl_init_do(struct Curl_easy *data, struct connectdata *conn);
|
|
|
|
CURLcode Curl_open(struct Curl_easy **curl);
|
2017-12-21 02:33:50 +08:00
|
|
|
CURLcode Curl_init_userdefined(struct Curl_easy *data);
|
2018-07-13 23:17:19 +08:00
|
|
|
|
2020-05-13 18:56:53 +08:00
|
|
|
void Curl_freeset(struct Curl_easy *data);
|
2018-10-22 06:09:49 +08:00
|
|
|
CURLcode Curl_uc_to_curlcode(CURLUcode uc);
|
2019-10-28 16:28:05 +08:00
|
|
|
CURLcode Curl_close(struct Curl_easy **datap); /* opposite of curl_open() */
|
2019-01-03 01:04:58 +08:00
|
|
|
CURLcode Curl_connect(struct Curl_easy *, bool *async, bool *protocol_connect);
|
2018-07-04 06:55:48 +08:00
|
|
|
CURLcode Curl_disconnect(struct Curl_easy *data,
|
|
|
|
struct connectdata *, bool dead_connection);
|
2021-01-25 06:32:24 +08:00
|
|
|
CURLcode Curl_setup_conn(struct Curl_easy *data,
|
2011-01-31 07:10:35 +08:00
|
|
|
bool *protocol_done);
|
2016-06-21 21:47:12 +08:00
|
|
|
void Curl_free_request_state(struct Curl_easy *data);
|
2017-11-11 00:45:54 +08:00
|
|
|
CURLcode Curl_parse_login_details(const char *login, const size_t len,
|
|
|
|
char **userptr, char **passwdptr,
|
|
|
|
char **optionsptr);
|
2006-09-08 05:49:20 +08:00
|
|
|
|
2018-08-05 17:51:07 +08:00
|
|
|
const struct Curl_handler *Curl_builtin_scheme(const char *scheme);
|
|
|
|
|
2020-02-07 23:09:41 +08:00
|
|
|
bool Curl_is_ASCII_name(const char *hostname);
|
2021-01-25 06:32:24 +08:00
|
|
|
CURLcode Curl_idnconvert_hostname(struct Curl_easy *data,
|
2020-02-07 23:09:41 +08:00
|
|
|
struct hostname *host);
|
|
|
|
void Curl_free_idnconverted_hostname(struct hostname *host);
|
|
|
|
|
2008-04-06 05:13:31 +08:00
|
|
|
#define CURL_DEFAULT_PROXY_PORT 1080 /* default proxy port unless specified */
|
2016-11-25 02:40:30 +08:00
|
|
|
#define CURL_DEFAULT_HTTPS_PROXY_PORT 443 /* default https proxy port unless
|
|
|
|
specified */
|
2008-04-06 05:13:31 +08:00
|
|
|
|
2010-05-08 05:49:29 +08:00
|
|
|
#ifdef CURL_DISABLE_VERBOSE_STRINGS
|
2021-01-09 00:58:15 +08:00
|
|
|
#define Curl_verboseconnect(x,y) Curl_nop_stmt
|
2010-05-08 05:49:29 +08:00
|
|
|
#else
|
2021-01-09 00:58:15 +08:00
|
|
|
void Curl_verboseconnect(struct Curl_easy *data, struct connectdata *conn);
|
2010-05-08 05:49:29 +08:00
|
|
|
#endif
|
|
|
|
|
2020-05-27 17:51:34 +08:00
|
|
|
#ifdef CURL_DISABLE_PROXY
|
|
|
|
#define CONNECT_PROXY_SSL() FALSE
|
|
|
|
#else
|
|
|
|
|
2016-11-17 01:49:15 +08:00
|
|
|
#define CONNECT_PROXY_SSL()\
|
|
|
|
(conn->http_proxy.proxytype == CURLPROXY_HTTPS &&\
|
|
|
|
!conn->bits.proxy_ssl_connected[sockindex])
|
|
|
|
|
|
|
|
#define CONNECT_FIRSTSOCKET_PROXY_SSL()\
|
|
|
|
(conn->http_proxy.proxytype == CURLPROXY_HTTPS &&\
|
|
|
|
!conn->bits.proxy_ssl_connected[FIRSTSOCKET])
|
|
|
|
|
|
|
|
#define CONNECT_SECONDARYSOCKET_PROXY_SSL()\
|
|
|
|
(conn->http_proxy.proxytype == CURLPROXY_HTTPS &&\
|
|
|
|
!conn->bits.proxy_ssl_connected[SECONDARYSOCKET])
|
2020-05-27 17:51:34 +08:00
|
|
|
#endif /* !CURL_DISABLE_PROXY */
|
2010-05-08 05:49:29 +08:00
|
|
|
|
2011-07-26 23:23:27 +08:00
|
|
|
#endif /* HEADER_CURL_URL_H */
|