add http version checking and test case for it