diff options
Diffstat (limited to 'src/check_curl.c')
-rw-r--r-- | src/check_curl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/check_curl.c b/src/check_curl.c index f95547b..011c8ee 100644 --- a/src/check_curl.c +++ b/src/check_curl.c @@ -28,6 +28,7 @@ #include "common.h" #include "curlhelper.h" +#include "utils.h" #define DEFAULT_TIMEOUT (double)10.0 @@ -120,6 +121,10 @@ int main( int argc, char *argv[] ) { if( args_info.authorization_given ) curl_easy_setopt( curl, CURLOPT_USERPWD, args_info.authorization_arg ); + /* user agent */ + if( args_info.useragent_given ) + curl_easy_setopt( curl, CURLOPT_USERAGENT, args_info.useragent_arg ); + /* compose URL */ snprintf( b, 2048, "http%s://%s%s", args_info.ssl_given ? "s" : "", |