. Moved 404 reply up to stat() section.
. Redirect /dir to /dir/
. Separate permissions (403 Forbidden) from other fopen() failures
(500 Internal Server Error)
. INADDR_NONE is -1
. Change bindport to an unsigned short (ntohs implies short).
. Conditionally implement our own errx() and err().
. Conditionally use a custom vasprintf() that depends on vsnprintf().
. Added conn_close to struct connection.
0 = Keep-Alive, 1 = Connection: close
. Added keepalive_connection() for recycling connection structs.
. Made "Connection: close\r\n" in reply headers optional.
. If protocol is HTTP/1.1, use Keep-Alive, unless Connection: close is
given in the request.
Offtopic:
. Improved request parsing - allow extraneous spaces.
. Make some empty for() loops more obvious.
. Missed a 0 -> '\0' last time.
. err(EXIT_FAILURE, ...) -> err(1, ...) to retain existing style.
. Annotate default_extension_map[] - it must be NULL terminated.
. Don't expand_tilde() -- unsure about this.
. Changed `#if IDLETIME' to `if (IDLETIME)' - it will be
optimized away by the compiler.
. Some casts and an int->size_t change to keep splint happy about
integer types.
. Added add_mime_mapping() to add to mime_map in unsorted order.
. Added sort_mime_map() - uses qsort() and mime_mapping_cmp() to sort
the mime_map.
. uri_content_type() uses bsearch() and mime_mapping_cmp_str() to search
through the mime_map for an extension parsed out of a specified URI.
. Free mime_map in exit_quickly()
. Completely deallocate connlist in exit_quickly()
. In main(), parse_commandline() after parse_default_extension_map() so
that a specified --mimetypes file will -override- the defaults.
. bindport is uint16_t like in Linux.
. Fix a bounds error in make_safe_uri().
. Remember to free temporaries in make_safe_uri().
. Free if_mod_since in process_get()
. Set reply_file to NULL after closing it in poll_send_reply() to avoid
double fclose() in free_connection().
. Don't log connections with http_code == 0; these are connections that
failed while receiving the request string.
. Initialise timeout more cleanly in httpd_poll().
. Made MAX_FD_SET use a { block } to keep gcc 3 happy.
. Don't free items in a LIST_FOREACH() block; use a temporary next
pointer and LIST_NEXT().
. exit_quickly() closes logfile if it's open.
. exit_quickly() doesn't re-throw the signal that triggered it.
. Decrease send BUFSIZE to 40,000 (max I've seen is 33,000).
. Remove a debugf() from poll_send_reply().
. Add exit_quickly().
. SIGINT and SIGQUIT exit_quickly().
. Added reply_start to struct connection.
. Added debugf() to free_connection().
. Construct HTTP 206 reply if Range specified.
. Take reply_start into consideration in poll_send_reply().
. Added fread() error handling - eof is non-fatal.