yahns Ruby server user/dev discussion
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 2/2] test/test_extras_exec_cgi: drop Rack::ContentLength
  2022-12-25 12:23  6% [PATCH 0/2] exec_cgi: fix compat with newer Rack 2 Eric Wong
@ 2022-12-25 12:23  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2022-12-25 12:23 UTC (permalink / raw)
  To: yahns-public

It is causing _blocked_zombie to fail on rtype=11 due to the
addition of Content-Length making the client persistent when
we didn't actually want it to be (for the test).
---
 test/test_extras_exec_cgi.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/test_extras_exec_cgi.rb b/test/test_extras_exec_cgi.rb
index 426409d..4fa928d 100644
--- a/test/test_extras_exec_cgi.rb
+++ b/test/test_extras_exec_cgi.rb
@@ -136,7 +136,7 @@ def _blocked_zombie(block_on, rtype)
       Yahns::HttpClient.__send__(:include, TrywriteBlocked)
       require './extras/exec_cgi'
       cfg.instance_eval do
-        stack = Rack::ContentLength.new(Rack::Chunked.new(ExecCgi.new(RUNME)))
+        stack = Rack::Chunked.new(ExecCgi.new(RUNME))
         app(:rack, stack) { listen "#{host}:#{port}" }
         stderr_path err.path
         worker_processes 1
@@ -170,6 +170,7 @@ def _blocked_zombie(block_on, rtype)
         assert_match %r{\A\d+\n\z}, body
         exec_pid = body.to_i
         poke_until_dead exec_pid
+        # lack of Content-Length should trigger EOF here:
         assert_raises(EOFError) { c.readpartial(666) }
       else
         raise "BUG in test, bad rtype"

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/2] exec_cgi: fix compat with newer Rack 2
@ 2022-12-25 12:23  6% Eric Wong
  2022-12-25 12:23  7% ` [PATCH 2/2] test/test_extras_exec_cgi: drop Rack::ContentLength Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2022-12-25 12:23 UTC (permalink / raw)
  To: yahns-public

Rack::ContentLength was causing problems with ExecCGI in the
extras/ problem.  Rack 3 is another can of worms I'll still
have to deal with :<

Eric Wong (2):
  extras/exec_cgi: fix for newer Rack::ContentLength
  test/test_extras_exec_cgi: drop Rack::ContentLength

 extras/exec_cgi.rb           | 7 ++++---
 test/test_extras_exec_cgi.rb | 3 ++-
 2 files changed, 6 insertions(+), 4 deletions(-)

^ permalink raw reply	[relevance 6%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-12-25 12:23  6% [PATCH 0/2] exec_cgi: fix compat with newer Rack 2 Eric Wong
2022-12-25 12:23  7% ` [PATCH 2/2] test/test_extras_exec_cgi: drop Rack::ContentLength Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/yahns.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).