gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-blog] branch master updated (70d58f6 -> b27c669)


From: gnunet
Subject: [GNUnet-SVN] [taler-blog] branch master updated (70d58f6 -> b27c669)
Date: Mon, 26 Aug 2019 03:49:46 +0200

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

dold pushed a change to branch master
in repository blog.

    from 70d58f6  cache control header
     new 2ee0cce  remove ETag header
     new b27c669  redirect to already_paid_order_id

The 2 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:
 talerblog/blog/blog.py | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/talerblog/blog/blog.py b/talerblog/blog/blog.py
index 1d064ac..c10bfcd 100644
--- a/talerblog/blog/blog.py
+++ b/talerblog/blog/blog.py
@@ -322,25 +322,23 @@ def article(article_name, data=None):
         ##
         # Finally return the article.
         return render_article(article_name, data, order_id)
-
+    elif pay_status.get("already_paid_order_id") is not None:
+        return flask.redirect(
+                url_for(
+                    "article",
+                    article_name=article_name,
+                    order_id=pay_status.get("already_paid_order_id"))
     else:
         ##
         # Redirect the browser to a page where the wallet can
         # run the payment protocol.
         contract_url = pay_status["contract_url"]
         taler_pay_uri = "talerpay:" + urllib.parse.quote_plus(contract_url) + 
";" + session_id
-        req_etag = flask.request.headers.get("If-None-Match")
-        resp_etag = f"\"{taler_pay_uri}\""
-        if req_etag == resp_etag:
-            resp = flask.Response(status=304)
-            return resp
 
         headers = {
                 "Taler-Contract-Url": urllib.parse.quote(contract_url),
                 "Taler-Session-Url": urllib.parse.quote(session_id),
                 "Taler-Resource-Url": urllib.parse.quote(resource_url),
-                "ETag": resp_etag,
-                "Cache-Control": "max-age=20",
         }
 
         qrcode_svg = get_qrcode_svg(taler_pay_uri)

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



reply via email to

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