]
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_rea...] when
implemented suffers the same error.
However, the
odata.org reference
[
implementation|https://services.odata.org/TripPinRESTierService/(S(4gus0w...]
does handle the slash correctly.
*_Why does this matter?_*
The
[
camel-odata|https://github.com/apache/camel/blob/master/components/camel-...]
connector uses the olingo4 libraries and positively
[
adds|https://github.com/apache/camel/blob/master/components/camel-olingo4...]
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.