aboutsummaryrefslogtreecommitdiff
path: root/picohttp.h
diff options
context:
space:
mode:
Diffstat (limited to 'picohttp.h')
-rw-r--r--picohttp.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/picohttp.h b/picohttp.h
index 831e1b0..ced2ef5 100644
--- a/picohttp.h
+++ b/picohttp.h
@@ -96,6 +96,17 @@ struct picohttpURLRoute {
int16_t allowed_methods;
};
+#define PICOHTTP_EPOCH_YEAR 1970
+
+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;
@@ -120,9 +131,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;
@@ -148,4 +159,15 @@ int picohttpResponseWrite (
size_t len,
char const *buf );
+uint16_t picohttpGetch(
+ struct picohttpRequest * const req,
+ struct picohttpChunkTransfer * const ct);
+
+int picohttpMultipartNext(
+ struct picohttpRequest * const req,
+ struct picohttpMultiPart * const mp);
+
+uint16_t picohttpMultipartGetch(
+ struct picohttpMultiPart * const mp);
+
#endif/*PICOHTTP_H_HEADERGUARD*/