If we return negative error code in that function, it means frame will not unpacked and ends up to lose any information the frame contains. The spec says it should send RST_STREAM with PROTOCOL_ERROR, so we need at least stream ID. Therefore, the check should be performed in spdylay_session_on_syn_stream_received().
See README.rst
v1.51.0r1
Latest
Languages
C++
51.6%
C
38.6%
Go
3.9%
Python
2.1%
M4
1.5%
Other
2.3%