curl / Mailing Lists / curl-library / Single Mail

curl-library

Bug: CURLINFO_PRIMARY_IP is empty

From: D M via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 02 May 2017 14:54:42 +0300

If request wasn't successful CURLINFO_PRIMARY_IP is empty in new versions of curl (in versions of curl several years ago it wasn't empty).
For example in Perl:
-----------
#!/usr/bin/perl
use WWW::Curl::Easy;
$curl = new WWW::Curl::Easy;
$curl->setopt(CURLOPT_URL, "http://curl.haxx.se:12345/");
$curl->setopt(CURLOPT_TIMEOUT, 2);
$curl->perform;
print $curl->getinfo(CURLINFO_PRIMARY_IP);
-----------
In new versions (7.38.0) on Debian 8 we receive empty result. In old versions (7.21.0) on Debian 6 we receive: 151.101.194.49.

Why new versions of curl have empty value in CURLINFO_PRIMARY_IP if request wasn't successful? Is it a bug?
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-05-02