Never set HTTP headers before invoking libgnunetcurl.

This commit is contained in:
Marcello Stanisci 2019-05-13 17:39:06 +02:00
parent 8868952735
commit e6c1d262a8
No known key found for this signature in database
GPG Key ID: 8D526861953F4C0F
2 changed files with 10 additions and 18 deletions

View File

@ -303,17 +303,13 @@ put_history_job (struct GNUNET_CURL_Context *ctx,
hh->authh = TALER_BANK_make_auth_header_ (auth); hh->authh = TALER_BANK_make_auth_header_ (auth);
eh = curl_easy_init (); eh = curl_easy_init ();
GNUNET_assert (CURLE_OK ==
curl_easy_setopt (eh,
CURLOPT_HTTPHEADER,
hh->authh));
GNUNET_assert (CURLE_OK == GNUNET_assert (CURLE_OK ==
curl_easy_setopt (eh, curl_easy_setopt (eh,
CURLOPT_URL, CURLOPT_URL,
hh->request_url)); hh->request_url));
hh->job = GNUNET_CURL_job_add (ctx, hh->job = GNUNET_CURL_job_add2 (ctx,
eh, eh,
GNUNET_NO, hh->authh,
&handle_history_finished, &handle_history_finished,
hh); hh);
return hh; return hh;

View File

@ -197,10 +197,6 @@ TALER_BANK_reject (struct GNUNET_CURL_Context *ctx,
json_dumps (reject_obj, json_dumps (reject_obj,
JSON_COMPACT))); JSON_COMPACT)));
json_decref (reject_obj); json_decref (reject_obj);
GNUNET_assert (CURLE_OK ==
curl_easy_setopt (eh,
CURLOPT_HTTPHEADER,
rh->authh));
GNUNET_assert (CURLE_OK == GNUNET_assert (CURLE_OK ==
curl_easy_setopt (eh, curl_easy_setopt (eh,
CURLOPT_URL, CURLOPT_URL,
@ -213,9 +209,9 @@ TALER_BANK_reject (struct GNUNET_CURL_Context *ctx,
curl_easy_setopt (eh, curl_easy_setopt (eh,
CURLOPT_POSTFIELDSIZE, CURLOPT_POSTFIELDSIZE,
strlen (rh->json_enc))); strlen (rh->json_enc)));
rh->job = GNUNET_CURL_job_add (ctx, rh->job = GNUNET_CURL_job_add2 (ctx,
eh, eh,
GNUNET_NO, rh->authh,
&handle_reject_finished, &handle_reject_finished,
rh); rh);
return rh; return rh;