9 Commits

Author SHA1 Message Date
Jo-Philipp Wich
022fa36b40 uhttpd: - rewrite large parts of the server, use uloop event driven structure - support concurrent requests and make the upper limit configurable - implement initial version of HTTP-to-ubus JSON proxy and session.* namespace - add compile time support for debug information - code style changes - bump package revision
SVN-Revision: 31931
2012-05-28 00:52:24 +00:00
Jo-Philipp Wich
8e9d914343 uhttpd: display errors in init script, code formatting changes, bump package version
SVN-Revision: 31572
2012-05-03 17:19:22 +00:00
Jo-Philipp Wich
54b34ccbc5 uhttpd: added uhttpd.docroot
Passes the document-root to the Lua handler by placing it in uhttpd.docroot.

It could alternatively be placed in env.DOCUMENT_ROOT which would more closely
resemble the CGI protocol; but would mean that it is not available at the time
when the handler-chunk is loaded but rather not until the handler is called,
without any code savings.

Signed-off-by: David Favro <openwrt@meta-dynamic.com>

SVN-Revision: 31571
2012-05-03 17:19:20 +00:00
Jo-Philipp Wich
bcd8d530d1 Fixed: [PATCH 2/3] uhttpd URL-codec enhancements.
My apologies, the 2nd of those patches had a syntax error -- that's what
I get for making a last-minute edit, even to the comments, without
testing! :-p

Here is the corrected patch.

-- David

From d259cff104d2084455476b82e92a3a27524f4263 Mon Sep 17 00:00:00 2001
From: David Favro <openwrt@meta-dynamic.com>
Date: Fri, 27 Apr 2012 14:17:52 -0400
Subject: [PATCH] uhttpd URL-codec enhancements.

* uh_urlencode() and uh_urldecode() now return an error condition for
  buffer-overflow and malformed-encoding rather than normal return with corrupt
  or truncated data.  As HTTP request processing is currently implemented, this
  causes a 404 HTTP status returned to the client, while 400 is more
  appropriate.

* Exposed urlencode() to Lua.

* Lua's uhttpd.urlencode() and .urldecode() now raise an error condition for
  buffer-overflow and malformed-encoding rather than normal return with
  incorrect data.

SVN-Revision: 31570
2016-03-20 20:05:13 +01:00
Jo-Philipp Wich
b95360d5bc uhttpd: fix a signal related race condition exposed by LuCI on fast machines
SVN-Revision: 20573
2010-03-29 09:26:02 +00:00
Jo-Philipp Wich
4172149f89 uhttpd: block SIGCHLD until it is expected (#6957)
SVN-Revision: 20513
2010-03-27 14:31:35 +00:00
Jo-Philipp Wich
161325ac4f uhttpd: clear script timeout as soon as data is received from the child
SVN-Revision: 20501
2010-03-27 01:47:36 +00:00
Jo-Philipp Wich
8c9b818a24 uhttpd: - make script timeout configurable - catch SIGCHLD to properly interrupt select() - flag listen and client sockets as close-on-exec
SVN-Revision: 20500
2010-03-27 00:00:33 +00:00
Jo-Philipp Wich
169642253f add uhttpd (moved from LuCI trunk)
SVN-Revision: 20428
2010-03-25 15:46:16 +00:00