Fix downloading binary files with (wrong) text/* content-type (#1489267)