From d4c5f39cf9f1d8c0f199e784ea865bb32b4b5493 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 5 Feb 2012 21:57:55 +0900 Subject: [PATCH] Don't check multiple in-sequence NULL in spdylay_frame_count_unpack_nv_space 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(). --- lib/spdylay_frame.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/spdylay_frame.c b/lib/spdylay_frame.c index 528658c6..ca21601a 100644 --- a/lib/spdylay_frame.c +++ b/lib/spdylay_frame.c @@ -118,11 +118,6 @@ int spdylay_frame_count_unpack_nv_space } for(off -= len, j = off+len; off != j; ++off) { if(in[off] == '\0') { - /* spdy/2 spec says it does not allow multiple, in-sequence - NULL characters */ - if(off+1 != j && in[off+1] == '\0') { - return SPDYLAY_ERR_INVALID_ARGUMENT; - } ++nvlen; } }