aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Draxinger <Wolfgang.Draxinger@physik.uni-muenchen.de>2013-04-23 17:12:22 +0200
committerWolfgang Draxinger <Wolfgang.Draxinger@physik.uni-muenchen.de>2013-04-23 17:12:22 +0200
commit660e0aaecd654c0ed99001cd765693dc9fb8a66d (patch)
treebfaa74eb31f89bfa62fd2f2172d6bb1babb909ad
parent43e94ded492f183e4db2589e74204969b261d5bb (diff)
downloadlitheweb-660e0aaecd654c0ed99001cd765693dc9fb8a66d.tar.gz
litheweb-660e0aaecd654c0ed99001cd765693dc9fb8a66d.tar.bz2
Tue Apr 23 17:12:22 CEST 2013
-rw-r--r--picohttp.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/picohttp.h b/picohttp.h
index 041f124..6041935 100644
--- a/picohttp.h
+++ b/picohttp.h
@@ -79,6 +79,17 @@ struct picohttpURLRoute {
int16_t allowed_methods;
};
+#define PICOHTTP_EPOCH_YEAR 1980
+
+struct picohttpDateTime {
+ unsigned int Y:7; /* EPOCH + 127 years */
+ unsigned int M:4;
+ unsigned int D:5;
+ unsigned int h:5;
+ unsigned int m:6;
+ unsigned int s:5; /* seconds / 2 */
+};
+
struct picohttpRequest {
struct picohttpIoOps const * ioops;
struct picohttpURLRoute const * route;
@@ -99,9 +110,9 @@ struct picohttpRequest {
} query;
struct {
char const *contenttype;
- char const *date;
- char const *cachecontrol;
char const *disposition;
+ struct picohttpDateTime lastmodified;
+ uint16_t max_age;
size_t contentlength;
uint8_t contentencoding;
uint8_t transferencoding;