From d8ea9ba63cd08a3c60837fd3bf0a39a0c056b747 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Wed, 1 Apr 2015 22:51:20 +0200 Subject: [PATCH] renamed keep_alive_requested as is_persistent_connection_requested. --- .../src/httpd/httpd_request_handler_i.e | 16 ++++++++-------- .../implementation/wgi_httpd_request_handler.e | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/library/server/ewsgi/connectors/standalone/src/httpd/httpd_request_handler_i.e b/library/server/ewsgi/connectors/standalone/src/httpd/httpd_request_handler_i.e index 8e701145..bf526b93 100644 --- a/library/server/ewsgi/connectors/standalone/src/httpd/httpd_request_handler_i.e +++ b/library/server/ewsgi/connectors/standalone/src/httpd/httpd_request_handler_i.e @@ -39,7 +39,7 @@ feature {NONE} -- Initialization create request_header.make_empty create request_header_map.make (10) - keep_alive_requested := False + is_persistent_connection_requested := False end feature -- Status report @@ -85,9 +85,9 @@ feature -- Access remote_info: detachable TUPLE [addr: STRING; hostname: STRING; port: INTEGER] -- Information related to remote client - keep_alive_requested: BOOLEAN + is_persistent_connection_requested: BOOLEAN -- Persistent connection requested? - -- either has "Connection: Keep-Alive" header, + -- either has "Connection: keep-alive" header, -- or is HTTP/1.1 and no header "Connection: close". is_http_version_1_0: BOOLEAN @@ -167,7 +167,7 @@ feature -- Execution execute_request l_exit := not {HTTPD_SERVER}.is_persistent_connection_supported or has_error or l_socket.is_closed or not l_socket.is_open_read - or not keep_alive_requested + or not is_persistent_connection_requested reset_request end end @@ -301,18 +301,18 @@ feature -- Parsing end end -- Except for HTTP/1.0, persistent connection is the default. - keep_alive_requested := True + is_persistent_connection_requested := True if is_http_version_1_0 then - keep_alive_requested := attached request_header_map.item ("Connection") as l_connection and then + is_persistent_connection_requested := attached request_header_map.item ("Connection") as l_connection and then l_connection.is_case_insensitive_equal_general ("keep-alive") else -- By default HTTP:1/1 support persistent connection. if attached request_header_map.item ("Connection") as l_connection then if l_connection.is_case_insensitive_equal_general ("close") then - keep_alive_requested := False + is_persistent_connection_requested := False end else - keep_alive_requested := True + is_persistent_connection_requested := True end end end diff --git a/library/server/ewsgi/connectors/standalone/src/implementation/wgi_httpd_request_handler.e b/library/server/ewsgi/connectors/standalone/src/implementation/wgi_httpd_request_handler.e index 0f4ad723..c9644fec 100644 --- a/library/server/ewsgi/connectors/standalone/src/implementation/wgi_httpd_request_handler.e +++ b/library/server/ewsgi/connectors/standalone/src/implementation/wgi_httpd_request_handler.e @@ -82,7 +82,7 @@ feature -- Request processing else l_output.set_http_version (version) end - res.set_is_persistent_connection_requested (keep_alive_requested) + res.set_is_persistent_connection_requested (is_persistent_connection_requested) req.set_meta_string_variable ("RAW_HEADER_DATA", request_header)