Imported some HTTP parser helper methods