Added initial HTML generation stuff. Also, more importantly, fixed a bug in which the content lenght was set incorrectly by unifying everything to use QByteArray instead of QString.