Latest changes from upstream, SSL support, and fix the max client
handling in web server.