[teiid-issues] [JBoss JIRA] (TEIID-5573) Ending a teiid odata url with a slash causes a 'Malformed URI' error

Steven Hawkins (Jira) issues at jboss.org
Fri Dec 14 17:10:00 EST 2018


     [ https://issues.jboss.org/browse/TEIID-5573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steven Hawkins resolved TEIID-5573.
-----------------------------------
    Fix Version/s: 11.1.2
                   12.0
                   11.2.2
       Resolution: Done


The upstream issue isn't a blocker for this because we can workaround with the context aware request cleansing of the url.

> Ending a teiid odata url with a slash causes a 'Malformed URI' error
> --------------------------------------------------------------------
>
>                 Key: TEIID-5573
>                 URL: https://issues.jboss.org/browse/TEIID-5573
>             Project: Teiid
>          Issue Type: Bug
>          Components: OData
>    Affects Versions: 9.1.1
>            Reporter: Paul Richardson
>            Assignee: Steven Hawkins
>            Priority: Major
>             Fix For: 11.1.2, 12.0, 11.2.2
>
>
> As discussed on #teiid (IRC), the URI used to access a teiid odata service fails if a '/' is appended to it, eg.
> {code:java}
> https://${HOST}:${PORT}/odata4/usstates/USStates/SvcView/
> {code}
> This results in this error (in Chrome):
> {code:xml}
> <error xmlns="http://docs.oasis-open.org/odata/ns/metadata">
>   <script/>
>   <code>null</code>
>   <message>The URI is malformed.</message>
> </error>
> {code}
> Removing the '/' works correctly.
> This appears to be an underlying problem with the olingo4 libraries since the [tutorial|https://olingo.apache.org/doc/odata4/tutorials/read/tutorial_read.html] when implemented suffers the same error.
> However, the odata.org reference [implementation|https://services.odata.org/TripPinRESTierService/(S(4gus0w41xmxedlzbywj2srqo))/People/?$filter=FirstName%20eq%20%27Scott%27] does handle the slash correctly.
> *_Why does this matter?_*
> The [camel-odata|https://github.com/apache/camel/blob/master/components/camel-olingo4/camel-olingo4-component/src/main/docs/olingo4-component.adoc] connector uses the olingo4 libraries and positively [adds|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] a '/' when forming the full URI to read data. This camel connector was originally created using the reference odata implementation as test data so unsurprising that it assumes the extra '/'.
> *_Who should fix what?_*
> Probably, the olingo4 libraries should be fixed to correctly handle the extra '/'. However, that would require both teiid and the camel odata-connector picking up a new version of the library, which may well take some time. From the discussion on IRC, it is possible to workaround this in teiid with the use of _'servlet filters'_.
> *_Tested version_*
> The version of teiid actually tested is 9.1.1 but would imagine that later versions may also be affected given it is ultimately a problem with the olingo4 libraries.



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the teiid-issues mailing list