Skip to content

Commit a1a620a

Browse files
committed
Export request and response from WGI_EXECUTION to itself.
Added WSF_FILTERED_ROUTED_SKELETON_EXECUTION
1 parent d8ea9ba commit a1a620a

File tree

3 files changed

+77
-7
lines changed

3 files changed

+77
-7
lines changed

library/server/ewsgi/specification/connector/wgi_execution.e

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ feature {NONE} -- Initialization
1818
response := res
1919
end
2020

21-
feature {NONE} -- Access
21+
feature {WGI_EXECUTION} -- Access
2222

2323
request: WGI_REQUEST
2424
-- Request data.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
note
2+
description: "[
3+
Skeleton execution based on filtered routed execution.
4+
]"
5+
author: "$Author$"
6+
date: "$Date$"
7+
revision: "$Revision$"
8+
9+
deferred class
10+
WSF_FILTERED_ROUTED_SKELETON_EXECUTION
11+
12+
inherit
13+
WSF_ROUTED_SKELETON_EXECUTION
14+
undefine
15+
execute
16+
redefine
17+
initialize
18+
end
19+
20+
WSF_FILTERED_EXECUTION
21+
redefine
22+
initialize
23+
end
24+
25+
WSF_FILTER
26+
rename
27+
execute as filter_execute
28+
end
29+
30+
feature {NONE} -- Initialize
31+
32+
initialize
33+
local
34+
f: like filter
35+
do
36+
Precursor {WSF_ROUTED_SKELETON_EXECUTION}
37+
Precursor {WSF_FILTERED_EXECUTION}
38+
-- Current is a WSF_FILTER as well in order to call the router
39+
-- let's add Current at the end of the filter chain.
40+
from
41+
f := filter
42+
until
43+
not attached f.next as l_next
44+
loop
45+
f := l_next
46+
end
47+
f.set_next (Current)
48+
end
49+
50+
feature -- Execute Filter
51+
52+
filter_execute (req: WSF_REQUEST; res: WSF_RESPONSE)
53+
-- Execute the filter.
54+
do
55+
execute_skeleton (req, res)
56+
end
57+
58+
note
59+
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others"
60+
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
61+
source: "[
62+
Eiffel Software
63+
5949 Hollister Ave., Goleta, CA 93117 USA
64+
Telephone 805-685-1006, Fax 805-685-6869
65+
Website http://www.eiffel.com
66+
Customer support http://support.eiffel.com
67+
]"
68+
end

library/server/wsf/router/policy/execution/wsf_routed_skeleton_execution.e

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,19 @@ inherit
1919
feature -- Execution
2020

2121
execute
22+
-- <Precursor>
23+
do
24+
execute_skeleton (request, response)
25+
end
26+
27+
execute_skeleton (req: WSF_REQUEST; res: WSF_RESPONSE)
2228
-- If the service is available, and request URI is not too long, dispatch the request
2329
-- and if handler is not found, execute the default procedure `execute_default'.
2430
local
2531
l_sess: WSF_ROUTER_SESSION
26-
req: WSF_REQUEST; res: WSF_RESPONSE
2732
do
28-
req := request
29-
res := response
30-
31-
--| When we reach here, the request has already passed check for 400 (Bad request),
32-
--| which is implemented in WSF_REQUEST.make_from_wgi (when it calls `analyze').
33+
--| When we reach here, the request has already passed check for 400 (Bad request),
34+
--| which is implemented in WSF_REQUEST.make_from_wgi (when it calls `analyze').
3335
if unavailable then
3436
handle_unavailable (res)
3537
elseif requires_proxy (req) then

0 commit comments

Comments
 (0)