[REM3-186] Prevent buffer double-freeing in certain cases
change getHostName to getHostString in http upgrade provider so that wrong reverse DNS does not break connection