ashd.git
14 years agoFixed mtio memory leak.
Fredrik Tolf [Sat, 4 Sep 2010 23:03:20 +0000 (01:03 +0200)]
Fixed mtio memory leak.

14 years agohtparser: Ignore SIGPIPE.
Fredrik Tolf [Fri, 3 Sep 2010 06:03:12 +0000 (08:03 +0200)]
htparser: Ignore SIGPIPE.

Shouldn't *really* be necessary, but it seems hard to ensure that
gnutls uses MSG_NOSIGNAL, and it's not as if it really hurts. At least
not a lot.

14 years agocallscgi: Log exec errors.
Fredrik Tolf [Fri, 3 Sep 2010 05:49:45 +0000 (07:49 +0200)]
callscgi: Log exec errors.

14 years agocallscgi: Fixed header typo.
Fredrik Tolf [Fri, 3 Sep 2010 05:47:56 +0000 (07:47 +0200)]
callscgi: Fixed header typo.

14 years agoscgi-wsgi: Fixed a couple of typos.
Fredrik Tolf [Fri, 3 Sep 2010 05:42:44 +0000 (07:42 +0200)]
scgi-wsgi: Fixed a couple of typos.

14 years agoAdded a SCGI-WSGI gateway for Python.
Fredrik Tolf [Fri, 3 Sep 2010 05:38:03 +0000 (07:38 +0200)]
Added a SCGI-WSGI gateway for Python.

14 years agolibht: Fixed headrmheader bug.
Fredrik Tolf [Fri, 3 Sep 2010 05:32:48 +0000 (07:32 +0200)]
libht: Fixed headrmheader bug.

14 years agocallscgi: Exit properly on SIGTERM and SIGINT.
Fredrik Tolf [Fri, 3 Sep 2010 04:57:12 +0000 (06:57 +0200)]
callscgi: Exit properly on SIGTERM and SIGINT.

14 years agouserplex: Actually open stdout and stderr for writing...
Fredrik Tolf [Fri, 3 Sep 2010 04:56:24 +0000 (06:56 +0200)]
userplex: Actually open stdout and stderr for writing...

14 years agocallscgi: Fixed a couple of simple bugs.
Fredrik Tolf [Fri, 3 Sep 2010 04:45:53 +0000 (06:45 +0200)]
callscgi: Fixed a couple of simple bugs.

14 years agoFixed a couple of callscgi bugs.
Fredrik Tolf [Thu, 2 Sep 2010 18:22:18 +0000 (20:22 +0200)]
Fixed a couple of callscgi bugs.

14 years agoAdded an initial version of callscgi for doing requests over SCGI.
Fredrik Tolf [Thu, 2 Sep 2010 15:43:37 +0000 (17:43 +0200)]
Added an initial version of callscgi for doing requests over SCGI.

14 years agocallcgi: Added option to change CWD to the script's directory.
Fredrik Tolf [Thu, 2 Sep 2010 03:15:11 +0000 (05:15 +0200)]
callcgi: Added option to change CWD to the script's directory.

14 years agohtls: Fixed HTML error.
Fredrik Tolf [Wed, 1 Sep 2010 13:10:14 +0000 (15:10 +0200)]
htls: Fixed HTML error.

14 years agodirplex: Ignore backup files.
Fredrik Tolf [Wed, 1 Sep 2010 00:31:34 +0000 (02:31 +0200)]
dirplex: Ignore backup files.

14 years agolibht: Fixed the trim bug again. :P
Fredrik Tolf [Tue, 31 Aug 2010 22:53:05 +0000 (00:53 +0200)]
libht: Fixed the trim bug again. :P

14 years agolibht: Fixed a bug in trim.
Fredrik Tolf [Tue, 31 Aug 2010 22:37:29 +0000 (00:37 +0200)]
libht: Fixed a bug in trim.

14 years agocallcgi: Fixed PATH_INFO bug.
Fredrik Tolf [Tue, 31 Aug 2010 22:20:28 +0000 (00:20 +0200)]
callcgi: Fixed PATH_INFO bug.

14 years agohtparser: Fixed pidfile-less bug.
Fredrik Tolf [Tue, 31 Aug 2010 22:14:11 +0000 (00:14 +0200)]
htparser: Fixed pidfile-less bug.

14 years agohtparser: Added pidfile generation.
Fredrik Tolf [Tue, 31 Aug 2010 21:51:33 +0000 (23:51 +0200)]
htparser: Added pidfile generation.

