[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-sync] branch master updated: use If-none-match instead of etag
From: |
gnunet |
Subject: |
[taler-sync] branch master updated: use If-none-match instead of etag |
Date: |
Thu, 05 Dec 2019 21:47:32 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository sync.
The following commit(s) were added to refs/heads/master by this push:
new 53767a0 use If-none-match instead of etag
53767a0 is described below
commit 53767a09fc38120b25d6e4302d476fd5364474e6
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Dec 5 21:47:18 2019 +0100
use If-none-match instead of etag
---
src/lib/sync_api_upload.c | 5 +++--
src/sync/sync-httpd_backup_post.c | 6 +++---
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/lib/sync_api_upload.c b/src/lib/sync_api_upload.c
index 31a7d08..97811e8 100644
--- a/src/lib/sync_api_upload.c
+++ b/src/lib/sync_api_upload.c
@@ -326,11 +326,12 @@ SYNC_upload (struct GNUNET_CURL_Context *ctx,
}
job_headers = ext;
- /* set Etag header */
+ /* set If-None-Match header */
val = GNUNET_STRINGS_data_to_string_alloc (&usp.new_backup_hash,
sizeof (struct
GNUNET_HashCode));
GNUNET_asprintf (&hdr,
- "Etag: %s",
+ "%s: %s",
+ MHD_HTTP_HEADER_IF_NONE_MATCH,
val);
GNUNET_free (val);
ext = curl_slist_append (job_headers,
diff --git a/src/sync/sync-httpd_backup_post.c
b/src/sync/sync-httpd_backup_post.c
index 251dc10..cdec9fd 100644
--- a/src/sync/sync-httpd_backup_post.c
+++ b/src/sync/sync-httpd_backup_post.c
@@ -707,7 +707,7 @@ SH_backup_post (struct MHD_Connection *connection,
etag = MHD_lookup_connection_value (connection,
MHD_HEADER_KIND,
- MHD_HTTP_HEADER_ETAG);
+ MHD_HTTP_HEADER_IF_NONE_MATCH);
if ( (NULL == etag) ||
(GNUNET_OK !=
GNUNET_STRINGS_string_to_data (etag,
@@ -718,8 +718,8 @@ SH_backup_post (struct MHD_Connection *connection,
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
- TALER_EC_SYNC_BAD_ETAG,
- "Etag does not include not a
base32-encoded SHA-512 hash");
+ TALER_EC_SYNC_BAD_IF_NONE_MATCH,
+ "If-none-match does not include not
a base32-encoded SHA-512 hash");
}
}
/* validate signature */
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-sync] branch master updated: use If-none-match instead of etag,
gnunet <=