Shortened http parser tests by extracting reused code.