From 9b4b4925b38333b8d7795331d27db9811f43d72a Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Thu, 9 Jun 2022 14:39:59 +0200 Subject: Ruby: fixed contents of SCRIPT_NAME. Having the basename of the script pathname was incorrect. While we don't have something more accurate, the best thing to do is to have it empty (which should be the right thing most of the time). This closes #715 issue on GitHub. The bug was introduced in git commit 0032543fa65f454c471c968998190b027c1ff270 'Ruby: added the Rack environment parameter "SCRIPT_NAME".'. --- test/test_ruby_application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/test_ruby_application.py') diff --git a/test/test_ruby_application.py b/test/test_ruby_application.py index 95c75d47..b3e02406 100644 --- a/test/test_ruby_application.py +++ b/test/test_ruby_application.py @@ -44,7 +44,7 @@ class TestRubyApplication(TestApplicationRuby): 'Request-Method': 'POST', 'Request-Uri': '/', 'Http-Host': 'localhost', - 'Script-Name': 'config.ru', + 'Script-Name': '', 'Server-Protocol': 'HTTP/1.1', 'Custom-Header': 'blah', 'Rack-Version': '13', -- cgit From c65e04682e85cc708b534863ae8f4e069ccccf64 Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Wed, 7 Sep 2022 01:11:04 +0100 Subject: Tests: minor fixes. --- test/test_ruby_application.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'test/test_ruby_application.py') diff --git a/test/test_ruby_application.py b/test/test_ruby_application.py index b3e02406..83af39be 100644 --- a/test/test_ruby_application.py +++ b/test/test_ruby_application.py @@ -347,7 +347,6 @@ class TestRubyApplication(TestApplicationRuby): headers={ 'Host': 'localhost', 'Connection': 'keep-alive', - 'Content-Type': 'text/html', }, start=True, body=body, @@ -357,15 +356,7 @@ class TestRubyApplication(TestApplicationRuby): assert resp['body'] == body, 'keep-alive 1' body = '0123456789' - resp = self.post( - headers={ - 'Host': 'localhost', - 'Connection': 'close', - 'Content-Type': 'text/html', - }, - sock=sock, - body=body, - ) + resp = self.post(sock=sock, body=body) assert resp['body'] == body, 'keep-alive 2' -- cgit