diff options
author | Alexander Tkachev | 2016-07-29 12:07:14 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 4f0c071e53ed1be17bd9bdd0079e585f0a1bf55c (patch) | |
tree | 08164dbf41eca381cdea3fc3a50f6dd9d161b296 /backends/networking | |
parent | 0558ba423cb9cdd5f9cd29a1c47a0530399b2399 (diff) | |
download | scummvm-rg350-4f0c071e53ed1be17bd9bdd0079e585f0a1bf55c.tar.gz scummvm-rg350-4f0c071e53ed1be17bd9bdd0079e585f0a1bf55c.tar.bz2 scummvm-rg350-4f0c071e53ed1be17bd9bdd0079e585f0a1bf55c.zip |
CLOUD: Add custom User-Agent
Full version is used like in Eugene's Google Analytics stub. Plus, on
PS3 that string contains "PlayStation", and that would be cool to know
that ScummVM+libcurl+PS3 work together.
Diffstat (limited to 'backends/networking')
-rw-r--r-- | backends/networking/curl/networkreadstream.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/backends/networking/curl/networkreadstream.cpp b/backends/networking/curl/networkreadstream.cpp index 9b20a758ee..30659e2361 100644 --- a/backends/networking/curl/networkreadstream.cpp +++ b/backends/networking/curl/networkreadstream.cpp @@ -24,6 +24,7 @@ #include "backends/networking/curl/networkreadstream.h" #include "backends/networking/curl/connectionmanager.h" +#include "base/version.h" #include "common/debug.h" #include <curl/curl.h> @@ -79,6 +80,7 @@ void NetworkReadStream::init(const char *url, curl_slist *headersList, const byt curl_easy_setopt(_easy, CURLOPT_VERBOSE, 0L); curl_easy_setopt(_easy, CURLOPT_FOLLOWLOCATION, 1L); //probably it's OK to have it always on curl_easy_setopt(_easy, CURLOPT_HTTPHEADER, headersList); + curl_easy_setopt(_easy, CURLOPT_USERAGENT, gScummVMFullVersion); curl_easy_setopt(_easy, CURLOPT_NOPROGRESS, 0L); curl_easy_setopt(_easy, CURLOPT_PROGRESSFUNCTION, curlProgressCallbackOlder); curl_easy_setopt(_easy, CURLOPT_PROGRESSDATA, this); @@ -122,6 +124,7 @@ void NetworkReadStream::init(const char *url, curl_slist *headersList, Common::H curl_easy_setopt(_easy, CURLOPT_VERBOSE, 0L); curl_easy_setopt(_easy, CURLOPT_FOLLOWLOCATION, 1L); //probably it's OK to have it always on curl_easy_setopt(_easy, CURLOPT_HTTPHEADER, headersList); + curl_easy_setopt(_easy, CURLOPT_USERAGENT, gScummVMFullVersion); curl_easy_setopt(_easy, CURLOPT_NOPROGRESS, 0L); curl_easy_setopt(_easy, CURLOPT_PROGRESSFUNCTION, curlProgressCallbackOlder); curl_easy_setopt(_easy, CURLOPT_PROGRESSDATA, this); |