gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r22572 - gnunet/src/gns


From: gnunet
Subject: [GNUnet-SVN] r22572 - gnunet/src/gns
Date: Mon, 9 Jul 2012 14:40:58 +0200

Author: schanzen
Date: 2012-07-09 14:40:58 +0200 (Mon, 09 Jul 2012)
New Revision: 22572

Modified:
   gnunet/src/gns/gnunet-gns-proxy.c
Log:
-add uri values to curl

Modified: gnunet/src/gns/gnunet-gns-proxy.c
===================================================================
--- gnunet/src/gns/gnunet-gns-proxy.c   2012-07-09 12:18:36 UTC (rev 22571)
+++ gnunet/src/gns/gnunet-gns-proxy.c   2012-07-09 12:40:58 UTC (rev 22572)
@@ -368,7 +368,19 @@
   return GNUNET_YES;
 }
 
+static int
+get_uri_val_iter (void *cls,
+                  enum MHD_ValueKind kind,
+                  const char *key,
+                  const char *value)
+{
+  char* buf = cls;
 
+  sprintf (buf+strlen (buf), "?%s=%s", key, value);
+
+  return MHD_YES;
+}
+
 /**
  * Read HTTP request header field 'Host'
  *
@@ -1408,7 +1420,11 @@
   
   //FIXME handle
   if (0 != strcmp (meth, "GET"))
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "%s NOT IMPLEMENTED!\n", meth);
     return MHD_NO;
+  }
 
   if (0 != *upload_data_size)
     return MHD_NO;
@@ -1472,11 +1488,17 @@
     if (GNUNET_NO == ctask->mhd->is_ssl)
     {
       sprintf (curlurl, "http://%s%s";, ctask->host, url);
+      MHD_get_connection_values (con,
+                                 MHD_GET_ARGUMENT_KIND,
+                                 &get_uri_val_iter, curlurl);
       curl_easy_setopt (ctask->curl, CURLOPT_URL, curlurl);
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "Adding new curl task for %s\n", curlurl);
     }
     strcpy (ctask->url, url);
+    MHD_get_connection_values (con,
+                               MHD_GET_ARGUMENT_KIND,
+                               &get_uri_val_iter, ctask->url);
   
     //curl_easy_setopt (ctask->curl, CURLOPT_URL, curlurl);
     curl_easy_setopt (ctask->curl, CURLOPT_FAILONERROR, 1);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]