tweak the http code so it works with 1.9