diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-07-13 17:10:56 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-07-13 17:10:56 +0000 |
commit | 268dea84ecccf5c23b7b95f303c29d02bbc4d4b6 (patch) | |
tree | a10b65cb7ffda97d2ca25344848cb6952b2b6ad7 /package/uhttpd/src/uhttpd.h | |
parent | 89511a81d0c9f6a22db3ca0c4a9975bc98228e01 (diff) | |
download | master-187ad058-268dea84ecccf5c23b7b95f303c29d02bbc4d4b6.tar.gz master-187ad058-268dea84ecccf5c23b7b95f303c29d02bbc4d4b6.tar.bz2 master-187ad058-268dea84ecccf5c23b7b95f303c29d02bbc4d4b6.zip |
[package] uhttpd: various changes
- remove unused variables
- simply ignore command line args which belong to not enabled features
- resolve peer address at accept() time, should solve (#11850)
- remove floating point operations where possible
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32704 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/uhttpd/src/uhttpd.h')
-rw-r--r-- | package/uhttpd/src/uhttpd.h | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/package/uhttpd/src/uhttpd.h b/package/uhttpd/src/uhttpd.h index fe86b01d40..f6982db323 100644 --- a/package/uhttpd/src/uhttpd.h +++ b/package/uhttpd/src/uhttpd.h @@ -63,15 +63,8 @@ #define UH_LIMIT_MSGHEAD 4096 #define UH_LIMIT_HEADERS 64 - #define UH_LIMIT_CLIENTS 64 -#define UH_HTTP_MSG_GET 0 -#define UH_HTTP_MSG_HEAD 1 -#define UH_HTTP_MSG_POST 2 - -#define UH_SOCK_CLIENT 0 -#define UH_SOCK_SERVER 1 struct listener; struct client; @@ -128,9 +121,25 @@ struct config { #endif }; +enum http_method { + UH_HTTP_MSG_GET, + UH_HTTP_MSG_POST, + UH_HTTP_MSG_HEAD, +}; + +extern const char *http_methods[]; + +enum http_version { + UH_HTTP_VER_0_9, + UH_HTTP_VER_1_0, + UH_HTTP_VER_1_1, +}; + +extern const char *http_versions[]; + struct http_request { - int method; - float version; + enum http_method method; + enum http_version version; int redirect_status; char *url; char *headers[UH_LIMIT_HEADERS]; @@ -167,7 +176,6 @@ struct client { bool (*cb)(struct client *); void *priv; bool dispatched; - bool dead; struct { char buf[UH_LIMIT_MSGHEAD]; char *ptr; |