aboutsummaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-09-21 02:18:35 +0000
committerLaurent Bercot <ska@appnovation.com>2023-09-21 02:18:35 +0000
commit3d334dca671898241732dbc0ef6838b768308da7 (patch)
tree0cac6b60ea1356455fef2553e41105f3c68bce9d /src/include
parent6be5496f8a5660875c5f45f915210f69496d231b (diff)
downloadtipidee-3d334dca671898241732dbc0ef6838b768308da7.tar.gz
Implement If-Modified-Since
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/tipidee/response.h6
-rw-r--r--src/include/tipidee/tipidee.h2
-rw-r--r--src/include/tipidee/util.h (renamed from src/include/tipidee/body.h)10
3 files changed, 12 insertions, 6 deletions
diff --git a/src/include/tipidee/response.h b/src/include/tipidee/response.h
index e0a6177..d549532 100644
--- a/src/include/tipidee/response.h
+++ b/src/include/tipidee/response.h
@@ -3,6 +3,7 @@
#ifndef TIPIDEE_RESPONSE_H
#define TIPIDEE_RESPONSE_H
+#include <sys/stat.h>
#include <stddef.h>
#include <stdint.h>
@@ -24,7 +25,10 @@ extern size_t tipidee_response_status (buffer *, tipidee_rql const *, unsigned i
#define tipidee_response_status_line(b, rql, line) tipidee_response_status(b, rql, 0, (line))
extern size_t tipidee_response_header_date_fmt (char *, size_t, tain const *) ;
-#define tipidee_response_header_date_fmt_g(buf, max) tipidee_response_header_date_fmt(buf, (max), &STAMP)
+extern size_t tipidee_response_header_date (char *, size_t, tain const *) ;
+#define tipidee_response_header_date_g(buf, max) tipidee_response_header_date(buf, (max), &STAMP)
+extern size_t tipidee_response_header_lastmodified (char *, size_t, struct stat const *) ;
+
extern size_t tipidee_response_header_common_put (buffer *, uint32_t, tain const *) ;
#define tipidee_response_header_common_put_g(b, options) tipidee_response_header_common_put(b, (options), &STAMP)
diff --git a/src/include/tipidee/tipidee.h b/src/include/tipidee/tipidee.h
index ddd1348..7634366 100644
--- a/src/include/tipidee/tipidee.h
+++ b/src/include/tipidee/tipidee.h
@@ -3,7 +3,6 @@
#ifndef TIPIDEE_H
#define TIPIDEE_H
-#include <tipidee/body.h>
#include <tipidee/config.h>
#include <tipidee/conf.h>
#include <tipidee/headers.h>
@@ -11,5 +10,6 @@
#include <tipidee/response.h>
#include <tipidee/rql.h>
#include <tipidee/uri.h>
+#include <tipidee/util.h>
#endif
diff --git a/src/include/tipidee/body.h b/src/include/tipidee/util.h
index fc8bd9a..5160a69 100644
--- a/src/include/tipidee/body.h
+++ b/src/include/tipidee/util.h
@@ -1,7 +1,7 @@
/* ISC license. */
-#ifndef TIPIDEE_BODY_H
-#define TIPIDEE_BODY_H
+#ifndef TIPIDEE_UTIL_H
+#define TIPIDEE_UTIL_H
#include <stddef.h>
#include <stdint.h>
@@ -19,7 +19,9 @@ enum tipidee_transfercoding_e
TIPIDEE_TRANSFERCODING_UNKNOWN
} ;
-extern int tipidee_chunked_read (buffer *, stralloc *, size_t, tain const *, tain *) ;
-#define tipidee_chunked_read_g(b, sa, max, deadline) tipidee_chunked_read(b, sa, max, (deadline), &STAMP)
+extern int tipidee_util_chunked_read (buffer *, stralloc *, size_t, tain const *, tain *) ;
+#define tipidee_util_chunked_read_g(b, sa, max, deadline) tipidee_util_chunked_read(b, sa, max, (deadline), &STAMP)
+
+extern int tipidee_util_httpdate (char const *, tain *) ;
#endif