gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] branch master updated (346f522 -> 5804737)


From: gnunet
Subject: [taler-merchant] branch master updated (346f522 -> 5804737)
Date: Tue, 11 Aug 2020 21:16:39 +0200

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

dold pushed a change to branch master
in repository merchant.

    from 346f522  fix conditional due to 'surprise naming'
     new 9cb80a0  Revert "fix conditional due to 'surprise naming'"
     new 553fe37  Revert "fix broken JSON packing, fix condition for order 
status 'gone'"
     new 5804737  Revert "implement refund gone response when claim token is 
present on paid order"

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/backend/taler-merchant-httpd_get-orders-ID.c | 79 ++----------------------
 1 file changed, 5 insertions(+), 74 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_get-orders-ID.c 
b/src/backend/taler-merchant-httpd_get-orders-ID.c
index 937ca99..fc551a1 100644
--- a/src/backend/taler-merchant-httpd_get-orders-ID.c
+++ b/src/backend/taler-merchant-httpd_get-orders-ID.c
@@ -875,54 +875,6 @@ god_cleanup (void *cls)
   GNUNET_free (god);
 }
 
-/**
- * Function to call to handle the request by sending
- * back a redirect to the fulfillment URL.
- *
- * @param connection the MHD connection to handle
- * @param url fulfillment URL
- * @return MHD result code
- */
-static MHD_RESULT
-reply_fulfillment_redirect (struct MHD_Connection *connection,
-                            const char *url)
-{
-  const char *text = "Redirecting to fulfillment URL ...";
-  struct MHD_Response *response;
-
-  response = MHD_create_response_from_buffer (strlen (text),
-                                              (void *) text,
-                                              MHD_RESPMEM_PERSISTENT);
-  if (NULL == response)
-  {
-    GNUNET_break (0);
-    return MHD_NO;
-  }
-  TALER_MHD_add_global_headers (response);
-  GNUNET_break (MHD_YES ==
-                MHD_add_response_header (response,
-                                         MHD_HTTP_HEADER_CONTENT_TYPE,
-                                         "text/plain"));
-  if (MHD_NO ==
-      MHD_add_response_header (response,
-                               MHD_HTTP_HEADER_LOCATION,
-                               url))
-  {
-    GNUNET_break (0);
-    MHD_destroy_response (response);
-    return MHD_NO;
-  }
-
-  {
-    MHD_RESULT ret;
-
-    ret = MHD_queue_response (connection,
-                              MHD_HTTP_FOUND,
-                              response);
-    MHD_destroy_response (response);
-    return ret;
-  }
-}
 
 /**
  * Handle a GET "/orders/$ID" request.
@@ -940,8 +892,6 @@ TMH_get_orders_ID (const struct TMH_RequestHandler *rh,
   struct GetOrderData *god = hc->ctx;
   const char *order_id = hc->infix;
   enum GNUNET_DB_QueryStatus qs;
-  /* Will we reply with HTTP 410 Gone and just the fulfillment URL? */
-  bool reply_gone = false;
 
   if (NULL == god)
   {
@@ -1099,16 +1049,11 @@ TMH_get_orders_ID (const struct TMH_RequestHandler *rh,
           GNUNET_memcmp (&h,
                          &god->h_contract_terms))
       {
-        if (0 != GNUNET_is_zero (&god->h_contract_terms))
-        {
-          /* The client provided a h_contract that's wrong, so complain! */
-          GNUNET_break_op (0);
-          return TALER_MHD_reply_with_error (connection,
-                                             MHD_HTTP_FORBIDDEN,
-                                             TALER_EC_GET_ORDER_WRONG_CONTRACT,
-                                             "Contract hash does not match 
order");
-        }
-        reply_gone = true;
+        GNUNET_break_op (0);
+        return TALER_MHD_reply_with_error (connection,
+                                           MHD_HTTP_FORBIDDEN,
+                                           TALER_EC_GET_ORDER_WRONG_CONTRACT,
+                                           "Contract hash does not match 
order");
       }
     }
 
@@ -1186,20 +1131,6 @@ TMH_get_orders_ID (const struct TMH_RequestHandler *rh,
                              NULL);
   }
 
-  if (reply_gone)
-  {
-    GNUNET_assert (NULL != god->fulfillment_url);
-    if (god->generate_html)
-      return reply_fulfillment_redirect (connection,
-                                         god->fulfillment_url);
-    else
-      return TALER_MHD_reply_json_pack (connection,
-                                        MHD_HTTP_GONE,
-                                        "{s:s}",
-                                        "fulfillment_url",
-                                        god->fulfillment_url);
-  }
-
   if ( (NULL != god->session_id) &&
        (NULL != god->fulfillment_url) )
   {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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