I've attached an updated version of the HTTPS patch to issue #19.
http://code.google.com/p/mochiweb/issues/detail?id=19#c5
The code is also available on github athttp://github.com/puzza007/mochiweb/tree/ssl
Any suggestions welcomed.
Paul.