Fixed various compilation error or warning.

This commit is contained in:
2015-06-05 12:17:53 +02:00
parent dd5c89e31c
commit 64463df552
9 changed files with 71 additions and 20 deletions

View File

@@ -20,14 +20,15 @@
<root class="EWF_DEBUG_SERVER" feature="make_and_launch"/>
<setting name="concurrency" value="scoop"/>
<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="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="src" location=".\src\" recursive="true"/>
</target>
<target name="debug_standalone" extends="common">
<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"/>
<cluster name="launcher" location=".\launcher\default\" recursive="true"/>
<cluster name="src" location=".\src\" recursive="true"/>

View File

@@ -1,5 +1,5 @@
<?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">
<file_rule>
<exclude>/EIFGENs$</exclude>
@@ -8,16 +8,16 @@
</file_rule>
<option full_class_checking="false" void_safety="all">
</option>
<setting name="concurrency" value="thread"/>
<setting name="concurrency" value="scoop"/>
<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">
<debug name="nino" enabled="true"/>
<debug name="standalone" enabled="true"/>
</option>
</library>
<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="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="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"/>
@@ -30,7 +30,7 @@
<target name="restbucks" extends="restbucks_common">
<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">
<debug name="nino" enabled="true"/>
<debug name="standalone" enabled="true"/>
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
</option>
<cluster name="src" location="src\" recursive="true">
@@ -42,7 +42,7 @@
<target name="policy_driven_restbucks" extends="restbucks_common">
<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">
<debug name="nino" enabled="true"/>
<debug name="standalone" enabled="true"/>
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
</option>
<library name="wsf_policy_driven" location="..\..\library\server\wsf\wsf_policy_driven-safe.ecf" readonly="false"/>

View File

@@ -8,17 +8,17 @@
<exclude>/\.svn$</exclude>
</file_rule>
<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"/>
</option>
<setting name="concurrency" value="thread"/>
<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>
<assertions precondition="true" check="true" invariant="true" supplier_precondition="true"/>
</option>
</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="http" location="..\..\library\network\protocol\http\http-safe.ecf" readonly="false"/>
<library name="testing" location="$ISE_LIBRARY\library\testing\testing-safe.ecf"/>

View File

@@ -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
-- <Precursor>
-- 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"

View File

@@ -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_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,10 +238,12 @@ feature -- Execution
end
if has_error then
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)
end

View File

@@ -13,6 +13,13 @@
<library name="ewsgi" location="..\..\ewsgi.ecf"/>
<library name="http" location="..\..\..\..\..\..\network\protocol\http\http.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>
</system>

View File

@@ -23,6 +23,6 @@
<exclude>/.*_service.e$</exclude>
</file_rule>
</cluster>
<cluster name="src" location=".\src\" recursive="true"/>
<cluster name="src_v0" location=".\src\" recursive="true" />
</target>
</system>

View File

@@ -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

View File

@@ -60,11 +60,21 @@
<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"/>
</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">
<description>Compiling with SCOOP concurrency</description>
<root all_classes="true"/>
<setting name="concurrency" value="scoop"/>
</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">
<description>Compiling as Windows , on other platforms than Windows</description>
<root all_classes="true"/>