Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Parsing encoded character with special meaning in ODataJsonLightContextUriParser #965
When receiving an OData response with 'odata.context' uri that contain encoded special characters with special meaning in uri parsing, for example %23 which is the encoding for '#', the OData client throws the following exception The context URL '[context url ]' is invalid.' This occur due to parsing the URI with 'UriFormat.Unescaped' param.
OData .Net lib 6.16.0 (and also 7.X by looking at the source code).
An example for a request that fails:
The OData response is parsed normally.
The following exception is thrown 'The context URL 'https://www.onenote.com/api/v1.0/$metadata#me/notes/classnotebooks('[guid]')/students('i%3A0%23.f%7Cmembership%7Cexample%40example.org')/members' is invalid.'
This is the main flow that cause this:
@OfirArviv: Thanks for the detailed message.