diff options
author | Karl Palsson <karlp@remake.is> | 2015-08-17 15:19:48 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-08-17 18:16:52 +0200 |
commit | f91788b809d9726126e9cf4384fedbbb0c5b8a73 (patch) | |
tree | 5dfd434bfb57a205bd25400cde535b72a4ef4de7 | |
parent | daeea305298197bb50c1e63cdd842ee1d9461d80 (diff) |
cgi: Support passing X-HTTP-Method-Override header.
As uhttpd doesn't currently support PUT/DELETE/PATCH, allow passing the
commonly used X-HTTP-Method-Override header to CGI scripts.
This is an optional "protocol specific metadata" variable as per rfc
3875 section 4.1.18.
Signed-off-by: Karl Palsson <karlp@remake.is>
-rw-r--r-- | proc.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -33,7 +33,8 @@ __header(referer, referer) \ __header(user_agent, user-agent) \ __header(content_type, content-type) \ - __header(content_length, content-length) + __header(content_length, content-length) \ + __header(x_http_method_override, x-http-method-override) #undef __header #define __header __enum_header @@ -62,6 +63,7 @@ static const struct { { "HTTP_HOST", HDR_host }, { "HTTP_REFERER", HDR_referer }, { "HTTP_USER_AGENT", HDR_user_agent }, + { "HTTP_X_HTTP_METHOD_OVERRIDE", HDR_x_http_method_override }, { "CONTENT_TYPE", HDR_content_type }, { "CONTENT_LENGTH", HDR_content_length }, }; |