Fix a couple masks and remove duplication in http2 test.
Merge pull request #809 from square/adrian.tidy-http2

Fix a couple masks and remove duplication in http2 test