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
|
|
|
* \___|\___/|_| \_\_____|
|
|
|
|
*
|
2019-01-03 01:04:58 +08:00
|
|
|
* Copyright (C) 1998 - 2019, 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
|
2016-02-03 07:19:02 +08:00
|
|
|
* are also available at https://curl.haxx.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
|
|
|
|
2017-11-11 00:45:54 +08:00
|
|
|
#define READBUFFER_SIZE CURL_MAX_WRITE_SIZE
|
|
|
|
#define READBUFFER_MAX CURL_MAX_READ_SIZE
|
|
|
|
#define READBUFFER_MIN 1024
|
|
|
|
|
2018-08-18 22:17:05 +08: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 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
|
|
|
|
2016-06-21 21:47:12 +08:00
|
|
|
void Curl_freeset(struct Curl_easy * data);
|
2018-10-22 06:09:49 +08:00
|
|
|
CURLcode Curl_uc_to_curlcode(CURLUcode uc);
|
2016-06-21 21:47:12 +08:00
|
|
|
CURLcode Curl_close(struct Curl_easy *data); /* 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);
|
2011-01-31 07:10:35 +08:00
|
|
|
CURLcode Curl_setup_conn(struct connectdata *conn,
|
|
|
|
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);
|
|
|
|
|
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
|
2011-09-03 22:06:10 +08:00
|
|
|
#define Curl_verboseconnect(x) Curl_nop_stmt
|
2010-05-08 05:49:29 +08:00
|
|
|
#else
|
|
|
|
void Curl_verboseconnect(struct connectdata *conn);
|
|
|
|
#endif
|
|
|
|
|
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])
|
2010-05-08 05:49:29 +08:00
|
|
|
|
2011-07-26 23:23:27 +08:00
|
|
|
#endif /* HEADER_CURL_URL_H */
|