fix HttpResponse handling codes and content types