GNUNET_assert (s != NULL);
if (msg->msg == CURLMSG_DONE)
{
- curl_easy_getinfo (easy_h, CURLINFO_RESPONSE_CODE, &http_statuscode);
+ GNUNET_break (CURLE_OK == curl_easy_getinfo (easy_h,
+ CURLINFO_RESPONSE_CODE, &http_statuscode));
if (easy_h == s->client_put)
{
if ((0 != msg->data.result) || (http_statuscode != 200))
{
- GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
- "Session %p/connection %p: PUT connection to `%s' ended with status %i reason %i: `%s'\n",
- s, msg->easy_handle, GNUNET_i2s (&s->target),
- http_statuscode,
- msg->data.result,
- curl_easy_strerror (msg->data.result));
+ GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG,
+ plugin->name,
+ "Session %p/connection %p: PUT connection to `%s' ended with status %i reason %i: `%s'\n",
+ s, msg->easy_handle,
+ GNUNET_i2s (&s->target),
+ http_statuscode,
+ msg->data.result,
+ curl_easy_strerror (msg->data.result));
}
else
- GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
- "Session %p/connection %p: PUT connection to `%s' ended normal\n",
- s, msg->easy_handle, GNUNET_i2s (&s->target));
- if (s->client_get == NULL)
+ GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG,
+ plugin->name,
+ "Session %p/connection %p: PUT connection to `%s' ended normal\n",
+ s, msg->easy_handle,
+ GNUNET_i2s (&s->target));
+ if (NULL == s->client_get)
{
/* Disconnect other transmission direction and tell transport */
+ /* FIXME? */
}
curl_multi_remove_handle (plugin->curl_multi_handle, easy_h);
curl_easy_cleanup (easy_h);
curl_easy_setopt (s->client_put, CURLOPT_SSL_VERIFYHOST, 0);
}
}
- curl_easy_setopt (s->client_get, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
- curl_easy_setopt (s->client_get, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTPS);
+ curl_easy_setopt (s->client_put, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
+ curl_easy_setopt (s->client_put, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTPS);
#else
- curl_easy_setopt (s->client_get, CURLOPT_PROTOCOLS, CURLPROTO_HTTP);
- curl_easy_setopt (s->client_get, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP);
+ curl_easy_setopt (s->client_put, CURLOPT_PROTOCOLS, CURLPROTO_HTTP);
+ curl_easy_setopt (s->client_put, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP);
#endif
if (s->plugin->proxy_hostname != NULL)
{
}
/* proxy http tunneling */
- if (GNUNET_SYSERR == (plugin->proxy_use_httpproxytunnel == GNUNET_CONFIGURATION_get_value_yesno (plugin->env->cfg,
+ if (GNUNET_SYSERR == (plugin->proxy_use_httpproxytunnel = GNUNET_CONFIGURATION_get_value_yesno (plugin->env->cfg,
plugin->name, "PROXY_HTTP_TUNNELING")))
plugin->proxy_use_httpproxytunnel = GNUNET_NO;