correced HTTP implementation