Renamed "ext" folder as "contrib" folder and reorganized a little bit

Renamed any *_APPLICATION as *_SERVICE
   mainly because those components
   such as WSF_APPLICATION, renamed as WSF_SERVICE
   are not always the main application entry, and "service" describe them better
Minor implementation change in WSF_REQUEST
Cosmetics
This commit is contained in:
Jocelyn Fiat
2011-11-17 15:50:30 +01:00
parent cc11debf08
commit 49c3e8e789
52 changed files with 134 additions and 144 deletions

View File

@@ -10,11 +10,11 @@ class
inherit
ANY
URI_TEMPLATE_ROUTED_APPLICATION
URI_TEMPLATE_ROUTED_SERVICE
ROUTED_APPLICATION_HELPER
ROUTED_SERVICE_HELPER
DEFAULT_APPLICATION
DEFAULT_SERVICE
create
make

View File

@@ -12,7 +12,7 @@
<setting name="concurrency" value="thread"/>
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
<library name="http_client" location="..\..\..\library\client\http_client\http_client-safe.ecf" readonly="false"/>
<library name="json" location="..\..\..\ext\text\json\library\json-safe.ecf" readonly="false"/>
<library name="json" location="..\..\..\contrib\library\text\parser\json\library\json-safe.ecf" readonly="false"/>
<library name="thread" location="$ISE_LIBRARY\library\thread\thread-safe.ecf"/>
<cluster name="src" location=".\src\" recursive="true"/>
</target>

View File

@@ -11,7 +11,7 @@
</option>
<setting name="concurrency" value="thread"/>
<library name="http_client" location="..\..\..\library\client\http_client\http_client.ecf"/>
<library name="json" location="..\..\..\ext\text\json\library\json.ecf" readonly="false"/>
<library name="json" location="..\..\..\contrib\library\text\parser\json\library\json.ecf" readonly="false"/>
<library name="base" location="$ISE_LIBRARY/library/base/base.ecf"/>
<library name="thread" location="$ISE_LIBRARY/library/thread/thread.ecf"/>
<cluster name="src" location="./src" recursive="true"/>

View File

@@ -18,7 +18,7 @@
<library name="eel" location="..\..\library\crypto\eel\eel-safe.ecf" readonly="false"/>
<library name="encoder" location="..\..\library\text\encoder\encoder-safe.ecf" readonly="false"/>
<library name="http" location="..\..\library\protocol\http\http-safe.ecf" readonly="false"/>
<library name="json" location="..\..\ext\text\json\library\json-safe.ecf" readonly="false"/>
<library name="json" location="..\..\contrib\library\text\parser\json\library\json-safe.ecf" readonly="false"/>
<library name="router" location="..\..\library\server\request\router\router-safe.ecf" readonly="false"/>
<library name="uri_template" location="..\..\library\protocol\uri_template\uri_template-safe.ecf" readonly="false"/>
<library name="wsf" location="..\..\library\server\wsf\wsf-safe.ecf" readonly="false"/>

View File

@@ -60,18 +60,18 @@ feature -- HTTP Methods
end
is_conditional_get (req : WSF_REQUEST; l_order : ORDER) : BOOLEAN
-- Check if If-None-Match is present and then if there is a representation that has that etag
-- if the representation hasn't changed, we return TRUE
-- then the response is a 304 with no entity body returned.
-- Check if If-None-Match is present and then if there is a representation that has that etag
-- if the representation hasn't changed, we return TRUE
-- then the response is a 304 with no entity body returned.
local
etag_util : ETAG_UTILS
do
if attached req.meta_variable ("HTTP_IF_NONE_MATCH") as if_none_match then
create etag_util
if if_none_match.as_string.same_string (etag_util.md5_digest (l_order.out).as_string_32) then
Result := True
end
if attached req.meta_variable ("HTTP_IF_NONE_MATCH") as if_none_match then
create etag_util
if if_none_match.as_string.same_string (etag_util.md5_digest (l_order.out).as_string_32) then
Result := True
end
end
end
compute_response_get (ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE; l_order : ORDER)

View File

@@ -10,11 +10,11 @@ class
inherit
ANY
URI_TEMPLATE_ROUTED_APPLICATION
URI_TEMPLATE_ROUTED_SERVICE
ROUTED_APPLICATION_HELPER
ROUTED_SERVICE_HELPER
DEFAULT_APPLICATION
DEFAULT_SERVICE
create
make

View File

@@ -1,6 +1,5 @@
note
description: "Summary description for {ETAG_UTILS}."
author: ""
date: "$Date$"
revision: "$Revision$"
@@ -8,25 +7,24 @@ class
ETAG_UTILS
inherit
ARRAY_FACILITIES
feature
md5_digest ( a_string : STRING ) : STRING
-- Cryptographic hash function that produces a 128-bit (16-byte) hash value, based on `a_string'
feature -- Access
md5_digest (a_string: STRING): STRING
-- Cryptographic hash function that produces a 128-bit (16-byte) hash value, based on `a_string'
local
md5: MD5
output: SPECIAL [NATURAL_8]
do
create md5.make
create output.make_filled (0, 16)
md5.sink_string (a_string)
md5.do_final (output, 0)
Result := as_natural_32_be (output, 0).to_hex_string
Result := Result + as_natural_32_be (output, 4).to_hex_string
Result := Result + as_natural_32_be (output, 8).to_hex_string
Result := Result + as_natural_32_be (output, 12).to_hex_string
Result.append (as_natural_32_be (output, 4).to_hex_string)
Result.append (as_natural_32_be (output, 8).to_hex_string)
Result.append (as_natural_32_be (output, 12).to_hex_string)
end
note