diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2019-05-13 17:39:06 +0200 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2019-05-13 17:39:06 +0200 |
commit | e6c1d262a82503f7815e92a4f73dd4011eb77162 (patch) | |
tree | 33d348d4cb00bb983d72ed768c7225ec6cf09a12 | |
parent | 886895273509f4a4d33fca089ab5fbf9772446e7 (diff) |
Never set HTTP headers before invoking libgnunetcurl.
-rw-r--r-- | src/bank-lib/bank_api_history.c | 14 | ||||
-rw-r--r-- | src/bank-lib/bank_api_reject.c | 14 |
2 files changed, 10 insertions, 18 deletions
diff --git a/src/bank-lib/bank_api_history.c b/src/bank-lib/bank_api_history.c index 5cdac9170..53c381f67 100644 --- a/src/bank-lib/bank_api_history.c +++ b/src/bank-lib/bank_api_history.c @@ -305,17 +305,13 @@ put_history_job (struct GNUNET_CURL_Context *ctx, eh = curl_easy_init (); GNUNET_assert (CURLE_OK == curl_easy_setopt (eh, - CURLOPT_HTTPHEADER, - hh->authh)); - GNUNET_assert (CURLE_OK == - curl_easy_setopt (eh, CURLOPT_URL, hh->request_url)); - hh->job = GNUNET_CURL_job_add (ctx, - eh, - GNUNET_NO, - &handle_history_finished, - hh); + hh->job = GNUNET_CURL_job_add2 (ctx, + eh, + hh->authh, + &handle_history_finished, + hh); return hh; } diff --git a/src/bank-lib/bank_api_reject.c b/src/bank-lib/bank_api_reject.c index 5e7a1ac29..cfedec4cf 100644 --- a/src/bank-lib/bank_api_reject.c +++ b/src/bank-lib/bank_api_reject.c @@ -199,10 +199,6 @@ TALER_BANK_reject (struct GNUNET_CURL_Context *ctx, json_decref (reject_obj); GNUNET_assert (CURLE_OK == curl_easy_setopt (eh, - CURLOPT_HTTPHEADER, - rh->authh)); - GNUNET_assert (CURLE_OK == - curl_easy_setopt (eh, CURLOPT_URL, rh->request_url)); GNUNET_assert (CURLE_OK == @@ -213,11 +209,11 @@ TALER_BANK_reject (struct GNUNET_CURL_Context *ctx, curl_easy_setopt (eh, CURLOPT_POSTFIELDSIZE, strlen (rh->json_enc))); - rh->job = GNUNET_CURL_job_add (ctx, - eh, - GNUNET_NO, - &handle_reject_finished, - rh); + rh->job = GNUNET_CURL_job_add2 (ctx, + eh, + rh->authh, + &handle_reject_finished, + rh); return rh; } |