Better support for unicode path and values.
Added WSF_REQUEST.percent_encoded_path_info: READABLE_STRING_8
to keep url encoded path info, as it is useful for specific component
The router is now using WSF_REQUEST.percent_encoded_path_info
since URI_TEMPLATE are handling URI (and not IRI)
this fixes an issue with unicode path parameters.
This should not break existing code, and this fixes various unicode related issues related
to PATH parameter and path info
but also any component using file names.
(required EiffelStudio >= 7.2)
This commit is contained in:
@@ -20,7 +20,7 @@ feature -- Execution
|
||||
a_start_path_attached: a_start_path /= Void
|
||||
req_attached: req /= Void
|
||||
res_attached: res /= Void
|
||||
path_start_with_a_start_path: req.path_info.starts_with (a_start_path)
|
||||
path_start_with_a_start_path: req.percent_encoded_path_info.starts_with (a_start_path)
|
||||
deferred
|
||||
end
|
||||
|
||||
@@ -33,7 +33,7 @@ feature {WSF_ROUTER} -- Mapping
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "2011-2012, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
|
||||
copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
source: "[
|
||||
Eiffel Software
|
||||
|
||||
@@ -83,7 +83,7 @@ feature {NONE} -- Execution
|
||||
a_start_path_attached: a_start_path /= Void
|
||||
req_attached: req /= Void
|
||||
res_attached: res /= Void
|
||||
path_start_with_a_start_path: req.path_info.starts_with (a_start_path)
|
||||
path_start_with_a_start_path: req.percent_encoded_path_info.starts_with (a_start_path)
|
||||
deferred
|
||||
end
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ feature -- Status
|
||||
-- <Precursor>
|
||||
local
|
||||
tpl: URI_TEMPLATE
|
||||
p: READABLE_STRING_32
|
||||
p: READABLE_STRING_8
|
||||
do
|
||||
p := path_from_request (req)
|
||||
tpl := based_uri_template (template, a_router)
|
||||
@@ -72,7 +72,7 @@ feature -- Status
|
||||
-- <Precursor>
|
||||
local
|
||||
tpl: URI_TEMPLATE
|
||||
p: READABLE_STRING_32
|
||||
p: READABLE_STRING_8
|
||||
new_src: detachable WSF_REQUEST_PATH_PARAMETERS_PROVIDER
|
||||
do
|
||||
p := path_from_request (req)
|
||||
|
||||
Reference in New Issue
Block a user