Added support for chunked input data (see Transfer-Encoding: chunked)
This commit is contained in:
22
library/server/wsf/tests/echo/echo-safe.ecf
Normal file
22
library/server/wsf/tests/echo/echo-safe.ecf
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-9-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-9-0 http://www.eiffel.com/developers/xml/configuration-1-9-0.xsd" name="echo_server" uuid="D3EE5B55-6F2E-4247-8C94-E7CFC4C5B648">
|
||||
<target name="echo_server">
|
||||
<root class="ECHO_SERVER" feature="make"/>
|
||||
<file_rule>
|
||||
<exclude>/.git$</exclude>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
<exclude>/.svn$</exclude>
|
||||
</file_rule>
|
||||
<option warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="all" syntax="provisional">
|
||||
</option>
|
||||
<setting name="concurrency" value="thread"/>
|
||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||
<library name="connector_nino" location="..\..\..\ewsgi\connectors\nino\nino-safe.ecf" readonly="false"/>
|
||||
<library name="connector_null" location="..\..\..\ewsgi\connectors\null\null-safe.ecf" readonly="false"/>
|
||||
<library name="dft_nino" location="..\..\default\nino-safe.ecf"/>
|
||||
<library name="ewsgi" location="..\..\..\ewsgi\ewsgi-safe.ecf" readonly="false"/>
|
||||
<library name="thread" location="$ISE_LIBRARY\library\thread\thread-safe.ecf"/>
|
||||
<library name="wsf" location="..\..\wsf-safe.ecf" readonly="false"/>
|
||||
<tests name="src" location=".\src\" recursive="true"/>
|
||||
</target>
|
||||
</system>
|
||||
75
library/server/wsf/tests/echo/src/echo_server.e
Normal file
75
library/server/wsf/tests/echo/src/echo_server.e
Normal file
@@ -0,0 +1,75 @@
|
||||
note
|
||||
description : "Objects that ..."
|
||||
author : "$Author$"
|
||||
date : "$Date$"
|
||||
revision : "$Revision$"
|
||||
|
||||
class
|
||||
ECHO_SERVER
|
||||
|
||||
inherit
|
||||
WSF_SERVICE
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make
|
||||
-- Initialize `Current'.
|
||||
local
|
||||
launcher: DEFAULT_SERVICE_LAUNCHER
|
||||
do
|
||||
create launcher.make_and_launch_with_options (agent execute, <<["port", 9091]>>)
|
||||
end
|
||||
|
||||
feature -- Execution
|
||||
|
||||
execute (req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
local
|
||||
page: WSF_PAGE_RESPONSE
|
||||
l_body: STRING_8
|
||||
do
|
||||
create l_body.make (1024)
|
||||
create page.make_with_body (l_body)
|
||||
page.header.put_content_type_text_plain
|
||||
|
||||
l_body.append ("REQUEST_METHOD=" + req.request_method + "%N")
|
||||
l_body.append ("REQUEST_URI=" + req.request_uri + "%N")
|
||||
l_body.append ("PATH_INFO=" + req.path_info + "%N")
|
||||
l_body.append ("QUERY_STRING=" + req.query_string + "%N")
|
||||
|
||||
l_body.append ("Query parameters:%N")
|
||||
across
|
||||
req.query_parameters as q
|
||||
loop
|
||||
l_body.append ("%T"+ q.item.name + "=" + q.item.string_representation +"%N")
|
||||
end
|
||||
|
||||
l_body.append ("Form parameters:%N")
|
||||
across
|
||||
req.form_parameters as q
|
||||
loop
|
||||
l_body.append ("%T"+ q.item.name + "=" + q.item.string_representation +"%N")
|
||||
end
|
||||
|
||||
l_body.append ("Meta variables:%N")
|
||||
across
|
||||
req.meta_variables as q
|
||||
loop
|
||||
l_body.append ("%T"+ q.item.name + "=" + q.item.string_representation +"%N")
|
||||
end
|
||||
|
||||
res.put_response (page)
|
||||
end
|
||||
|
||||
feature -- Access
|
||||
|
||||
feature -- Change
|
||||
|
||||
feature {NONE} -- Implementation
|
||||
|
||||
invariant
|
||||
-- invariant_clause: True
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user