mirror of
https://github.com/curl/curl.git
synced 2026-05-30 23:17:32 +03:00
url: Add option CURLOPT_RESOLVER_START_FUNCTION
- Add new option CURLOPT_RESOLVER_START_FUNCTION to set a callback that will be called every time before a new resolve request is started (ie before a host is resolved) with a pointer to backend-specific resolver data. Currently this is only useful for ares. - Add new option CURLOPT_RESOLVER_START_DATA to set a user pointer to pass to the resolver start callback. Closes https://github.com/curl/curl/pull/2311
This commit is contained in:
parent
dd027c80fe
commit
23713645d4
16 changed files with 379 additions and 3 deletions
50
tests/data/test655
Normal file
50
tests/data/test655
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
HTTP
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<data>
|
||||
HTTP/1.1 200 OK
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake swsclose
|
||||
Connection: close
|
||||
Content-Type: text/html
|
||||
|
||||
hello
|
||||
</data>
|
||||
<datacheck>
|
||||
hello
|
||||
</datacheck>
|
||||
</reply>
|
||||
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
http
|
||||
</server>
|
||||
# tool is what to use instead of 'curl'
|
||||
<tool>
|
||||
lib655
|
||||
</tool>
|
||||
|
||||
<name>
|
||||
resolver start callback
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/655
|
||||
</command>
|
||||
</client>
|
||||
|
||||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<errorcode>
|
||||
0
|
||||
</errorcode>
|
||||
</verify>
|
||||
</testcase>
|
||||
Loading…
Add table
Add a link
Reference in a new issue