project/uhttpd.git
12 years agoadd support for deferring script requests, limit maximum number of script calls to...
Felix Fietkau [Sat, 19 Jan 2013 17:30:23 +0000 (18:30 +0100)]
add support for deferring script requests, limit maximum number of script calls to 3, maximum number of connections to 100

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
12 years agoignore initial newlines in http requests
Felix Fietkau [Sat, 19 Jan 2013 15:48:05 +0000 (16:48 +0100)]
ignore initial newlines in http requests

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
12 years agofix container_of() on ustream callbacks
Felix Fietkau [Sat, 19 Jan 2013 15:47:37 +0000 (16:47 +0100)]
fix container_of() on ustream callbacks

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
12 years agopoll read data after connect as well
Felix Fietkau [Sat, 19 Jan 2013 15:07:15 +0000 (16:07 +0100)]
poll read data after connect as well

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
12 years agopoll connection after request completion when using keepalive
Felix Fietkau [Sat, 19 Jan 2013 15:00:34 +0000 (16:00 +0100)]
poll connection after request completion when using keepalive

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
12 years agoproperly terminate headers of http responses without data, add Content-Length: 0
Felix Fietkau [Sat, 19 Jan 2013 14:53:33 +0000 (15:53 +0100)]
properly terminate headers of http responses without data, add Content-Length: 0

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
12 years agofix file etag buffer length
Felix Fietkau [Sat, 19 Jan 2013 12:41:39 +0000 (13:41 +0100)]
fix file etag buffer length

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
12 years agomove listener unblocking to a separate stack context via uloop timer
Felix Fietkau [Sat, 19 Jan 2013 12:39:47 +0000 (13:39 +0100)]
move listener unblocking to a separate stack context via uloop timer

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
12 years agoadd user agent detection for working around keepalive issues and add support for...
Felix Fietkau [Sat, 19 Jan 2013 12:10:53 +0000 (13:10 +0100)]
add user agent detection for working around keepalive issues and add support for the connection: close|keep-alive header

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
12 years agorelicense to ISC
Felix Fietkau [Sun, 13 Jan 2013 15:16:10 +0000 (16:16 +0100)]
relicense to ISC

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
12 years agofix cgi/lua header parsing
Felix Fietkau [Sun, 13 Jan 2013 10:59:36 +0000 (11:59 +0100)]
fix cgi/lua header parsing

12 years agofix redirect status
Felix Fietkau [Sun, 13 Jan 2013 10:50:50 +0000 (11:50 +0100)]
fix redirect status

12 years agofix local/remote port env vars
Felix Fietkau [Sun, 13 Jan 2013 10:47:42 +0000 (11:47 +0100)]
fix local/remote port env vars

12 years agopoll ustream after the process dies to fix eof detection
Felix Fietkau [Sun, 13 Jan 2013 10:30:15 +0000 (11:30 +0100)]
poll ustream after the process dies to fix eof detection

12 years agofix path lookup
Felix Fietkau [Sun, 13 Jan 2013 10:17:35 +0000 (11:17 +0100)]
fix path lookup

12 years agoadd an option for configuring http keepalive
Felix Fietkau [Sun, 13 Jan 2013 10:13:59 +0000 (11:13 +0100)]
add an option for configuring http keepalive

12 years agocheck for conf.error_handler before using it
Felix Fietkau [Sun, 13 Jan 2013 10:10:50 +0000 (11:10 +0100)]
check for conf.error_handler before using it

12 years agofix getting local server address
Felix Fietkau [Sun, 13 Jan 2013 09:50:42 +0000 (10:50 +0100)]
fix getting local server address

12 years agoadd check for shadow support, turn -Os back on
Felix Fietkau [Sun, 13 Jan 2013 09:17:31 +0000 (10:17 +0100)]
add check for shadow support, turn -Os back on

12 years agoadd missing file exists check
Felix Fietkau [Sun, 13 Jan 2013 09:10:03 +0000 (10:10 +0100)]
add missing file exists check

12 years agoremove unused data from the url in the session test script
Felix Fietkau [Sun, 13 Jan 2013 08:25:12 +0000 (09:25 +0100)]
remove unused data from the url in the session test script

12 years agorework the ubus plugin to support JSON-RPC 2.0
Felix Fietkau [Sun, 13 Jan 2013 08:24:04 +0000 (09:24 +0100)]
rework the ubus plugin to support JSON-RPC 2.0

12 years agoadd plugin op for uh_chunk_printf
Felix Fietkau [Sun, 13 Jan 2013 07:40:46 +0000 (08:40 +0100)]
add plugin op for uh_chunk_printf

12 years agoubus: split out session handling code into ubus-session.c
Felix Fietkau [Mon, 7 Jan 2013 15:47:13 +0000 (16:47 +0100)]
ubus: split out session handling code into ubus-session.c

