[ https://issues.apache.org/jira/browse/CAMEL-12057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16274935#comment-16274935 ]
ASF GitHub Bot commented on CAMEL-12057: ---------------------------------------- GitHub user przem opened a pull request: https://github.com/apache/camel/pull/2126 CAMEL-12057 Fixed missing encoding for query params You can merge this pull request into a Git repository by running: $ git pull https://github.com/przem/camel master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/camel/pull/2126.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2126 ---- commit e239645cadd7130b27cb85bd713cb71140872865 Author: Przemek Kubicki <przemek.kubi...@gmail.com> Date: 2017-12-01T20:14:35Z Fixed missing encoding for query params ---- > Missing encoding for query params > --------------------------------- > > Key: CAMEL-12057 > URL: https://issues.apache.org/jira/browse/CAMEL-12057 > Project: Camel > Issue Type: Bug > Components: camel-olingo2 > Affects Versions: 2.20.1 > Environment: spring-boot > Reporter: Przemek Kubicki > Fix For: 2.20.2 > > > Hi guys, > i've a problem with making camel-olingo2 to work with $filter query parameter > Here is my RouteBuilder situation > {{ > rest("/olingo2") > .get("tickets").to("direct:olingo2/tickets"); > from("direct:olingo2/tickets") > .setHeader("CamelOlingo2.$filter", simple("ReporterEmail eq > 'u...@company.com'")) > .setHeader("CamelOlingo2.$select", simple("ID,Name")) > .to("olingo2://read/ServiceRequestCollection") > }} > I get an exception while parsing endpoint URI (a space in uri) > {{URISyntaxException: Illegal character in query at index 107: > https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codata/ServiceRequestCollection/?$filter=ReporterEmail > eq 'u...@company.com'&$select=ID,Name > }} > It comes basically from Olingo2AppImpl:224 > I tried with > {{ .setHeader("CamelOlingo2.$filter", > simple("reporteremail%20eq%20%27u...@company.com%27")) > }}but then it fails in Olingo2AppImpl:222 while parsing filter expression. > As a conclusion, at Olingo2AppImpl:224 queryParams should be encoded. > here is my patch > https://github.com/przem/camel/commit/e239645cadd7130b27cb85bd713cb71140872865 -- This message was sent by Atlassian JIRA (v6.4.14#64029)