[jira] [Work logged] (CAMEL-13008) Odata-connector assumes '/' at end of URI

2018-12-22 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/CAMEL-13008?focusedWorklogId=178288=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-178288
 ]

ASF GitHub Bot logged work on CAMEL-13008:
--

Author: ASF GitHub Bot
Created on: 22/Dec/18 21:31
Start Date: 22/Dec/18 21:31
Worklog Time Spent: 10m 
  Work Description: dmvolod closed pull request #2681: CAMEL-13008: 
Odata-connector assumes '/' at end of URI
URL: https://github.com/apache/camel/pull/2681
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java
 
b/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java
index 62bc8abd616..30bac11141f 100644
--- 
a/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java
+++ 
b/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java
@@ -778,7 +778,7 @@ private String createUri(String resourceUri, String 
resourcePath, String queryOp
 
 final StringBuilder absolutUri = new 
StringBuilder(resourceUri).append(SEPARATOR).append(resourcePath);
 if (queryOptions != null && !queryOptions.isEmpty()) {
-absolutUri.append("/?" + queryOptions);
+absolutUri.append("?" + queryOptions);
 }
 return absolutUri.toString();
 


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 178288)
Time Spent: 20m  (was: 10m)

> Odata-connector assumes '/' at end of URI
> -
>
> Key: CAMEL-13008
> URL: https://issues.apache.org/jira/browse/CAMEL-13008
> Project: Camel
>  Issue Type: Bug
>  Components: camel-olingo4
>Affects Versions: 2.21.0
>Reporter: Paul Richardson
>Assignee: Dmitry Volodin
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> An issue comes to light when testing certain odata implementations that do 
> not handle a '/' being added to the end of the consumed URI, eg.
> * Implementation of the olingo4 
> [tutorial|https://olingo.apache.org/doc/odata4/tutorials/read/tutorial_read.html]
> * Services deployed using current implementations of [teiid|http://teiid.io/]
> Use of the odata-connector on these services results in a _malformed URI_ 
> error.
> Essentially, when the service URI is concatenated with the resource path, the 
> constructed URI is 
> [appended|https://github.com/apache/camel/blob/master/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java#L781]
>  with a '/' and a '?' prior to the addition of the query parameters.
> This works fine for the reference odata 
> [implementation|https://services.odata.org/TripPinRESTierService/(S(4gus0w41xmxedlzbywj2srqo))/People/?$filter=FirstName%20eq%20%27Scott%27]
>  since can handle the extra '/'.
> Since both teiid and the olingo4 tutorial use the olingo4 libraries, it would 
> seem that the problem might be solved with them. However, it might be 
> advantageous, given odata implementations already deployed, whether this 
> odata-connector might check whether the '/' was supported before appending it?
> (note. a bug [report|https://issues.jboss.org/browse/TEIID-5573] has been 
> logged with the teiid project to this affect).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (CAMEL-13008) Odata-connector assumes '/' at end of URI

2018-12-20 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/CAMEL-13008?focusedWorklogId=177497=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-177497
 ]

ASF GitHub Bot logged work on CAMEL-13008:
--

Author: ASF GitHub Bot
Created on: 20/Dec/18 13:48
Start Date: 20/Dec/18 13:48
Worklog Time Spent: 10m 
  Work Description: dmvolod opened a new pull request #2681: CAMEL-13008: 
Odata-connector assumes '/' at end of URI
URL: https://github.com/apache/camel/pull/2681
 
 
   @phantomjinx, could you please review this fix. Is it enough for this issue?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 177497)
Time Spent: 10m
Remaining Estimate: 0h

> Odata-connector assumes '/' at end of URI
> -
>
> Key: CAMEL-13008
> URL: https://issues.apache.org/jira/browse/CAMEL-13008
> Project: Camel
>  Issue Type: Bug
>  Components: camel-olingo4
>Affects Versions: 2.21.0
>Reporter: Paul Richardson
>Assignee: Dmitry Volodin
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> An issue comes to light when testing certain odata implementations that do 
> not handle a '/' being added to the end of the consumed URI, eg.
> * Implementation of the olingo4 
> [tutorial|https://olingo.apache.org/doc/odata4/tutorials/read/tutorial_read.html]
> * Services deployed using current implementations of [teiid|http://teiid.io/]
> Use of the odata-connector on these services results in a _malformed URI_ 
> error.
> Essentially, when the service URI is concatenated with the resource path, the 
> constructed URI is 
> [appended|https://github.com/apache/camel/blob/master/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java#L781]
>  with a '/' and a '?' prior to the addition of the query parameters.
> This works fine for the reference odata 
> [implementation|https://services.odata.org/TripPinRESTierService/(S(4gus0w41xmxedlzbywj2srqo))/People/?$filter=FirstName%20eq%20%27Scott%27]
>  since can handle the extra '/'.
> Since both teiid and the olingo4 tutorial use the olingo4 libraries, it would 
> seem that the problem might be solved with them. However, it might be 
> advantageous, given odata implementations already deployed, whether this 
> odata-connector might check whether the '/' was supported before appending it?
> (note. a bug [report|https://issues.jboss.org/browse/TEIID-5573] has been 
> logged with the teiid project to this affect).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)