fix assembling the current URL when port is set in Host header