From 53903a714c267caccbe99ab63fade110c5014f60 Mon Sep 17 00:00:00 2001 From: samr7 Date: Thu, 9 Aug 2012 16:26:43 -0700 Subject: [PATCH] Follow HTTP redirections on bounty servers. --- oclvanityminer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/oclvanityminer.c b/oclvanityminer.c index 1e83758..6713691 100644 --- a/oclvanityminer.c +++ b/oclvanityminer.c @@ -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_WRITEFUNCTION, server_body_reader) || + curl_easy_setopt(creq, CURLOPT_FOLLOWLOCATION, 1) || curl_easy_setopt(creq, CURLOPT_WRITEDATA, reqp)) { fprintf(stderr, "Failed to set up libcurl\n"); exit(1); @@ -634,6 +635,7 @@ server_context_submit_solution(server_context_t *ctxp, creq = curl_easy_init(); if (curl_easy_setopt(creq, CURLOPT_URL, urlbuf) || curl_easy_setopt(creq, CURLOPT_VERBOSE, ctxp->verbose > 1) || + curl_easy_setopt(creq, CURLOPT_FOLLOWLOCATION, 1) || curl_easy_setopt(creq, CURLOPT_POST, 1)) { fprintf(stderr, "Failed to set up libcurl\n"); exit(1);