mirror of
https://github.com/curl/curl.git
synced 2026-08-26 13:33:33 +03:00
- Added CURLINFO_PRIMARY_IP as a new information retrievable with
curl_easy_getinfo. It returns a pointer to a string with the most recently used IP address. Modified test case 500 to also verify this feature. The implementing of this feature was sponsored by Lenny Rachitsky at NeuStar.
This commit is contained in:
parent
afc66554d7
commit
930a45e7a9
9 changed files with 48 additions and 7 deletions
|
|
@ -210,6 +210,10 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
|
|||
option had been enabled! */
|
||||
*param_charp = data->info.wouldredirect;
|
||||
break;
|
||||
case CURLINFO_PRIMARY_IP:
|
||||
/* Return the ip address of the most recent (primary) connection */
|
||||
*param_charp = data->info.ip;
|
||||
break;
|
||||
default:
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue