diff --git a/src/pextlib1.0/curl.c b/src/pextlib1.0/curl.c index d079f34e5b..82c94b4e7c 100644 --- a/src/pextlib1.0/curl.c +++ b/src/pextlib1.0/curl.c @@ -836,6 +836,7 @@ CurlIsNewerCmd(Tcl_Interp* interp, int objc, Tcl_Obj* const objv[]) CURLcode theCurlCode; long theModDate; long userModDate; + const char* userAgent = PACKAGE_NAME "/" PACKAGE_VERSION " libcurl/" LIBCURL_VERSION; optioncrsr = 2; lastoption = objc - 3; @@ -906,6 +907,13 @@ CurlIsNewerCmd(Tcl_Interp* interp, int objc, Tcl_Obj* const objv[]) break; } + /* -A option */ + theCurlCode = curl_easy_setopt(theHandle, CURLOPT_USERAGENT, userAgent); + if (theCurlCode != CURLE_OK) { + theResult = SetResultFromCurlErrorCode(interp, theCurlCode); + break; + } + /* --max-redirs option, same default as curl command line */ theCurlCode = curl_easy_setopt(theHandle, CURLOPT_MAXREDIRS, 50); if (theCurlCode != CURLE_OK) {