Corrected byterange calculations and implemented multipart byteranges