12 years agofix typo
Felix Fietkau [Mon, 7 Jan 2013 11:54:40 +0000 (12:54 +0100)]
fix typo

12 years agofix prefix lookup
Felix Fietkau [Mon, 7 Jan 2013 02:03:08 +0000 (03:03 +0100)]
fix prefix lookup

12 years agoadd ubus support
Felix Fietkau [Mon, 7 Jan 2013 01:56:48 +0000 (02:56 +0100)]
add ubus support

12 years agoexport uh_http_header to plugins
Felix Fietkau [Mon, 7 Jan 2013 00:45:54 +0000 (01:45 +0100)]
export uh_http_header to plugins

12 years agoexport uh_request_done to plugins
Felix Fietkau [Mon, 7 Jan 2013 00:42:57 +0000 (01:42 +0100)]
export uh_request_done to plugins

12 years agode-constify the url parameter for the handler, it becomes invalid after the request...
Felix Fietkau [Sat, 5 Jan 2013 23:13:13 +0000 (00:13 +0100)]
de-constify the url parameter for the handler, it becomes invalid after the request anyway

12 years agoadd a c function for .send and .sendc
Felix Fietkau [Sat, 5 Jan 2013 13:17:21 +0000 (14:17 +0100)]
add a c function for .send and .sendc

12 years agoadd header table for lua calls
Felix Fietkau [Sat, 5 Jan 2013 13:13:14 +0000 (14:13 +0100)]
add header table for lua calls

12 years agofix uninitialized variables
Felix Fietkau [Fri, 4 Jan 2013 22:18:07 +0000 (23:18 +0100)]
fix uninitialized variables

12 years agoadd lua plugin support
Felix Fietkau [Fri, 4 Jan 2013 22:14:07 +0000 (23:14 +0100)]
add lua plugin support

12 years agoremove #ifdef HAVE_CGI
Felix Fietkau [Fri, 4 Jan 2013 18:39:13 +0000 (19:39 +0100)]
remove #ifdef HAVE_CGI

12 years agoadd basic tls support, todo: error handling
Felix Fietkau [Fri, 4 Jan 2013 17:28:10 +0000 (18:28 +0100)]
add basic tls support, todo: error handling

12 years agoget rid of -rdynamic on linking
Felix Fietkau [Fri, 4 Jan 2013 16:25:25 +0000 (17:25 +0100)]
get rid of -rdynamic on linking

12 years agofix relay ustream initialization
Felix Fietkau [Thu, 3 Jan 2013 14:54:57 +0000 (15:54 +0100)]
fix relay ustream initialization

12 years agoconstify mimetype list
Felix Fietkau [Fri, 4 Jan 2013 15:54:46 +0000 (16:54 +0100)]
constify mimetype list

