Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to Issue #541 #542

Closed
wants to merge 1 commit into from
Closed

Fix to Issue #541 #542

wants to merge 1 commit into from

Conversation

weiran-ms
Copy link

Issues

This pull request fixes issue #541

Description

There will be an assertion failure complaining "edit link must already be set to location header", if the location header in the OData response is an URI having no local path, e.g. https://graph.microsoft.com

Root cause:
if the location header in the OData response is an URI having no local path, e.g. https://graph.microsoft.com, it will be added a tailing slash automatically when converted to an Uri object (i.e. https://graph.microsoft.com/ ). therefore, it will always fail, when comparing the location string to an Uri.AbsoluteUri, because of an extra tailing slash.

Fix: Convert the location string to a Uri first, when comparing it to an Uri

Checklist (Uncheck if it is not completed)

  • [ x ] Test cases added
  • [ x ] 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.

There will be an assertion failure complaining "edit link must already be set to location header", if the location header in the OData response is an URI having no local path, e.g. https://graph.microsoft.com

Root cause:
if the location header in the OData response is an URI having no local path, e.g. https://graph.microsoft.com, it will be added a tailing slash automatically when converted to an Uri object (i.e. https://graph.microsoft.com/ ). therefore, it will always fail, when comparing the location string to an Uri.AbsoluteUri, because of an extra tailing slash.

Fix: Convert the location string to a Uri first, when comparing it to an Uri

There will be an assertion failure complaining "edit link must already be set to location header", if the location header in the OData response is an URI having no local path, e.g. https://graph.microsoft.com

Root cause:
 if the location header in the OData response is an URI having no local path, e.g. https://graph.microsoft.com, it will be added a tailing slash automatically when converted to an Uri object (i.e. https://graph.microsoft.com/ ). therefore, it will always fail, when comparing the location string to an Uri.AbsoluteUri, because of an extra tailing slash.

Fix: Convert the location string to a Uri first, when comparing it to an Uri
@msftclas
Copy link

Hi @weiran-ms, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, MSBOT;

@TomDu
Copy link
Contributor

TomDu commented May 24, 2016

Merged locally and added test cases, thanks a lot!

@TomDu TomDu closed this May 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants