Blame SOURCES/cpaste-useragent.patch

4d702e
diff -aurp a/main.cpp b/main.cpp
4d702e
--- a/main.cpp	2018-09-13 04:19:21.000000000 +0000
4d702e
+++ b/main.cpp	2018-09-13 23:04:17.214701846 +0000
4d702e
@@ -129,12 +129,14 @@ int main(int argc, char *argv[])
4d702e
             post += "&private=1";
4d702e
         if (Stikkit::Configuration::Expiry != "0")
4d702e
             post += "&expire=" + Stikkit::Configuration::Expiry;
4d702e
+        string useragent;
4d702e
+        useragent = "cpaste " + Stikkit::Configuration::Version + " (https://paste.centos.org/)";
4d702e
         curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
4d702e
         curl_easy_setopt(curl, CURLOPT_URL, Stikkit::Configuration::URL.c_str());
4d702e
         curl_easy_setopt(curl, CURLOPT_POSTFIELDS, post.c_str());
4d702e
-        curl_easy_setopt(curl, CURLOPT_USERAGENT, "stikkit");
4d702e
+        curl_easy_setopt(curl, CURLOPT_USERAGENT, useragent.c_str());
4d702e
 
4d702e
-        /* Perform the request, res will get the return code */
4d702e
+        /* Perform the request, res will get the return HTTP code */
4d702e
         res = curl_easy_perform(curl);
4d702e
         /* Check for errors */
4d702e
         if(res != CURLE_OK)