darkhttpd
7 years agoPassing bad-end range test.
Emil Mikulic [Sun, 1 May 2011 08:54:06 +0000 (18:54 +1000)]
Passing bad-end range test.

7 years agoTest range requests, including one failing test.
Emil Mikulic [Sun, 1 May 2011 08:49:18 +0000 (18:49 +1000)]
Test range requests, including one failing test.

7 years agoAdvertise that we accept ranges.
Emil Mikulic [Sun, 1 May 2011 08:43:14 +0000 (18:43 +1000)]
Advertise that we accept ranges.

7 years agoRemove unnecessary headers from 304 reply.
Emil Mikulic [Sun, 1 May 2011 08:26:33 +0000 (18:26 +1000)]
Remove unnecessary headers from 304 reply.

7 years agoFailing test for If-Modified-Since
Emil Mikulic [Sun, 1 May 2011 08:20:26 +0000 (18:20 +1000)]
Failing test for If-Modified-Since

7 years agoTest for HEAD method.
Emil Mikulic [Sun, 1 May 2011 08:15:56 +0000 (18:15 +1000)]
Test for HEAD method.

7 years agoImplement straightforward GET test.
Emil Mikulic [Sun, 1 May 2011 08:13:41 +0000 (18:13 +1000)]
Implement straightforward GET test.

7 years agoUse setUp and tearDown to manage test file.
Emil Mikulic [Sun, 17 Apr 2011 09:01:52 +0000 (19:01 +1000)]
Use setUp and tearDown to manage test file.

7 years agoRe-arrange tests, no functional change.
Emil Mikulic [Sun, 17 Apr 2011 09:00:04 +0000 (19:00 +1000)]
Re-arrange tests, no functional change.

7 years agoImprove "caught Terminated" output.
Emil Mikulic [Sun, 17 Apr 2011 07:34:14 +0000 (17:34 +1000)]
Improve "caught Terminated" output.

7 years agoparse_field() was looking for \r instead of [\r\n]
Emil Mikulic [Sun, 17 Apr 2011 07:00:02 +0000 (17:00 +1000)]
parse_field() was looking for \r instead of [\r\n]

7 years agoWhen logging, escape strings.
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.

7 years agoOops, wrong kind of line ending.
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.

7 years agoTest URL escaping in directory listing.
Emil Mikulic [Sat, 16 Apr 2011 09:27:06 +0000 (19:27 +1000)]
Test URL escaping in directory listing.

7 years agoDon't log to stdout when testing.
Emil Mikulic [Sat, 16 Apr 2011 09:15:32 +0000 (19:15 +1000)]
Don't log to stdout when testing.

7 years agoLog to stdout by default.
Emil Mikulic [Sat, 16 Apr 2011 09:14:06 +0000 (19:14 +1000)]
Log to stdout by default.

7 years agoPrint "listening on" as a URL.
Emil Mikulic [Sat, 16 Apr 2011 09:08:31 +0000 (19:08 +1000)]
Print "listening on" as a URL.

7 years agoDefault to --port 8080, or 80 if running as root.
Emil Mikulic [Sat, 16 Apr 2011 09:07:57 +0000 (19:07 +1000)]
Default to --port 8080, or 80 if running as root.

7 years agouri -> url
Emil Mikulic [Sat, 16 Apr 2011 08:52:53 +0000 (18:52 +1000)]
uri -> url

7 years agoUpdate AUTHORS.
Emil Mikulic [Sat, 16 Apr 2011 08:38:39 +0000 (18:38 +1000)]
Update AUTHORS.

7 years agoAccept \n as line ending when parsing URL.
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.

7 years agoFix include path.
Emil Mikulic [Tue, 18 Jan 2011 13:48:59 +0000 (00:48 +1100)]
Fix include path.

7 years agoPrint more quotes.
Emil Mikulic [Tue, 18 Jan 2011 13:47:18 +0000 (00:47 +1100)]
Print more quotes.

