2011-07-26 11:23:27 -04:00
|
|
|
#ifndef HEADER_CURL_URL_H
|
|
|
|
#define HEADER_CURL_URL_H
|
2002-09-03 07:52:59 -04:00
|
|
|
/***************************************************************************
|
2004-05-17 04:05:46 -04:00
|
|
|
* _ _ ____ _
|
|
|
|
* Project ___| | | | _ \| |
|
|
|
|
* / __| | | | |_) | |
|
|
|
|
* | (__| |_| | _ <| |___
|
2000-05-22 10:12:12 -04:00
|
|
|
* \___|\___/|_| \_\_____|
|
|
|
|
*
|
2021-01-08 11:58:15 -05:00
|
|
|
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
|
2000-05-22 10:12:12 -04:00
|
|
|
*
|
2002-09-03 07:52:59 -04: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 08:02:01 -05:00
|
|
|
* are also available at https://curl.se/docs/copyright.html.
|
2004-05-17 04:05:46 -04:00
|
|
|
*
|
2001-01-03 04:29:33 -05: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 07:52:59 -04:00
|
|
|
* furnished to do so, under the terms of the COPYING file.
|
2000-05-22 10:12:12 -04:00
|
|
|
*
|
2001-01-03 04:29:33 -05:00
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
2000-05-22 10:12:12 -04:00
|
|
|
*
|
2002-09-03 07:52:59 -04:00
|
|
|
***************************************************************************/
|
2013-01-06 13:06:49 -05:00
|
|
|
#include "curl_setup.h"
|
2001-01-05 05:11:41 -05:00
|
|
|
|
2017-11-10 11:45:54 -05:00
|
|
|
#define READBUFFER_SIZE CURL_MAX_WRITE_SIZE
|
|
|
|
#define READBUFFER_MAX CURL_MAX_READ_SIZE
|
|
|
|
#define READBUFFER_MIN 1024
|
|
|
|
|
2018-08-18 10:17:05 -04:00
|
|
|
/* The default upload buffer size, should not be smaller than
|
|
|
|
CURL_MAX_WRITE_SIZE, as it needs to hold a full buffer as could be sent in
|
|
|
|
a write callback.
|
|
|
|
|
|
|
|
The size was 16KB for many years but was bumped to 64KB because it makes
|
|
|
|
libcurl able to do significantly faster uploads in some circumstances. Even
|
|
|
|
larger buffers can help further, but this is deemed a fair memory/speed
|
|
|
|
compromise. */
|
|
|
|
#define UPLOADBUFFER_DEFAULT 65536
|
|
|
|
#define UPLOADBUFFER_MAX (2*1024*1024)
|
|
|
|
#define UPLOADBUFFER_MIN CURL_MAX_WRITE_SIZE
|
|
|
|
|
2001-08-15 02:53:34 -04:00
|
|
|
/*
|
2013-01-03 20:50:28 -05:00
|
|
|
* Prototypes for library-wide functions provided by url.c
|
2001-08-15 02:53:34 -04:00
|
|
|
*/
|
|
|
|
|
2016-06-21 09:47:12 -04:00
|
|
|
CURLcode Curl_init_do(struct Curl_easy *data, struct connectdata *conn);
|
|
|
|
CURLcode Curl_open(struct Curl_easy **curl);
|
2017-12-20 13:33:50 -05:00
|
|
|
CURLcode Curl_init_userdefined(struct Curl_easy *data);
|
2018-07-13 11:17:19 -04:00
|
|
|
|
2020-05-13 06:56:53 -04:00
|
|
|
void Curl_freeset(struct Curl_easy *data);
|
2018-10-21 18:09:49 -04:00
|
|
|
CURLcode Curl_uc_to_curlcode(CURLUcode uc);
|
2019-10-28 04:28:05 -04:00
|
|
|
CURLcode Curl_close(struct Curl_easy **datap); /* opposite of curl_open() */
|
2019-01-02 12:04:58 -05:00
|
|
|
CURLcode Curl_connect(struct Curl_easy *, bool *async, bool *protocol_connect);
|
2018-07-03 18:55:48 -04:00
|
|
|
CURLcode Curl_disconnect(struct Curl_easy *data,
|
|
|
|
struct connectdata *, bool dead_connection);
|
2011-01-30 18:10:35 -05:00
|
|
|
CURLcode Curl_setup_conn(struct connectdata *conn,
|
|
|
|
bool *protocol_done);
|
2016-06-21 09:47:12 -04:00
|
|
|
void Curl_free_request_state(struct Curl_easy *data);
|
2017-11-10 11:45:54 -05:00
|
|
|
CURLcode Curl_parse_login_details(const char *login, const size_t len,
|
|
|
|
char **userptr, char **passwdptr,
|
|
|
|
char **optionsptr);
|
2006-09-07 17:49:20 -04:00
|
|
|
|
2018-08-05 05:51:07 -04:00
|
|
|
const struct Curl_handler *Curl_builtin_scheme(const char *scheme);
|
|
|
|
|
2020-02-07 10:09:41 -05:00
|
|
|
bool Curl_is_ASCII_name(const char *hostname);
|
|
|
|
CURLcode Curl_idnconvert_hostname(struct connectdata *conn,
|
|
|
|
struct hostname *host);
|
|
|
|
void Curl_free_idnconverted_hostname(struct hostname *host);
|
|
|
|
|
2008-04-05 17:13:31 -04:00
|
|
|
#define CURL_DEFAULT_PROXY_PORT 1080 /* default proxy port unless specified */
|
2016-11-24 13:40:30 -05:00
|
|
|
#define CURL_DEFAULT_HTTPS_PROXY_PORT 443 /* default https proxy port unless
|
|
|
|
specified */
|
2008-04-05 17:13:31 -04:00
|
|
|
|
2010-05-07 17:49:29 -04:00
|
|
|
#ifdef CURL_DISABLE_VERBOSE_STRINGS
|
2021-01-08 11:58:15 -05:00
|
|
|
#define Curl_verboseconnect(x,y) Curl_nop_stmt
|
2010-05-07 17:49:29 -04:00
|
|
|
#else
|
2021-01-08 11:58:15 -05:00
|
|
|
void Curl_verboseconnect(struct Curl_easy *data, struct connectdata *conn);
|
2010-05-07 17:49:29 -04:00
|
|
|
#endif
|
|
|
|
|
2020-05-27 05:51:34 -04:00
|
|
|
#ifdef CURL_DISABLE_PROXY
|
|
|
|
#define CONNECT_PROXY_SSL() FALSE
|
|
|
|
#else
|
|
|
|
|
2016-11-16 12:49:15 -05: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 05:51:34 -04:00
|
|
|
#endif /* !CURL_DISABLE_PROXY */
|
2010-05-07 17:49:29 -04:00
|
|
|
|
2011-07-26 11:23:27 -04:00
|
|
|
#endif /* HEADER_CURL_URL_H */
|