File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,9 @@ namespace http
159
159
curl_easy_setopt (easy, CURLOPT_FOLLOWLOCATION, 1L );
160
160
curl_easy_setopt (easy, CURLOPT_MAXREDIRS, 10L );
161
161
162
+ curl_easy_setopt (easy, CURLOPT_ERRORBUFFER, error_buffer);
163
+ error_buffer[0 ] = 0 ;
164
+
162
165
curl_easy_setopt (easy, CURLOPT_TIMEOUT, timeout);
163
166
curl_easy_setopt (easy, CURLOPT_HTTPHEADER, headers);
164
167
curl_easy_setopt (easy, CURLOPT_URL, uri.c_str ());
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ namespace http
25
25
ByteString response_body;
26
26
27
27
CURL *easy;
28
+ char error_buffer[CURL_ERROR_SIZE];
28
29
29
30
volatile curl_off_t rm_total;
30
31
volatile curl_off_t rm_done;
Original file line number Diff line number Diff line change 3
3
#include " Config.h"
4
4
#include " Platform.h"
5
5
6
+ #include < iostream>
7
+
6
8
const int curl_multi_wait_timeout_ms = 100 ;
7
9
const long curl_max_host_connections = 6 ;
8
10
@@ -142,6 +144,11 @@ namespace http
142
144
break ;
143
145
}
144
146
147
+ if (finish_with >= 600 )
148
+ {
149
+ std::cerr << request->error_buffer << std::endl;
150
+ }
151
+
145
152
request->status = finish_with;
146
153
}
147
154
};
You can’t perform that action at this time.
0 commit comments