7 years agoAllow running of individual tests from cmdline.
Emil Mikulic [Tue, 18 Jan 2011 13:44:15 +0000 (00:44 +1100)]
Allow running of individual tests from cmdline.

7 years agoMake devel/test.py shorter.
Emil Mikulic [Tue, 18 Jan 2011 13:26:13 +0000 (00:26 +1100)]
Make devel/test.py shorter.

7 years agoMake devel/test.py less repetitive.
Emil Mikulic [Mon, 17 Jan 2011 13:51:56 +0000 (00:51 +1100)]
Make devel/test.py less repetitive.

7 years agoAdd coverage driver.
Emil Mikulic [Mon, 17 Jan 2011 12:59:41 +0000 (23:59 +1100)]
Add coverage driver.

7 years agoMore tests.
Emil Mikulic [Mon, 17 Jan 2011 12:59:33 +0000 (23:59 +1100)]
More tests.

7 years agoWorking on unit tests.
Emil Mikulic [Mon, 17 Jan 2011 12:44:02 +0000 (23:44 +1100)]
Working on unit tests.

7 years agoFor developers: script to run through clang static analyzer.
Emil Mikulic [Sat, 15 Jan 2011 09:56:30 +0000 (20:56 +1100)]
For developers: script to run through clang static analyzer.

7 years agoAnother developer script - clang with warnings.
Emil Mikulic [Sat, 15 Jan 2011 09:54:15 +0000 (20:54 +1100)]
Another developer script - clang with warnings.

7 years agoFor developers - build with lots of warnings.
Emil Mikulic [Sat, 15 Jan 2011 09:51:07 +0000 (20:51 +1100)]
For developers - build with lots of warnings.

7 years agoDon't qsort() NULL.
Emil Mikulic [Sat, 15 Jan 2011 09:38:31 +0000 (20:38 +1100)]
Don't qsort() NULL.

Found by: clang static analyzer

7 years agoFix clang nits.
Emil Mikulic [Sat, 15 Jan 2011 09:31:34 +0000 (20:31 +1100)]
Fix clang nits.

7 years agoUse int over size_t.
Emil Mikulic [Sat, 15 Jan 2011 09:22:52 +0000 (20:22 +1100)]
Use int over size_t.

7 years agoDon't use init decls, they're C99.
Emil Mikulic [Sat, 15 Jan 2011 09:13:00 +0000 (20:13 +1100)]
Don't use init decls, they're C99.

7 years agoFinished style changes.
Emil Mikulic [Sat, 15 Jan 2011 09:12:12 +0000 (20:12 +1100)]
Finished style changes.

7 years agoMore style changes, fixed most of the compiler warnings.
Emil Mikulic [Sat, 15 Jan 2011 09:08:16 +0000 (20:08 +1100)]
More style changes, fixed most of the compiler warnings.

7 years agoMore style changes, move a function.
Emil Mikulic [Sat, 15 Jan 2011 08:36:09 +0000 (19:36 +1100)]
More style changes, move a function.

7 years agoMostly style changes.
Emil Mikulic [Sat, 15 Jan 2011 08:17:03 +0000 (19:17 +1100)]
Mostly style changes.

7 years agoRestyle and add printflike.
Emil Mikulic [Sat, 15 Jan 2011 07:37:15 +0000 (18:37 +1100)]
Restyle and add printflike.

7 years agoBump copyright year.
Emil Mikulic [Sat, 15 Jan 2011 07:16:12 +0000 (18:16 +1100)]
Bump copyright year.

7 years agoMore inttype tweaks.
Emil Mikulic [Sat, 15 Jan 2011 07:15:39 +0000 (18:15 +1100)]
More inttype tweaks.

7 years agoCasts and indents.
Emil Mikulic [Sat, 15 Jan 2011 05:20:09 +0000 (16:20 +1100)]
Casts and indents.

7 years agoCosmetics.
Emil Mikulic [Sat, 15 Jan 2011 05:16:22 +0000 (16:16 +1100)]
Cosmetics.

