[ 
https://issues.apache.org/jira/browse/PLUTO-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12759215#action_12759215
 ] 

David Jencks commented on PLUTO-579:
------------------------------------

Hi Ate,

I now have a lot of questions :-)

As you note, in trunk both single parameters and multi valued parameters are 
URLEncoded/Decoded whereas in 1.1.x only single valued paramters were. I think 
that clearly by the spec (1.0 spec, top of p 32) the multivalued parameters 
need to be URL encoded/decoded as well in 1.1.x, in other words both before and 
after the 1.1.x change it's not spec compliant.

What I don't understand is why encodeCharacters is needed at all, and why we 
can't always use the URLEncoded/Decoder.

trunk encodes these characters:
{code}
    private static final String[][] ENCODINGS = new String[][] {
     new String[] { "_", "0x1" },
            new String[] { ".", "0x2" },
            new String[] { "/", "0x3" },
            new String[] { "\r", "0x4" },
            new String[] { "\n", "0x5" },
            new String[] { "<", "0x6" },
            new String[] { ">", "0x7" },
            new String[] { " ", "0x8" },
            new String[] { "#", "0x9" },
            new String[] { "?", "0xa" },
            new String[] { "\\", "0xb" },
            new String[] { "%", "0xc" },
    };
{code}

The URLEncoder docs say everything except these get URL encoded:

# The special characters ".", "-", "*", and "_" remain the same.

"." and "_" are pluto-encoded, "-" and "*" are not.

pluto encodeCharacters is called:

after url-encoding multi values. (line 434) This will encode "." and "_" in 
parameter values. I don't think this is compliant with the spec.

to encode a windowId (encodeControlParameter, line 395). Is there a regex or 
similar grammar for window Ids?

to encode a resourceWindow (toString, line 239). I think this is another 
windowId.

to encode the actionWindow (toString, line 248), presumably another windowId.

to encode resource window cachablilty (toString, line 256). The ResourceURL 
seems to indicate that the valid cachability values are in a small set of 
string constants. none of which need encoding.

to encode resource window resourceId (toString, line 261), presumably another 
windowId.

So, depending on what valid windowIds are, the encoding is unnecessary, 
excessive, or incomplete. I'd like to know what valid windowIds can be.

Also, there's a problem with strings to be encoded that have the encoding 
characters in them already, such as "0x1". These need to be re-encoded somehow 
so decoding produces the original value. I think Ivan's patch does this 
successfully.

I'll change the branch impl to use more URLEncoding on multi-values, for the 
other bits I need more info. 

> Some render parameters are lost if they contains semicolon
> ----------------------------------------------------------
>
>                 Key: PLUTO-579
>                 URL: https://issues.apache.org/jira/browse/PLUTO-579
>             Project: Pluto
>          Issue Type: Bug
>          Components: portal driver
>    Affects Versions: 1.1.7
>            Reporter: Ivan
>            Assignee: David Jencks
>             Fix For: 2.0.1, 1.1.8
>
>         Attachments: PLUTO-579-0921.patch, PLUTO-579.patch
>
>
> If one render parameter contains semicolon, those parameters after it in the 
> url are lost
> Like the URL below
> __pm0x3system-database0x2DBWizard!1134683811|0_view/__rp0x3system-database0x2DBWizard!1134683811|0_rarPath/org0x2tranql0x3tranql-connector-ra0x30x3rar/__rp0x3system-database0x2DBWizard!1134683811|0_driverClass/com0x2microsoft0x2sqlserver0x2jdbc0x2SQLServerDriver/__rp0x3system-database0x2DBWizard!1134683811|0_mode/params/__rp0x3system-database0x2DBWizard!1134683811|0_dbtype/SQL0x8Server0x82005/__rp0x3system-database0x2DBWizard!1134683811|0_adapterDisplayName/TranQL0x8Generic0x8JDBC0x8Resource0x8Adapter/__rp0x3system-database0x2DBWizard!1134683811|0_urlPrototype/jdbc:sqlserver:0x30x3%7BHost%7D:%7BPort%7D;DatabaseName=%7BDatabase%7D/__rp0x3system-database0x2DBWizard!1134683811|0_transactionType/LOCAL/__rp0x3system-database0x2DBWizard!1134683811|0_name/ddddd
> The parameter urlPrototype contains semicolon, while I calling 
> renderRequest.getParameter("name"), it will return null.
> After some investigations, I found in the class PortalURLParserImpl, line 115
>         String pathInfo = request.getPathInfo(); <--- the pathInfo got from 
> the request is truncated by the semicolon.
>         if (pathInfo == null) {
> Maybe, we need to add the ; to the ENCODINGS arrays ?
> Thanks !           

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to