curl/lib
Patrick Monnerat e44ddfd477 mime: clone mime tree upon easy handle duplication.
A mime tree attached to an easy handle using CURLOPT_MIMEPOST is
strongly bound to the handle: there is a pointer to the easy handle in
each item of the mime tree and following the parent pointer list
of mime items ends in a dummy part stored within the handle.

Because of this binding, a mime tree cannot be shared between different
easy handles, thus it needs to be cloned upon easy handle duplication.

There is no way for the caller to get the duplicated mime tree
handle: it is then set to be automatically destroyed upon freeing the
new easy handle.

New test 654 checks proper mime structure duplication/release.

Add a warning note in curl_mime_data_cb() documentation about sharing
user data between duplicated handles.

Closes #2235
2018-01-14 19:43:12 +01:00
..
vauth ntlm: remove unnecessary NULL-check to please scan-build 2017-11-21 09:02:40 +01:00
vtls build: remove HAVE_LIMITS_H check 2018-01-05 23:34:30 -05:00
.gitattributes .gitattributes: force shell scripts to LF 2017-04-17 08:32:13 +02:00
.gitignore
amigaos.c
amigaos.h
arpa_telnet.h
asyn-ares.c build: remove HAVE_LIMITS_H check 2018-01-05 23:34:30 -05:00
asyn-thread.c time: rename Curl_tvnow to Curl_now 2017-10-25 18:48:05 +02:00
asyn.h
base64.c
checksrc.pl scripts: allow all perl scripts to be run directly 2018-01-07 15:42:11 -05:00
CMakeLists.txt cmake: Export libcurl and curl targets to use by other cmake projects 2017-10-28 17:22:47 +02:00
config-amigaos.h
config-dos.h build: remove HAVE_LIMITS_H check 2018-01-05 23:34:30 -05:00
config-mac.h
config-os400.h os400: add missing symbols in config file. 2017-10-19 18:48:21 +01:00
config-riscos.h
config-symbian.h build: remove HAVE_LIMITS_H check 2018-01-05 23:34:30 -05:00
config-tpf.h build: remove HAVE_LIMITS_H check 2018-01-05 23:34:30 -05:00
config-vxworks.h build: remove HAVE_LIMITS_H check 2018-01-05 23:34:30 -05:00
config-win32.h build: remove HAVE_LIMITS_H check 2018-01-05 23:34:30 -05:00
config-win32ce.h build: remove HAVE_LIMITS_H check 2018-01-05 23:34:30 -05:00
conncache.c conncache: fix a return code [regression] 2017-12-12 23:54:35 +01:00
conncache.h conncache: fix several lock issues 2017-12-05 23:21:02 +01:00
connect.c connect: add support for new TCP Fast Open API on Linux 2017-11-24 10:49:59 +01:00
connect.h Curl_timeleft: change return type to timediff_t 2017-10-28 10:40:51 +02:00
content_encoding.c brotli: data at the end of content can be lost 2017-12-27 13:00:54 +01:00
content_encoding.h HTTP: support multiple Content-Encodings 2017-11-05 15:09:48 +01:00
cookie.c cookie: avoid NULL dereference 2017-10-31 09:16:03 +01:00
cookie.h cookies: reject oversized cookies 2017-09-18 22:55:50 +02:00
curl_addrinfo.c configure: check for netinet/in6.h 2017-12-06 00:19:09 +01:00
curl_addrinfo.h
curl_base64.h
curl_config.h.cmake build: remove HAVE_LIMITS_H check 2018-01-05 23:34:30 -05:00
curl_des.c
curl_des.h
curl_endian.c curl_endian: remove unused functions 2017-06-02 13:30:41 +02:00
curl_endian.h curl_endian: remove unused functions 2017-06-02 13:30:41 +02:00
curl_fnmatch.c wildcardmatch: fix heap buffer overflow in setcharset 2017-11-27 08:19:34 +01:00
curl_fnmatch.h
curl_gethostname.c
curl_gethostname.h
curl_gssapi.c
curl_gssapi.h
curl_hmac.h
curl_ldap.h
curl_md4.h mbedtls: enable NTLM (& SMB) even if MD4 support is unavailable 2017-04-21 22:42:14 +02:00
curl_md5.h
curl_memory.h
curl_memrchr.c
curl_memrchr.h
curl_multibyte.c
curl_multibyte.h
curl_ntlm_core.c curl_ntlm_core.c: use the limits.h's SIZE_T_MAX if provided 2017-11-27 10:40:31 +01:00
curl_ntlm_core.h ntlm: move NTLM_NEEDS_NSS_INIT define into core NTLM header 2017-09-23 13:58:14 -04:00
curl_ntlm_wb.c ntlm: move NTLM_NEEDS_NSS_INIT define into core NTLM header 2017-09-23 13:58:14 -04:00
curl_ntlm_wb.h
curl_path.c sftp: allow quoted commands to use relative paths 2017-12-09 13:38:38 +01:00
curl_path.h sftp: allow quoted commands to use relative paths 2017-12-09 13:38:38 +01:00
curl_printf.h
curl_rtmp.c curl_rtmp: fix a compiler warning 2017-07-28 16:41:29 +02:00
curl_rtmp.h
curl_sasl.c Curl_base64_encode: always call with a real data handle. 2017-09-02 12:49:59 +01:00
curl_sasl.h
curl_sec.h
curl_setup_once.h curl_setup_once: Remove ERRNO/SET_ERRNO macros 2017-07-10 02:09:27 -04:00
curl_setup.h progress: calculate transfer speed on milliseconds if possible 2018-01-08 23:45:09 +13:00
curl_sha256.h auth: add support for RFC7616 - HTTP Digest access authentication 2017-10-28 16:32:43 +02:00
curl_sspi.c
curl_sspi.h
curl_threads.c curl_threads: fix MSVC compiler warning 2017-08-01 17:22:30 +02:00
curl_threads.h
curlx.h curlx: the timeval functions are no longer provided as curlx_* 2017-10-30 16:41:44 +01:00
dict.c code style: use spaces around equals signs 2017-09-11 09:29:50 +02:00
dict.h
dotdot.c code style: use spaces around pluses 2017-09-11 09:29:50 +02:00
dotdot.h
easy.c mime: clone mime tree upon easy handle duplication. 2018-01-14 19:43:12 +01:00
easyif.h
escape.c escape.c: error: pointer targets differ in signedness 2017-09-15 16:56:23 +02:00
escape.h
file.c time: rename Curl_tvnow to Curl_now 2017-10-25 18:48:05 +02:00
file.h
fileinfo.c llist: no longer uses malloc 2017-04-22 11:25:27 +02:00
fileinfo.h llist: no longer uses malloc 2017-04-22 11:25:27 +02:00
firefox-db2pem.sh
formdata.c mime: keep "text/plain" content type if user-specified. 2017-10-12 19:36:16 +01:00
formdata.h mime: unified to use the typedef'd mime structs everywhere 2017-09-05 17:33:16 +01:00
ftp.c Curl_timeleft: change return type to timediff_t 2017-10-28 10:40:51 +02:00
ftp.h ftp: fix CWD when doing multicwd then nocwd on same connection 2017-08-17 10:08:11 +02:00
ftplistparser.c ftplistparser: follow-up cleanup to remove PL_ERROR() 2017-10-25 18:45:14 +02:00
ftplistparser.h
getenv.c
getinfo.c getinfo: access SSL internals via Curl_ssl 2017-08-28 14:56:57 +02:00
getinfo.h
gopher.c code style: use spaces around equals signs 2017-09-11 09:29:50 +02:00
gopher.h
hash.c code style: use space after semicolon 2017-09-12 09:50:24 +02:00
hash.h llist: no longer uses malloc 2017-04-22 11:25:27 +02:00
hmac.c
hostasyn.c resolvers: only include anything if needed 2017-10-27 13:20:13 +02:00
hostcheck.c configure: check for netinet/in6.h 2017-12-06 00:19:09 +01:00
hostcheck.h
hostip4.c resolvers: only include anything if needed 2017-10-27 13:20:13 +02:00
hostip6.c resolvers: only include anything if needed 2017-10-27 13:20:13 +02:00
hostip.c RESOLVE: output verbose text when trying to set a duplicate name 2017-12-10 00:41:57 +01:00
hostip.h
hostsyn.c resolvers: only include anything if needed 2017-10-27 13:20:13 +02:00
http2.c http2: fix incorrect trailer buffer size 2018-01-11 02:33:24 -05:00
http2.h http2: fix OOM crash 2017-06-18 23:57:45 +02:00
http_chunks.c HTTP: support multiple Content-Encodings 2017-11-05 15:09:48 +01:00
http_chunks.h
http_digest.c
http_digest.h
http_negotiate.c
http_negotiate.h
http_ntlm.c ntlm: move NTLM_NEEDS_NSS_INIT define into core NTLM header 2017-09-23 13:58:14 -04:00
http_ntlm.h
http_proxy.c CONNECT: keep close connection flag in http_connect_state struct 2017-12-07 09:48:33 +01:00
http_proxy.h http_proxy: fix build with http and proxy 2017-06-18 15:18:15 +02:00
http.c HTTP: bail out on negative Content-Length: values 2018-01-13 22:49:04 +01:00
http.h Curl_checkheaders: make it available for IMAP and SMTP too 2017-09-11 00:26:17 +02:00
idn_win32.c
if2ip.c code style: use spaces around pluses 2017-09-11 09:29:50 +02:00
if2ip.h ipv6_scope: support unique local addresses 2017-08-13 17:52:15 +02:00
imap.c sasl_getmesssage: make sure we have a long enough string to pass 2017-12-05 17:05:44 +01:00
imap.h imap: support PREAUTH 2017-08-23 23:58:49 +02:00
inet_ntop.c code style: use spaces around pluses 2017-09-11 09:29:50 +02:00
inet_ntop.h
inet_pton.c curl_setup_once: Remove ERRNO/SET_ERRNO macros 2017-07-10 02:09:27 -04:00
inet_pton.h inet_pton: fix include on windows to get prototype 2017-07-05 13:28:19 +02:00
krb5.c krb5: fix a potential access of uninitialized memory 2017-12-13 00:36:39 +01:00
ldap.c ldap: silence clang warning 2017-10-15 15:59:43 +00:00
libcurl.plist
libcurl.rc
libcurl.vers.in
llist.c Curl_llist_remove: fix potential NULL pointer deref 2017-11-21 09:02:40 +01:00
llist.h llist: no longer uses malloc 2017-04-22 11:25:27 +02:00
Makefile.am lib: don't export all symbols, just everything curl_* 2017-12-01 10:32:28 +01:00
makefile.amiga
Makefile.b32
makefile.dj lib: fix the djgpp build 2017-06-21 07:46:21 +02:00
Makefile.inc Added support for libssh SSH SCP back-end 2017-12-01 17:35:14 +01:00
Makefile.m32 Makefile.m32: allow to customize brotli libs 2017-11-05 23:02:05 +00:00
Makefile.netware build: remove HAVE_LIMITS_H check 2018-01-05 23:34:30 -05:00
Makefile.vxworks
Makefile.Watcom lib/curl_setup.h: remove CURL_WANTS_CA_BUNDLE_ENV 2017-06-15 11:11:15 +02:00
md4.c MD(4|5): silence cast-align clang warning 2017-06-02 21:58:48 +02:00
md5.c MD(4|5): silence cast-align clang warning 2017-06-02 21:58:48 +02:00
memdebug.c memdebug: use send/recv signature for curl_dosend/curl_dorecv 2017-10-30 21:27:59 +01:00
memdebug.h memdebug: use send/recv signature for curl_dosend/curl_dorecv 2017-10-30 21:27:59 +01:00
mime.c mime: clone mime tree upon easy handle duplication. 2018-01-14 19:43:12 +01:00
mime.h mime: clone mime tree upon easy handle duplication. 2018-01-14 19:43:12 +01:00
mk-ca-bundle.pl scripts: allow all perl scripts to be run directly 2018-01-07 15:42:11 -05:00
mk-ca-bundle.vbs
mprintf.c code style: remove wrong uses of multiple spaces 2017-09-12 13:54:54 +02:00
multi.c multi_done: prune DNS cache 2017-12-10 14:51:47 +01:00
multihandle.h share: add support for sharing the connection cache 2017-11-09 11:07:44 +01:00
multiif.h expire: remove Curl_expire_latest() 2017-06-08 10:50:47 +02:00
netrc.c code style: use spaces around equals signs 2017-09-11 09:29:50 +02:00
netrc.h
non-ascii.c non-ascii: use iconv() with 'char **' argument 2017-09-15 16:56:23 +02:00
non-ascii.h mime: new MIME API. 2017-09-02 17:47:10 +01:00
nonblock.c
nonblock.h
nwlib.c
nwos.c
objnames-test08.sh
objnames-test10.sh
objnames.inc
openldap.c openldap: fix checksrc nits 2017-12-06 14:58:26 +01:00
parsedate.c build: remove HAVE_LIMITS_H check 2018-01-05 23:34:30 -05:00
parsedate.h
pingpong.c time: rename Curl_tvnow to Curl_now 2017-10-25 18:48:05 +02:00
pingpong.h time: rename Curl_tvnow to Curl_now 2017-10-25 18:48:05 +02:00
pipeline.c PIPELINING_SERVER_BL: cleanup the internal list use 2017-06-19 09:14:49 +02:00
pipeline.h
pop3.c sasl_getmesssage: make sure we have a long enough string to pass 2017-12-05 17:05:44 +01:00
pop3.h
progress.c progress: calculate transfer speed on milliseconds if possible 2018-01-08 23:45:09 +13:00
progress.h progress: Track total times following redirects 2017-08-15 18:58:31 +02:00
rand.c rand: add a clang-analyzer work-around 2017-12-13 00:45:42 +01:00
rand.h rand: treat fake entropy the same regardless of endianness 2017-05-08 23:24:29 +02:00
rtsp.c rtsp: Segfault in rtsp.c when using WRITEDATA 2017-09-15 15:43:48 +02:00
rtsp.h handler: refactor connection checking 2017-06-30 10:17:27 +02:00
security.c build: remove HAVE_LIMITS_H check 2018-01-05 23:34:30 -05:00
select.c select: update comments 2017-10-30 16:40:28 +01:00
select.h select.h: avoid macro redefinition harder 2017-07-05 13:28:28 +02:00
sendf.c include: get netinet/in.h before linux/tcp.h 2017-12-07 08:15:44 +01:00
sendf.h
setopt.c setopt: fix SSLVERSION to allow CURL_SSLVERSION_MAX_ values 2018-01-13 02:57:30 -05:00
setopt.h setopt: reintroduce non-static Curl_vsetopt() for OS400 support 2018-01-13 01:28:19 +01:00
setup-os400.h
setup-vms.h
sha256.c auth: add support for RFC7616 - HTTP Digest access authentication 2017-10-28 16:32:43 +02:00
share.c curl_share_setopt: va_end was not called if conncache errors 2017-11-10 15:02:11 +01:00
share.h share: add support for sharing the connection cache 2017-11-09 11:07:44 +01:00
sigpipe.h
slist.c
slist.h
smb.c SMB: fix uninitialized local variable 2017-11-13 08:27:36 +01:00
smb.h
smtp.c sasl_getmesssage: make sure we have a long enough string to pass 2017-12-05 17:05:44 +01:00
smtp.h
sockaddr.h
socks_gssapi.c code style: use spaces around pluses 2017-09-11 09:29:50 +02:00
socks_sspi.c code style: use spaces around pluses 2017-09-11 09:29:50 +02:00
socks.c Curl_timeleft: change return type to timediff_t 2017-10-28 10:40:51 +02:00
socks.h
speedcheck.c timediff: return timediff_t from the time diff functions 2017-10-25 09:54:37 +02:00
speedcheck.h timeval: struct curltime is a struct timeval replacement 2017-07-28 15:51:25 +02:00
splay.c code style: use spaces around equals signs 2017-09-11 09:29:50 +02:00
splay.h code style: remove wrong uses of multiple spaces 2017-09-12 13:54:54 +02:00
ssh-libssh.c build: remove HAVE_LIMITS_H check 2018-01-05 23:34:30 -05:00
ssh.c build: remove HAVE_LIMITS_H check 2018-01-05 23:34:30 -05:00
ssh.h libssh: added SFTP support 2017-12-01 17:38:37 +01:00
strcase.c strcase: corrected comment header for Curl_strcasecompare() 2017-08-31 11:37:36 +02:00
strcase.h
strdup.c code style: use spaces around pluses 2017-09-11 09:29:50 +02:00
strdup.h
strerror.c strerror: Preserve Windows error code in some functions 2017-07-11 01:53:23 -04:00
strerror.h
strtok.c
strtok.h
strtoofft.c strtoofft: Remove extraneous null check 2017-10-06 14:49:28 +02:00
strtoofft.h progress: calculate transfer speed on milliseconds if possible 2018-01-08 23:45:09 +13:00
system_win32.c
system_win32.h
telnet.c time: rename Curl_tvnow to Curl_now 2017-10-25 18:48:05 +02:00
telnet.h
tftp.c Curl_timeleft: change return type to timediff_t 2017-10-28 10:40:51 +02:00
tftp.h
timeval.c timeval: use mach time on MacOS 2017-10-30 15:27:46 +01:00
timeval.h timeval: make timediff_t also work on 32bit windows 2017-10-26 20:22:55 +02:00
transfer.c HTTP: support multiple Content-Encodings 2017-11-05 15:09:48 +01:00
transfer.h Curl_checkheaders: make it available for IMAP and SMTP too 2017-09-11 00:26:17 +02:00
url.c build: remove HAVE_LIMITS_H check 2018-01-05 23:34:30 -05:00
url.h setopt: reintroduce non-static Curl_vsetopt() for OS400 support 2018-01-13 01:28:19 +01:00
urldata.h progress: calculate transfer speed on milliseconds if possible 2018-01-08 23:45:09 +13:00
version.c libssh: added SFTP support 2017-12-01 17:38:37 +01:00
warnless.c CURL_SIZEOF_LONG: removed, use only SIZEOF_LONG 2017-08-17 10:27:00 +02:00
warnless.h
wildcard.c
wildcard.h
x509asn1.c x509asn1: fix implicit-fallthrough warning with GCC 7 2017-06-03 20:10:52 +02:00
x509asn1.h