7 years agoAvoid infinite loop (and quiet gcc warning)
Emil Mikulic [Sat, 15 Jan 2011 05:06:31 +0000 (16:06 +1100)]
Avoid infinite loop (and quiet gcc warning)

7 years agoRanges work now.
Emil Mikulic [Wed, 24 Nov 2010 14:49:23 +0000 (01:49 +1100)]
Ranges work now.

7 years agoShould these be unsigned?
Emil Mikulic [Wed, 24 Nov 2010 14:44:46 +0000 (01:44 +1100)]
Should these be unsigned?

7 years agoMore longlong fixes.
Emil Mikulic [Wed, 24 Nov 2010 14:43:51 +0000 (01:43 +1100)]
More longlong fixes.

10 years agoWorking on large file support.
Emil Mikulic [Wed, 24 Nov 2010 14:37:37 +0000 (01:37 +1100)]
Working on large file support.

10 years agoTidy up Makefile.
Emil Mikulic [Wed, 24 Nov 2010 12:33:31 +0000 (23:33 +1100)]
Tidy up Makefile.

7 years agoMove trunk/ into base dir, move tests into devel/.
Emil Mikulic [Sun, 28 Apr 2013 10:29:15 +0000 (20:29 +1000)]
Move trunk/ into base dir, move tests into devel/.

7 years ago[ darkhttpd-1.7 release ]
Emil Mikulic [Sat, 1 Nov 2008 14:47:33 +0000 (14:47 +0000)]
[ darkhttpd-1.7 release ]

7 years agoFix off-by-one.
Emil Mikulic [Tue, 4 Nov 2008 08:53:22 +0000 (08:53 +0000)]
Fix off-by-one.

7 years agoDon't use strlen() in urlencode_filename()
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.

7 years agois_bad_char -> needs_urlencoding, whitespace fixes.
Emil Mikulic [Sun, 26 Oct 2008 12:50:28 +0000 (12:50 +0000)]
is_bad_char -> needs_urlencoding, whitespace fixes.

7 years agourlencode file names when generating directory listing.
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

7 years ago[ darkhttpd-1.6 release ]
Emil Mikulic [Sat, 2 Aug 2008 04:00:56 +0000 (04:00 +0000)]
[ darkhttpd-1.6 release ]

Update copyright years.

7 years agoUbuntu hides uname somewhere else. Don't use a full path.
Emil Mikulic [Sat, 2 Aug 2008 03:59:02 +0000 (03:59 +0000)]
Ubuntu hides uname somewhere else.  Don't use a full path.

7 years agoFive-letter patch that fixes a use-after-free and possible list
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.

7 years ago[ darkhttpd-1.5 release ]
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.

7 years agoSimplify the Makefile.
Emil Mikulic [Thu, 14 Dec 2006 10:10:46 +0000 (10:10 +0000)]
Simplify the Makefile.

7 years agoNot sure if we were taking the size of the right thing previously.
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.

7 years agoRevert - don't bother with tzset.
Emil Mikulic [Thu, 14 Dec 2006 10:05:06 +0000 (10:05 +0000)]
Revert - don't bother with tzset.

7 years agoStuff to do when I find the time.
Emil Mikulic [Wed, 13 Dec 2006 14:00:24 +0000 (14:00 +0000)]
Stuff to do when I find the time.

7 years agoIf sendfile blocks and sends zero bytes, treat it as blocking and not
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.

7 years agoCache time and update it once per event loop iteration.
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.

7 years agoSlightly re-arrange the way recycling of keep-alive connections is
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.

7 years agoMinor tweaks.
Emil Mikulic [Wed, 13 Dec 2006 13:28:32 +0000 (13:28 +0000)]
Minor tweaks.

7 years agoImplement disabling TCP_NODELAY, but comment it out.
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.

7 years agoWe can handle a request from accept() to close() without having to go through a
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.

