about summary refs log tree commit diff stats
path: root/difference.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2016-04-16 14:35:28 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2016-04-16 14:35:28 -0400
commit37432b0c47a040b2a2c0dcb2157d1ebb27fbb4f9 (patch)
tree0a12839eb953e1480b6973700da870c540e7ec2f /difference.cpp
parent5fb54e56fabb69237fdf66d4134483d37b455f5c (diff)
parentff6d29e7f6b587a2536227834950986dbbcd580b (diff)
downloaddifference-37432b0c47a040b2a2c0dcb2157d1ebb27fbb4f9.tar.gz
difference-37432b0c47a040b2a2c0dcb2157d1ebb27fbb4f9.tar.bz2
difference-37432b0c47a040b2a2c0dcb2157d1ebb27fbb4f9.zip
Merge branch 'master' of https://github.com/hatkirby/difference
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