Mark Sztainbok created OLINGO-424:
-------------------------------------

             Summary: Type filters are added to the OData URI in the incorrect 
location when OData parameters such as $filter are also specified
                 Key: OLINGO-424
                 URL: https://issues.apache.org/jira/browse/OLINGO-424
             Project: Olingo
          Issue Type: Bug
          Components: odata4-client
    Affects Versions: V4 4.0.0-beta-01
            Reporter: Mark Sztainbok


I have the following code written using Olingo:
GroupCollection groups = 
this.container.getDirectoryObjects().filter(this.getNameFilter(groupName)).execute(GroupCollection.class);
which should return only the groups from the directoryObjects collection which 
match the filter.

However when the request is sent to the server, the URI is misconstructed and 
the type is placed in the wrong part of the URI and encoding is a bit weird. It 
looks like the query string was double encoded.

This is the URI that is sent to the server:
https://graph.windows.net/f872e367-02c7-4012-a01c-0f5b7c5636ae/directoryObjects?%2524filter=%2528displayName+eq+%2527TestGroupGraph0%2527%2529%252FMicrosoft.WindowsAzure.ActiveDirectory.Group

As you can see the type filter was added to the end of the URI instead of after 
the collection where it should be.

The correct URL for OData should be more like:
https://graph.windows.net/f872e367-02c7-4012-a01c-0f5b7c5636ae/directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Group?$filter=(displayName
 eq 'TestGroupGraph0')



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to