update sendfile functionality to be compatible with rack 1.1.x