Continued reducing WGI and move implementation to WSF (Web Server Framework)
Removed many usage of READABLE_STRING_GENERAL in favor to READABLE_STRING_8 to avoid potential nasty issues in user's code URI-template is working only with STRING_8, then changed any _GENERAL or _STRING_32 to _STRING_8
This commit is contained in:
@@ -126,7 +126,6 @@ feature {NONE} -- Initialization
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
feature -- Access
|
||||
|
||||
mime_type (ext: READABLE_STRING_8): detachable READABLE_STRING_8
|
||||
|
||||
@@ -189,7 +189,7 @@ feature -- Match
|
||||
exp: URI_TEMPLATE_EXPRESSION
|
||||
vn, s,t: STRING
|
||||
vv, path_vv: STRING
|
||||
l_vars, l_path_vars, l_query_vars: HASH_TABLE [READABLE_STRING_32, READABLE_STRING_GENERAL]
|
||||
l_vars, l_path_vars, l_query_vars: HASH_TABLE [READABLE_STRING_8, READABLE_STRING_8]
|
||||
l_uri_count: INTEGER
|
||||
tpl_count: INTEGER
|
||||
l_next_literal_separator: detachable STRING
|
||||
@@ -414,7 +414,7 @@ feature {NONE} -- Implementation
|
||||
end
|
||||
end
|
||||
|
||||
import_path_style_parameters_into (a_content: STRING; res: HASH_TABLE [READABLE_STRING_32, READABLE_STRING_GENERAL])
|
||||
import_path_style_parameters_into (a_content: STRING; res: HASH_TABLE [READABLE_STRING_8, READABLE_STRING_8])
|
||||
require
|
||||
a_content_attached: a_content /= Void
|
||||
res_attached: res /= Void
|
||||
@@ -422,7 +422,7 @@ feature {NONE} -- Implementation
|
||||
import_custom_style_parameters_into (a_content, ';', res)
|
||||
end
|
||||
|
||||
import_form_style_parameters_into (a_content: STRING; res: HASH_TABLE [READABLE_STRING_32, READABLE_STRING_GENERAL])
|
||||
import_form_style_parameters_into (a_content: STRING; res: HASH_TABLE [READABLE_STRING_8, READABLE_STRING_8])
|
||||
require
|
||||
a_content_attached: a_content /= Void
|
||||
res_attached: res /= Void
|
||||
@@ -430,14 +430,14 @@ feature {NONE} -- Implementation
|
||||
import_custom_style_parameters_into (a_content, '&', res)
|
||||
end
|
||||
|
||||
import_custom_style_parameters_into (a_content: STRING; a_separator: CHARACTER; res: HASH_TABLE [READABLE_STRING_32, READABLE_STRING_GENERAL])
|
||||
import_custom_style_parameters_into (a_content: STRING; a_separator: CHARACTER; res: HASH_TABLE [READABLE_STRING_8, READABLE_STRING_8])
|
||||
require
|
||||
a_content_attached: a_content /= Void
|
||||
res_attached: res /= Void
|
||||
local
|
||||
n, p, i, j: INTEGER
|
||||
s: STRING
|
||||
l_name,l_value: STRING
|
||||
s: READABLE_STRING_8
|
||||
l_name, l_value: READABLE_STRING_8
|
||||
do
|
||||
n := a_content.count
|
||||
if n > 0 then
|
||||
|
||||
@@ -24,30 +24,29 @@ feature {NONE} -- Initialization
|
||||
make (create {like path_variables}.make (0), create {like query_variables}.make (0))
|
||||
end
|
||||
|
||||
|
||||
feature -- Access
|
||||
|
||||
path_variables: HASH_TABLE [READABLE_STRING_32, READABLE_STRING_GENERAL]
|
||||
path_variables: HASH_TABLE [READABLE_STRING_8, READABLE_STRING_8]
|
||||
-- Variables being part of the path segments
|
||||
|
||||
query_variables: HASH_TABLE [READABLE_STRING_32, READABLE_STRING_GENERAL]
|
||||
query_variables: HASH_TABLE [READABLE_STRING_8, READABLE_STRING_8]
|
||||
-- Variables being part of the query segments (i.e: after the ?)
|
||||
|
||||
feature -- Query
|
||||
|
||||
path_variable (n: READABLE_STRING_GENERAL): detachable READABLE_STRING_32
|
||||
path_variable (n: READABLE_STRING_8): detachable READABLE_STRING_8
|
||||
-- Value related to query variable name `n'
|
||||
do
|
||||
Result := path_variables.item (n)
|
||||
end
|
||||
|
||||
query_variable (n: READABLE_STRING_GENERAL): detachable READABLE_STRING_32
|
||||
query_variable (n: READABLE_STRING_8): detachable READABLE_STRING_8
|
||||
-- Value related to path variable name `n'
|
||||
do
|
||||
Result := query_variables.item (n)
|
||||
end
|
||||
|
||||
variable (n: READABLE_STRING_GENERAL): detachable READABLE_STRING_32
|
||||
variable (n: READABLE_STRING_8): detachable READABLE_STRING_8
|
||||
-- Value related to variable name `n'
|
||||
do
|
||||
Result := query_variable (n)
|
||||
@@ -58,7 +57,7 @@ feature -- Query
|
||||
|
||||
feature -- Query: url-decoded
|
||||
|
||||
url_decoded_query_variable (n: READABLE_STRING_GENERAL): detachable READABLE_STRING_32
|
||||
url_decoded_query_variable (n: READABLE_STRING_8): detachable READABLE_STRING_32
|
||||
-- Unencoded value related to variable name `n'
|
||||
do
|
||||
if attached query_variable (n) as v then
|
||||
@@ -66,7 +65,7 @@ feature -- Query: url-decoded
|
||||
end
|
||||
end
|
||||
|
||||
url_decoded_path_variable (n: READABLE_STRING_GENERAL): detachable READABLE_STRING_32
|
||||
url_decoded_path_variable (n: READABLE_STRING_8): detachable READABLE_STRING_32
|
||||
-- Unencoded value related to variable name `n'
|
||||
do
|
||||
if attached path_variable (n) as v then
|
||||
@@ -74,7 +73,7 @@ feature -- Query: url-decoded
|
||||
end
|
||||
end
|
||||
|
||||
url_decoded_variable (n: READABLE_STRING_GENERAL): detachable READABLE_STRING_32
|
||||
url_decoded_variable (n: READABLE_STRING_8): detachable READABLE_STRING_32
|
||||
-- Unencoded value related to variable name `n'
|
||||
do
|
||||
if attached variable (n) as v then
|
||||
@@ -84,7 +83,7 @@ feature -- Query: url-decoded
|
||||
|
||||
feature {NONE} -- Implementation
|
||||
|
||||
url_decoded_string (s: READABLE_STRING_GENERAL): READABLE_STRING_32
|
||||
url_decoded_string (s: READABLE_STRING_8): READABLE_STRING_32
|
||||
do
|
||||
Result := url_encoder.decoded_string (s.as_string_8)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user