odata.net
odata.net copied to clipboard
Fix relative context Uri resolution
Issues
This pull request fixes issue #1208.
Description
Fix error for relative context Uri resolution using the request uri passed in from the reader settings, applying similar logic from ODL-6.x branch.
Checklist (Uncheck if it is not completed)
- [x] Test cases added
- [ ] Build and test with one-click build and test script passed
Additional work necessary
If documentation update is needed, please add "Docs Needed" label to the issue and provide details about the required document change in the issue.
Does this fix the issue with OData Client? I don't see where RelativeUrl gets set in MessageWriterSettings.
Could it use BaseUri instead? #ByDesign
I believe the the ODataJsonLightContextUriParser.Parse() is invoked when client is reading the payload using reader settings. This change is to fix the issue of reading payload with relative url by, form example, OData Client; not the writing part. See above related to BaseUri vs. RequestUri.
In reply to: 406439921 [](ancestors = 406439921)
Sorry, I meant MessageReaderSettings.
How/where does RequestUri get set when using ODataClient to read a result with relative URLs?
In reply to: 406729387 [](ancestors = 406729387,406439921)
This fix appears to be specific to the contextUrl. how do we resolve relative urls in nextLinks, edit/readLinks, mediaLInks, relationshipLinks, etc.? #Resolved
See RelativeUriReaderTests.cs L249 as an example.
In reply to: 407874612 [](ancestors = 407874612,406729387,406439921)
This issue is for relative contextUrl only, not including other relative urls.
In reply to: 407879722 [](ancestors = 407879722)
@mikepizzo Please see replies above. Not sure why my replies to your comments seem to be dislocated on the web page. If you can open CodeFlow, you can see that they are aligned much better there. #Resolved
:clock1:
I'm also affected by this issue, is there any way I can help unblocking this pull request?
Anything we can help out on with this PR @mikepizzo?
Hi guys, I face the same issue, is there any progress? Thanks a lot!