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:
@@ -18,10 +18,13 @@ convert
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make (a_name: READABLE_STRING_GENERAL; a_string: like string)
|
||||
make (a_name: READABLE_STRING_8; a_string: READABLE_STRING_8)
|
||||
do
|
||||
name := a_name.as_string_32
|
||||
string := a_string
|
||||
name := url_decoded_string (a_name)
|
||||
string := url_decoded_string (a_string)
|
||||
|
||||
url_encoded_name := a_name
|
||||
url_encoded_string := a_string
|
||||
end
|
||||
|
||||
feature -- Access
|
||||
@@ -30,6 +33,10 @@ feature -- Access
|
||||
|
||||
string: READABLE_STRING_32
|
||||
|
||||
url_encoded_name: READABLE_STRING_32
|
||||
|
||||
url_encoded_string: READABLE_STRING_32
|
||||
|
||||
feature -- Helper
|
||||
|
||||
same_string (a_other: READABLE_STRING_GENERAL): BOOLEAN
|
||||
@@ -58,6 +65,19 @@ feature -- Conversion
|
||||
create Result.make_from_string (string)
|
||||
end
|
||||
|
||||
feature {NONE} -- Implementation
|
||||
|
||||
url_decoded_string (s: READABLE_STRING_8): READABLE_STRING_32
|
||||
-- Decoded url-encoded string `s'
|
||||
do
|
||||
Result := url_encoder.decoded_string (s)
|
||||
end
|
||||
|
||||
url_encoder: URL_ENCODER
|
||||
once
|
||||
create Result
|
||||
end
|
||||
|
||||
;note
|
||||
copyright: "2011-2011, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
|
||||
Reference in New Issue
Block a user