fix bug when port is also in  because user agent sent according host header