Skip to content
This repository was archived by the owner on Jul 9, 2023. It is now read-only.

If the RequestUri in Http.Request is set with an escaped URI then the… #806

Conversation

keyoti
Copy link
Contributor

@keyoti keyoti commented Oct 19, 2020

If the RequestUri in Http.Request is set with an escaped URI then the backing string 'Url' will get an unescaped URI, which is incorrect.

Doneness:

  • Build is okay - I made sure that this change is building successfully.
  • No Bugs - I made sure that this change is working properly as expected. It doesn't have any bugs that you are aware of.
  • Branching - If this is not a hotfix, I am making this request against the master branch

… backing string 'Url' will get an unescaped URI, which is incorrect.
@honfika
Copy link
Collaborator

honfika commented Oct 20, 2020

But this is wrong in the another direction.

What do you think about Uri.OriginalString?

kép

The escaping was a problem for a user in the following issue: #596
(however not in this RequestUri setter)... so I think it should not escape the given url. (but also should not unescape as you notice corretly)

@keyoti
Copy link
Contributor Author

keyoti commented Oct 20, 2020

Yes, I think OriginalString is safest.

honfika added a commit that referenced this pull request Nov 9, 2020
@honfika
Copy link
Collaborator

honfika commented Nov 9, 2020

OriginalString was added, so I close this PR... Thank you.

@honfika honfika closed this Nov 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants