darkhttpd
7 years agoAdd test for --mimetypes
Emil Mikulic [Mon, 10 Jun 2013 10:41:46 +0000 (20:41 +1000)]
Add test for --mimetypes

7 years agoAdd test to exercise memove() in make_safe_url()
Emil Mikulic [Mon, 10 Jun 2013 09:26:25 +0000 (19:26 +1000)]
Add test to exercise memove() in make_safe_url()

7 years agoREADME: update default port.
Emil Mikulic [Mon, 10 Jun 2013 08:59:55 +0000 (18:59 +1000)]
README: update default port.

7 years agoFix file_exists() comparison.
Emil Mikulic [Mon, 10 Jun 2013 08:56:14 +0000 (18:56 +1000)]
Fix file_exists() comparison.

Found with: git://repo.or.cz/smatch.git

7 years agoMakefile: move .PHONY to the end.
Emil Mikulic [Mon, 10 Jun 2013 08:53:19 +0000 (18:53 +1000)]
Makefile: move .PHONY to the end.

7 years agoTests: add pointer to cover script which runs them.
Emil Mikulic [Mon, 10 Jun 2013 08:52:38 +0000 (18:52 +1000)]
Tests: add pointer to cover script which runs them.

7 years ago[ darkhttpd-1.9 release ]
Emil Mikulic [Sun, 28 Apr 2013 15:06:31 +0000 (01:06 +1000)]
[ darkhttpd-1.9 release ]

Add release script.

7 years agoOptimization for case when no web forward is configured.
Egor Ivanov [Tue, 23 Apr 2013 16:31:21 +0000 (20:31 +0400)]
Optimization for case when no web forward is configured.

7 years agoImplement --no-server-id
Emil Mikulic [Sun, 28 Apr 2013 14:55:08 +0000 (00:55 +1000)]
Implement --no-server-id

Suggested by: T.Ramirez

7 years agoAdd test for --forward
Emil Mikulic [Sun, 28 Apr 2013 14:31:54 +0000 (00:31 +1000)]
Add test for --forward

7 years agoChange web_forward_record from a hand-rolled linked list to an array.
Emil Mikulic [Sun, 28 Apr 2013 13:48:16 +0000 (23:48 +1000)]
Change web_forward_record from a hand-rolled linked list to an array.

Free it before exiting.

7 years agoImplement --forward.
Egor Ivanov [Sat, 20 Apr 2013 10:05:27 +0000 (14:05 +0400)]
Implement --forward.

A web forward feature that performs 301 redirects for some requests
(in addition normal web content serving)

The "Host:" request header (HTTP/1.1 only) is compared with a list of
hosts, defined by the "--forward host url" option. If a match is found,
the request is redirected to url+path. Otherwise, it is served as a
request to the local file system.

7 years agoMake devel/cover clean up after itself.
Emil Mikulic [Sun, 28 Apr 2013 11:45:14 +0000 (21:45 +1000)]
Make devel/cover clean up after itself.

7 years agoFix memory leak when diropen() fails.
Emil Mikulic [Sun, 28 Apr 2013 11:39:43 +0000 (21:39 +1000)]
Fix memory leak when diropen() fails.

Found by: clang static analyzer.

7 years agoMake sure malloc and realloc can't be called with size 0.
Emil Mikulic [Sun, 28 Apr 2013 11:37:31 +0000 (21:37 +1000)]
Make sure malloc and realloc can't be called with size 0.

Make pool size double instead of increment in make_sorted_dirlist().

Prompted by: clang static analyzer.

7 years agoFix warnings found by clang r180088.
Emil Mikulic [Sun, 28 Apr 2013 11:24:33 +0000 (21:24 +1000)]
Fix warnings found by clang r180088.

7 years agoClean up and improve the devel/ scripts.
Emil Mikulic [Sun, 28 Apr 2013 11:16:40 +0000 (21:16 +1000)]
Clean up and improve the devel/ scripts.

7 years agoPut project page and contact address into comments.
Emil Mikulic [Sun, 28 Apr 2013 11:03:29 +0000 (21:03 +1000)]
Put project page and contact address into comments.

7 years agoMake keep_alive() a tiny function instead of a macro.
Emil Mikulic [Sun, 28 Apr 2013 11:01:31 +0000 (21:01 +1000)]
Make keep_alive() a tiny function instead of a macro.

7 years agoImplement --no-keepalive.
Emil Mikulic [Mon, 28 May 2012 10:33:52 +0000 (20:33 +1000)]
Implement --no-keepalive.

Requested by: Devin LaSalle

7 years agoFix for when MAXNAMLEN is not found (Android)
Vlatko Kosturjak [Wed, 30 Jun 2010 22:21:35 +0000 (00:21 +0200)]
Fix for when MAXNAMLEN is not found (Android)

7 years ago[ darkhttpd-1.8 release ]
Emil Mikulic [Tue, 3 May 2011 10:53:50 +0000 (20:53 +1000)]
[ darkhttpd-1.8 release ]

printf format fixes from FreeBSD 8.2 (gcc version 4.2.1)

7 years agoAdd guard around __printflike
Emil Mikulic [Tue, 3 May 2011 10:50:31 +0000 (20:50 +1000)]
Add guard around __printflike

7 years agoTest large (>2G, >4G) files.
Emil Mikulic [Tue, 3 May 2011 10:43:04 +0000 (20:43 +1000)]
Test large (>2G, >4G) files.

7 years agoRun usage, not really a test.
Emil Mikulic [Tue, 3 May 2011 10:14:10 +0000 (20:14 +1000)]
Run usage, not really a test.

7 years agoCheck dependencies in devel/cover
Emil Mikulic [Tue, 3 May 2011 10:11:09 +0000 (20:11 +1000)]
Check dependencies in devel/cover

7 years agoBring preprocessor directives in line.
Emil Mikulic [Sun, 1 May 2011 09:29:13 +0000 (19:29 +1000)]
Bring preprocessor directives in line.

7 years agoDon't catch SIGQUIT.
Emil Mikulic [Sun, 1 May 2011 09:25:14 +0000 (19:25 +1000)]
Don't catch SIGQUIT.

I'm okay with this being more fatal.

7 years agoRe-arrange usage().
Emil Mikulic [Sun, 1 May 2011 09:24:31 +0000 (19:24 +1000)]
Re-arrange usage().

7 years agoSingle byte corner cases.
Emil Mikulic [Sun, 1 May 2011 09:19:39 +0000 (19:19 +1000)]
Single byte corner cases.

7 years agoTest directory redirect.
Emil Mikulic [Sun, 1 May 2011 09:13:25 +0000 (19:13 +1000)]
Test directory redirect.

7 years agoImprove handling of invalid ranges.
Emil Mikulic [Sun, 1 May 2011 09:08:29 +0000 (19:08 +1000)]
Improve handling of invalid ranges.

7 years agoStill more range test fiddling.
Emil Mikulic [Sun, 1 May 2011 09:08:12 +0000 (19:08 +1000)]
Still more range test fiddling.

7 years agoAdd test for backwards range.
Emil Mikulic [Sun, 1 May 2011 08:56:04 +0000 (18:56 +1000)]
Add test for backwards range.

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.

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

9 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.