tatsuhiro-t / spdylay

The experimental SPDY protocol version 2, 3 and 3.1 implementation in C
http://tatsuhiro-t.github.io/spdylay/
MIT License
603 stars 102 forks source link

Issue RST_STREAM with FLOW_CONTROL_ERROR if the remote peer ignores flow control #21

Closed tatsuhiro-t closed 10 years ago

tatsuhiro-t commented 12 years ago

Currently spdylay accepts DATA frame even if the window size is negative from the remote peer. To make flow control effective and rule out broken peer, we need to RST_STREAM with FLOW_CONTROL_ERROR if the peer ignores window size. Make sure that negative window size due to SETTINGS frame does not cause RST_STREAM.

tatsuhiro-t commented 12 years ago

Receiving SETTINGS by the peer and receiving DATA from peer are asynchronous and inherently race condition. So I think we can not differentiate negative window size case by broken peer from SETTINGS frame. I am now leaning to leave the code as is and the application should decide to send RST_STREAM if the inbound buffer is full and the peer keeps sending DATA.

tatsuhiro-t commented 10 years ago

Decided to discontinue