Commit Graph

206 Commits

Author SHA1 Message Date
Emil Mikulic
d65990449e Make devel/test.py shorter. 2013-04-28 20:55:18 +10:00
Emil Mikulic
da24c211d7 Make devel/test.py less repetitive. 2013-04-28 20:41:30 +10:00
Emil Mikulic
594e65d474 Add coverage driver. 2013-04-28 20:37:08 +10:00
Emil Mikulic
c16f5c1007 More tests. 2013-04-28 20:37:08 +10:00
Emil Mikulic
8586258fbf Working on unit tests. 2013-04-28 20:37:08 +10:00
Emil Mikulic
ffbc4c2b08 For developers: script to run through clang static analyzer. 2013-04-28 20:37:08 +10:00
Emil Mikulic
dbe886b9d2 Another developer script - clang with warnings. 2013-04-28 20:37:08 +10:00
Emil Mikulic
c42e5afec5 For developers - build with lots of warnings. 2013-04-28 20:37:08 +10:00
Emil Mikulic
ccbe7cffa7 Don't qsort() NULL.
Found by: clang static analyzer
2013-04-28 20:37:08 +10:00
Emil Mikulic
1b7bbcc033 Fix clang nits. 2013-04-28 20:37:08 +10:00
Emil Mikulic
11bb4d8906 Use int over size_t. 2013-04-28 20:37:08 +10:00
Emil Mikulic
014ce0e988 Don't use init decls, they're C99. 2013-04-28 20:37:08 +10:00
Emil Mikulic
f32ffbabd5 Finished style changes. 2013-04-28 20:37:08 +10:00
Emil Mikulic
7343ecf35f More style changes, fixed most of the compiler warnings. 2013-04-28 20:37:08 +10:00
Emil Mikulic
0442d41dab More style changes, move a function. 2013-04-28 20:37:08 +10:00
Emil Mikulic
775cd3ad9b Mostly style changes. 2013-04-28 20:37:01 +10:00
Emil Mikulic
1fa02dc545 Restyle and add printflike. 2013-04-28 20:36:56 +10:00
Emil Mikulic
8d11e14d11 Bump copyright year. 2013-04-28 20:34:03 +10:00
Emil Mikulic
8393796097 More inttype tweaks. 2013-04-28 20:33:20 +10:00
Emil Mikulic
bc692bb5f7 Casts and indents. 2013-04-28 20:33:14 +10:00
Emil Mikulic
7c65160849 Cosmetics. 2013-04-28 20:33:14 +10:00
Emil Mikulic
ec246e2a51 Avoid infinite loop (and quiet gcc warning) 2013-04-28 20:33:14 +10:00
Emil Mikulic
803655dba9 Ranges work now. 2013-04-28 20:33:14 +10:00
Emil Mikulic
41f4ec2d50 Should these be unsigned? 2013-04-28 20:33:13 +10:00
Emil Mikulic
3cc77c31d6 More longlong fixes. 2013-04-28 20:33:07 +10:00
Emil Mikulic
63bdabd79f Working on large file support. 2011-01-15 14:37:56 +11:00
Emil Mikulic
1cd7fd3cda Tidy up Makefile. 2011-01-15 14:37:56 +11:00
Emil Mikulic
0ab76c953b Move trunk/ into base dir, move tests into devel/. 2013-04-28 20:44:06 +10:00
Emil Mikulic
7c4a9ffade [ darkhttpd-1.7 release ] 2013-04-28 20:20:29 +10:00
Emil Mikulic
45912c373b Fix off-by-one. 2013-04-28 20:20:29 +10:00
Emil Mikulic
8eec408691 Don't use strlen() in urlencode_filename()
Also move safe_url variable into for loop that uses it.
2013-04-28 20:20:29 +10:00
Emil Mikulic
ca6a07f714 is_bad_char -> needs_urlencoding, whitespace fixes. 2013-04-28 20:20:29 +10:00
Emil Mikulic
b02c1bba08 urlencode file names when generating directory listing.
Noticed by, patched by: nf
2013-04-28 20:20:29 +10:00
Emil Mikulic
3e2e53a33e [ darkhttpd-1.6 release ]
Update copyright years.
2013-04-28 20:20:29 +10:00
Emil Mikulic
b70dcdfab6 Ubuntu hides uname somewhere else. Don't use a full path. 2013-04-28 20:20:29 +10:00
Emil Mikulic
820b5c2e3b 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.
2013-04-28 20:20:29 +10:00
Emil Mikulic
f5c051aad5 [ darkhttpd-1.5 release ]
(we skipped 1.4 due to a release engineering oversight)

Update README to reflect Makefile changes.
2013-04-28 20:20:06 +10:00
Emil Mikulic
1a161a47ce Simplify the Makefile. 2013-04-28 19:56:51 +10:00
Emil Mikulic
4cddcf96a5 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.
2013-04-28 19:56:51 +10:00
Emil Mikulic
0819e7c3c6 Revert - don't bother with tzset. 2013-04-28 19:56:51 +10:00
Emil Mikulic
cfcbdf0ad7 Stuff to do when I find the time. 2013-04-28 19:56:51 +10:00
Emil Mikulic
6690b3c7cf If sendfile blocks and sends zero bytes, treat it as blocking and not
end-of-file.  This is a really rare corner case.
2013-04-28 19:56:51 +10:00
Emil Mikulic
c23550f165 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.
2013-04-28 19:56:51 +10:00
Emil Mikulic
400ee17051 Slightly re-arrange the way recycling of keep-alive connections is
handled.  Unfortunately, I'm still seeing horrible performance.
2013-04-28 19:56:51 +10:00
Emil Mikulic
29cbe09d4c Minor tweaks. 2013-04-28 19:56:51 +10:00
Emil Mikulic
3e96ddf6d6 Implement disabling TCP_NODELAY, but comment it out.
It makes performance worse.
2013-04-28 19:56:51 +10:00
Emil Mikulic
008f6f5d4e 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.
2013-04-28 19:56:51 +10:00
Emil Mikulic
5ab0496a9b 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.  =(
2013-04-28 19:56:51 +10:00
Emil Mikulic
3ed2762831 Another state transition optimization:
Go from send_header straight to send_reply.
2013-04-28 19:56:51 +10:00
Emil Mikulic
844dcc6b9d Another state transition optimization due to NBIO:
Go from recv_request to send_header without visiting select()
2013-04-28 19:56:51 +10:00