refactor SPDY parser