myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leonardo Uribe <lu4...@gmail.com>
Subject Re: [jira] [Commented] (MYFACES-4052) Multiple <f:param> with same name encodes only last one in link URL
Date Mon, 20 Jun 2016 15:58:44 GMT
Yes, good idea. It is just this part of the code has a long history. In
theory, the call to encodeActionURL from encodeBookmarkableURL should not
be done, because you are just calling the same code (encodeURL) twice, but
the spec demands this call.

2016-06-20 16:35 GMT+02:00 Mike Kienenberger <mkienenb@gmail.com>:

> If the spec is ambiguous, and there is a use case for both possibilities,
> wouldn't it make sense to support both and use a context parameter to
> enable which behaviour is enabled?
>
> On Mon, Jun 20, 2016 at 8:56 AM, Leonardo Uribe (JIRA) <
> dev@myfaces.apache.org> wrote:
>
>>
>>     [
>> https://issues.apache.org/jira/browse/MYFACES-4052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15339443#comment-15339443
>> ]
>>
>> Leonardo Uribe commented on MYFACES-4052:
>> -----------------------------------------
>>
>> I checked the code step by step, and it looks like the call to
>> ViewHandler.getBookmarkableURL(...) before the end calls to
>> ExternalContext.encodeActionURL(...), which according to the spec:
>>
>> "... Return the input URL, after performing any rewriting needed to
>> ensure that it will correctly identify an addressable action in the current
>> application. ..."
>>
>> In fact there is a rewriting there, which put all parameters in a map
>> again, but in that moment the previous param is lost.
>>
>> JSF 2.2 section 7.6.2 enforces call encodeActionURL at the end of
>> getBookmarkableURL.
>>
>> Other problem I see is in the RFC 3986 there is no mention about use a
>> query param with multiple values, so we are in a case where this detail is
>> not specified, even if it is used somehow.
>>
>> I can remember of some issues related to encodeActionURL, where a param
>> was written on the url more than once and the code is there is used to
>> clean the URL, as the javadoc says. It should be fixed at spec level, so
>> I'll close it again as won't fix.
>>
>> > Multiple <f:param> with same name encodes only last one in link URL
>> > -------------------------------------------------------------------
>> >
>> >                 Key: MYFACES-4052
>> >                 URL: https://issues.apache.org/jira/browse/MYFACES-4052
>> >             Project: MyFaces Core
>> >          Issue Type: Bug
>> >    Affects Versions: 2.2.10
>> >         Environment: TomEE 7.0.0
>> >            Reporter: Bauke Scholtz
>> >            Assignee: Leonardo Uribe
>> >
>> > Consider:
>> > {code}
>> > <h:link value="link">
>> >     <f:param name="p" value="foo"/>
>> >     <f:param name="p" value="bar"/>
>> > </h:link>
>> > {code}
>> > MyFaces 2.2.10 renders only last one in link URL instead of both.
>>
>>
>>
>> --
>> This message was sent by Atlassian JIRA
>> (v6.3.4#6332)
>>
>
>

Mime
View raw message