cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aki Yoshida (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-4861) Encoding issue jax-rs - UriBuilder
Date Fri, 01 Mar 2013 09:13:12 GMT

    [ https://issues.apache.org/jira/browse/CXF-4861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13590358#comment-13590358
] 

Aki Yoshida commented on CXF-4861:
----------------------------------

if there are unresolved parameters in a partially encoded query, while building a uri object,
we need to escape the prop delimiters of theQuery before calling buildURIFromEncoded to avoid
passing an invalid uri string.

this assumes the resulting uri to look like
$filter=startswith%28CarrierId%2C%27A%27%29&$skiptoken=%7BdummySkipToken%7D
                
> Encoding issue jax-rs - UriBuilder
> ----------------------------------
>
>                 Key: CXF-4861
>                 URL: https://issues.apache.org/jira/browse/CXF-4861
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.6, 2.7.0
>            Reporter: Stephan Klevenz
>
> Use Case: OData (odata.org) / odata4j (odata4j.org)
> Building an URI based on OData query parameter:
> URI called by http client: .../Employees?$filter=startswith(CarrierId,'A')
> URI build on server:
> String nextHref = uriInfo.getRequestUriBuilder().replaceQueryParam("$skiptoken", "{dummySkipToken}").build().toString();
> Result is:
> /Employees?$filter=startswith%2528CarrierId%252C%2527A%2527%2529&$skiptoken=%7BdummySkipToken%7D
> The value of query parameter $filter is encoded twice. The issue is in the embrasing
{} of the value of the $skiptoken query parameter.
> CXF does a partial encoding of the first query parameter which succeeds and then gets
a UriSyntaxException for the 2nd query parameter. After that it falls back and encodes the
whole URI while the 1st query option is already encoded.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message