added REQUEST_HANDLER_CONTEXT.string_array_path_parameter (...) to help user handling list/array parameters
fixed postcondition WSF_REQUEST.set_meta_string_variable ...
This commit is contained in:
@@ -141,6 +141,29 @@ feature -- String query
|
|||||||
Result := string_from (path_parameter (a_name))
|
Result := string_from (path_parameter (a_name))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
string_array_path_parameter (a_name: READABLE_STRING_8): detachable ARRAY [READABLE_STRING_32]
|
||||||
|
local
|
||||||
|
i: INTEGER
|
||||||
|
n: INTEGER
|
||||||
|
do
|
||||||
|
from
|
||||||
|
i := 1
|
||||||
|
n := 1
|
||||||
|
create Result.make_filled ("", 1, 5)
|
||||||
|
until
|
||||||
|
i = 0
|
||||||
|
loop
|
||||||
|
if attached string_path_parameter (a_name + "[" + i.out + "]") as v then
|
||||||
|
Result.force (v, n)
|
||||||
|
n := n + 1
|
||||||
|
i := i + 1
|
||||||
|
else
|
||||||
|
i := 0 -- Exit
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Result.keep_head (n)
|
||||||
|
end
|
||||||
|
|
||||||
string_query_parameter (a_name: READABLE_STRING_8): detachable READABLE_STRING_32
|
string_query_parameter (a_name: READABLE_STRING_8): detachable READABLE_STRING_32
|
||||||
do
|
do
|
||||||
Result := string_from (query_parameter (a_name))
|
Result := string_from (query_parameter (a_name))
|
||||||
|
|||||||
@@ -298,7 +298,7 @@ feature -- Access: CGI Meta variables
|
|||||||
do
|
do
|
||||||
meta_variables_table.force (new_string_value (a_name, a_value), a_name)
|
meta_variables_table.force (new_string_value (a_name, a_value), a_name)
|
||||||
ensure
|
ensure
|
||||||
param_set: attached {WSF_STRING} meta_variable (a_name) as val and then val ~ a_value
|
param_set: attached {WSF_STRING} meta_variable (a_name) as val and then val.url_encoded_string.same_string (a_value)
|
||||||
end
|
end
|
||||||
|
|
||||||
unset_meta_variable (a_name: READABLE_STRING_8)
|
unset_meta_variable (a_name: READABLE_STRING_8)
|
||||||
|
|||||||
Reference in New Issue
Block a user