fix cgi/lua header parsing
authorFelix Fietkau <nbd@openwrt.org>
Sun, 13 Jan 2013 10:59:36 +0000 (11:59 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 13 Jan 2013 10:59:36 +0000 (11:59 +0100)
proc.c
uhttpd.h

diff --git a/proc.c b/proc.c
index d24649f78d1313321b73fbd45f3429854aa0d151..bbf7ad8cae5c48d453779213dc5b7d0bfa7d51d6 100644 (file)
--- a/proc.c
+++ b/proc.c
 #include "uhttpd.h"
 
 #define __headers \
-       __header(accept) \
-       __header(accept_charset) \
-       __header(accept_encoding) \
-       __header(accept_language) \
-       __header(authorization) \
-       __header(connection) \
-       __header(cookie) \
-       __header(host) \
-       __header(referer) \
-       __header(user_agent) \
-       __header(content_type) \
-       __header(content_length)
+       __header(accept, accept) \
+       __header(accept_charset, accept-charset) \
+       __header(accept_encoding, accept-encoding) \
+       __header(accept_language, accept-language) \
+       __header(authorization, authorization) \
+       __header(connection, connection) \
+       __header(cookie, cookie) \
+       __header(host, host) \
+       __header(referer, referer) \
+       __header(user_agent, user-agent) \
+       __header(content_type, content-type) \
+       __header(content_length, content-length)
 
 #undef __header
 #define __header __enum_header
index 12cfc287676d870c51d2c5587b6f160d3fe36cf5..9dba44d4ee9a0ba440a44eb259f666b646871156 100644 (file)
--- a/uhttpd.h
+++ b/uhttpd.h
@@ -41,8 +41,8 @@
 
 #define UH_LIMIT_CLIENTS       64
 
-#define __enum_header(_name) HDR_##_name,
-#define __blobmsg_header(_name) [HDR_##_name] = { .name = #_name, .type = BLOBMSG_TYPE_STRING },
+#define __enum_header(_name, _val) HDR_##_name,
+#define __blobmsg_header(_name, _val) [HDR_##_name] = { .name = #_val, .type = BLOBMSG_TYPE_STRING },
 
 struct client;