Added an implementation folder in ewsgi_spec, mainly to provide default implementation just to save the developer of connector some time.
changed structured
This commit is contained in:
@@ -10,8 +10,9 @@
|
||||
<option warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="all">
|
||||
</option>
|
||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||
<library name="ewsgi" location="..\..\ewsgi-safe.ecf" readonly="false"/>
|
||||
<library name="ewsgi_spec" location="..\..\ewsgi_specification-safe.ecf" readonly="false"/>
|
||||
<library name="libfcgi" location="..\..\..\libfcgi\libfcgi-safe.ecf" />
|
||||
<library name="http" location="..\..\..\..\protocol\http\http-safe.ecf"/>
|
||||
<cluster name="src" location=".\" recursive="true"/>
|
||||
</target>
|
||||
</system>
|
||||
|
||||
@@ -10,8 +10,9 @@
|
||||
<option warning="true" full_class_checking="true">
|
||||
</option>
|
||||
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
|
||||
<library name="ewsgi" location="..\..\ewsgi.ecf" readonly="false"/>
|
||||
<library name="libfcgi" location="..\..\libfcgi\libfcgi.ecf" />
|
||||
<library name="ewsgi_spec" location="..\..\ewsgi_specification.ecf" readonly="false"/>
|
||||
<library name="libfcgi" location="..\..\..\libfcgi\libfcgi.ecf" />
|
||||
<library name="http" location="..\..\..\..\protocol\http\http.ecf"/>
|
||||
<cluster name="src" location=".\" recursive="true"/>
|
||||
</target>
|
||||
</system>
|
||||
|
||||
@@ -9,7 +9,7 @@ class
|
||||
GW_LIBFCGI_CONNECTOR
|
||||
|
||||
inherit
|
||||
GW_CONNECTOR
|
||||
EWSGI_CONNECTOR
|
||||
redefine
|
||||
initialize
|
||||
end
|
||||
@@ -46,7 +46,7 @@ feature -- Execution
|
||||
|
||||
process_fcgi_request (vars: HASH_TABLE [STRING, STRING]; a_input: like input; a_output: like output)
|
||||
local
|
||||
gw_env: GW_ENVIRONMENT_VARIABLES
|
||||
gw_env: EWSGI_ENVIRONMENT_VARIABLES
|
||||
do
|
||||
create gw_env.make_with_variables (vars)
|
||||
application.process (gw_env, a_input, a_output)
|
||||
@@ -54,10 +54,10 @@ feature -- Execution
|
||||
|
||||
feature -- Input/Output
|
||||
|
||||
input: GW_INPUT_STREAM
|
||||
input: EWSGI_INPUT_STREAM
|
||||
-- Input from client (from httpd server via FCGI)
|
||||
|
||||
output: GW_OUTPUT_STREAM
|
||||
output: EWSGI_OUTPUT_STREAM
|
||||
-- Output to client (via httpd server/fcgi)
|
||||
|
||||
feature {NONE} -- Implementation
|
||||
|
||||
@@ -9,7 +9,7 @@ class
|
||||
GW_LIBFCGI_INPUT_STREAM
|
||||
|
||||
inherit
|
||||
GW_INPUT_STREAM
|
||||
EWSGI_INPUT_STREAM
|
||||
|
||||
STRING_HANDLER
|
||||
|
||||
|
||||
@@ -9,7 +9,12 @@ class
|
||||
GW_LIBFCGI_OUTPUT_STREAM
|
||||
|
||||
inherit
|
||||
GW_OUTPUT_STREAM
|
||||
EWSGI_OUTPUT_STREAM
|
||||
|
||||
HTTP_STATUS_CODE_MESSAGES
|
||||
export
|
||||
{NONE} all
|
||||
end
|
||||
|
||||
create
|
||||
make
|
||||
@@ -23,6 +28,26 @@ feature {NONE} -- Initialization
|
||||
fcgi := a_fcgi
|
||||
end
|
||||
|
||||
feature -- Status writing
|
||||
|
||||
put_status_line (a_code: INTEGER)
|
||||
-- Put status code line for `a_code'
|
||||
--| Note this is a default implementation, and could be redefined
|
||||
--| for instance in relation to NPH CGI script
|
||||
local
|
||||
s: STRING
|
||||
do
|
||||
create s.make (16)
|
||||
s.append ({HTTP_CONSTANTS}.http_version_1_1)
|
||||
s.append_character (' ')
|
||||
s.append_integer (a_code)
|
||||
if attached http_status_code_message (a_code) as l_status_message then
|
||||
s.append_character (' ')
|
||||
s.append_string (l_status_message)
|
||||
end
|
||||
put_header_line (s)
|
||||
end
|
||||
|
||||
feature -- Basic operation
|
||||
|
||||
put_string (s: STRING)
|
||||
|
||||
Reference in New Issue
Block a user