7 years agoCall tzset() during initialization.
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.  =(

7 years agoAnother state transition optimization:
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.

7 years agoAnother state transition optimization due to NBIO:
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()

7 years agoAfter accepting a connection, attempt a read straight away instead of
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.

7 years agoDon't just SETFL O_NONBLOCK, first GETFL.
Emil Mikulic [Wed, 13 Dec 2006 12:31:30 +0000 (12:31 +0000)]
Don't just SETFL O_NONBLOCK, first GETFL.

7 years ago%Z gives UTC. Apache uses GMT instead, and wget complains about an
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.

7 years agoGet the constness right.
Emil Mikulic [Wed, 13 Dec 2006 08:41:05 +0000 (08:41 +0000)]
Get the constness right.

7 years ago- In decode_url()
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!

7 years agoRestore a check I shouldn't have removed.
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.

7 years agoAdapt make_safe_uri() to work in-place.
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.

7 years agoTurn up the debugging and warnflags.
Emil Mikulic [Wed, 13 Dec 2006 08:29:53 +0000 (08:29 +0000)]
Turn up the debugging and warnflags.

7 years agoTest for consolidate_slashes() too.
Emil Mikulic [Wed, 13 Dec 2006 08:17:56 +0000 (08:17 +0000)]
Test for consolidate_slashes() too.

7 years agoRemember to free memory.
Emil Mikulic [Wed, 13 Dec 2006 08:16:16 +0000 (08:16 +0000)]
Remember to free memory.

7 years agoAdd tests for make_safe_uri.
Emil Mikulic [Wed, 13 Dec 2006 08:14:27 +0000 (08:14 +0000)]
Add tests for make_safe_uri.

7 years agoRename warnflags to debug-build and add debugging and torture defines.
Emil Mikulic [Wed, 13 Dec 2006 07:46:46 +0000 (07:46 +0000)]
Rename warnflags to debug-build and add debugging and torture defines.

7 years agoRequest a bigger file -> more testing.
Emil Mikulic [Wed, 13 Dec 2006 07:46:26 +0000 (07:46 +0000)]
Request a bigger file -> more testing.

7 years agoTorture test: send and recv one byte at a time to make sure darkhttpd's
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.

7 years agoImplement (optional, compile-time) shrinking of send buffer for torture tests.
Emil Mikulic [Wed, 13 Dec 2006 07:35:29 +0000 (07:35 +0000)]
Implement (optional, compile-time) shrinking of send buffer for torture tests.

7 years agoRemove the pidfile_path assertion entirely.
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.

7 years agoFix some GCC warnings.
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

7 years agoNeed some release engineering reminders after I failed to update the pkgname
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.

7 years agoWalking through the code - correct some comment typos.
Emil Mikulic [Wed, 13 Dec 2006 07:09:10 +0000 (07:09 +0000)]
Walking through the code - correct some comment typos.

7 years ago[ darkhttpd-1.4 release ]
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)

7 years ago[ darkhttpd-1.3 release ]
Emil Mikulic [Fri, 21 Jul 2006 09:33:55 +0000 (09:33 +0000)]
[ darkhttpd-1.3 release ]

Also remove an unused variable.

7 years agoDon't need libutil anymore.
Emil Mikulic [Fri, 21 Jul 2006 09:33:10 +0000 (09:33 +0000)]
Don't need libutil anymore.

7 years agoAdd example of --dameon and --pidfile to README.
Emil Mikulic [Fri, 21 Jul 2006 09:24:47 +0000 (09:24 +0000)]
Add example of --dameon and --pidfile to README.

7 years agoImport pidfile helpers and cut them down to just the pieces we need.
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.

7 years agoImplement warn()
Emil Mikulic [Fri, 21 Jul 2006 08:43:09 +0000 (08:43 +0000)]
Implement warn()

7 years agoImplement daemonize.
Emil Mikulic [Fri, 21 Jul 2006 08:39:01 +0000 (08:39 +0000)]
Implement daemonize.