Corrected the value of current server by reading it from the host header.