12 years agoclean up directory listing code, only iterate over the set once (by sorting directori...
Felix Fietkau [Fri, 4 Jan 2013 15:52:53 +0000 (16:52 +0100)]
clean up directory listing code, only iterate over the set once (by sorting directories before files ahead of time)

12 years agoensure the cgi postdata write pipe is closed for other processes
Felix Fietkau [Fri, 4 Jan 2013 02:15:00 +0000 (03:15 +0100)]
ensure the cgi postdata write pipe is closed for other processes

12 years agore-enable reads from the cgi pipe after enough data has been written to the client
Felix Fietkau [Fri, 4 Jan 2013 01:30:59 +0000 (02:30 +0100)]
re-enable reads from the cgi pipe after enough data has been written to the client

12 years agoplug a memory leak in cgi processing
Felix Fietkau [Fri, 4 Jan 2013 00:20:54 +0000 (01:20 +0100)]
plug a memory leak in cgi processing

12 years agofix resuming accept() calls after exceeding client limit
Felix Fietkau [Fri, 4 Jan 2013 00:15:08 +0000 (01:15 +0100)]
fix resuming accept() calls after exceeding client limit

12 years agofree cgi headers
Felix Fietkau [Thu, 3 Jan 2013 23:23:58 +0000 (00:23 +0100)]
free cgi headers

12 years agouse pipes instead of a socketpair, EOF handling is broken with sockets
Felix Fietkau [Thu, 3 Jan 2013 21:45:18 +0000 (22:45 +0100)]
use pipes instead of a socketpair, EOF handling is broken with sockets

12 years agoimplement proper flow control for relaying postdata
Felix Fietkau [Thu, 3 Jan 2013 16:03:49 +0000 (17:03 +0100)]
implement proper flow control for relaying postdata

12 years agofix use-after-realloc issue with the request url
Felix Fietkau [Thu, 3 Jan 2013 14:01:50 +0000 (15:01 +0100)]
fix use-after-realloc issue with the request url

12 years agoclean up / fix #include
Felix Fietkau [Thu, 3 Jan 2013 13:13:56 +0000 (14:13 +0100)]
clean up / fix #include

12 years agolink against libcrypt
Felix Fietkau [Thu, 3 Jan 2013 13:13:13 +0000 (14:13 +0100)]
link against libcrypt

12 years agofix compile errors on linux
Felix Fietkau [Thu, 3 Jan 2013 12:50:59 +0000 (13:50 +0100)]
fix compile errors on linux

12 years agodo not send an error on a full buffer for post data
Felix Fietkau [Thu, 3 Jan 2013 02:33:24 +0000 (03:33 +0100)]
do not send an error on a full buffer for post data

12 years agofix chunked postdata parsing
Felix Fietkau [Thu, 3 Jan 2013 01:49:36 +0000 (02:49 +0100)]
fix chunked postdata parsing

12 years agoadd missing n_clients decrement
Felix Fietkau [Thu, 3 Jan 2013 01:29:45 +0000 (02:29 +0100)]
add missing n_clients decrement

12 years agoadd post data relaying
Felix Fietkau [Thu, 3 Jan 2013 01:25:10 +0000 (02:25 +0100)]
add post data relaying

12 years agocleanup dispatch struct access
Felix Fietkau [Thu, 3 Jan 2013 00:14:07 +0000 (01:14 +0100)]
cleanup dispatch struct access

12 years agodeclare dispatch struct type
Felix Fietkau [Thu, 3 Jan 2013 00:12:43 +0000 (01:12 +0100)]
declare dispatch struct type

12 years agofix index file handling
Felix Fietkau [Thu, 3 Jan 2013 00:08:06 +0000 (01:08 +0100)]
fix index file handling

12 years agouse a better error code for unsupported expect headers
Felix Fietkau [Thu, 3 Jan 2013 00:03:17 +0000 (01:03 +0100)]
use a better error code for unsupported expect headers

12 years agobail out on unsupported Expect: headers
Felix Fietkau [Wed, 2 Jan 2013 23:29:58 +0000 (00:29 +0100)]
bail out on unsupported Expect: headers

12 years agomove timegm declaration to utils.h
Felix Fietkau [Wed, 2 Jan 2013 18:48:37 +0000 (19:48 +0100)]
move timegm declaration to utils.h

12 years agomake hex array static
Felix Fietkau [Wed, 2 Jan 2013 18:42:19 +0000 (19:42 +0100)]
make hex array static

12 years agofix error handling of invalid http method/version
Felix Fietkau [Wed, 2 Jan 2013 18:35:21 +0000 (19:35 +0100)]
fix error handling of invalid http method/version

12 years agoreduce stack usage of uh_file_dirlist
Felix Fietkau [Wed, 2 Jan 2013 18:29:08 +0000 (19:29 +0100)]
reduce stack usage of uh_file_dirlist

12 years agofix buffer handling for time formatting
Felix Fietkau [Wed, 2 Jan 2013 18:25:38 +0000 (19:25 +0100)]
fix buffer handling for time formatting

12 years agorework string handling for directory listing, avoid redundant string scanning
Felix Fietkau [Wed, 2 Jan 2013 18:24:23 +0000 (19:24 +0100)]
rework string handling for directory listing, avoid redundant string scanning

12 years agoadd support for sending HTTP/1.1 100 Continue
Felix Fietkau [Wed, 2 Jan 2013 18:07:17 +0000 (19:07 +0100)]
add support for sending HTTP/1.1 100 Continue

12 years agoadd rfc1918 filter check
Felix Fietkau [Wed, 2 Jan 2013 15:14:15 +0000 (16:14 +0100)]
add rfc1918 filter check

12 years agoadd uh_addr_rfc1918()
Felix Fietkau [Wed, 2 Jan 2013 15:12:02 +0000 (16:12 +0100)]
add uh_addr_rfc1918()

12 years agoremove a static buffer
Felix Fietkau [Wed, 2 Jan 2013 13:54:00 +0000 (14:54 +0100)]
remove a static buffer

12 years agoadd auth support
Felix Fietkau [Wed, 2 Jan 2013 13:47:12 +0000 (14:47 +0100)]
add auth support

12 years agochange uh_b64decode to take a void pointer to avoid redundant signed/unsigned casts
Felix Fietkau [Wed, 2 Jan 2013 13:35:35 +0000 (14:35 +0100)]
change uh_b64decode to take a void pointer to avoid redundant signed/unsigned casts

12 years agoremove unused constant
Felix Fietkau [Wed, 2 Jan 2013 13:01:23 +0000 (14:01 +0100)]
remove unused constant

12 years agoconstify, fix types
Felix Fietkau [Wed, 2 Jan 2013 12:59:18 +0000 (13:59 +0100)]
constify, fix types

12 years agoadd local/remote address env vars for cgi
Felix Fietkau [Wed, 2 Jan 2013 12:23:55 +0000 (13:23 +0100)]
add local/remote address env vars for cgi

12 years agoenable http keepalive again, it seems to work properly now
Felix Fietkau [Wed, 2 Jan 2013 11:46:20 +0000 (12:46 +0100)]
enable http keepalive again, it seems to work properly now

12 years agofix client state tracking and request complete handling
Felix Fietkau [Wed, 2 Jan 2013 11:41:21 +0000 (12:41 +0100)]
fix client state tracking and request complete handling

12 years agoparse status header code from cgi scripts
Felix Fietkau [Wed, 2 Jan 2013 11:08:09 +0000 (12:08 +0100)]
parse status header code from cgi scripts

12 years agorevert cflags change
Felix Fietkau [Tue, 1 Jan 2013 22:53:11 +0000 (23:53 +0100)]
revert cflags change

12 years agoconsume the newline (overwritten with 0-byte) after receiving cgi process headers
Felix Fietkau [Tue, 1 Jan 2013 22:50:58 +0000 (23:50 +0100)]
consume the newline (overwritten with 0-byte) after receiving cgi process headers

12 years agofix line length calculation
Felix Fietkau [Tue, 1 Jan 2013 22:44:41 +0000 (23:44 +0100)]
fix line length calculation

12 years agofix typo in header name check
Felix Fietkau [Tue, 1 Jan 2013 22:44:35 +0000 (23:44 +0100)]
fix typo in header name check

12 years agoadd preliminary cgi support, needs fixing for close handling
Felix Fietkau [Tue, 1 Jan 2013 22:28:19 +0000 (23:28 +0100)]
add preliminary cgi support, needs fixing for close handling

12 years agofix clearenv() on mac os x
Felix Fietkau [Tue, 1 Jan 2013 21:37:05 +0000 (22:37 +0100)]
fix clearenv() on mac os x

12 years agoadd uh_split_header()
Felix Fietkau [Tue, 1 Jan 2013 20:46:12 +0000 (21:46 +0100)]
add uh_split_header()

12 years agoadd uh_path_match()
Felix Fietkau [Tue, 1 Jan 2013 19:08:13 +0000 (20:08 +0100)]
add uh_path_match()

12 years agoappend / to directory links to avoid unnecessary redirects
Felix Fietkau [Tue, 1 Jan 2013 14:56:05 +0000 (15:56 +0100)]
append / to directory links to avoid unnecessary redirects

12 years agocode cleanup
Felix Fietkau [Tue, 1 Jan 2013 13:25:25 +0000 (14:25 +0100)]
code cleanup

12 years agorename uhttpd-mimetypes.h to mimetypes.h
Felix Fietkau [Tue, 1 Jan 2013 13:32:09 +0000 (14:32 +0100)]
rename uhttpd-mimetypes.h to mimetypes.h

12 years agominor cleanup
Felix Fietkau [Tue, 1 Jan 2013 12:47:27 +0000 (13:47 +0100)]
minor cleanup

12 years agofree client header buffer memory
Felix Fietkau [Mon, 31 Dec 2012 18:40:34 +0000 (19:40 +0100)]
free client header buffer memory

12 years agoremove unnecessary client struct field members
Felix Fietkau [Mon, 31 Dec 2012 18:39:41 +0000 (19:39 +0100)]
remove unnecessary client struct field members

12 years agomove dispatch cbs and data to one place
Felix Fietkau [Mon, 31 Dec 2012 18:29:44 +0000 (19:29 +0100)]
move dispatch cbs and data to one place

12 years agoadd -Wmissing-declarations
Felix Fietkau [Mon, 31 Dec 2012 17:49:15 +0000 (18:49 +0100)]
add -Wmissing-declarations

12 years agomake uh_path_lookup static
Felix Fietkau [Mon, 31 Dec 2012 17:49:08 +0000 (18:49 +0100)]
make uh_path_lookup static

12 years agouse -Os
Felix Fietkau [Mon, 31 Dec 2012 17:43:14 +0000 (18:43 +0100)]
use -Os

12 years agofix 404 and 403 error handling, improve error message output
Felix Fietkau [Mon, 31 Dec 2012 17:29:35 +0000 (18:29 +0100)]
fix 404 and 403 error handling, improve error message output

12 years agoadd default cgi prefix
Felix Fietkau [Mon, 31 Dec 2012 16:46:11 +0000 (17:46 +0100)]
add default cgi prefix

12 years agoadd default value for conf.realm
Felix Fietkau [Mon, 31 Dec 2012 16:45:08 +0000 (17:45 +0100)]
add default value for conf.realm

12 years agoset a default for script timeout
Felix Fietkau [Mon, 31 Dec 2012 16:44:14 +0000 (17:44 +0100)]
set a default for script timeout