fixing binary files used as response bodies