http: fix port fetching from connection