summaryrefslogtreecommitdiff
path: root/uhttpd-lua.c
Commit message (Collapse)AuthorAgeFilesLines
* lua: add explicit typecasts to fix compiler warningsFelix Fietkau2012-10-041-2/+2
|
* [package] uhttpd: various changesjow2012-07-131-26/+9
| | | | | | | | | - 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/package/uhttpd/src@32704 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] uhttpd: various fixesjow2012-07-091-31/+24
| | | | | | | | | - avoid closing descriptors before removing them from uloop (#11755, #11830) - do not auto-initialize ubus if no prefix is set (#11832) - remove extraneous client context pointer from cgi and lua states - code cleanups and debug message changes git-svn-id: svn://svn.openwrt.org/openwrt/trunk/package/uhttpd/src@32651 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] uhttpd: do not subscribe to epoll write eventsjow2012-07-061-0/+1
| | | | | | | | Watch child read pipe end for data instead of relying on socket write notification to process cgi data, should lower cpu consumption during requests on weaker devices. git-svn-id: svn://svn.openwrt.org/openwrt/trunk/package/uhttpd/src@32640 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] uhttpd: finish inherited uloop in forked childs, fixes ↵jow2012-06-181-0/+3
| | | | | | misdispatched events leading to race conditions and bad memory accesses git-svn-id: svn://svn.openwrt.org/openwrt/trunk/package/uhttpd/src@32419 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] uhttpd: remove some dead codejow2012-06-021-7/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk/package/uhttpd/src@32028 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] uhttpd: add explicit stdin eof notification for Lua and CGI childsjow2012-06-021-1/+5
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk/package/uhttpd/src@32027 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] uhttpd:jow2012-05-281-291/+317
| | | | | | | | | | | - 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 git-svn-id: svn://svn.openwrt.org/openwrt/trunk/package/uhttpd/src@31931 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] uhttpd: display errors in init script, code formatting changes, ↵jow2012-05-031-42/+43
| | | | | | bump package version git-svn-id: svn://svn.openwrt.org/openwrt/trunk/package/uhttpd/src@31572 3c298f89-4303-0410-b956-a3cf2f4a3e73
* uhttpd: added uhttpd.docrootjow2012-05-031-2/+10
| | | | | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk/package/uhttpd/src@31571 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Fixed: [PATCH 2/3] uhttpd URL-codec enhancements.jow2012-05-031-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn://svn.openwrt.org/openwrt/trunk/package/uhttpd/src@31570 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] uhttpd: fix a signal related race condition exposed by LuCI on ↵jow2010-03-291-2/+3
| | | | | | fast machines git-svn-id: svn://svn.openwrt.org/openwrt/trunk/package/uhttpd/src@20573 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] uhttpd: block SIGCHLD until it is expected (#6957)jow2010-03-271-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk/package/uhttpd/src@20513 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] uhttpd: clear script timeout as soon as data is received from the ↵jow2010-03-271-5/+7
| | | | | | child git-svn-id: svn://svn.openwrt.org/openwrt/trunk/package/uhttpd/src@20501 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] uhttpd:jow2010-03-271-4/+8
| | | | | | | | | - make script timeout configurable - catch SIGCHLD to properly interrupt select() - flag listen and client sockets as close-on-exec git-svn-id: svn://svn.openwrt.org/openwrt/trunk/package/uhttpd/src@20500 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] add uhttpd (moved from LuCI trunk)jow2010-03-251-0/+541
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/package/uhttpd/src@20428 3c298f89-4303-0410-b956-a3cf2f4a3e73