Fixed: do not send Range request header when encounter error. (PR2761)