[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-blog] branch master updated: etag
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-blog] branch master updated: etag |
Date: |
Sat, 24 Aug 2019 19:44:22 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository blog.
The following commit(s) were added to refs/heads/master by this push:
new 9476242 etag
9476242 is described below
commit 9476242a878def6ce45da10f0c28b85172adbbb6
Author: Florian Dold <address@hidden>
AuthorDate: Sat Aug 24 19:43:30 2019 +0200
etag
---
talerblog/blog/blog.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/talerblog/blog/blog.py b/talerblog/blog/blog.py
index 5340d56..47b7074 100644
--- a/talerblog/blog/blog.py
+++ b/talerblog/blog/blog.py
@@ -328,13 +328,20 @@ def article(article_name, data=None):
# 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 = 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,
}
- taler_pay_uri = "talerpay:" + urllib.parse.quote_plus(contract_url) +
";" + session_id
qrcode_svg = get_qrcode_svg(taler_pay_uri)
content = flask.render_template("templates/request_payment.html",
article_name=article_name,
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-blog] branch master updated: etag,
gnunet <=