Commit Graph

  • 6d24c697b1 Request a bigger file -> more testing. Emil Mikulic 2006-12-13 07:46:26 +0000
  • af7d21c31e Torture test: send and recv one byte at a time to make sure darkhttpd's buffering is up to scratch. Emil Mikulic 2006-12-13 07:35:52 +0000
  • ab1204f700 Implement (optional, compile-time) shrinking of send buffer for torture tests. Emil Mikulic 2006-12-13 07:35:29 +0000
  • 94d3403c2e Remove the pidfile_path assertion entirely. Emil Mikulic 2006-12-13 07:23:55 +0000
  • b307616f3d Fix some GCC warnings. Emil Mikulic 2006-12-13 07:16:38 +0000
  • de03d20958 Need some release engineering reminders after I failed to update the pkgname when I released v1.4. Emil Mikulic 2006-12-13 07:15:32 +0000
  • 4a405e36b1 Walking through the code - correct some comment typos. Emil Mikulic 2006-12-13 07:09:10 +0000
  • c2ff18a157 [ darkhttpd-1.4 release ] Emil Mikulic 2006-09-04 07:04:39 +0000
  • c9947250f2 [ darkhttpd-1.3 release ] Emil Mikulic 2006-07-21 09:33:55 +0000
  • 868c1ed1da Don't need libutil anymore. Emil Mikulic 2006-07-21 09:33:10 +0000
  • 572eed9e3a Add example of --dameon and --pidfile to README. Emil Mikulic 2006-07-21 09:24:47 +0000
  • 953a93d2fc Import pidfile helpers and cut them down to just the pieces we need. Emil Mikulic 2006-07-21 09:17:34 +0000
  • c3166bf1d0 Implement warn() Emil Mikulic 2006-07-21 08:43:09 +0000
  • 2d4fbd38cd Implement daemonize. Emil Mikulic 2006-07-21 08:39:01 +0000
  • cad637254a Add mimetypes, sort them, remove lots of whitespace from the middle. Emil Mikulic 2006-07-21 08:16:30 +0000
  • ff152e87ef Update copyright years. Emil Mikulic 2006-07-21 07:26:13 +0000
  • 25eea59af9 We need libutil on BSD now. Emil Mikulic 2006-07-21 07:17:24 +0000
  • 258d54ed8c You don't "usually" need root privs for chroot(), you always do. Emil Mikulic 2006-07-21 07:17:04 +0000
  • 4fed6d0665 Implement --pidfile and move clean shutdown into main() Emil Mikulic 2006-07-21 07:14:22 +0000
  • 42833fb312 Fix build on FreeBSD by spelling "sockin" correctly. This has been outstanding for a long time. Emil Mikulic 2006-07-21 07:13:21 +0000
  • 6c1922391f Answer requests that end in \n\n as well as the more pedantic \r\n\r\n Emil Mikulic 2006-07-21 07:12:46 +0000
  • bea398d629 Add support for sendfile() on Solaris. Emil Mikulic 2006-07-21 07:11:56 +0000
  • 49fb5f3fbf Fix fallback on platforms that don't have sendfile() It was quite badly broken. Emil Mikulic 2006-07-21 07:11:08 +0000
  • 2ca3cef4a3 [ darkhttpd-1.2 release ] Emil Mikulic 2004-12-27 12:54:54 +0000
  • 666d9b3355 Instructions, not prompts. Emil Mikulic 2004-12-27 12:49:08 +0000
  • 3829ceade8 Fix (unsigned < 0) comparison. Emil Mikulic 2004-12-27 12:48:24 +0000
  • 74fcaf5859 safefree -> free Emil Mikulic 2004-12-27 12:47:39 +0000
  • dfe896357a Fix debugf mess. Emil Mikulic 2004-12-27 12:46:35 +0000
  • b50b4f1c5a Fix signed-unsigned comparison. Emil Mikulic 2004-12-27 12:40:43 +0000
  • 5cf2862f08 Manually inline acceptfilter code to remove unused arg warning on non-FreeBSD platforms. Emil Mikulic 2004-12-27 12:38:32 +0000
  • e624dbbe02 Fix err and debugf warnings. Emil Mikulic 2004-12-27 12:30:36 +0000
  • 91fcb80e4a Adjust copyright and license. Emil Mikulic 2004-12-27 12:28:46 +0000
  • d545127600 Track requests and bytes transferred statistics. Emil Mikulic 2003-12-14 08:29:08 +0000
  • c4f78a124c [ darkhttpd-1.1 release ] Emil Mikulic 2003-12-13 14:19:06 +0000
  • 27a35821a1 wwwroot = strdup(argv[1]) so we don't end up stripping the only existing slash out of the commandline shown by ps(1). And free it on shutdown. Emil Mikulic 2003-12-13 14:11:49 +0000
  • e18f533945 . Tell people to use Makefile for building. . Make a few things clearer by improving examples. Emil Mikulic 2003-12-13 14:09:05 +0000
  • af46f81440 User specifies platform, like mpg123. Emil Mikulic 2003-12-13 14:08:36 +0000
  • 108eb4cce3 . Split usage() into many printfs() to keep GCC3 happy about ISO limits. . Knock out the REPLY_GENERATED length assertion since ap_buf doesn't null-terminate strings and it's never been tripped by xasprintf() consumers. . Cast rusage times when printing, and don't print too many zeroes. Emil Mikulic 2003-12-13 08:56:05 +0000
  • ecb3d8adb3 Optimize generate_dir_listing(): . Split appendf() calls into a number of append() calls. . To insert spaces, instead of sitting in a loop, use a spaces[] buffer and insert a chunk of it with appendl(). Emil Mikulic 2003-12-13 08:45:06 +0000
  • 4ce4eabdbd . Version upped to 1.1 for append buffer optimizations. . Don't keep the apbuf strings null-terminated. . Compile-time optimise append() if we have GCC. Emil Mikulic 2003-12-13 08:42:34 +0000
  • fd4e271d57 Before exiting, getrusage() and print time spent on CPU. Emil Mikulic 2003-12-13 07:50:16 +0000
  • 0f798c0d71 Merge two lines. Emil Mikulic 2003-12-13 07:37:52 +0000
  • b2e4f924b9 NDEBUG gets defined in the source file. Emil Mikulic 2003-12-13 07:24:43 +0000
  • 020b4d20e2 Fix whitespace and disclaimer comment. Emil Mikulic 2003-12-13 06:27:03 +0000
  • 84e59c72ac Use FALLTHROUGH instead of goto. Emil Mikulic 2003-12-03 09:39:16 +0000
  • 1623dee16a Initial revision - this and the source are the only files in the 1.0 tarball. Emil Mikulic 2003-11-30 13:22:04 +0000
  • 6ab21a586e . Don't expect user to define NDEBUG. Emil Mikulic 2003-11-30 11:31:40 +0000
  • 761462e4e5 . __sun__ -> __sun since Sun's CC doesn't use the former. Emil Mikulic 2003-11-30 11:30:20 +0000
  • 7df4b55839 . Fix chomp()'s checking of empty strings. Emil Mikulic 2003-11-30 11:04:37 +0000
  • c58880c10a . Added third BSD clause. . Got rid of Solaris hint - it belongs in the README. . Got rid of a tab. Emil Mikulic 2003-11-30 04:46:06 +0000
  • b175db347d . Added --accf instead of compile-time NO_ACCEPTFILTER. . Fixed const issues in dlent_cmp(). . Fixed uninitialized from/to warning. Emil Mikulic 2003-11-29 07:36:01 +0000
  • 36f027c8c8 Fix two memory leaks. Emil Mikulic 2003-11-28 05:26:31 +0000
  • a4be99dc3f . USE_ACCEPTFILTER -> NO_ACCEPTFILTER and document it. Emil Mikulic 2003-11-28 05:12:43 +0000
  • a0dddaf19a . Add USE_ACCEPTFILTER knob. . debugf() sweep - turn non-verbose ones into printf()s Emil Mikulic 2003-11-28 05:08:21 +0000
  • 3f6c57ca70 -DNDEBUG Emil Mikulic 2003-11-28 05:08:21 +0000
  • a4347fa196 . Added BSD license. . Version is now 1.0. . Display [!]NDEBUG in --version output. Emil Mikulic 2003-11-28 04:26:56 +0000
  • 01f231eaea . -O won't hurt, and it catches uninitialized vars. Emil Mikulic 2003-11-28 04:08:47 +0000
  • 3e378caaf0 . Implemented apbuf API. . Reworked generate_dir_listing() to use apbuf - much nicer now. Emil Mikulic 2003-11-27 13:04:08 +0000
  • 2776f8c35e . Cosmetics in mime_mapping_cmp(). . Added make_sorted_dirlist(), cleanup_sorted_dirlist(). . generate_dir_listing() works better and produces sorted output, but still looks awful. Emil Mikulic 2003-11-27 12:20:55 +0000
  • 3dbf2f15b4 . Got rid of pretty top-of-file. . Moved $Id$ into static rcsid[]. . Preened TODO list. . Removed LIST_EMPTY() - it wasn't being used. . Got rid of "mapping x -> y" debugf. . Move exit() out of usage() and into caller to make program flow more obvious. . Added --version handling that prints rcsid. Emil Mikulic 2003-11-27 10:52:43 +0000
  • fb2e40cae5 . Added file_exists(). . Added skeleton for generate_dir_listing(). . Tied it into process_get(). Emil Mikulic 2003-11-27 10:37:02 +0000
  • 917e7a2cc4 . De-constify offset for Linux. Emil Mikulic 2003-11-27 10:12:09 +0000
  • 132757b8fe . Do a non-blocking open and only stat once. Emil Mikulic 2003-11-27 10:07:25 +0000
  • 7abf59ea32 . Removed test_make_safe_uri(). Emil Mikulic 2003-11-27 08:04:19 +0000
  • 19f70a46a9 . Added xclose(). . Changed reply_file from FILE to a file descriptor - using regular syscalls instead of stdio f* calls. Emil Mikulic 2003-11-27 08:03:36 +0000
  • 6312e230fb . Implement chroot. Emil Mikulic 2003-11-27 05:45:43 +0000
  • 45ac8883e0 . Correct order of checking name and id for --uid and --gid. Emil Mikulic 2003-11-27 05:18:00 +0000
  • 7ef872fd6a Added handling of --uid. Emil Mikulic 2003-11-27 05:14:55 +0000
  • b5f0992e7e . Added str_to_num(). . Added handling of --uid. Emil Mikulic 2003-11-27 05:10:20 +0000
  • b2b6d75a05 . In NDEBUG, safefree() is just free(). . Originally there were three places where a pointer was NULL'd after being freed. One of these is actually important, so annotate it. Emil Mikulic 2003-11-24 12:21:33 +0000
  • 7014380256 Cosmetics. Emil Mikulic 2003-11-24 12:09:08 +0000
  • 850543f7d6 . Patch up a leak by freeing target when needed. Emil Mikulic 2003-11-24 11:54:34 +0000
  • 832851b83d . Add safefree(x) macro to set x to NULL after freeing. Emil Mikulic 2003-11-24 11:48:49 +0000
  • e74bb5a077 . Added redirect(). . Moved 404 reply up to stat() section. . Redirect /dir to /dir/ . Separate permissions (403 Forbidden) from other fopen() failures (500 Internal Server Error) Emil Mikulic 2003-11-24 11:44:22 +0000
  • eee798c571 . stat() the file before opening it to avoid opening FIFOs, sockets, etc. Emil Mikulic 2003-11-24 11:24:26 +0000
  • db6517c62d . Use goto instead of code duplication. Emil Mikulic 2003-11-24 11:11:20 +0000
  • 5563889b66 Make keep_alive() a macro instead of a tiny function. Emil Mikulic 2003-11-22 13:16:13 +0000
  • df4f6910de send_from_file(): Use sendfile() on Linux. Emil Mikulic 2003-11-22 13:10:57 +0000
  • 8f4a5e6b60 . Split file sending into send_from_file(). . Optimize it with sendfile() on FreeBSD. Emil Mikulic 2003-11-22 12:56:46 +0000
  • e127c6acda make_safe_uri() improvements. Emil Mikulic 2003-11-22 12:22:14 +0000
  • b082fa213f Faster, simpler, not yet completely correct reimplementation of make_safe_uri(). It still has a lot of debugging cruft inside. Emil Mikulic 2003-11-22 12:09:56 +0000
  • b2f504f975 . Add consolidate_slashes(). . make_safe_uri() may modify the URI string given to it. . SAFE() and UNSAFE() don't pass const strings to make_safe_uri(). Emil Mikulic 2003-11-22 11:29:44 +0000
  • 41d2f5867a Solaris compatibility fixes. Emil Mikulic 2003-11-18 12:33:02 +0000
  • 466de20e2e . Cosmetics. Emil Mikulic 2003-11-18 11:33:08 +0000
  • 255a78d0c4 . strip_endslash() should not have been reallocating argv[1] . Remove strip_endslash() by boiling it down to one line and putting that line where the function call used to be. Emil Mikulic 2003-11-18 11:05:03 +0000
  • f7c0995234 . Don't need to nonblock the listening socket. . Use acceptfilter. Emil Mikulic 2003-11-18 11:00:08 +0000
  • f0766d80f3 . Don't kill the whole server if recv() error occurs. . Set conn_close to 1 on error to ensure connection closure. Emil Mikulic 2003-11-18 10:32:11 +0000
  • 376c8b29fb . Make parse_request return int so it can return failure on malformed requests. . Make it bomb out on malformed requests like "moo\r\n\r\n" Emil Mikulic 2003-11-18 10:19:29 +0000
  • 00fea650ed . IDLETIME -> idletime . Construct keep_alive_field from idletime. . Send keep_alive_field when there's no `Connection: close' Emil Mikulic 2003-11-18 10:09:43 +0000
  • dd4a217817 Fix conn->close logic: . HTTP/1.1 protocol enables keep-alive. . Connection: keep-alive' enables keep-alive, regardless of protocol. . Connection: close' disables keep-alive. Emil Mikulic 2003-11-18 09:38:45 +0000
  • 3389cc39d4 . Keep-alive connections work now. . free_connection() now calls log_connection() for us. . keepalive_connection() -> recycle_connection(). . recycle_connection() calls free_connection() (results in logging). . Don't reset conn->client in recycle. . Before main select loop, recycle keep-alive DONE connections. Emil Mikulic 2003-11-18 09:32:39 +0000
  • a07492c1a8 . In poll_send_{header,reply}(), don't bother deallocating stuff that free_connection will deallocate anyway. Emil Mikulic 2003-11-18 09:22:33 +0000
  • 2080b05d4c Starting work on Keep-Alive: . Added conn_close to struct connection. 0 = Keep-Alive, 1 = Connection: close . Added keepalive_connection() for recycling connection structs. . Made "Connection: close\r\n" in reply headers optional. . If protocol is HTTP/1.1, use Keep-Alive, unless Connection: close is given in the request. Emil Mikulic 2003-11-18 09:16:27 +0000
  • 1e3b874dca Import LIST_FOREACH_SAFE macro from FreeBSD. Emil Mikulic 2003-11-18 08:28:33 +0000
  • 34db7c9e68 . Traditional C sucks. Emil Mikulic 2003-11-18 08:07:51 +0000
  • f246f24acb . Remove expand_tilde(). . Remove commented-out SIGINT/SIGQUIT handling. Emil Mikulic 2003-11-18 07:22:51 +0000
  • e70a830c2c . Add TODO reminders. . Optimize string reassembly in make_safe_uri(). Emil Mikulic 2003-11-18 07:14:00 +0000
  • 8a05f349d8 . Fix assertions in split_string(). . Don't split_string() outside of the string in make_safe_uri() . Added test_make_safe_uri(), called from main() Emil Mikulic 2003-11-18 06:41:07 +0000
  • f65f8520a0 . More assertions in split_string(). . Make some empty for() loops more obvious. . Missed a 0 -> '\0' last time. . err(EXIT_FAILURE, ...) -> err(1, ...) to retain existing style. . Annotate default_extension_map[] - it must be NULL terminated. . Don't expand_tilde() -- unsure about this. Emil Mikulic 2003-11-17 13:02:32 +0000
  • 9988849ea7 Change 0 to '\0' in a character context. Emil Mikulic 2003-11-17 12:46:03 +0000