fix bug in check http/https scheme
handle uri w/o port properly and add unit test