Commit Graph

379 Commits

Author SHA1 Message Date
Emil Mikulic
505223a9e5 Clean up after fuzzers. 2021-02-21 17:10:18 +11:00
Emil Mikulic
dc0fd7ecdc Don't include URL or method in default_reply. 2021-02-21 17:09:27 +11:00
Emil Mikulic
3058f910d9 File listings: decoded URL in title and heading.
Also HTML-escape title, heading, and file names.
2021-02-21 16:47:14 +11:00
ilmich
2b37151afc Add support for logging with syslog.
The motivation is that with busybox, the implementation of syslog has a
builtin log rotation.

So I don't need an external logrotate for darkhttpd.
2021-02-10 18:51:24 +11:00
Emil Mikulic
f72e8d6afe Bump version past release. 2021-02-10 18:48:57 +11:00
Emil Mikulic
afeb47443a [ darkhttpd 1.13 release ]
And bump copyright year.
2021-01-18 00:50:36 +11:00
Emil Mikulic
1845a4aa93 Update readme: add introduction, markdown. 2021-01-18 00:44:28 +11:00
Emil Mikulic
fdf28d2ede Rename README. 2021-01-18 00:34:04 +11:00
Emil Mikulic
dd49204609 Add a fuzzer that runs the server in the background. 2021-01-18 00:25:02 +11:00
Emil Mikulic
8cca3b6c87 Fix a bug when a range is requested and the request is too large. 2021-01-17 23:00:32 +11:00
Emil Mikulic
c1cd3d0e2d Fix bug in handling of bad requests. 2021-01-17 22:11:54 +11:00
Emil Mikulic
b57eb17d47 More Python 3 updates. 2021-01-17 17:29:23 +11:00
Emil Mikulic
d39cc3849a test_auth: Add test for wrong auth. 2021-01-17 16:55:09 +11:00
Emil Mikulic
7e60a9b731 test_auth.py: Update to Python 3. 2021-01-17 16:52:47 +11:00
Emil Mikulic
3f236fd71b test.py: close sockets, more Python 3 cleanups. 2021-01-17 16:36:26 +11:00
Emil Mikulic
67c506b620 Convert test.py to Python 3.
Unicode was a mistake.
2021-01-17 16:29:41 +11:00
decho
1990aee864 directory listing: Send viewport meta tag 2021-01-05 19:31:16 +11:00
Emil Mikulic
6a82e67772 Avoid file size overflow on 32-bit systems.
Reported by: Mariusz Stokłosa <krokator@gmail.com>
2020-07-01 22:07:12 +10:00
solsTiCe d'Hiver
d777aacd98 Log using Combined Log Format (commonly found in apache log)
Commonly found in Apache log. It adds 2 fields upon the Common Log
Format (referer and user-agent).

https://en.wikipedia.org/wiki/Common_Log_Format

It is just a matter of reordering what your were already logging with a
new date formatting.

* We are cheating because we always assume HTTP/1.1 as the request
  header.

* We assume the user name is unknown.
2020-07-01 21:47:26 +10:00
Andreas Gal
85609c8095 add mp4 mine type 2020-07-01 21:36:04 +10:00
Christian Hesse
3a582f3c57 Honour LDFLAGS.
Signed-off-by: Christian Hesse <mail@eworm.de>
2020-07-01 21:34:23 +10:00
Teo Klestrup Röijezon
07af05745e Add SVG mime type. 2020-07-01 21:29:25 +10:00
Emil Mikulic
e9c474dfac Don't send extra blank line when --auth is disabled. 2020-07-01 21:22:17 +10:00
Emil Mikulic
598a47fe9d Add tests for --auth. 2020-07-01 21:22:17 +10:00
Ryan Jacobs
027b0c90e5 Add basic-auth support. 2020-07-01 20:48:02 +10:00
Emil Mikulic
47ba3fd7c7 -fno-omit-frame-pointer to get full backtraces in asan build. 2020-07-01 20:46:10 +10:00
Emil Mikulic
36ab416f73 Enable leak sanitizer. 2020-07-01 20:43:49 +10:00
Emil Mikulic
f41be73a66 Silence -Wparentheses warning. 2020-07-01 20:15:36 +10:00
Emil Mikulic
6c7fb762ac Adjust test: make_safe_uri no longer strips query params. 2020-07-01 20:15:03 +10:00
Mathieu Gagnon
e09f869072 Fix handling of files with question mark in the name. 2020-07-01 20:15:03 +10:00
Emil Mikulic
5fc747a64e Add tests for fetching a file with a question mark in its name. 2020-07-01 20:15:03 +10:00
Emil Mikulic
36aadb6f90 Tweak macros to avoid extraneous semicolons.
-Wextra-semi-stmt complains about this.
2020-07-01 19:43:30 +10:00
Emil Mikulic
9274bfbfe9 clang-warns: use clang in path by default. 2020-07-01 19:41:46 +10:00
Emil Mikulic
27e489aab7 Memory sanitizer workaround: unpoison fd_sets.
This is necessary with clang-9, maybe earlier.
2020-07-01 19:18:13 +10:00
Luca Weiss
e2e693e1cf Add application/wasm mimetype
Useful for serving wasm files.

See https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle#configure-wasm-mime-type
2020-07-01 19:01:32 +10:00
Emil Mikulic
cbbaba25fb Add benchmark. 2018-12-11 00:42:52 +11:00
Emil Mikulic
ba63a6d60f Add test for --timeout. 2018-12-10 23:52:42 +11:00
Emil Mikulic
f0a8dc6c6c Add --timeout cmdline option. 2018-12-10 23:35:31 +11:00
Emil Mikulic
8207cf6b0f run-tests: try to use the default gcc and clang. 2018-12-10 23:35:31 +11:00
Emil Mikulic
6e8abe2324 run-tests: don't mix msan with ubsan.
ubsan seems to be causing false positives for msan.
We already try ubsan together with asan.
2018-12-10 23:34:56 +11:00
Emil Mikulic
7d0fc1d9f9 Clean more. 2018-12-10 23:34:34 +11:00
Emil Mikulic
38362a4111 Bump copyright year. 2018-12-10 23:34:34 +11:00
Emil Mikulic
e5ce7390c3 open_sockets: finer grained timing. 2018-12-10 21:03:17 +11:00
Emil Mikulic
744bac5cb8 In debug mode: time how long select() takes. 2018-12-10 21:03:17 +11:00
Emil Mikulic
89af6956e2 Fix timeouts to close connections. 2018-12-10 21:03:17 +11:00
Emil Mikulic
dcb89f3d0f Add helper script for opening sockets until they run out. 2018-12-10 01:10:19 +11:00
Emil Mikulic
c2fbca8d5a If accept() fails, don't exit.
Temporarily stop accept()ing if we ran out of fds.

Suggested by: Bert Gijsbers
2018-12-10 00:29:51 +11:00
Emil Mikulic
bdae96c653 Switch make_safe_url() to more efficient implementation.
Contributed by: Bert Gijsbers
2018-12-09 23:44:36 +11:00
Emil Mikulic
5f519fec8d Add make_safe_url_new()
Contributed by: Bert Gijsbers
2018-12-09 23:44:33 +11:00
Emil Mikulic
6b91b9dc05 Add LLVM fuzzer. 2018-12-09 23:13:17 +11:00