14 years agouserplex: Parse command-line arguments properly.
Fredrik Tolf [Tue, 31 Aug 2010 21:19:28 +0000 (23:19 +0200)]
userplex: Parse command-line arguments properly.

14 years agopatplex: Don't quit from recvreq on EINTR.
Fredrik Tolf [Tue, 31 Aug 2010 21:06:47 +0000 (23:06 +0200)]
patplex: Don't quit from recvreq on EINTR.

14 years agoAdded a proper SIGHUP handler to patplex.
Fredrik Tolf [Tue, 31 Aug 2010 20:36:33 +0000 (22:36 +0200)]
Added a proper SIGHUP handler to patplex.

14 years agodirplex: Fixed up handledir a bit.
Fredrik Tolf [Tue, 31 Aug 2010 19:38:35 +0000 (21:38 +0200)]
dirplex: Fixed up handledir a bit.

14 years agoMade callcgi more Apache-compliant.
Fredrik Tolf [Tue, 31 Aug 2010 15:39:01 +0000 (17:39 +0200)]
Made callcgi more Apache-compliant.

14 years agoAdded an initial implementation of HTTPS.
Fredrik Tolf [Tue, 31 Aug 2010 15:28:16 +0000 (17:28 +0200)]
Added an initial implementation of HTTPS.

Should be complemented with some output of certificate information
in the request.

14 years agoFixed plaintcp bug.
Fredrik Tolf [Tue, 31 Aug 2010 13:42:44 +0000 (15:42 +0200)]
Fixed plaintcp bug.

14 years agohtls: Made directories more obvious.
Fredrik Tolf [Mon, 30 Aug 2010 15:44:04 +0000 (17:44 +0200)]
htls: Made directories more obvious.

14 years agohtls: Remember to quote URL characters in filenames.
Fredrik Tolf [Mon, 30 Aug 2010 15:30:59 +0000 (17:30 +0200)]
htls: Remember to quote URL characters in filenames.

14 years agoAdded a simple python program for processing SSI.
Fredrik Tolf [Mon, 30 Aug 2010 14:49:04 +0000 (16:49 +0200)]
Added a simple python program for processing SSI.

14 years agodirplex: Made it easier to include configuration "modules".
Fredrik Tolf [Mon, 30 Aug 2010 10:45:04 +0000 (12:45 +0200)]
dirplex: Made it easier to include configuration "modules".

14 years agoFixed htls bug.
Fredrik Tolf [Mon, 30 Aug 2010 01:50:06 +0000 (03:50 +0200)]
Fixed htls bug.

14 years agoBeautified the directory listings.
Fredrik Tolf [Sun, 29 Aug 2010 22:56:57 +0000 (00:56 +0200)]
Beautified the directory listings.

14 years agoAdded a htls program for directory listings.
Fredrik Tolf [Sun, 29 Aug 2010 21:37:23 +0000 (23:37 +0200)]
Added a htls program for directory listings.

14 years agodirplex: Added explicit directory matches.
Fredrik Tolf [Sun, 29 Aug 2010 21:37:02 +0000 (23:37 +0200)]
dirplex: Added explicit directory matches.

14 years agoMake libmagic follow symlinks.
Fredrik Tolf [Sun, 29 Aug 2010 14:45:06 +0000 (16:45 +0200)]
Make libmagic follow symlinks.

I could think this should be the default... :)

