aboutsummaryrefslogtreecommitdiff
path: root/picohttp.h
diff options
context:
space:
mode:
authorWolfgang Draxinger <Wolfgang.Draxinger@physik.uni-muenchen.de>2013-06-18 20:18:53 +0200
committerWolfgang Draxinger <Wolfgang.Draxinger@physik.uni-muenchen.de>2013-06-18 20:18:53 +0200
commitfeb3e1de269c3c72a7c7925cfb81415189cf54f9 (patch)
tree89aa5c9e1e9c474e1504a425517334c3b4bb3d5c /picohttp.h
parent660e0aaecd654c0ed99001cd765693dc9fb8a66d (diff)
parent47e13329da36b76918d44d51be78ef9e5584fcc0 (diff)
downloadlitheweb-feb3e1de269c3c72a7c7925cfb81415189cf54f9.tar.gz
litheweb-feb3e1de269c3c72a7c7925cfb81415189cf54f9.tar.bz2
Merge branch 'master' of mhzoctdev.maiman:/srv/git/mhzoct/picoweb
Diffstat (limited to 'picohttp.h')
-rw-r--r--picohttp.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/picohttp.h b/picohttp.h
index 6041935..38cdd76 100644
--- a/picohttp.h
+++ b/picohttp.h
@@ -5,6 +5,8 @@
#include <stddef.h>
#include <stdint.h>
+#define PICOHTTP_MULTIPARTBOUNDARY_MAX_LEN 70
+
#define PICOHTTP_MAJORVERSION(x) ( (x & 0x7f00) >> 8 )
#define PICOHTTP_MINORVERSION(x) ( (x & 0x007f) )
@@ -12,6 +14,21 @@
#define PICOHTTP_METHOD_HEAD 2
#define PICOHTTP_METHOD_POST 3
+#define PICOHTTP_CONTENTTYPE_APPLICATION 0
+#define PICOHTTP_CONTENTTYPE_AUDIO 1
+#define PICOHTTP_CONTENTTYPE_IMAGE 2
+#define PICOHTTP_CONTENTTYPE_MESSAGE 3
+#define PICOHTTP_CONTENTTYPE_MODEL 4
+#define PICOHTTP_CONTENTTYPE_MULTIPART 5
+#define PICOHTTP_CONTENTTYPE_TEXT 6
+#define PICOHTTP_CONTENTTYPE_VIDEO 7
+
+#define PICOHTTP_CONTENTTYPE_TEXT_SUBTYPE_CSV 3
+#define PICOHTTP_CONTENTTYPE_TEXT_SUBTYPE_HTML 4
+#define PICOHTTP_CONTENTTYPE_TEXT_SUBTYPE_PLAIN 6
+
+#define PICOHTTP_CONTENTTYPE_MULTIPART_SUBTYPE_FORM_DATA 4
+
#define PICOHTTP_CODING_IDENTITY 0
#define PICOHTTP_CODING_COMPRESS 1
#define PICOHTTP_CODING_DEFLATE 2
@@ -103,10 +120,14 @@ struct picohttpRequest {
uint8_t minor;
} httpversion;
struct {
- char const *contenttype;
+ struct {
+ uint16_t type:4;
+ uint16_t subtype:12;
+ } contenttype;
size_t contentlength;
- uint8_t contentcoding;
+ uint8_t contentencoding;
uint8_t te;
+ char multipartboundary[PICOHTTP_MULTIPARTBOUNDARY_MAX_LEN+1];
} query;
struct {
char const *contenttype;