summaryrefslogtreecommitdiffstats
path: root/src/download.c
diff options
context:
space:
mode:
authorGravatar BALATON Zoltan2017-11-13 16:05:54 +0100
committerGravatar BALATON Zoltan2017-11-13 22:12:44 +0100
commit6074f76f7dd32d272b6de801f9638d8ebca1cbbf (patch)
treecc3127827e740ce9b7848764b673fbb41635e303 /src/download.c
parent542ef27e70c52dbe76ba00a44b0069844c945ed2 (diff)
downloadidevicerestore-6074f76f7dd32d272b6de801f9638d8ebca1cbbf.tar.gz
idevicerestore-6074f76f7dd32d272b6de801f9638d8ebca1cbbf.tar.bz2
Define a constant for user agent string instead of duplicate strings
Diffstat (limited to 'src/download.c')
-rw-r--r--src/download.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/download.c b/src/download.c
index 82087df..fab6bba 100644
--- a/src/download.c
+++ b/src/download.c
@@ -65,7 +65,7 @@ int download_to_buffer(const char* url, char** buf, uint32_t* length)
curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, (curl_write_callback)&download_write_buffer_callback);
curl_easy_setopt(handle, CURLOPT_WRITEDATA, &response);
- curl_easy_setopt(handle, CURLOPT_USERAGENT, "InetURL/1.0");
+ curl_easy_setopt(handle, CURLOPT_USERAGENT, USER_AGENT_STRING);
curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(handle, CURLOPT_URL, url);
@@ -128,7 +128,7 @@ int download_to_file(const char* url, const char* filename, int enable_progress)
curl_easy_setopt(handle, CURLOPT_PROGRESSFUNCTION, (curl_progress_callback)&download_progress);
curl_easy_setopt(handle, CURLOPT_NOPROGRESS, enable_progress > 0 ? 0: 1);
- curl_easy_setopt(handle, CURLOPT_USERAGENT, "InetURL/1.0");
+ curl_easy_setopt(handle, CURLOPT_USERAGENT, USER_AGENT_STRING);
curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(handle, CURLOPT_URL, url);