fixed cgi and libfcgi connectors due to recent changes from WGI_APPLICATION
This commit is contained in:
@@ -18,13 +18,30 @@ feature -- Execution
|
|||||||
launch
|
launch
|
||||||
local
|
local
|
||||||
req: WGI_REQUEST_FROM_TABLE
|
req: WGI_REQUEST_FROM_TABLE
|
||||||
res: WGI_RESPONSE_STREAM_BUFFER
|
res: detachable WGI_RESPONSE_STREAM_BUFFER
|
||||||
|
rescued: BOOLEAN
|
||||||
do
|
do
|
||||||
create req.make ((create {EXECUTION_ENVIRONMENT}).starting_environment_variables, create {EWF_CGI_INPUT_STREAM}.make)
|
if not rescued then
|
||||||
create res.make (create {EWF_CGI_OUTPUT_STREAM}.make)
|
create req.make ((create {EXECUTION_ENVIRONMENT}).starting_environment_variables, create {EWF_CGI_INPUT_STREAM}.make)
|
||||||
application.process (req, res)
|
create res.make (create {EWF_CGI_OUTPUT_STREAM}.make)
|
||||||
|
application.execute (req, res)
|
||||||
|
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.write_header ({HTTP_STATUS_CODE}.internal_server_error, Void)
|
||||||
|
end
|
||||||
|
if res.message_writable then
|
||||||
|
res.write_string ("<pre>" + l_trace + "</pre>")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
rescue
|
||||||
|
rescued := True
|
||||||
|
retry
|
||||||
end
|
end
|
||||||
|
|
||||||
note
|
note
|
||||||
copyright: "2011-2011, Eiffel Software and others"
|
copyright: "2011-2011, Eiffel Software and others"
|
||||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||||
|
|||||||
@@ -47,11 +47,28 @@ feature -- Execution
|
|||||||
process_fcgi_request (vars: HASH_TABLE [STRING, STRING]; a_input: like input; a_output: like output)
|
process_fcgi_request (vars: HASH_TABLE [STRING, STRING]; a_input: like input; a_output: like output)
|
||||||
local
|
local
|
||||||
req: WGI_REQUEST_FROM_TABLE
|
req: WGI_REQUEST_FROM_TABLE
|
||||||
res: WGI_RESPONSE_STREAM_BUFFER
|
res: detachable WGI_RESPONSE_STREAM_BUFFER
|
||||||
|
rescued: BOOLEAN
|
||||||
do
|
do
|
||||||
create req.make (vars, a_input)
|
if not rescued then
|
||||||
create res.make (a_output)
|
create req.make (vars, a_input)
|
||||||
application.process (req, res)
|
create res.make (a_output)
|
||||||
|
application.execute (req, res)
|
||||||
|
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.write_header ({HTTP_STATUS_CODE}.internal_server_error, Void)
|
||||||
|
end
|
||||||
|
if res.message_writable then
|
||||||
|
res.write_string ("<pre>" + l_trace + "</pre>")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
rescue
|
||||||
|
rescued := True
|
||||||
|
retry
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Input/Output
|
feature -- Input/Output
|
||||||
|
|||||||
Reference in New Issue
Block a user