about summary refs log tree commit diff stats
path: root/difference.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'difference.cpp')
-rw-r--r--difference.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/difference.cpp b/difference.cpp index 4575671..6444efd 100644 --- a/difference.cpp +++ b/difference.cpp
@@ -94,6 +94,11 @@ int main(int argc, char** argv)
94 } 94 }
95 } 95 }
96 96
97 // Accept string from Google Chrome
98 std::string accept = "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8";
99 curl::curl_header headers;
100 headers.add(accept);
101
97 std::cout << "Started!" << std::endl; 102 std::cout << "Started!" << std::endl;
98 for (;;) 103 for (;;)
99 { 104 {
@@ -153,6 +158,8 @@ int main(int argc, char** argv)
153 curl::curl_ios<std::ostringstream> img1ios(img1buf); 158 curl::curl_ios<std::ostringstream> img1ios(img1buf);
154 curl::curl_easy img1handle(img1ios); 159 curl::curl_easy img1handle(img1ios);
155 std::string img1url = lstvec[curind]; 160 std::string img1url = lstvec[curind];
161
162 img1handle.add<CURLOPT_HTTPHEADER>(headers.get());
156 img1handle.add<CURLOPT_URL>(img1url.c_str()); 163 img1handle.add<CURLOPT_URL>(img1url.c_str());
157 img1handle.add<CURLOPT_CONNECTTIMEOUT>(30); 164 img1handle.add<CURLOPT_CONNECTTIMEOUT>(30);
158 165
@@ -202,6 +209,8 @@ int main(int argc, char** argv)
202 curl::curl_ios<std::ostringstream> img2ios(img2buf); 209 curl::curl_ios<std::ostringstream> img2ios(img2buf);
203 curl::curl_easy img2handle(img2ios); 210 curl::curl_easy img2handle(img2ios);
204 std::string img2url = lstvec[curind]; 211 std::string img2url = lstvec[curind];
212
213 img2handle.add<CURLOPT_HTTPHEADER>(headers.get());
205 img2handle.add<CURLOPT_URL>(img2url.c_str()); 214 img2handle.add<CURLOPT_URL>(img2url.c_str());
206 img2handle.add<CURLOPT_CONNECTTIMEOUT>(30); 215 img2handle.add<CURLOPT_CONNECTTIMEOUT>(30);
207 216