diff --git a/examples/debug/debug.ecf b/examples/debug/debug.ecf
index 642cd4cc..5c6d642c 100644
--- a/examples/debug/debug.ecf
+++ b/examples/debug/debug.ecf
@@ -20,14 +20,15 @@
-
+
+
diff --git a/examples/restbucksCRUD/restbucks-safe.ecf b/examples/restbucksCRUD/restbucks-safe.ecf
index 626f0d5e..acf2f5dd 100644
--- a/examples/restbucksCRUD/restbucks-safe.ecf
+++ b/examples/restbucksCRUD/restbucks-safe.ecf
@@ -1,5 +1,5 @@
-
+
/EIFGENs$
@@ -8,16 +8,16 @@
-
+
-
+
-
+
@@ -30,7 +30,7 @@
@@ -42,7 +42,7 @@
diff --git a/examples/upload_image/upload_image-safe.ecf b/examples/upload_image/upload_image-safe.ecf
index 66fb0fcc..77f989d3 100644
--- a/examples/upload_image/upload_image-safe.ecf
+++ b/examples/upload_image/upload_image-safe.ecf
@@ -8,17 +8,17 @@
/\.svn$
-
+
-
+
diff --git a/library/server/ewsgi/connectors/standalone/src/httpd/concurrency/none/httpd_request_handler.e b/library/server/ewsgi/connectors/standalone/src/httpd/concurrency/none/httpd_request_handler.e
index 5055af02..c033de78 100644
--- a/library/server/ewsgi/connectors/standalone/src/httpd/concurrency/none/httpd_request_handler.e
+++ b/library/server/ewsgi/connectors/standalone/src/httpd/concurrency/none/httpd_request_handler.e
@@ -8,6 +8,16 @@ deferred class
inherit
HTTPD_REQUEST_HANDLER_I
+ redefine
+ is_persistent_connection_supported
+ end
+
+feature -- Status report
+
+ is_persistent_connection_supported: BOOLEAN = False
+ --
+ -- When there is no concurrency support, do not try to support
+ -- persistent connection!
note
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
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 b394d6d5..3c5d0487 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
@@ -108,6 +108,16 @@ feature -- Settings
is_verbose: BOOLEAN
+ is_persistent_connection_supported: BOOLEAN
+ -- Is persistent connection supported?
+ do
+ Result := {HTTPD_SERVER}.is_persistent_connection_supported
+ end
+
+ persistent_connection_timeout: INTEGER = 5 -- seconds
+ -- Number of seconds for persistent connection timeout.
+ -- Default: 5 sec.
+
feature -- Status report
has_error: BOOLEAN
@@ -168,7 +178,7 @@ feature -- Execution
n := n + 1
-- FIXME: it seems to be called one more time, mostly to see this is done.
execute_request
- l_exit := not {HTTPD_SERVER}.is_persistent_connection_supported
+ l_exit := not is_persistent_connection_supported
or has_error or l_socket.is_closed or not l_socket.is_open_read
or not is_persistent_connection_requested
reset_request
@@ -196,10 +206,21 @@ feature -- Execution
debug ("dbglog")
dbglog (generator + ".execute_request socket=" + l_socket.descriptor.out + " ENTER")
end
- l_socket.set_timeout (5) -- 5 seconds!
+
--| TODO: add configuration options for socket timeout.
--| set by default 5 seconds.
- l_ready_for_reading := l_socket.ready_for_reading
+-- l_socket.set_timeout (persistent_connection_timeout) -- 5 seconds!
+ l_socket.set_timeout (1) -- 1 second!
+ from
+ i := persistent_connection_timeout -- * 1 sec
+ until
+ l_ready_for_reading or i <= 0 or has_error
+ loop
+ l_ready_for_reading := l_socket.ready_for_reading
+ check not l_socket.is_closed end
+ i := i - 1
+ end
+
if l_ready_for_reading then
create l_remote_info
if attached l_socket.peer_address as l_addr then
@@ -217,9 +238,11 @@ feature -- Execution
end
if has_error then
--- check catch_bad_incoming_connection: False end
- if is_verbose then
- log ("ERROR: invalid HTTP incoming request")
+ if l_ready_for_reading then
+ -- check catch_bad_incoming_connection: False end
+ if is_verbose then
+ log ("ERROR: invalid HTTP incoming request")
+ end
end
else
process_request (l_socket)
diff --git a/library/server/obsolete/v0/ewsgi/connectors/libfcgi/libfcgi.ecf b/library/server/obsolete/v0/ewsgi/connectors/libfcgi/libfcgi.ecf
index b99fe98b..c4196cfd 100644
--- a/library/server/obsolete/v0/ewsgi/connectors/libfcgi/libfcgi.ecf
+++ b/library/server/obsolete/v0/ewsgi/connectors/libfcgi/libfcgi.ecf
@@ -13,6 +13,13 @@
-
+
+
+ /wgi_.*_handler.e$
+ /wgi_.*_connector.e$
+ /.*_service.e$
+
+
+
diff --git a/library/server/obsolete/v0/ewsgi/connectors/nino/nino.ecf b/library/server/obsolete/v0/ewsgi/connectors/nino/nino.ecf
index feee5fa9..25198b63 100644
--- a/library/server/obsolete/v0/ewsgi/connectors/nino/nino.ecf
+++ b/library/server/obsolete/v0/ewsgi/connectors/nino/nino.ecf
@@ -23,6 +23,6 @@
/.*_service.e$
-
+
diff --git a/library/server/wsf/src/wsf_request.e b/library/server/wsf/src/wsf_request.e
index ed082696..608b92cf 100644
--- a/library/server/wsf/src/wsf_request.e
+++ b/library/server/wsf/src/wsf_request.e
@@ -41,7 +41,7 @@ inherit
{NONE} all
end
-create {WSF_TO_WGI_SERVICE, WSF_EXECUTION, WGI_EXPORTER}
+create {WSF_EXECUTION, WGI_EXPORTER}
make_from_wgi
convert
diff --git a/tests/all-safe.ecf b/tests/all-safe.ecf
index 84a9e075..6bf2afa2 100644
--- a/tests/all-safe.ecf
+++ b/tests/all-safe.ecf
@@ -60,11 +60,21 @@
+
+ Compiling with None concurrency
+
+
+
Compiling with SCOOP concurrency
+
+ Compiling with Eiffel Thread concurrency
+
+
+
Compiling as Windows , on other platforms than Windows