Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion builtin-functions/kphp-light/stdlib/curl-functions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ define('CURLOPT_SSL_CIPHER_LIST', 10083);
define('CURLOPT_URL', 10002);
define('CURLOPT_USERAGENT', 10018);
define('CURLOPT_USERNAME', 10173);
// define('CURLOPT_USERPWD', 10005);
define('CURLOPT_USERPWD', 10005);
// define('CURLOPT_HTTP200ALIASES', 10104);
define('CURLOPT_HTTPHEADER', 10023);
// define('CURLOPT_POSTQUOTE', 10039);
Expand Down
4 changes: 3 additions & 1 deletion runtime-light/stdlib/curl/curl-easy-functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ inline auto f$curl_setopt(kphp::web::curl::easy_type easy_id, int64_t option, co
case kphp::web::curl::CURLOPT::URL:
case kphp::web::curl::CURLOPT::USERAGENT:
case kphp::web::curl::CURLOPT::USERNAME:
// case kphp::web::curl::CURLOPT::USERPWD:
case kphp::web::curl::CURLOPT::ACCEPT_ENCODING: {
auto res{kphp::web::set_transfer_property(st, option, kphp::web::property_value::as_string(value.to_string()))};
if (!res.has_value()) [[unlikely]] {
Expand Down Expand Up @@ -383,6 +382,9 @@ inline auto f$curl_setopt(kphp::web::curl::easy_type easy_id, int64_t option, co
easy_ctx.set_errno(kphp::web::curl::CURLE::OK);
return true;
}
case kphp::web::curl::CURLOPT::USERPWD: {
kphp::log::error("Unsupported CURL options");
}
default:
easy_ctx.set_errno(kphp::web::curl::CURLE::UNKNOWN_OPTION);
return false;
Expand Down
2 changes: 1 addition & 1 deletion runtime-light/stdlib/curl/defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ enum class CURLOPT : uint64_t {
URL = 10002,
USERAGENT = 10018,
USERNAME = 10173,
// USERPWD = 10005,
USERPWD = 10005,

// HTTP200ALIASES = 10104,
HTTPHEADER = 10023,
Expand Down
Loading