summaryrefslogtreecommitdiff
path: root/src/libtipidee
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-12-04 07:22:53 +0000
committerLaurent Bercot <ska@appnovation.com>2023-12-04 07:22:53 +0000
commite3c075c72d6b7b64c869b4cb0c0ff128b1d084cd (patch)
treedcb810bb5aa6a853672c6d8e749df508a2ae4e53 /src/libtipidee
parent691c9878f41d6646af38f417b23dfc72644a8c96 (diff)
downloadtipidee-e3c075c72d6b7b64c869b4cb0c0ff128b1d084cd.tar.xz
Use wallclock time for Date header in responses
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libtipidee')
-rw-r--r--src/libtipidee/deps-lib/tipidee5
-rw-r--r--src/libtipidee/tipidee_response_error_nofile_G.c12
-rw-r--r--src/libtipidee/tipidee_response_file_G.c12
-rw-r--r--src/libtipidee/tipidee_response_header_date_G.c12
-rw-r--r--src/libtipidee/tipidee_response_header_writeall_G.c12
-rw-r--r--src/libtipidee/tipidee_response_header_writemerge_G.c12
6 files changed, 65 insertions, 0 deletions
diff --git a/src/libtipidee/deps-lib/tipidee b/src/libtipidee/deps-lib/tipidee
index d71ef89..985be7e 100644
--- a/src/libtipidee/deps-lib/tipidee
+++ b/src/libtipidee/deps-lib/tipidee
@@ -21,13 +21,18 @@ tipidee_log_request.o
tipidee_log_start.o
tipidee_method.o
tipidee_response_error_nofile.o
+tipidee_response_error_nofile_G.o
tipidee_response_file.o
+tipidee_response_file_G.o
tipidee_response_header_date.o
+tipidee_response_header_date_G.o
tipidee_response_header_date_fmt.o
tipidee_response_header_lastmodified.o
tipidee_response_header_preparebuiltin.o
tipidee_response_header_writeall.o
+tipidee_response_header_writeall_G.o
tipidee_response_header_writemerge.o
+tipidee_response_header_writemerge_G.o
tipidee_response_status.o
tipidee_rql_read.o
tipidee_uri_parse.o
diff --git a/src/libtipidee/tipidee_response_error_nofile_G.c b/src/libtipidee/tipidee_response_error_nofile_G.c
new file mode 100644
index 0000000..d7239cc
--- /dev/null
+++ b/src/libtipidee/tipidee_response_error_nofile_G.c
@@ -0,0 +1,12 @@
+/* ISC license. */
+
+#include <skalibs/tai.h>
+
+#include <tipidee/response.h>
+
+size_t tipidee_response_error_nofile_G (buffer *b, tipidee_rql const *rql, unsigned int status, char const *reason, char const *text, tipidee_response_header const *rhdr, uint32_t rhdrn, uint32_t options)
+{
+ tain wstamp ;
+ tain_wallclock_read(&wstamp) ;
+ return tipidee_response_error_nofile(b, rql, status, reason, text, rhdr, rhdrn, options, &wstamp) ;
+}
diff --git a/src/libtipidee/tipidee_response_file_G.c b/src/libtipidee/tipidee_response_file_G.c
new file mode 100644
index 0000000..8c08c98
--- /dev/null
+++ b/src/libtipidee/tipidee_response_file_G.c
@@ -0,0 +1,12 @@
+/* ISC license. */
+
+#include <skalibs/tai.h>
+
+#include <tipidee/response.h>
+
+size_t tipidee_response_file_G (buffer *b, tipidee_rql const *rql, unsigned int status, char const *reason, struct stat const *st, char const *ct, tipidee_response_header const *rhdr, uint32_t rhdrn, uint32_t options)
+{
+ tain wstamp ;
+ tain_wallclock_read(&wstamp) ;
+ return tipidee_response_file(b, rql, status, reason, st, ct, rhdr, rhdrn, options, &wstamp) ;
+}
diff --git a/src/libtipidee/tipidee_response_header_date_G.c b/src/libtipidee/tipidee_response_header_date_G.c
new file mode 100644
index 0000000..6d06d81
--- /dev/null
+++ b/src/libtipidee/tipidee_response_header_date_G.c
@@ -0,0 +1,12 @@
+/* ISC license. */
+
+#include <skalibs/tai.h>
+
+#include <tipidee/response.h>
+
+size_t tipidee_response_header_date_G (char *s, size_t max)
+{
+ tain wstamp ;
+ tain_wallclock_read(&wstamp) ;
+ return tipidee_response_header_date(s, max, &wstamp) ;
+}
diff --git a/src/libtipidee/tipidee_response_header_writeall_G.c b/src/libtipidee/tipidee_response_header_writeall_G.c
new file mode 100644
index 0000000..b448395
--- /dev/null
+++ b/src/libtipidee/tipidee_response_header_writeall_G.c
@@ -0,0 +1,12 @@
+/* ISC license. */
+
+#include <skalibs/tai.h>
+
+#include <tipidee/response.h>
+
+size_t tipidee_response_header_writeall_G (buffer *b, tipidee_response_header const *rhdr, uint32_t rhdrn, uint32_t options)
+{
+ tain wstamp ;
+ tain_wallclock_read(&wstamp) ;
+ return tipidee_response_header_writeall(b, rhdr, rhdrn, options, &wstamp) ;
+}
diff --git a/src/libtipidee/tipidee_response_header_writemerge_G.c b/src/libtipidee/tipidee_response_header_writemerge_G.c
new file mode 100644
index 0000000..78a7526
--- /dev/null
+++ b/src/libtipidee/tipidee_response_header_writemerge_G.c
@@ -0,0 +1,12 @@
+/* ISC license. */
+
+#include <skalibs/tai.h>
+
+#include <tipidee/response.h>
+
+size_t tipidee_response_header_writemerge_G (buffer *b, tipidee_response_header const *rhdr, uint32_t rhdrn, tipidee_headers const *hdr, uint32_t options)
+{
+ tain wstamp ;
+ tain_wallclock_read(&wstamp) ;
+ return tipidee_response_header_writemerge(b, rhdr, rhdrn, hdr, options, &wstamp) ;
+}