Age | Commit message (Collapse) | Author |
|
Removes two entries from KNOWN_BUGS.
Closes #4907
|
|
Previously it was stored in a global state which contributed to
curl_global_init's thread unsafety. This boolean is now instead figured
out in curl_multi_init() and stored in the multi handle. Less effective,
but thread safe.
Closes #4851
|
|
... to make it hold microseconds too.
Fixes #4165
Closes #4168
|
|
It was used (intended) to pass in the size of the 'socks' array that is
also passed to these functions, but was rarely actually checked/used and
the array is defined to a fixed size of MAX_SOCKSPEREASYHANDLE entries
that should be used instead.
Closes #4169
|
|
There were a leftover few prototypes of Curl_ functions that we used to
export but no longer do, this removes those prototypes and cleans up any
comments still referring to them.
Curl_write32_le(), Curl_strcpy_url(), Curl_strlen_url(), Curl_up_free()
Curl_concat_url(), Curl_detach_connnection(), Curl_http_setup_conn()
were made static in 05b100aee247bb9bec8e9a1b0166496aa4248d1c.
Curl_http_perhapsrewind() made static in 574aecee208f79d391f10d57520b3.
For the remainder, I didn't trawl the Git logs hard enough to capture
their exact time of deletion, but they were all gone: Curl_splayprint(),
Curl_http2_send_request(), Curl_global_host_cache_dtor(),
Curl_scan_cache_used(), Curl_hostcache_destroy(), Curl_second_connect(),
Curl_http_auth_stage() and Curl_close_connections().
Closes #4096
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
|
|
Due to limitations in Curl_resolver_wait_resolv(), it doesn't work for
DOH resolves. This fix disables DOH for those.
Limitation added to KNOWN_BUGS.
Fixes #3850
Closes #3857
|
|
urlapi: turn three local-only functions into statics
conncache: make conncache_find_first_connection static
multi: make detach_connnection static
connect: make getaddressinfo static
curl_ntlm_core: make hmac_md5 static
http2: make two functions static
http: make http_setup_conn static
connect: make tcpnodelay static
tests: make UNITTEST a thing to mark functions with, so they can be static for
normal builds and non-static for unit test builds
... and mark Curl_shuffle_addr accordingly.
url: make up_free static
setopt: make vsetopt static
curl_endian: make write32_le static
rtsp: make rtsp_connisdead static
warnless: remove unused functions
memdebug: remove one unused function, made another static
|
|
Closes #2668
|
|
This patch adds CURLOPT_DNS_SHUFFLE_ADDRESSES to explicitly request
shuffling of IP addresses returned for a hostname when there is more
than one. This is useful when the application knows that a round robin
approach is appropriate and is willing to accept the consequences of
potentially discarding some preference order returned by the system's
implementation.
Closes #1694
|
|
Closes #1356
|
|
In order to make the code style more uniform everywhere
|
|
|
|
Visual C++ now complains about implicitly casting time_t (64-bit) to
long (32-bit). Fix this by changing some variables from long to time_t,
or explicitly casting to long where the public interface would be
affected.
Closes #1131
|
|
|
|
|
|
This avoids unnecessary dynamic allocs and as this also removed the last
users of *hash_alloc() and *hash_destroy(), those two functions are now
removed.
|
|
|
|
- cache entries must be also refreshed when they are in use
- have the cache count as inuse reference too, freeing timestamp == 0 special
value
- use timestamp == 0 for CURLOPT_RESOLVE entries which don't get refreshed
- remove CURLOPT_RESOLVE special inuse reference (timestamp == 0 will prevent refresh)
- fix Curl_hostcache_clean - CURLOPT_RESOLVE entries don't have a special
reference anymore, and it would also release non CURLOPT_RESOLVE references
- fix locking in Curl_hostcache_clean
- fix unit1305.c: hash now keeps a reference, need to set inuse = 1
|
|
Also, remove the log output of the resolved name is NOT in the cache in
the spirit of only telling when something is actually happening.
|
|
For consistency, as we seem to have a bit of a mixed bag, changed all
instances of ipv4 and ipv6 in comments and documentations to use the
correct case.
|
|
While waiting for a host resolve, check if the host cache may have
gotten the name already (by someone else), for when the same name is
resolved by several simultanoues requests.
The resolver thread occasionally gets stuck in getaddrinfo() when the
DNS or anything else is crappy or slow, so when a host is found in the
DNS cache, leave the thread alone and let itself cleanup the mess.
|
|
Avoid 'interface' literal that some MinGW versions define as a macro
Additionally, corrected some very, very minor coding style errors.
|
|
|
|
CURLOPT_DNS_USE_GLOBAL_CACHE broke in commit c43127414d89ccb (been
broken since the libcurl 7.29.0 release). While this option has been
documented as deprecated for almost a decade and nobody even reported
this bug, it should remain functional.
Added test case 1512 to verify
|
|
This commit renames lib/setup.h to lib/curl_setup.h and
renames lib/setup_once.h to lib/curl_setup_once.h.
Removes the need and usage of a header inclusion guard foreign
to libcurl. [1]
Removes the need and presence of an alarming notice we carried
in old setup_once.h [2]
----------------------------------------
1 - lib/setup_once.h used __SETUP_ONCE_H macro as header inclusion guard
up to commit ec691ca3 which changed this to HEADER_CURL_SETUP_ONCE_H,
this single inclusion guard is enough to ensure that inclusion of
lib/setup_once.h done from lib/setup.h is only done once.
Additionally lib/setup.h has always used __SETUP_ONCE_H macro to
protect inclusion of setup_once.h even after commit ec691ca3, this
was to avoid a circular header inclusion triggered when building a
c-ares enabled version with c-ares sources available which also has
a setup_once.h header. Commit ec691ca3 exposes the real nature of
__SETUP_ONCE_H usage in lib/setup.h, it is a header inclusion guard
foreign to libcurl belonging to c-ares's setup_once.h
The renaming this commit does, fixes the circular header inclusion,
and as such removes the need and usage of a header inclusion guard
foreign to libcurl. Macro __SETUP_ONCE_H no longer used in libcurl.
2 - Due to the circular interdependency of old lib/setup_once.h and the
c-ares setup_once.h header, old file lib/setup_once.h has carried
back from 2006 up to now days an alarming and prominent notice about
the need of keeping libcurl's and c-ares's setup_once.h in sync.
Given that this commit fixes the circular interdependency, the need
and presence of mentioned notice is removed.
All mentioned interdependencies come back from now old days when
the c-ares project lived inside a curl subdirectory. This commit
removes last traces of such fact.
|
|
This reverts renaming and usage of lib/*.h header files done
28-12-2012, reverting 2 commits:
f871de0... build: make use of 76 lib/*.h renamed files
ffd8e12... build: rename 76 lib/*.h files
This also reverts removal of redundant include guard (redundant thanks
to changes in above commits) done 2-12-2013, reverting 1 commit:
c087374... curl_setup.h: remove redundant include guard
This also reverts renaming and usage of lib/*.c source files done
3-12-2013, reverting 3 commits:
13606bb... build: make use of 93 lib/*.c renamed files
5b6e792... build: rename 93 lib/*.c files
7d83dff... build: commit 13606bbfde follow-up 1
Start of related discussion thread:
http://curl.haxx.se/mail/lib-2013-01/0012.html
Asking for confirmation on pushing this revertion commit:
http://curl.haxx.se/mail/lib-2013-01/0048.html
Confirmation summary:
http://curl.haxx.se/mail/lib-2013-01/0079.html
NOTICE: The list of 2 files that have been modified by other
intermixed commits, while renamed, and also by at least one
of the 6 commits this one reverts follows below. These 2 files
will exhibit a hole in history unless git's '--follow' option
is used when viewing logs.
lib/curl_imap.h
lib/curl_smtp.h
|
|
76 private header files renamed to use our standard naming scheme.
This commit only does the file renaming.
----------------------------------------
renamed: amigaos.h -> curl_amigaos.h
renamed: arpa_telnet.h -> curl_arpa_telnet.h
renamed: asyn.h -> curl_asyn.h
renamed: axtls.h -> curl_axtls.h
renamed: bundles.h -> curl_bundles.h
renamed: conncache.h -> curl_conncache.h
renamed: connect.h -> curl_connect.h
renamed: content_encoding.h -> curl_content_encoding.h
renamed: cookie.h -> curl_cookie.h
renamed: cyassl.h -> curl_cyassl.h
renamed: dict.h -> curl_dict.h
renamed: easyif.h -> curl_easyif.h
renamed: escape.h -> curl_escape.h
renamed: file.h -> curl_file.h
renamed: fileinfo.h -> curl_fileinfo.h
renamed: formdata.h -> curl_formdata.h
renamed: ftp.h -> curl_ftp.h
renamed: ftplistparser.h -> curl_ftplistparser.h
renamed: getinfo.h -> curl_getinfo.h
renamed: gopher.h -> curl_gopher.h
renamed: gtls.h -> curl_gtls.h
renamed: hash.h -> curl_hash.h
renamed: hostcheck.h -> curl_hostcheck.h
renamed: hostip.h -> curl_hostip.h
renamed: http.h -> curl_http.h
renamed: http_chunks.h -> curl_http_chunks.h
renamed: http_digest.h -> curl_http_digest.h
renamed: http_negotiate.h -> curl_http_negotiate.h
renamed: http_proxy.h -> curl_http_proxy.h
renamed: if2ip.h -> curl_if2ip.h
renamed: imap.h -> curl_imap.h
renamed: inet_ntop.h -> curl_inet_ntop.h
renamed: inet_pton.h -> curl_inet_pton.h
renamed: krb4.h -> curl_krb4.h
renamed: llist.h -> curl_llist.h
renamed: memdebug.h -> curl_memdebug.h
renamed: multiif.h -> curl_multiif.h
renamed: netrc.h -> curl_netrc.h
renamed: non-ascii.h -> curl_non-ascii.h
renamed: nonblock.h -> curl_nonblock.h
renamed: nssg.h -> curl_nssg.h
renamed: parsedate.h -> curl_parsedate.h
renamed: pingpong.h -> curl_pingpong.h
renamed: polarssl.h -> curl_polarssl.h
renamed: pop3.h -> curl_pop3.h
renamed: progress.h -> curl_progress.h
renamed: qssl.h -> curl_qssl.h
renamed: rawstr.h -> curl_rawstr.h
renamed: rtsp.h -> curl_rtsp.h
renamed: select.h -> curl_select.h
renamed: sendf.h -> curl_sendf.h
renamed: setup.h -> curl_setup.h
renamed: setup_once.h -> curl_setup_once.h
renamed: share.h -> curl_share.h
renamed: slist.h -> curl_slist.h
renamed: smtp.h -> curl_smtp.h
renamed: sockaddr.h -> curl_sockaddr.h
renamed: socks.h -> curl_socks.h
renamed: speedcheck.h -> curl_speedcheck.h
renamed: splay.h -> curl_splay.h
renamed: ssh.h -> curl_ssh.h
renamed: sslgen.h -> curl_sslgen.h
renamed: ssluse.h -> curl_ssluse.h
renamed: strdup.h -> curl_strdup.h
renamed: strequal.h -> curl_strequal.h
renamed: strerror.h -> curl_strerror.h
renamed: strtok.h -> curl_strtok.h
renamed: strtoofft.h -> curl_strtoofft.h
renamed: telnet.h -> curl_telnet.h
renamed: tftp.h -> curl_tftp.h
renamed: timeval.h -> curl_timeval.h
renamed: transfer.h -> curl_transfer.h
renamed: url.h -> curl_url.h
renamed: urldata.h -> curl_urldata.h
renamed: warnless.h -> curl_warnless.h
renamed: wildcard.h -> curl_wildcard.h
----------------------------------------
|
|
76 private header files renamed to use our standard naming scheme.
This change affects 322 files in libcurl's source tree.
|
|
DNS cache entries populated with CURLOPT_RESOLVE were not properly freed
again when done using the multi interface.
Test case 1502 added to verify.
Bug: http://curl.haxx.se/bug/view.cgi?id=3575448
Reported by: Alex Gruz
|
|
The load host names to DNS cache function was moved to hostip.c and it
now makes sure to not add host names that already are present in the
cache. It would previously lead to memory leaks when for example using
the --resolve and multiple URLs on the command line.
|
|
CURLOPT_RESOLVE populates the DNS cache with entries that are marked as
eternally in use. Those entries need to be taken care of when the cache
is killed off.
Bug: http://curl.haxx.se/bug/view.cgi?id=3463121
Reported by: "tw84452852"
|
|
|
|
|
|
asyn-ares.c and asyn-thread.c are two separate backends that implement
the same (internal) async resolver API for libcurl to use. Backend is
specified at build time.
The internal resolver API is defined in asyn.h for asynch resolvers.
|
|
Fixed indents, coding conventions and white space edits.
Modified the c-ares completion callback function to again NOT read the
conn data when the ares handle is being taken down as then it may have
been freed already.
|
|
Introducing an internal API for handling of different async resolver
backends.
|
|
Found with codespell.
|
|
Move ipv6-functional-probe into a single function that is used from all
places that need to know.
Make the probe function store the result in a static variable so that
subsequent invokes just returns the previous result and won't have to
probe again.
|
|
When built IPv6-enabled, we could do Curl_done() with one of the two
resolves having returned already, so when ares_cancel() is called the
resolve callback ends up doing funny things (sometimes resulting in a
segfault) since it would try to actually store the previous resolve even
though we're shutting down the resolve.
This bug was introduced in commit 8ab137b2bc9630ce so it hasn't been
included in any public release.
Bug: http://curl.haxx.se/bug/view.cgi?id=3145445
Reported by: Pedro Larroy
|
|
The IP version choice was previously only in the UserDefined struct
within the SessionHandle, but since we sometimes alter that option
during a request we need to have it on a per-connection basis.
I also moved more "init conn" code into the allocate_conn() function
which is designed for that purpose more or less.
|
|
|
|
|
|
from hostip.h to setup.h in order to allow proper inclusion in any file.
This represents no functional change at all in which resolver is used,
everything still works as usual, internally and externally there is no
difference in behavior.
|
|
removal of Curl_addrinfo_copy(), Curl_addrinfo6_callback(), and
Curl_addrinfo4_callback()
|
|
(http://curl.haxx.se/bug/view.cgi?id=2891595) which identified how an entry
in the DNS cache would linger too long if the request that added it was in
use that long. He also provided the patch that now makes libcurl capable of
still doing a request while the DNS hash entry may get timed out.
|
|
which now also takes a protocol address family argument.
|
|
implementation from lib/hostip6.c to lib/curl_addrinfo.c
and prototypes from lib/hostip.h to lib/curl_addrinfo.h
|
|
Use a wrapper function to call system's getaddrinfo().
|
|
or `vfork'
|
|
|