You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by Mark Sztainbok <ma...@okta.com> on 2014/09/05 21:02:28 UTC

Bug in Olingo

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 what 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&api-version=1.21-preview

The correct URL for OData should be:

https://graph.windows.net/f872e367-02c7-4012-a01c-0f5b7c5636ae/directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Group?$filter=(displayName eq 'TestGroupGraph0')&api-version=1.21-preview

Thanks,

Mark



Re: Bug in Olingo

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 05/09/2014 21:02, Mark Sztainbok wrote:
> 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 what 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&api-version=1.21-preview
> The correct URL for OData should be:
> https://graph.windows.net/f872e367-02c7-4012-a01c-0f5b7c5636ae/directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Group?$filter=(displayName eq 'TestGroupGraph0')&api-version=1.21-preview

Hi,
this looks definitely like a bug: could you please file an issue on JIRA 
for this?

Regards.

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/