From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 048581F8CA for ; Sun, 25 Dec 2022 12:23:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yhbt.net; s=selector1; t=1671971032; bh=nim20NulpDeTxVouNonXKyohglUZeZFWuNNPH8LDmeQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YjdaLjLlm8hAbISy18TqKaPIjQ6EH1eB07NAxLKQUtVcryEsYHjeRvFVumX3eSEqy vHnzH+T8bUV6PqG6QreQWeix7V4cTuxq8rCsdj6xxFrlrZ5AKuZlcNinXmLA2C3wha zxSCIJqncDJmKkkgv5ne68QtaOLLPOYL0Tz6dcSk= From: Eric Wong To: yahns-public@yhbt.net Subject: [PATCH 2/2] test/test_extras_exec_cgi: drop Rack::ContentLength Date: Sun, 25 Dec 2022 12:23:51 +0000 Message-Id: <20221225122351.4799-3-bofh@yhbt.net> In-Reply-To: <20221225122351.4799-1-bofh@yhbt.net> References: <20221225122351.4799-1-bofh@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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"