summaryrefslogtreecommitdiff
path: root/apps/netutils/webserver/Kconfig
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-09-05 18:03:37 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-09-05 18:03:37 +0000
commit2323c98f7bfe6367f48ba025d586a9d1ff22c6bc (patch)
treece1a329f597da59fb575f6d476befe38affd2780 /apps/netutils/webserver/Kconfig
parent05c66e9f991c28717a1955f4aba1e7691a74d418 (diff)
downloadnuttx-2323c98f7bfe6367f48ba025d586a9d1ff22c6bc.tar.gz
nuttx-2323c98f7bfe6367f48ba025d586a9d1ff22c6bc.tar.bz2
nuttx-2323c98f7bfe6367f48ba025d586a9d1ff22c6bc.zip
Add URL/CGI function mapping option to uIP web server
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5096 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/netutils/webserver/Kconfig')
-rw-r--r--apps/netutils/webserver/Kconfig27
1 files changed, 27 insertions, 0 deletions
diff --git a/apps/netutils/webserver/Kconfig b/apps/netutils/webserver/Kconfig
index ef7171a8e..c3ebe755d 100644
--- a/apps/netutils/webserver/Kconfig
+++ b/apps/netutils/webserver/Kconfig
@@ -19,6 +19,33 @@ config NETUTILS_HTTPD_SCRIPT_DISABLE
---help---
This option, if selected, will elide the %! scripting
+config NETUTILS_HTTPD_CGIPATH
+ bool "URL/CGI function mapping"
+ default n
+ ---help---
+ This option enables mappings from URLs to call CGI functions. The
+ effect is that the existing httpd_cgi_register() interface can be
+ used thus:
+
+ const static struct httpd_cgi_call a[] = {
+ { NULL, "/abc", cgi_abc },
+ { NULL, "/xyz", cgi_xyz }
+ };
+
+ for (i = 0; i < sizeof a / sizeof *a; i++) {
+ httpd_cgi_register(&a[i]);
+ }
+
+ Where (under CONFIG_NETUTILS_HTTPD_CGIPATH) the "/xyz" is a URL path,
+ rather than a %! xyz style call in the existing manner.
+
+ This is useful when CONFIG_NETUTILS_HTTPD_SCRIPT_DISABLE is defined.
+
+ In other words, this provides a way to get your CGI functions called
+ without needing the scripting language. I'm using this to provide a
+ REST style interface over HTTP, where my CGI handlers just return a
+ HTTP status code with a content length of 0.
+
config NETUTILS_HTTPD_SERVERHEADER_DISABLE
bool "Disabled the SERVER header"
default n