justcoding121 / titanium-web-proxy

A cross-platform asynchronous HTTP(S) proxy server in C#.
MIT License
1.93k stars 618 forks source link

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

Closed keyoti closed 4 years ago

keyoti commented 4 years ago

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:

honfika commented 4 years ago

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: https://github.com/justcoding121/Titanium-Web-Proxy/issues/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 commented 4 years ago

Yes, I think OriginalString is safest.

honfika commented 4 years ago

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