curlsmtpsink: Set CURLOPT_UPLOAD to 1 to not use VRFY and other unneeded commands
authorVivia Nikolaidou <n.vivia@gmail.com>
Mon, 6 Oct 2014 18:25:30 +0000 (21:25 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 6 Oct 2014 18:28:45 +0000 (21:28 +0300)
Fixes the sink with SMTP servers that disable VRFY for spam protection.

http://sourceforge.net/p/curl/bugs/1389/

ext/curl/gstcurlsmtpsink.c

index 03f178bdb3341261256b8ef7f88bb2c2c718bd50..f8be5d06a2920e89fea3ada3d3c3c787a329b175 100644 (file)
@@ -725,6 +725,13 @@ gst_curl_smtp_sink_set_transfer_options_unlocked (GstCurlBaseSink * bcsink)
     return FALSE;
   }
 
+  res = curl_easy_setopt (bcsink->curl, CURLOPT_UPLOAD, 1L);
+  if (res != CURLE_OK) {
+    bcsink->error = g_strdup_printf ("failed to prepare for upload: %s",
+        curl_easy_strerror (res));
+    return FALSE;
+  }
+
   parent_class = GST_CURL_TLS_SINK_GET_CLASS (sink);
 
   if (sink->use_ssl) {