diff --git a/src/pextlib1.0/curl.c b/src/pextlib1.0/curl.c index 8e19f36aae..d9e6aa1c0d 100644 --- a/src/pextlib1.0/curl.c +++ b/src/pextlib1.0/curl.c @@ -835,6 +835,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; @@ -905,6 +906,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) {