14 years agoTry to add default charset for text/* types in sendfile.
Fredrik Tolf [Sun, 29 Aug 2010 14:40:33 +0000 (16:40 +0200)]
Try to add default charset for text/* types in sendfile.

14 years agoFixed up PATH_INFO and SCRIPT_NAME.
Fredrik Tolf [Sun, 29 Aug 2010 11:09:34 +0000 (13:09 +0200)]
Fixed up PATH_INFO and SCRIPT_NAME.

14 years agocallcgi: Set SERVER_PORT and canonically consider Host to be SERVER_NAME.
Fredrik Tolf [Sun, 29 Aug 2010 10:58:11 +0000 (12:58 +0200)]
callcgi: Set SERVER_PORT and canonically consider Host to be SERVER_NAME.

14 years agoUnquote URL escapes in dirplex elements.
Fredrik Tolf [Sat, 28 Aug 2010 05:02:59 +0000 (07:02 +0200)]
Unquote URL escapes in dirplex elements.

14 years agoFixed a bug in callcgi.
Fredrik Tolf [Fri, 27 Aug 2010 00:54:11 +0000 (02:54 +0200)]
Fixed a bug in callcgi.

14 years agoFixed a couple of bugs in dirplex.
Fredrik Tolf [Thu, 26 Aug 2010 23:46:55 +0000 (01:46 +0200)]
Fixed a couple of bugs in dirplex.

14 years agoFixed userplex usage message.
Fredrik Tolf [Thu, 26 Aug 2010 14:30:25 +0000 (16:30 +0200)]
Fixed userplex usage message.

14 years agoAdded directory index-file handling to dirplex.
Fredrik Tolf [Wed, 25 Aug 2010 15:03:15 +0000 (17:03 +0200)]
Added directory index-file handling to dirplex.

14 years agoAdded ability to have alternative patterns for name matches.
Fredrik Tolf [Wed, 25 Aug 2010 15:02:57 +0000 (17:02 +0200)]
Added ability to have alternative patterns for name matches.

14 years agoAdded the library header files to SOURCES.
Fredrik Tolf [Wed, 25 Aug 2010 01:43:24 +0000 (03:43 +0200)]
Added the library header files to SOURCES.

14 years agoAdded a more convenient fork-handler to dirplex configuration.
Fredrik Tolf [Wed, 25 Aug 2010 00:38:14 +0000 (02:38 +0200)]
Added a more convenient fork-handler to dirplex configuration.

14 years agoAdded global config files to dirplex and patplex.
Fredrik Tolf [Wed, 25 Aug 2010 00:05:05 +0000 (02:05 +0200)]
Added global config files to dirplex and patplex.

14 years agoFixed config parsing bug.
Fredrik Tolf [Wed, 25 Aug 2010 00:03:53 +0000 (02:03 +0200)]
Fixed config parsing bug.

14 years agoCache dirplex .htrc files better to avoid redundant rechecking...
Fredrik Tolf [Tue, 24 Aug 2010 23:37:50 +0000 (01:37 +0200)]
Cache dirplex .htrc files better to avoid redundant rechecking...

...and make strace output look nicer. These things are important. :)

14 years agoSend 404 for files with no matches.
Fredrik Tolf [Tue, 24 Aug 2010 23:00:43 +0000 (01:00 +0200)]
Send 404 for files with no matches.

14 years agoMade config lookup in dirplex much nicer.
Fredrik Tolf [Tue, 24 Aug 2010 22:56:06 +0000 (00:56 +0200)]
Made config lookup in dirplex much nicer.

14 years agoMade non-absolute included filenames relative to the containing config file.
Fredrik Tolf [Tue, 24 Aug 2010 22:27:11 +0000 (00:27 +0200)]
Made non-absolute included filenames relative to the containing config file.

14 years agoAdded a userplex.
Fredrik Tolf [Tue, 24 Aug 2010 21:09:16 +0000 (23:09 +0200)]
Added a userplex.

14 years agoFixed a bug in stdredir.
Fredrik Tolf [Tue, 24 Aug 2010 20:55:36 +0000 (22:55 +0200)]
Fixed a bug in stdredir.

14 years agoDon't close the filedescriptors passed to simpleerror or stdredir.
Fredrik Tolf [Tue, 24 Aug 2010 19:45:03 +0000 (21:45 +0200)]
Don't close the filedescriptors passed to simpleerror or stdredir.

14 years agoRedirect directory requests to dirplex to always include a trailing slash.
Fredrik Tolf [Tue, 24 Aug 2010 19:40:24 +0000 (21:40 +0200)]
Redirect directory requests to dirplex to always include a trailing slash.

14 years agoAdded a response function for standard redirection.
Fredrik Tolf [Tue, 24 Aug 2010 19:39:58 +0000 (21:39 +0200)]
Added a response function for standard redirection.

These things will always be ugly hacks, so why shouldn't this one be? :-/

14 years agoFixed return bug in childhandle.
Fredrik Tolf [Tue, 24 Aug 2010 19:35:10 +0000 (21:35 +0200)]
Fixed return bug in childhandle.

14 years agoUse childhandle() in dirplex too.
Fredrik Tolf [Tue, 24 Aug 2010 18:46:44 +0000 (20:46 +0200)]
Use childhandle() in dirplex too.

14 years agoMade plaintcp a bit more flexible and present the port number to handlers.
Fredrik Tolf [Tue, 24 Aug 2010 18:26:12 +0000 (20:26 +0200)]
Made plaintcp a bit more flexible and present the port number to handlers.

14 years agoTrim any X-Ash- headers sent by the client.
Fredrik Tolf [Tue, 24 Aug 2010 15:38:39 +0000 (17:38 +0200)]
Trim any X-Ash- headers sent by the client.

14 years agoRemoved the unused strrcmp from sendfile.
Fredrik Tolf [Tue, 24 Aug 2010 14:50:10 +0000 (16:50 +0200)]
Removed the unused strrcmp from sendfile.

14 years agoInclude sys/types in utils.h
Fredrik Tolf [Tue, 24 Aug 2010 14:49:35 +0000 (16:49 +0200)]
Include sys/types in utils.h

14 years agoAdded a generic config parser/child handler and used it for dirplex and patplex.
Fredrik Tolf [Tue, 24 Aug 2010 14:49:26 +0000 (16:49 +0200)]
Added a generic config parser/child handler and used it for dirplex and patplex.

14 years agoAdded an error message for crashing request handlers in dirplex.
Fredrik Tolf [Tue, 24 Aug 2010 12:03:18 +0000 (14:03 +0200)]
Added an error message for crashing request handlers in dirplex.

14 years agoSlightly more sensible argument parsing for htparser.
Fredrik Tolf [Sat, 21 Aug 2010 14:15:46 +0000 (16:15 +0200)]
Slightly more sensible argument parsing for htparser.

14 years agoAdded daemonizing, syslogging, setuid and chrooting to htparser.
Fredrik Tolf [Sat, 21 Aug 2010 14:12:20 +0000 (16:12 +0200)]
Added daemonizing, syslogging, setuid and chrooting to htparser.

14 years agoMade htparser listening much more flexible.
Fredrik Tolf [Sat, 21 Aug 2010 13:46:51 +0000 (15:46 +0200)]
Made htparser listening much more flexible.

14 years agoAlways send the entire buffer in mtwrite.
Fredrik Tolf [Fri, 20 Aug 2010 15:44:56 +0000 (17:44 +0200)]
Always send the entire buffer in mtwrite.

If not, then libc considers it an error, as with the fwrite(3)
protocol. That does, however, seem to violate what is specified in the
manual, which states that mtwrite should work like write(2).

14 years agoUse new-style (CR-less) headers in responses.
Fredrik Tolf [Fri, 20 Aug 2010 13:29:54 +0000 (15:29 +0200)]
Use new-style (CR-less) headers in responses.

14 years agoAdded xattr mime-type detection to sendfile.
Fredrik Tolf [Fri, 20 Aug 2010 13:00:44 +0000 (15:00 +0200)]
Added xattr mime-type detection to sendfile.

14 years agoUse libmagic for sendfile.
Fredrik Tolf [Mon, 14 Dec 2009 16:08:14 +0000 (17:08 +0100)]
Use libmagic for sendfile.

15 years agoMade it possible to specify the content-type to sendfile.
Fredrik Tolf [Sat, 9 May 2009 14:02:07 +0000 (16:02 +0200)]
Made it possible to specify the content-type to sendfile.

15 years agoAdded CSS "support" to sendfile.
Fredrik Tolf [Wed, 7 Jan 2009 11:05:07 +0000 (12:05 +0100)]
Added CSS "support" to sendfile.

15 years agoAbsolutify SCRIPT_FILENAME in callcgi.
Fredrik Tolf [Wed, 7 Jan 2009 11:01:20 +0000 (12:01 +0100)]
Absolutify SCRIPT_FILENAME in callcgi.

15 years agoMerge branch 'master' of /srv/git/r/ashd
Fredrik Tolf [Wed, 7 Jan 2009 10:52:52 +0000 (11:52 +0100)]
Merge branch 'master' of /srv/git/r/ashd

15 years agoFixed a couple of small bugs.
Fredrik Tolf [Wed, 7 Jan 2009 10:52:45 +0000 (11:52 +0100)]
Fixed a couple of small bugs.

15 years agoFixed a "Status" header bug in callcgi.
Fredrik Tolf [Wed, 7 Jan 2009 10:51:13 +0000 (11:51 +0100)]
Fixed a "Status" header bug in callcgi.

15 years agoFixed a passdata bug in htparser.
Fredrik Tolf [Wed, 7 Jan 2009 05:15:37 +0000 (06:15 +0100)]
Fixed a passdata bug in htparser.

15 years agoRewrote htparser to handle both HTTP/1.0 and HTTP/1.1.
Fredrik Tolf [Wed, 7 Jan 2009 05:02:47 +0000 (06:02 +0100)]
Rewrote htparser to handle both HTTP/1.0 and HTTP/1.1.

15 years agoUsed glibc to provide mt-blocking stdio for fds.
Fredrik Tolf [Tue, 6 Jan 2009 13:11:32 +0000 (14:11 +0100)]
Used glibc to provide mt-blocking stdio for fds.

15 years agoAdded a simple patplex.
Fredrik Tolf [Thu, 1 Jan 2009 04:05:01 +0000 (05:05 +0100)]
Added a simple patplex.

15 years agoFixed a bug in the MT ioloop.
Fredrik Tolf [Thu, 1 Jan 2009 04:03:37 +0000 (05:03 +0100)]
Fixed a bug in the MT ioloop.

15 years agoMake htparser exit when the root multiplexer exits.
Fredrik Tolf [Thu, 1 Jan 2009 03:50:08 +0000 (04:50 +0100)]
Make htparser exit when the root multiplexer exits.

15 years agoModified callcgi to run CGI programs without an explicit handler.
Fredrik Tolf [Wed, 31 Dec 2008 10:33:53 +0000 (11:33 +0100)]
Modified callcgi to run CGI programs without an explicit handler.

15 years agoCheck the output from passdata in htparser.
Fredrik Tolf [Wed, 31 Dec 2008 10:22:13 +0000 (11:22 +0100)]
Check the output from passdata in htparser.

15 years agoAdded a simple CGI endcap.
Fredrik Tolf [Wed, 31 Dec 2008 10:21:58 +0000 (11:21 +0100)]
Added a simple CGI endcap.

15 years agoAdded some caching capabilities to sendfile.
Fredrik Tolf [Tue, 23 Dec 2008 00:35:19 +0000 (01:35 +0100)]
Added some caching capabilities to sendfile.

15 years agoAdded a really basic sendfile implementation.
Fredrik Tolf [Mon, 22 Dec 2008 04:04:59 +0000 (05:04 +0100)]
Added a really basic sendfile implementation.

15 years agoFixed a couple of bugs in dirplex.
Fredrik Tolf [Mon, 22 Dec 2008 04:03:28 +0000 (05:03 +0100)]
Fixed a couple of bugs in dirplex.

15 years agoSend error reports from dirplex.
Fredrik Tolf [Sun, 21 Dec 2008 19:53:50 +0000 (20:53 +0100)]
Send error reports from dirplex.

15 years agoReorganized dirplex quite a bit.
Fredrik Tolf [Sun, 21 Dec 2008 19:21:05 +0000 (20:21 +0100)]
Reorganized dirplex quite a bit.

15 years agoChanged dirplex to pass the filename as an optional header and preserve the semantics...
Fredrik Tolf [Fri, 19 Dec 2008 15:11:32 +0000 (16:11 +0100)]
Changed dirplex to pass the filename as an optional header and preserve the semantics of the rest string.

15 years agoAdded a first version of the directory multiplexer.
Fredrik Tolf [Thu, 18 Dec 2008 05:14:16 +0000 (06:14 +0100)]
Added a first version of the directory multiplexer.

15 years agoCreate the passed socket explicitly in htparser rather than generally in sendreq().
Fredrik Tolf [Thu, 18 Dec 2008 04:17:44 +0000 (05:17 +0100)]
Create the passed socket explicitly in htparser rather than generally in sendreq().

15 years agoMake sure to wait for the rootplex to accept writes from htparser.
Fredrik Tolf [Wed, 17 Dec 2008 23:36:01 +0000 (00:36 +0100)]
Make sure to wait for the rootplex to accept writes from htparser.

15 years agoAdded a `calen' utility function.
Fredrik Tolf [Wed, 17 Dec 2008 21:47:17 +0000 (22:47 +0100)]
Added a `calen' utility function.

15 years agoMoved htparser's ioloop to the library.
Fredrik Tolf [Wed, 17 Dec 2008 05:42:26 +0000 (06:42 +0100)]
Moved htparser's ioloop to the library.

15 years agoAdded a tokenizer util function.
Fredrik Tolf [Wed, 17 Dec 2008 05:36:36 +0000 (06:36 +0100)]
Added a tokenizer util function.