add range in header requests and abort stream if it is necessary