From 790aa40591b441944512dfa2523aa46be2cb20fd Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Tue, 17 Jan 2012 13:49:04 +0100 Subject: [PATCH] According to http://www.fastcgi.com/docs/faq.html#httpstatus send the Status code, as an header line Status: code reason --- .../libfcgi/src/wgi_libfcgi_output_stream.e | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/library/server/ewsgi/connectors/libfcgi/src/wgi_libfcgi_output_stream.e b/library/server/ewsgi/connectors/libfcgi/src/wgi_libfcgi_output_stream.e index 8f861f4a..7e01c756 100644 --- a/library/server/ewsgi/connectors/libfcgi/src/wgi_libfcgi_output_stream.e +++ b/library/server/ewsgi/connectors/libfcgi/src/wgi_libfcgi_output_stream.e @@ -42,8 +42,22 @@ feature -- Status writing -- Put status code line for `a_code' --| Note this is a default implementation, and could be redefined --| for instance in relation to NPH CGI script + local + s: STRING do --| Do not send any Status line back to the FastCGI client + --| According to http://www.fastcgi.com/docs/faq.html#httpstatus + if a_code /= 200 then + create s.make (16) + s.append ("Status:") + s.append_character (' ') + s.append_integer (a_code) + if attached http_status_code_message (a_code) as l_status_message then + s.append_character (' ') + s.append_string (l_status_message) + end + put_header_line (s) + end end feature -- Basic operation