curl-library
Bug: Ignored port setting
Date: Thu, 31 Jan 2019 10:44:45 +0100
I think I found a bug in the cURL library.
I run it with Windows 10.
In this case I can connect:
#define ZOTERO_PWP_URL "http://127.0.0.1:23116" //
scheme://host:port/path
curl_global_init(CURL_GLOBAL_ALL);
curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_URL, (char*) ZOTERO_PWP_URL);
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1);
curl_easy_perform(curl);
But I can't connect, in this way:
#define ZOTERO_PWP_URL "http://127.0.0.1" // scheme://host:port/path
#define ZOTERO_PWP_PORT 23116
curl_global_init(CURL_GLOBAL_ALL);
curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_URL, (char*) ZOTERO_PWP_URL);
curl_easy_setopt(curl, CURLOPT_LOCALPORT, (long) ZOTERO_PWP_PORT);
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1);
curl_easy_perform(curl);
The call below doesn't work.
curl_easy_setopt(curl, CURLOPT_LOCALPORT, (long) ZOTERO_PWP_PORT);
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-01-31