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 c2f4e589..1f987381 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 @@ -174,7 +174,6 @@ feature -- Execution is_connected: is_connected local l_remote_info: detachable like remote_info - l_continue: BOOLEAN l_socket: like client_socket l_ready_for_reading: BOOLEAN do @@ -192,25 +191,20 @@ feature -- Execution dbglog (generator + ".execute_request socket=" + l_socket.descriptor.out + " ENTER") end l_socket.set_timeout (5) -- 5 seconds! - from until l_continue loop - -- Use timeout from l_socket! - l_ready_for_reading := l_socket.ready_for_reading - if l_ready_for_reading then - l_continue := True - create l_remote_info - if attached l_socket.peer_address as l_addr then - l_remote_info.addr := l_addr.host_address.host_address - l_remote_info.hostname := l_addr.host_address.host_name - l_remote_info.port := l_addr.port - remote_info := l_remote_info - end - analyze_request_message (l_socket) - else - has_error := True - l_continue := True - debug ("dbglog") - dbglog (generator + ".execute_request socket=" + l_socket.descriptor.out + "} WAITING") - end + l_ready_for_reading := l_socket.ready_for_reading + if l_ready_for_reading then + create l_remote_info + if attached l_socket.peer_address as l_addr then + l_remote_info.addr := l_addr.host_address.host_address + l_remote_info.hostname := l_addr.host_address.host_name + l_remote_info.port := l_addr.port + remote_info := l_remote_info + end + analyze_request_message (l_socket) + else + has_error := True + debug ("dbglog") + dbglog (generator + ".execute_request socket=" + l_socket.descriptor.out + "} timeout!") end end @@ -310,11 +304,11 @@ feature -- Parsing 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 and then - l_connection.is_case_insensitive_equal_general ("close") - then - keep_alive_enabled := False + if attached request_header_map.item ("Connection") as l_connection then + print ("Connection -> " + l_connection + "%N") + if l_connection.is_case_insensitive_equal_general ("close") then + keep_alive_enabled := False + end else keep_alive_enabled := True end diff --git a/library/server/ewsgi/connectors/standalone/src/httpd/httpd_server_i.e b/library/server/ewsgi/connectors/standalone/src/httpd/httpd_server_i.e index 2c3d9c6c..15caf568 100644 --- a/library/server/ewsgi/connectors/standalone/src/httpd/httpd_server_i.e +++ b/library/server/ewsgi/connectors/standalone/src/httpd/httpd_server_i.e @@ -58,7 +58,7 @@ feature -- Access factory: separate HTTPD_REQUEST_HANDLER_FACTORY - is_persistent_connection_supported: BOOLEAN = False + is_persistent_connection_supported: BOOLEAN = True -- Is persistent connection supported? --| For now, disabled during dev. diff --git a/library/server/ewsgi/connectors/standalone/test_standalone-safe.ecf b/library/server/ewsgi/connectors/standalone/test_standalone-safe.ecf index f56141dd..4bb190b4 100644 --- a/library/server/ewsgi/connectors/standalone/test_standalone-safe.ecf +++ b/library/server/ewsgi/connectors/standalone/test_standalone-safe.ecf @@ -1,4 +1,4 @@ - + @@ -10,7 +10,8 @@ - + + diff --git a/library/server/ewsgi/connectors/standalone/tests/test_execution.e b/library/server/ewsgi/connectors/standalone/tests/test_execution.e index c02a3c65..cb99663c 100644 --- a/library/server/ewsgi/connectors/standalone/tests/test_execution.e +++ b/library/server/ewsgi/connectors/standalone/tests/test_execution.e @@ -22,9 +22,10 @@ feature -- Execution s: STRING i64: INTEGER_64 do - i64 := {INTEGER_64} 1_000_000_000 - s := "Hello Concurrent EWF" - s.append (" (counter=") + i64 := {INTEGER_64} 1_000_000_000 + s := "Test Concurrent EWF [" + s.append (request.percent_encoded_path_info) + s.append ("] (counter=") s.append_integer (next_cell_counter_item (counter_cell)) s.append (")%N")