This function is used for reading http reply headers. Signed-off-by: Martin Storsjö <martin@martin.st>