odata.net icon indicating copy to clipboard operation
odata.net copied to clipboard

Fix relative context Uri resolution

Open biaol-odata opened this issue 7 years ago • 11 comments

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.

biaol-odata avatar Jul 13 '18 00:07 biaol-odata

Does this fix the issue with OData Client? I don't see where RelativeUrl gets set in MessageWriterSettings.

Could it use BaseUri instead? #ByDesign

mikepizzo avatar Jul 19 '18 23:07 mikepizzo

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)

biaol-odata avatar Jul 20 '18 21:07 biaol-odata

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)

mikepizzo avatar Jul 25 '18 19:07 mikepizzo

This fix appears to be specific to the contextUrl. how do we resolve relative urls in nextLinks, edit/readLinks, mediaLInks, relationshipLinks, etc.? #Resolved

mikepizzo avatar Jul 25 '18 20:07 mikepizzo

See RelativeUriReaderTests.cs L249 as an example.


In reply to: 407874612 [](ancestors = 407874612,406729387,406439921)

biaol-odata avatar Jul 25 '18 21:07 biaol-odata

This issue is for relative contextUrl only, not including other relative urls.


In reply to: 407879722 [](ancestors = 407879722)

biaol-odata avatar Jul 25 '18 21:07 biaol-odata

@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

biaol-odata avatar Jul 25 '18 21:07 biaol-odata

:clock1:

biaol-odata avatar Aug 30 '18 22:08 biaol-odata

I'm also affected by this issue, is there any way I can help unblocking this pull request?

nils avatar Jun 17 '19 09:06 nils

Anything we can help out on with this PR @mikepizzo?

Tiberriver256 avatar Jan 07 '21 13:01 Tiberriver256

Hi guys, I face the same issue, is there any progress? Thanks a lot!

ruza-kavanka avatar Nov 25 '21 11:11 ruza-kavanka