improved handling of http port ranges