added feature of separating machne port in the URI or host header
fixed bug: machine port not extracted correctly