Blob Blame History Raw
commit 97d2e97fe1dd9d4209d6c502f9a84ce2b7be1701
Author: Petr Špaček <petr.spacek@nic.cz>
Date:   Fri Apr 12 13:34:49 2019 +0200

    http/h2_stream: ignore delayed RST_STREAM frames
    
    Fixes: #145

diff --git a/http/h2_stream.lua b/http/h2_stream.lua
index abd3899..689c8ec 100644
--- a/http/h2_stream.lua
+++ b/http/h2_stream.lua
@@ -690,6 +690,8 @@ frame_handlers[frame_types.RST_STREAM] = function(stream, flags, payload, deadli
 	end
 	if stream.state == "idle" then
 		return nil, h2_errors.PROTOCOL_ERROR:new_traceback("'RST_STREAM' frames MUST NOT be sent for a stream in the 'idle' state"), ce.EILSEQ
+	elseif stream.state == "closed" then  -- probably a delayed RST_STREAM, ignore
+		return true
 	end
 
 	local err_code = sunpack(">I4", payload)