Emil Mikulic [Sun, 1 May 2011 08:13:41 +0000 (18:13 +1000)]
Implement straightforward GET test.
Emil Mikulic [Sun, 17 Apr 2011 09:01:52 +0000 (19:01 +1000)]
Use setUp and tearDown to manage test file.
Emil Mikulic [Sun, 17 Apr 2011 09:00:04 +0000 (19:00 +1000)]
Re-arrange tests, no functional change.
Emil Mikulic [Sun, 17 Apr 2011 07:34:14 +0000 (17:34 +1000)]
Improve "caught Terminated" output.
Emil Mikulic [Sun, 17 Apr 2011 07:00:02 +0000 (17:00 +1000)]
parse_field() was looking for \r instead of [\r\n]
Emil Mikulic [Sun, 17 Apr 2011 06:47:09 +0000 (16:47 +1000)]
When logging, escape strings.
While I'm here, rename urlencode[_filename]() and improve it.
Emil Mikulic [Sat, 16 Apr 2011 09:57:00 +0000 (19:57 +1000)]
Oops, wrong kind of line ending.
Also, enforce Connection:close since the test harness doesn't
handle keep-alive.
Emil Mikulic [Sat, 16 Apr 2011 09:27:06 +0000 (19:27 +1000)]
Test URL escaping in directory listing.
Emil Mikulic [Sat, 16 Apr 2011 09:15:32 +0000 (19:15 +1000)]
Don't log to stdout when testing.
Emil Mikulic [Sat, 16 Apr 2011 09:14:06 +0000 (19:14 +1000)]
Log to stdout by default.
Emil Mikulic [Sat, 16 Apr 2011 09:08:31 +0000 (19:08 +1000)]
Print "listening on" as a URL.
Emil Mikulic [Sat, 16 Apr 2011 09:07:57 +0000 (19:07 +1000)]
Default to --port 8080, or 80 if running as root.
Emil Mikulic [Sat, 16 Apr 2011 08:52:53 +0000 (18:52 +1000)]
uri -> url
Emil Mikulic [Sat, 16 Apr 2011 08:38:39 +0000 (18:38 +1000)]
Update AUTHORS.
Emil Mikulic [Tue, 18 Jan 2011 14:11:43 +0000 (01:11 +1100)]
Accept \n as line ending when parsing URL.
This fixes "HTTP 0.9" requests.
Emil Mikulic [Tue, 18 Jan 2011 13:48:59 +0000 (00:48 +1100)]
Fix include path.
Emil Mikulic [Tue, 18 Jan 2011 13:47:18 +0000 (00:47 +1100)]
Print more quotes.
Emil Mikulic [Tue, 18 Jan 2011 13:44:15 +0000 (00:44 +1100)]
Allow running of individual tests from cmdline.
Emil Mikulic [Tue, 18 Jan 2011 13:26:13 +0000 (00:26 +1100)]
Make devel/test.py shorter.
Emil Mikulic [Mon, 17 Jan 2011 13:51:56 +0000 (00:51 +1100)]
Make devel/test.py less repetitive.
Emil Mikulic [Mon, 17 Jan 2011 12:59:41 +0000 (23:59 +1100)]
Add coverage driver.
Emil Mikulic [Mon, 17 Jan 2011 12:59:33 +0000 (23:59 +1100)]
More tests.
Emil Mikulic [Mon, 17 Jan 2011 12:44:02 +0000 (23:44 +1100)]
Working on unit tests.
Emil Mikulic [Sat, 15 Jan 2011 09:56:30 +0000 (20:56 +1100)]
For developers: script to run through clang static analyzer.
Emil Mikulic [Sat, 15 Jan 2011 09:54:15 +0000 (20:54 +1100)]
Another developer script - clang with warnings.
Emil Mikulic [Sat, 15 Jan 2011 09:51:07 +0000 (20:51 +1100)]
For developers - build with lots of warnings.
Emil Mikulic [Sat, 15 Jan 2011 09:38:31 +0000 (20:38 +1100)]
Don't qsort() NULL.
Found by: clang static analyzer
Emil Mikulic [Sat, 15 Jan 2011 09:31:34 +0000 (20:31 +1100)]
Fix clang nits.
Emil Mikulic [Sat, 15 Jan 2011 09:22:52 +0000 (20:22 +1100)]
Use int over size_t.
Emil Mikulic [Sat, 15 Jan 2011 09:13:00 +0000 (20:13 +1100)]
Don't use init decls, they're C99.
Emil Mikulic [Sat, 15 Jan 2011 09:12:12 +0000 (20:12 +1100)]
Finished style changes.
Emil Mikulic [Sat, 15 Jan 2011 09:08:16 +0000 (20:08 +1100)]
More style changes, fixed most of the compiler warnings.
Emil Mikulic [Sat, 15 Jan 2011 08:36:09 +0000 (19:36 +1100)]
More style changes, move a function.
Emil Mikulic [Sat, 15 Jan 2011 08:17:03 +0000 (19:17 +1100)]
Mostly style changes.
Emil Mikulic [Sat, 15 Jan 2011 07:37:15 +0000 (18:37 +1100)]
Restyle and add printflike.
Emil Mikulic [Sat, 15 Jan 2011 07:16:12 +0000 (18:16 +1100)]
Bump copyright year.
Emil Mikulic [Sat, 15 Jan 2011 07:15:39 +0000 (18:15 +1100)]
More inttype tweaks.
Emil Mikulic [Sat, 15 Jan 2011 05:20:09 +0000 (16:20 +1100)]
Casts and indents.
Emil Mikulic [Sat, 15 Jan 2011 05:16:22 +0000 (16:16 +1100)]
Cosmetics.
Emil Mikulic [Sat, 15 Jan 2011 05:06:31 +0000 (16:06 +1100)]
Avoid infinite loop (and quiet gcc warning)
Emil Mikulic [Wed, 24 Nov 2010 14:49:23 +0000 (01:49 +1100)]
Ranges work now.
Emil Mikulic [Wed, 24 Nov 2010 14:44:46 +0000 (01:44 +1100)]
Should these be unsigned?
Emil Mikulic [Wed, 24 Nov 2010 14:43:51 +0000 (01:43 +1100)]
More longlong fixes.
Emil Mikulic [Wed, 24 Nov 2010 14:37:37 +0000 (01:37 +1100)]
Working on large file support.
Emil Mikulic [Wed, 24 Nov 2010 12:33:31 +0000 (23:33 +1100)]
Tidy up Makefile.
Emil Mikulic [Sun, 28 Apr 2013 10:29:15 +0000 (20:29 +1000)]
Move trunk/ into base dir, move tests into devel/.
Emil Mikulic [Sat, 1 Nov 2008 14:47:33 +0000 (14:47 +0000)]
[ darkhttpd-1.7 release ]
Emil Mikulic [Tue, 4 Nov 2008 08:53:22 +0000 (08:53 +0000)]
Fix off-by-one.
Emil Mikulic [Sun, 26 Oct 2008 12:53:34 +0000 (12:53 +0000)]
Don't use strlen() in urlencode_filename()
Also move safe_url variable into for loop that uses it.
Emil Mikulic [Sun, 26 Oct 2008 12:50:28 +0000 (12:50 +0000)]
is_bad_char -> needs_urlencoding, whitespace fixes.
Emil Mikulic [Sun, 26 Oct 2008 12:45:57 +0000 (12:45 +0000)]
urlencode file names when generating directory listing.
Noticed by, patched by: nf
Emil Mikulic [Sat, 2 Aug 2008 04:00:56 +0000 (04:00 +0000)]
[ darkhttpd-1.6 release ]
Update copyright years.
Emil Mikulic [Sat, 2 Aug 2008 03:59:02 +0000 (03:59 +0000)]
Ubuntu hides uname somewhere else. Don't use a full path.
Emil Mikulic [Sat, 2 Aug 2008 03:51:11 +0000 (03:51 +0000)]
Five-letter patch that fixes a use-after-free and possible list
corruption. Don't know how far back this bug goes. Caught and
diagnosed on an Ubuntu system where it manifested as a segfault.
Emil Mikulic [Thu, 14 Dec 2006 10:13:55 +0000 (10:13 +0000)]
[ darkhttpd-1.5 release ]
(we skipped 1.4 due to a release engineering oversight)
Update README to reflect Makefile changes.
Emil Mikulic [Thu, 14 Dec 2006 10:10:46 +0000 (10:10 +0000)]
Simplify the Makefile.
Emil Mikulic [Thu, 14 Dec 2006 10:08:34 +0000 (10:08 +0000)]
Not sure if we were taking the size of the right thing previously.
Zero out the sockaddr_in before having accept() write to it.
This un-confuses bcheck on Solaris, at least.
Emil Mikulic [Thu, 14 Dec 2006 10:05:06 +0000 (10:05 +0000)]
Revert - don't bother with tzset.
Emil Mikulic [Wed, 13 Dec 2006 14:00:24 +0000 (14:00 +0000)]
Stuff to do when I find the time.
Emil Mikulic [Wed, 13 Dec 2006 13:55:48 +0000 (13:55 +0000)]
If sendfile blocks and sends zero bytes, treat it as blocking and not
end-of-file. This is a really rare corner case.
Emil Mikulic [Wed, 13 Dec 2006 13:38:50 +0000 (13:38 +0000)]
Cache time and update it once per event loop iteration.
This cuts down the number of gettimeofday() calls for a single request
from 5 to 1.
Emil Mikulic [Wed, 13 Dec 2006 13:32:22 +0000 (13:32 +0000)]
Slightly re-arrange the way recycling of keep-alive connections is
handled. Unfortunately, I'm still seeing horrible performance.
Emil Mikulic [Wed, 13 Dec 2006 13:28:32 +0000 (13:28 +0000)]
Minor tweaks.
Emil Mikulic [Wed, 13 Dec 2006 13:28:10 +0000 (13:28 +0000)]
Implement disabling TCP_NODELAY, but comment it out.
It makes performance worse.
Emil Mikulic [Wed, 13 Dec 2006 13:07:10 +0000 (13:07 +0000)]
We can handle a request from accept() to close() without having to go through a
single iteration of the select() loop.
This commit re-orders the way state == DONE is handled so that keep-alive
connections can go straight back into recv_request without visiting select().
Unfortunately, this doesn't fix the keep-alive performance.
Emil Mikulic [Wed, 13 Dec 2006 13:01:41 +0000 (13:01 +0000)]
Call tzset() during initialization.
truss output suggests this isn't enough to load posixrules (UTC leap
seconds data) which happens only after the first request. =(
Emil Mikulic [Wed, 13 Dec 2006 12:57:30 +0000 (12:57 +0000)]
Another state transition optimization:
Go from send_header straight to send_reply.
Emil Mikulic [Wed, 13 Dec 2006 12:47:20 +0000 (12:47 +0000)]
Another state transition optimization due to NBIO:
Go from recv_request to send_header without visiting select()
Emil Mikulic [Wed, 13 Dec 2006 12:41:08 +0000 (12:41 +0000)]
After accepting a connection, attempt a read straight away instead of
going through an iteration of the select() loop.
Emil Mikulic [Wed, 13 Dec 2006 12:31:30 +0000 (12:31 +0000)]
Don't just SETFL O_NONBLOCK, first GETFL.
Emil Mikulic [Wed, 13 Dec 2006 11:53:13 +0000 (11:53 +0000)]
%Z gives UTC. Apache uses GMT instead, and wget complains about an
invalid header when it sees UTC, so switch.
Emil Mikulic [Wed, 13 Dec 2006 08:41:05 +0000 (08:41 +0000)]
Get the constness right.
Emil Mikulic [Wed, 13 Dec 2006 08:38:18 +0000 (08:38 +0000)]
- In decode_url()
- Use '\0' instead of 0 to hint that it's in a character context.
- Don't realloc - this wastes more time than it saves memory.
- Don't forget to free decoded url if it's found to be unsafe!
Emil Mikulic [Wed, 13 Dec 2006 08:32:10 +0000 (08:32 +0000)]
Restore a check I shouldn't have removed.
We now pass all our tests again.
Emil Mikulic [Wed, 13 Dec 2006 08:30:21 +0000 (08:30 +0000)]
Adapt make_safe_uri() to work in-place.
We're currently failing some tests.
Emil Mikulic [Wed, 13 Dec 2006 08:29:53 +0000 (08:29 +0000)]
Turn up the debugging and warnflags.
Emil Mikulic [Wed, 13 Dec 2006 08:17:56 +0000 (08:17 +0000)]
Test for consolidate_slashes() too.
Emil Mikulic [Wed, 13 Dec 2006 08:16:16 +0000 (08:16 +0000)]
Remember to free memory.
Emil Mikulic [Wed, 13 Dec 2006 08:14:27 +0000 (08:14 +0000)]
Add tests for make_safe_uri.
Emil Mikulic [Wed, 13 Dec 2006 07:46:46 +0000 (07:46 +0000)]
Rename warnflags to debug-build and add debugging and torture defines.
Emil Mikulic [Wed, 13 Dec 2006 07:46:26 +0000 (07:46 +0000)]
Request a bigger file -> more testing.
Emil Mikulic [Wed, 13 Dec 2006 07:35:52 +0000 (07:35 +0000)]
Torture test: send and recv one byte at a time to make sure darkhttpd's
buffering is up to scratch.
Emil Mikulic [Wed, 13 Dec 2006 07:35:29 +0000 (07:35 +0000)]
Implement (optional, compile-time) shrinking of send buffer for torture tests.
Emil Mikulic [Wed, 13 Dec 2006 07:23:55 +0000 (07:23 +0000)]
Remove the pidfile_path assertion entirely.
Its name changed but I didn't notice because I didn't do any DEBUG builds.
Emil Mikulic [Wed, 13 Dec 2006 07:16:38 +0000 (07:16 +0000)]
Fix some GCC warnings.
Pointed out by: Brian Lewis <bsl04@uark.edu>
Pointed out on: Wed, 27 Sep 2006 15:46:26 -0500
Emil Mikulic [Wed, 13 Dec 2006 07:15:32 +0000 (07:15 +0000)]
Need some release engineering reminders after I failed to update the pkgname
when I released v1.4.
Emil Mikulic [Wed, 13 Dec 2006 07:09:10 +0000 (07:09 +0000)]
Walking through the code - correct some comment typos.
Emil Mikulic [Mon, 4 Sep 2006 07:04:39 +0000 (07:04 +0000)]
[ darkhttpd-1.4 release ]
Fix a segfault in log_connection() that happens when the incoming
request is too long.
(Forgot to bump the version)
Emil Mikulic [Fri, 21 Jul 2006 09:33:55 +0000 (09:33 +0000)]
[ darkhttpd-1.3 release ]
Also remove an unused variable.
Emil Mikulic [Fri, 21 Jul 2006 09:33:10 +0000 (09:33 +0000)]
Don't need libutil anymore.
Emil Mikulic [Fri, 21 Jul 2006 09:24:47 +0000 (09:24 +0000)]
Add example of --dameon and --pidfile to README.
Emil Mikulic [Fri, 21 Jul 2006 09:17:34 +0000 (09:17 +0000)]
Import pidfile helpers and cut them down to just the pieces we need.
Emil Mikulic [Fri, 21 Jul 2006 08:43:09 +0000 (08:43 +0000)]
Implement warn()
Emil Mikulic [Fri, 21 Jul 2006 08:39:01 +0000 (08:39 +0000)]
Implement daemonize.
Emil Mikulic [Fri, 21 Jul 2006 08:16:30 +0000 (08:16 +0000)]
Add mimetypes, sort them, remove lots of whitespace from the middle.
Emil Mikulic [Fri, 21 Jul 2006 07:26:13 +0000 (07:26 +0000)]
Update copyright years.
Emil Mikulic [Fri, 21 Jul 2006 07:17:24 +0000 (07:17 +0000)]
We need libutil on BSD now.
Emil Mikulic [Fri, 21 Jul 2006 07:17:04 +0000 (07:17 +0000)]
You don't "usually" need root privs for chroot(), you always do.
Emil Mikulic [Fri, 21 Jul 2006 07:14:22 +0000 (07:14 +0000)]
Implement --pidfile and move clean shutdown into main()
Emil Mikulic [Fri, 21 Jul 2006 07:13:21 +0000 (07:13 +0000)]
Fix build on FreeBSD by spelling "sockin" correctly.
This has been outstanding for a long time.