1
0
mirror of https://github.com/GOSTSec/vanitygen synced 2025-02-07 12:24:20 +00:00

Follow HTTP redirections on bounty servers.

This commit is contained in:
samr7 2012-08-09 16:26:43 -07:00
parent dece236223
commit 53903a714c

View File

@ -589,6 +589,7 @@ server_context_getwork(server_context_t *ctxp)
curl_easy_setopt(creq, CURLOPT_VERBOSE, ctxp->verbose > 1) || curl_easy_setopt(creq, CURLOPT_VERBOSE, ctxp->verbose > 1) ||
curl_easy_setopt(creq, CURLOPT_WRITEFUNCTION, curl_easy_setopt(creq, CURLOPT_WRITEFUNCTION,
server_body_reader) || server_body_reader) ||
curl_easy_setopt(creq, CURLOPT_FOLLOWLOCATION, 1) ||
curl_easy_setopt(creq, CURLOPT_WRITEDATA, reqp)) { curl_easy_setopt(creq, CURLOPT_WRITEDATA, reqp)) {
fprintf(stderr, "Failed to set up libcurl\n"); fprintf(stderr, "Failed to set up libcurl\n");
exit(1); exit(1);
@ -634,6 +635,7 @@ server_context_submit_solution(server_context_t *ctxp,
creq = curl_easy_init(); creq = curl_easy_init();
if (curl_easy_setopt(creq, CURLOPT_URL, urlbuf) || if (curl_easy_setopt(creq, CURLOPT_URL, urlbuf) ||
curl_easy_setopt(creq, CURLOPT_VERBOSE, ctxp->verbose > 1) || curl_easy_setopt(creq, CURLOPT_VERBOSE, ctxp->verbose > 1) ||
curl_easy_setopt(creq, CURLOPT_FOLLOWLOCATION, 1) ||
curl_easy_setopt(creq, CURLOPT_POST, 1)) { curl_easy_setopt(creq, CURLOPT_POST, 1)) {
fprintf(stderr, "Failed to set up libcurl\n"); fprintf(stderr, "Failed to set up libcurl\n");
exit(1); exit(1);