From 2b026054acc59337d13ecb49d02d1247455ffe89 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 13 Apr 2022 17:32:32 +0300 Subject: app.py: print HTTP status when CGIing --- app.py | 1 + test/test.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 9498516..1b36f23 100755 --- a/app.py +++ b/app.py @@ -34,6 +34,7 @@ class Response: self.write_body_as_cgi_script() def write_headers_as_cgi_script(self): + print(f'{self.status.value} {self.status.phrase}') for name, val in self.headers(): print(f'{name}: {val}') print() diff --git a/test/test.sh b/test/test.sh index 46c136f..90c0a1f 100755 --- a/test/test.sh +++ b/test/test.sh @@ -147,7 +147,7 @@ run_curl_tests() { } cgi_check_header() { - local expected='Content-Type: text/html; charset=utf-8' + local expected='200 OK' local actual actual="$( head -n 1 -- "$curl_output_file" )" -- cgit v1.2.3