Improve the performance when handling a http get with range header