Fixed various compilation error or warning.
This commit is contained in:
@@ -20,14 +20,15 @@
|
|||||||
<root class="EWF_DEBUG_SERVER" feature="make_and_launch"/>
|
<root class="EWF_DEBUG_SERVER" feature="make_and_launch"/>
|
||||||
<setting name="concurrency" value="scoop"/>
|
<setting name="concurrency" value="scoop"/>
|
||||||
<library name="cgi" location="..\..\library\server\wsf\connector\cgi-safe.ecf" readonly="false"/>
|
<library name="cgi" location="..\..\library\server\wsf\connector\cgi-safe.ecf" readonly="false"/>
|
||||||
<library name="standalone" location="..\..\library\server\wsf\connector\standalone-safe.ecf" readonly="false"/>
|
|
||||||
<library name="libfcgi" location="..\..\library\server\wsf\connector\libfcgi-safe.ecf" readonly="false"/>
|
<library name="libfcgi" location="..\..\library\server\wsf\connector\libfcgi-safe.ecf" readonly="false"/>
|
||||||
<library name="nino" location="..\..\library\server\wsf\connector\nino-safe.ecf" readonly="false"/>
|
<library name="nino" location="..\..\library\server\wsf\connector\nino-safe.ecf" readonly="false"/>
|
||||||
|
<library name="standalone" location="..\..\library\server\wsf\connector\standalone-safe.ecf" readonly="false"/>
|
||||||
<cluster name="launcher" location=".\launcher\any\" recursive="true"/>
|
<cluster name="launcher" location=".\launcher\any\" recursive="true"/>
|
||||||
<cluster name="src" location=".\src\" recursive="true"/>
|
<cluster name="src" location=".\src\" recursive="true"/>
|
||||||
</target>
|
</target>
|
||||||
<target name="debug_standalone" extends="common">
|
<target name="debug_standalone" extends="common">
|
||||||
<root class="EWF_DEBUG_SERVER" feature="make_and_launch"/>
|
<root class="EWF_DEBUG_SERVER" feature="make_and_launch"/>
|
||||||
|
<setting name="concurrency" value="scoop"/>
|
||||||
<library name="default_standalone" location="..\..\library\server\wsf\default\standalone-safe.ecf" readonly="false"/>
|
<library name="default_standalone" location="..\..\library\server\wsf\default\standalone-safe.ecf" readonly="false"/>
|
||||||
<cluster name="launcher" location=".\launcher\default\" recursive="true"/>
|
<cluster name="launcher" location=".\launcher\default\" recursive="true"/>
|
||||||
<cluster name="src" location=".\src\" recursive="true"/>
|
<cluster name="src" location=".\src\" recursive="true"/>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-12-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-12-0 http://www.eiffel.com/developers/xml/configuration-1-12-0.xsd" name="restbucks" uuid="2773FEAA-448F-410E-BEDE-9298C4749066" library_target="restbucks">
|
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-13-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-13-0 http://www.eiffel.com/developers/xml/configuration-1-13-0.xsd" name="restbucks" uuid="2773FEAA-448F-410E-BEDE-9298C4749066" library_target="restbucks">
|
||||||
<target name="restbucks_common">
|
<target name="restbucks_common">
|
||||||
<file_rule>
|
<file_rule>
|
||||||
<exclude>/EIFGENs$</exclude>
|
<exclude>/EIFGENs$</exclude>
|
||||||
@@ -8,16 +8,16 @@
|
|||||||
</file_rule>
|
</file_rule>
|
||||||
<option full_class_checking="false" void_safety="all">
|
<option full_class_checking="false" void_safety="all">
|
||||||
</option>
|
</option>
|
||||||
<setting name="concurrency" value="thread"/>
|
<setting name="concurrency" value="scoop"/>
|
||||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||||
<library name="connector_nino" location="..\..\library\server\ewsgi\connectors\nino\nino-safe.ecf" readonly="false">
|
<library name="connector_standalone" location="..\..\library\server\ewsgi\connectors\standalone\standalone-safe.ecf" readonly="false">
|
||||||
<option debug="true">
|
<option debug="true">
|
||||||
<debug name="nino" enabled="true"/>
|
<debug name="standalone" enabled="true"/>
|
||||||
</option>
|
</option>
|
||||||
</library>
|
</library>
|
||||||
<library name="conneg" location="..\..\library\network\protocol\content_negotiation\conneg-safe.ecf"/>
|
<library name="conneg" location="..\..\library\network\protocol\content_negotiation\conneg-safe.ecf"/>
|
||||||
<library name="crypto" location="$ISE_LIBRARY\unstable\library\text\encryption\crypto\crypto-safe.ecf" readonly="false"/>
|
<library name="crypto" location="$ISE_LIBRARY\unstable\library\text\encryption\crypto\crypto-safe.ecf" readonly="false"/>
|
||||||
<library name="default_nino" location="..\..\library\server\wsf\default\nino-safe.ecf" readonly="false"/>
|
<library name="default_standalone" location="..\..\library\server\wsf\default\standalone-safe.ecf" readonly="false"/>
|
||||||
<library name="encoder" location="..\..\library\text\encoder\encoder-safe.ecf" readonly="false"/>
|
<library name="encoder" location="..\..\library\text\encoder\encoder-safe.ecf" readonly="false"/>
|
||||||
<library name="http" location="..\..\library\network\protocol\http\http-safe.ecf" readonly="false"/>
|
<library name="http" location="..\..\library\network\protocol\http\http-safe.ecf" readonly="false"/>
|
||||||
<library name="json" location="..\..\contrib\library\text\parser\json\library\json-safe.ecf" readonly="false"/>
|
<library name="json" location="..\..\contrib\library\text\parser\json\library\json-safe.ecf" readonly="false"/>
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
<target name="restbucks" extends="restbucks_common">
|
<target name="restbucks" extends="restbucks_common">
|
||||||
<root class="RESTBUCKS_SERVER" feature="make"/>
|
<root class="RESTBUCKS_SERVER" feature="make"/>
|
||||||
<option debug="true" warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="transitional" syntax="provisional">
|
<option debug="true" warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="transitional" syntax="provisional">
|
||||||
<debug name="nino" enabled="true"/>
|
<debug name="standalone" enabled="true"/>
|
||||||
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
|
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
|
||||||
</option>
|
</option>
|
||||||
<cluster name="src" location="src\" recursive="true">
|
<cluster name="src" location="src\" recursive="true">
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
<target name="policy_driven_restbucks" extends="restbucks_common">
|
<target name="policy_driven_restbucks" extends="restbucks_common">
|
||||||
<root class="RESTBUCKS_SERVER" feature="make"/>
|
<root class="RESTBUCKS_SERVER" feature="make"/>
|
||||||
<option debug="true" warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="transitional" syntax="provisional">
|
<option debug="true" warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="transitional" syntax="provisional">
|
||||||
<debug name="nino" enabled="true"/>
|
<debug name="standalone" enabled="true"/>
|
||||||
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
|
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
|
||||||
</option>
|
</option>
|
||||||
<library name="wsf_policy_driven" location="..\..\library\server\wsf\wsf_policy_driven-safe.ecf" readonly="false"/>
|
<library name="wsf_policy_driven" location="..\..\library\server\wsf\wsf_policy_driven-safe.ecf" readonly="false"/>
|
||||||
|
|||||||
@@ -8,17 +8,17 @@
|
|||||||
<exclude>/\.svn$</exclude>
|
<exclude>/\.svn$</exclude>
|
||||||
</file_rule>
|
</file_rule>
|
||||||
<option debug="true" warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="all" syntax="provisional">
|
<option debug="true" warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="all" syntax="provisional">
|
||||||
<debug name="nino" enabled="true"/>
|
<debug name="standalone" enabled="true"/>
|
||||||
<assertions precondition="true" postcondition="true" check="true" invariant="true" supplier_precondition="true"/>
|
<assertions precondition="true" postcondition="true" check="true" invariant="true" supplier_precondition="true"/>
|
||||||
</option>
|
</option>
|
||||||
<setting name="concurrency" value="thread"/>
|
<setting name="concurrency" value="thread"/>
|
||||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||||
<library name="connector_nino" location="..\..\library\server\ewsgi\connectors\nino\nino-safe.ecf" readonly="false" use_application_options="true">
|
<library name="connector_standalone" location="..\..\library\server\ewsgi\connectors\standalone\standalone-safe.ecf" readonly="false" use_application_options="true">
|
||||||
<option>
|
<option>
|
||||||
<assertions precondition="true" check="true" invariant="true" supplier_precondition="true"/>
|
<assertions precondition="true" check="true" invariant="true" supplier_precondition="true"/>
|
||||||
</option>
|
</option>
|
||||||
</library>
|
</library>
|
||||||
<library name="default_nino" location="..\..\library\server\wsf\default\nino-safe.ecf" readonly="false" use_application_options="true"/>
|
<library name="default_standalone" location="..\..\library\server\wsf\default\standalone-safe.ecf" readonly="false" use_application_options="true"/>
|
||||||
<library name="encoder" location="..\..\library\text\encoder\encoder-safe.ecf" readonly="false"/>
|
<library name="encoder" location="..\..\library\text\encoder\encoder-safe.ecf" readonly="false"/>
|
||||||
<library name="http" location="..\..\library\network\protocol\http\http-safe.ecf" readonly="false"/>
|
<library name="http" location="..\..\library\network\protocol\http\http-safe.ecf" readonly="false"/>
|
||||||
<library name="testing" location="$ISE_LIBRARY\library\testing\testing-safe.ecf"/>
|
<library name="testing" location="$ISE_LIBRARY\library\testing\testing-safe.ecf"/>
|
||||||
|
|||||||
@@ -8,6 +8,16 @@ deferred class
|
|||||||
|
|
||||||
inherit
|
inherit
|
||||||
HTTPD_REQUEST_HANDLER_I
|
HTTPD_REQUEST_HANDLER_I
|
||||||
|
redefine
|
||||||
|
is_persistent_connection_supported
|
||||||
|
end
|
||||||
|
|
||||||
|
feature -- Status report
|
||||||
|
|
||||||
|
is_persistent_connection_supported: BOOLEAN = False
|
||||||
|
-- <Precursor>
|
||||||
|
-- When there is no concurrency support, do not try to support
|
||||||
|
-- persistent connection!
|
||||||
|
|
||||||
note
|
note
|
||||||
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
|
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
|
||||||
|
|||||||
@@ -108,6 +108,16 @@ feature -- Settings
|
|||||||
|
|
||||||
is_verbose: BOOLEAN
|
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
|
feature -- Status report
|
||||||
|
|
||||||
has_error: BOOLEAN
|
has_error: BOOLEAN
|
||||||
@@ -168,7 +178,7 @@ feature -- Execution
|
|||||||
n := n + 1
|
n := n + 1
|
||||||
-- FIXME: it seems to be called one more time, mostly to see this is done.
|
-- FIXME: it seems to be called one more time, mostly to see this is done.
|
||||||
execute_request
|
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 has_error or l_socket.is_closed or not l_socket.is_open_read
|
||||||
or not is_persistent_connection_requested
|
or not is_persistent_connection_requested
|
||||||
reset_request
|
reset_request
|
||||||
@@ -196,10 +206,21 @@ feature -- Execution
|
|||||||
debug ("dbglog")
|
debug ("dbglog")
|
||||||
dbglog (generator + ".execute_request socket=" + l_socket.descriptor.out + " ENTER")
|
dbglog (generator + ".execute_request socket=" + l_socket.descriptor.out + " ENTER")
|
||||||
end
|
end
|
||||||
l_socket.set_timeout (5) -- 5 seconds!
|
|
||||||
--| TODO: add configuration options for socket timeout.
|
--| TODO: add configuration options for socket timeout.
|
||||||
--| set by default 5 seconds.
|
--| 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
|
if l_ready_for_reading then
|
||||||
create l_remote_info
|
create l_remote_info
|
||||||
if attached l_socket.peer_address as l_addr then
|
if attached l_socket.peer_address as l_addr then
|
||||||
@@ -217,9 +238,11 @@ feature -- Execution
|
|||||||
end
|
end
|
||||||
|
|
||||||
if has_error then
|
if has_error then
|
||||||
-- check catch_bad_incoming_connection: False end
|
if l_ready_for_reading then
|
||||||
if is_verbose then
|
-- check catch_bad_incoming_connection: False end
|
||||||
log ("ERROR: invalid HTTP incoming request")
|
if is_verbose then
|
||||||
|
log ("ERROR: invalid HTTP incoming request")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
process_request (l_socket)
|
process_request (l_socket)
|
||||||
|
|||||||
@@ -13,6 +13,13 @@
|
|||||||
<library name="ewsgi" location="..\..\ewsgi.ecf"/>
|
<library name="ewsgi" location="..\..\ewsgi.ecf"/>
|
||||||
<library name="http" location="..\..\..\..\..\..\network\protocol\http\http.ecf"/>
|
<library name="http" location="..\..\..\..\..\..\network\protocol\http\http.ecf"/>
|
||||||
<library name="libfcgi" location="..\..\..\..\..\libfcgi\libfcgi.ecf"/>
|
<library name="libfcgi" location="..\..\..\..\..\libfcgi\libfcgi.ecf"/>
|
||||||
<cluster name="src" location=".\" recursive="true"/>
|
<cluster name="src" location="..\..\..\..\..\ewsgi\connectors\libfcgi\src" recursive="true">
|
||||||
|
<file_rule>
|
||||||
|
<exclude>/wgi_.*_handler.e$</exclude>
|
||||||
|
<exclude>/wgi_.*_connector.e$</exclude>
|
||||||
|
<exclude>/.*_service.e$</exclude>
|
||||||
|
</file_rule>
|
||||||
|
</cluster>
|
||||||
|
<cluster name="src_v0" location=".\" recursive="true"/>
|
||||||
</target>
|
</target>
|
||||||
</system>
|
</system>
|
||||||
|
|||||||
@@ -23,6 +23,6 @@
|
|||||||
<exclude>/.*_service.e$</exclude>
|
<exclude>/.*_service.e$</exclude>
|
||||||
</file_rule>
|
</file_rule>
|
||||||
</cluster>
|
</cluster>
|
||||||
<cluster name="src" location=".\src\" recursive="true"/>
|
<cluster name="src_v0" location=".\src\" recursive="true" />
|
||||||
</target>
|
</target>
|
||||||
</system>
|
</system>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ inherit
|
|||||||
{NONE} all
|
{NONE} all
|
||||||
end
|
end
|
||||||
|
|
||||||
create {WSF_TO_WGI_SERVICE, WSF_EXECUTION, WGI_EXPORTER}
|
create {WSF_EXECUTION, WGI_EXPORTER}
|
||||||
make_from_wgi
|
make_from_wgi
|
||||||
|
|
||||||
convert
|
convert
|
||||||
|
|||||||
@@ -60,11 +60,21 @@
|
|||||||
<library name="wsf_router_context" location="..\library\server\wsf\wsf_router_context-safe.ecf" readonly="false"/>
|
<library name="wsf_router_context" location="..\library\server\wsf\wsf_router_context-safe.ecf" readonly="false"/>
|
||||||
<library name="wsf_session" location="..\library\server\wsf\wsf_session-safe.ecf" readonly="false"/>
|
<library name="wsf_session" location="..\library\server\wsf\wsf_session-safe.ecf" readonly="false"/>
|
||||||
</target>
|
</target>
|
||||||
|
<target name="all_none" extends="all">
|
||||||
|
<description>Compiling with None concurrency</description>
|
||||||
|
<root all_classes="true"/>
|
||||||
|
<setting name="concurrency" value="none"/>
|
||||||
|
</target>
|
||||||
<target name="all_scoop" extends="all">
|
<target name="all_scoop" extends="all">
|
||||||
<description>Compiling with SCOOP concurrency</description>
|
<description>Compiling with SCOOP concurrency</description>
|
||||||
<root all_classes="true"/>
|
<root all_classes="true"/>
|
||||||
<setting name="concurrency" value="scoop"/>
|
<setting name="concurrency" value="scoop"/>
|
||||||
</target>
|
</target>
|
||||||
|
<target name="all_mt" extends="all">
|
||||||
|
<description>Compiling with Eiffel Thread concurrency</description>
|
||||||
|
<root all_classes="true"/>
|
||||||
|
<setting name="concurrency" value="thread"/>
|
||||||
|
</target>
|
||||||
<target name="all_windows" extends="all">
|
<target name="all_windows" extends="all">
|
||||||
<description>Compiling as Windows , on other platforms than Windows</description>
|
<description>Compiling as Windows , on other platforms than Windows</description>
|
||||||
<root all_classes="true"/>
|
<root all_classes="true"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user