Fix logic in http_loader

We don't need to repeatedly read the headers.