A better way to test the invalid header