gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] branch master updated: fix FTBFS and #6030


From: gnunet
Subject: [taler-merchant] branch master updated: fix FTBFS and #6030
Date: Fri, 17 Jan 2020 00:27:08 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new ab70e04  fix FTBFS and #6030
ab70e04 is described below

commit ab70e0410c5dea3b6cf9b57c7290fa1a791b846f
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Jan 17 00:27:04 2020 +0100

    fix FTBFS and #6030
---
 src/backend/taler-merchant-httpd.c       | 13 ++++++++++++-
 src/backend/taler-merchant-httpd_order.c | 20 ++++++++++----------
 2 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/src/backend/taler-merchant-httpd.c 
b/src/backend/taler-merchant-httpd.c
index 395cff0..6073aed 100644
--- a/src/backend/taler-merchant-httpd.c
+++ b/src/backend/taler-merchant-httpd.c
@@ -1433,7 +1433,13 @@ url_handler (void *cls,
       if ( (0 != strcasecmp (effective_url, rh->url)) )
         continue;
       url_found = GNUNET_YES;
-      if ( (rh->method != NULL) && (0 != strcasecmp (method, rh->method)) )
+      if (0 == strcasecmp (method,
+                           MHD_HTTP_METHOD_OPTIONS))
+      {
+        return TALER_MHD_reply_cors_preflight (connection);
+      }
+      if ( (rh->method != NULL) &&
+           (0 != strcasecmp (method, rh->method)) )
         continue;
       selected_handler = rh;
       break;
@@ -1449,6 +1455,11 @@ url_handler (void *cls,
       if ( (0 != strcasecmp (effective_url, rh->url)) )
         continue;
       url_found = GNUNET_YES;
+      if (0 == strcasecmp (method,
+                           MHD_HTTP_METHOD_OPTIONS))
+      {
+        return TALER_MHD_reply_cors_preflight (connection);
+      }
       if ( (rh->method != NULL) && (0 != strcasecmp (method, rh->method)) )
         continue;
       selected_handler = rh;
diff --git a/src/backend/taler-merchant-httpd_order.c 
b/src/backend/taler-merchant-httpd_order.c
index 892dfce..a862178 100644
--- a/src/backend/taler-merchant-httpd_order.c
+++ b/src/backend/taler-merchant-httpd_order.c
@@ -150,12 +150,12 @@ make_merchant_base_url (struct MHD_Connection 
*connection, const
   const char *host;
   const char *forwarded_host;
   const char *uri_path;
-  struct TALER_Buffer buf = { 0 };
+  struct GNUNET_Buffer buf = { 0 };
 
   if (GNUNET_YES == TALER_mhd_is_https (connection))
-    TALER_buffer_write_str (&buf, "https://";);
+    GNUNET_buffer_write_str (&buf, "https://";);
   else
-    TALER_buffer_write_str (&buf, "http://";);
+    GNUNET_buffer_write_str (&buf, "http://";);
 
 
   host = MHD_lookup_connection_value (connection, MHD_HEADER_KIND, "Host");
@@ -164,12 +164,12 @@ make_merchant_base_url (struct MHD_Connection 
*connection, const
 
   if (NULL != forwarded_host)
   {
-    TALER_buffer_write_str (&buf, forwarded_host);
+    GNUNET_buffer_write_str (&buf, forwarded_host);
   }
   else
   {
     GNUNET_assert (NULL != host);
-    TALER_buffer_write_str (&buf, host);
+    GNUNET_buffer_write_str (&buf, host);
   }
 
   uri_path = MHD_lookup_connection_value (connection, MHD_HEADER_KIND,
@@ -181,16 +181,16 @@ make_merchant_base_url (struct MHD_Connection 
*connection, const
     GNUNET_assert (0);
   }
 
-  TALER_buffer_write_path (&buf, "public");
+  GNUNET_buffer_write_path (&buf, "public");
 
   if (0 != strcmp (instance_id, "default"))
   {
-    TALER_buffer_write_path (&buf, "/instances/");
-    TALER_buffer_write_str (&buf, instance_id);
+    GNUNET_buffer_write_path (&buf, "/instances/");
+    GNUNET_buffer_write_str (&buf, instance_id);
   }
-  TALER_buffer_write_path (&buf, "");
+  GNUNET_buffer_write_path (&buf, "");
 
-  return TALER_buffer_reap_str (&buf);
+  return GNUNET_buffer_reap_str (&buf);
 }
 
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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