Lines 576 and 577:
handshake: The file handle supplied is not valid
Aside from that and the fact that I changed the datatype of "doc_root" in main and do_session to std::string, it's the same. Source code is here:
. If I should put all of the info I have in the issue opened on GitHub here as well, please let me know and I'll do it.