Skip to content

Commit 414d3f2

Browse files
authored
Mark CURLINFO_NUM_CONNECTS as unsupported but available info option (#1468)
Signed-off-by: Petr Shumilov <p.shumilov@vkteam.ru>
1 parent 32225c7 commit 414d3f2

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

builtin-functions/kphp-light/stdlib/curl-functions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ define('CURLINFO_HTTP_CONNECTCODE', 2097174);
3131
// define('CURLINFO_HTTPAUTH_AVAIL', 100027);
3232
// define('CURLINFO_PROXYAUTH_AVAIL', 100028);
3333
define('CURLINFO_OS_ERRNO', 2097177);
34-
// define('CURLINFO_NUM_CONNECTS', 100030);
34+
define('CURLINFO_NUM_CONNECTS', 2097178);
3535
// define('CURLINFO_FTP_ENTRY_PATH', 100031);
3636
define('CURLINFO_APPCONNECT_TIME', 3145761);
3737
define('CURLINFO_CONDITION_UNMET', 2097187);

runtime-light/stdlib/curl/curl-easy-functions.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ inline auto f$curl_setopt(kphp::web::curl::easy_type easy_id, int64_t option, co
383383
return true;
384384
}
385385
case kphp::web::curl::CURLOPT::USERPWD: {
386-
kphp::log::error("Unsupported CURL options");
386+
kphp::log::error("Unsupported CURL option");
387387
}
388388
default:
389389
easy_ctx.set_errno(kphp::web::curl::CURLE::UNKNOWN_OPTION);
@@ -580,6 +580,9 @@ inline auto f$curl_getinfo(kphp::web::curl::easy_type easy_id, int64_t option =
580580
kphp::log::assertion(v != (*res).end());
581581
co_return v->second.to_mixed();
582582
}
583+
case kphp::web::curl::CURLINFO::NUM_CONNECTS: {
584+
kphp::log::error("Unsupported CURL info option");
585+
}
583586
default:
584587
co_return false;
585588
}

runtime-light/stdlib/curl/defs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ enum class CURLINFO : uint64_t {
5151
LOCAL_PORT = 2097194,
5252
HTTP_CONNECTCODE = 2097174,
5353
OS_ERRNO = 2097177,
54+
NUM_CONNECTS = 2097178,
5455
APPCONNECT_TIME = 3145761,
5556
CONDITION_UNMET = 2097187,
5657
HEADER_OUT = 2,

0 commit comments

Comments
 (0)