http: fix a bug when downloading with identity encoding