mirror of
https://github.com/curl/curl.git
synced 2026-08-24 22:13:33 +03:00
hostip: cache negative name resolves
Hold them for half the normal lifetime. Helps when told to transfer N URLs in quick succession that all use the same non-resolving hostname. Done by storing a DNS entry with a NULL pointer for 'addr'. Previously an attempt was made in #12406 by Björn Stenberg that was ultimately never merged. Closes #18157
This commit is contained in:
parent
06c12cc08b
commit
df2b4ccc22
11 changed files with 155 additions and 19 deletions
|
|
@ -74,7 +74,7 @@ static CURLcode test_lib655(const char *URL)
|
|||
goto test_cleanup;
|
||||
}
|
||||
|
||||
/* First set the URL that is about to receive our request. */
|
||||
/* Set the URL that is about to receive our first request. */
|
||||
test_setopt(curl, CURLOPT_URL, URL);
|
||||
|
||||
test_setopt(curl, CURLOPT_RESOLVER_START_DATA, TEST_DATA_STRING);
|
||||
|
|
@ -91,6 +91,9 @@ static CURLcode test_lib655(const char *URL)
|
|||
goto test_cleanup;
|
||||
}
|
||||
|
||||
/* Set the URL that receives our second request. */
|
||||
test_setopt(curl, CURLOPT_URL, libtest_arg2);
|
||||
|
||||
test_setopt(curl, CURLOPT_RESOLVER_START_FUNCTION, resolver_alloc_cb_pass);
|
||||
|
||||
/* this should succeed */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue