Added abstraction WSF_ROUTED, and WSF_FILTERED.
Added under library/server/obsolete/v0 the previous non concurrent friendly version of EWF/WSF, for backward compatiblity. Removed WSF_CALLBACK_SERVICE and WSF_TO_WGI_SERVICE which are not need with new EWF.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="connector_libfcgi" uuid="59C57E56-3EE6-4EF7-873F-7ED084B0EB22" library_target="connector_libfcgi">
|
||||
<target name="connector_libfcgi">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
<exclude>/\.git$</exclude>
|
||||
<exclude>/\.svn$</exclude>
|
||||
</file_rule>
|
||||
<option warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="all" syntax="transitional">
|
||||
</option>
|
||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||
<library name="ewsgi" location="..\..\ewsgi-safe.ecf"/>
|
||||
<library name="http" location="..\..\..\..\..\..\network\protocol\http\http-safe.ecf"/>
|
||||
<library name="libfcgi" location="..\..\..\..\..\libfcgi\libfcgi-safe.ecf"/>
|
||||
<cluster name="src" location="..\..\..\..\..\ewsgi\connectors\libfcgi\src\" recursive="true">
|
||||
<file_rule>
|
||||
<exclude>/wgi_.*_connector.e$</exclude>
|
||||
</file_rule>
|
||||
</cluster>
|
||||
<cluster name="src_v0" location=".\" recursive="true"/>
|
||||
</target>
|
||||
</system>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="connector_libfcgi" uuid="59C57E56-3EE6-4EF7-873F-7ED084B0EB22" library_target="connector_libfcgi">
|
||||
<target name="connector_libfcgi">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
<exclude>/\.git$</exclude>
|
||||
<exclude>/\.svn$</exclude>
|
||||
</file_rule>
|
||||
<option warning="true" full_class_checking="true" void_safety="none" syntax="transitional">
|
||||
</option>
|
||||
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
|
||||
<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"/>
|
||||
</target>
|
||||
</system>
|
||||
@@ -0,0 +1,10 @@
|
||||
${NOTE_KEYWORD}
|
||||
copyright: "2011-${YEAR}, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
source: "[
|
||||
Eiffel Software
|
||||
5949 Hollister Ave., Goleta, CA 93117 USA
|
||||
Telephone 805-685-1006, Fax 805-685-6869
|
||||
Website http://www.eiffel.com
|
||||
Customer support http://support.eiffel.com
|
||||
]"
|
||||
@@ -0,0 +1,118 @@
|
||||
note
|
||||
description: "Summary description for {WGI_LIBFCGI_CONNECTOR}."
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
WGI_LIBFCGI_CONNECTOR
|
||||
|
||||
inherit
|
||||
WGI_CONNECTOR
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make (a_service: like service)
|
||||
do
|
||||
service := a_service
|
||||
create fcgi.make
|
||||
create input.make (fcgi)
|
||||
create output.make (fcgi)
|
||||
end
|
||||
|
||||
feature -- Access
|
||||
|
||||
Name: STRING_8 = "libFCGI"
|
||||
-- Name of Current connector
|
||||
|
||||
Version: STRING_8 = "0.1"
|
||||
-- Version of Current connector
|
||||
|
||||
feature {NONE} -- Access
|
||||
|
||||
service: WGI_SERVICE
|
||||
-- Gateway Service
|
||||
|
||||
feature -- Server
|
||||
|
||||
launch
|
||||
local
|
||||
res: INTEGER
|
||||
do
|
||||
from
|
||||
res := fcgi.fcgi_listen
|
||||
until
|
||||
res < 0
|
||||
loop
|
||||
process_fcgi_request (fcgi.updated_environ_variables, input, output)
|
||||
res := fcgi.fcgi_listen
|
||||
end
|
||||
end
|
||||
|
||||
feature -- Execution
|
||||
|
||||
process_fcgi_request (vars: STRING_TABLE [READABLE_STRING_8]; a_input: like input; a_output: like output)
|
||||
local
|
||||
req: WGI_REQUEST_FROM_TABLE
|
||||
res: detachable WGI_RESPONSE_STREAM
|
||||
rescued: BOOLEAN
|
||||
do
|
||||
if not rescued then
|
||||
a_input.reset
|
||||
create req.make (vars, a_input, Current)
|
||||
create res.make (a_output, a_output)
|
||||
service.execute (req, res)
|
||||
res.push
|
||||
else
|
||||
if attached (create {EXCEPTION_MANAGER}).last_exception as e and then attached e.exception_trace as l_trace then
|
||||
if res /= Void then
|
||||
if not res.status_is_set then
|
||||
res.set_status_code ({HTTP_STATUS_CODE}.internal_server_error, Void)
|
||||
end
|
||||
if res.message_writable then
|
||||
res.put_string ("<pre>")
|
||||
res.put_string (l_trace)
|
||||
res.put_string ("</pre>")
|
||||
end
|
||||
res.push
|
||||
end
|
||||
end
|
||||
end
|
||||
rescue
|
||||
if not rescued then
|
||||
rescued := True
|
||||
retry
|
||||
end
|
||||
end
|
||||
|
||||
feature -- Input/Output
|
||||
|
||||
input: WGI_LIBFCGI_INPUT_STREAM
|
||||
-- Input from client (from httpd server via FCGI)
|
||||
|
||||
output: WGI_LIBFCGI_OUTPUT_STREAM
|
||||
-- Output to client (via httpd server/fcgi)
|
||||
|
||||
feature {NONE} -- Implementation
|
||||
|
||||
fcgi: FCGI
|
||||
|
||||
invariant
|
||||
fcgi_attached: fcgi /= Void
|
||||
|
||||
note
|
||||
copyright: "2011-2013, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
source: "[
|
||||
Eiffel Software
|
||||
5949 Hollister Ave., Goleta, CA 93117 USA
|
||||
Telephone 805-685-1006, Fax 805-685-6869
|
||||
Website http://www.eiffel.com
|
||||
Customer support http://support.eiffel.com
|
||||
]"
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user