Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-4867

Loosen up OData4 URL validation or parsing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 8.12.11.6_4, 8.12.11.6_3
    • 8.12.8.6_3
    • OData
    • None
    • Hide

      With Salesforce

      • Build a VDB that has a table with a multi-column key
      • In Salesforce, import the table via the OData importer
      • Create a page in Salesforce that displays a few columns from that table
      • Clicking on the a row in the salesforce UI will give you a drill-down, which will create a new URI to $filter down specifically on your one record. It'll create a filter with all the columns of the primary key

      Without Salesforce

      Show
      With Salesforce Build a VDB that has a table with a multi-column key In Salesforce, import the table via the OData importer Create a page in Salesforce that displays a few columns from that table Clicking on the a row in the salesforce UI will give you a drill-down, which will create a new URI to $filter down specifically on your one record. It'll create a filter with all the columns of the primary key Without Salesforce Create a VDB Create a URI that has a space right after $filter= e.g. http://localhost:8080/odata4/VDB/Schema/Table?$filter=%20ColumnA%20eq%2077777

      I'm accessing my JDV table via OData4 through Salesforce's UI builder. The salesforce engine itself is creating the OData calls, and whenever a $filter is needed with multiple columns, it looks like salesforce pads the column name with a space in front and behind. That'll make the URL look like ...$filter=%20ColumnA%20eq%20123%20and%20ColumnB%20eq...

      The first space right after the $filter= throws off the JDV engine as it thinks it's a malformed URL - which I guess it is. The thing is when I tested it via the OData2 interface, it accepted it just fine. I'm not sure if the OData4 specifications explicitly state in terms of the URL, so it could be anybody's bug. Perhaps we could make JDV a little more forgiving and trim the spaces after un-URL-encoding the URI.

              rhn-support-jolee Johnathon Lee
              stran@redhat.com Steve Tran (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: