We cannot maintain a persistent connection to a client if
writing to the client fails; so we can't proceed to let
the app hijack the response.

This may happen in the unlikely case where a response
header needs to be buffered with a Wbuf (and the app
uses response hijacking).
---
 lib/yahns/wbuf_common.rb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/yahns/wbuf_common.rb b/lib/yahns/wbuf_common.rb
index c51050b..ee18218 100644
--- a/lib/yahns/wbuf_common.rb
+++ b/lib/yahns/wbuf_common.rb
@@ -38,6 +38,7 @@ def wbuf_flush(client)
     end while @sf_count > 0
     wbuf_close(client)
   rescue
+    @wbuf_persist = false # ensure a hijack response is not called
     wbuf_close(client)
     raise
   end
-- 
EW

--
unsubscribe: [email protected]
archive: https://yhbt.net/yahns-public/

Reply via email to