When you create a new Uri like this:
New Uri(New Uri("http://example.com/test.php"),"?x=y")
it returns:
http://example.com/?x=y
It was supposed to return:
http://example.com/test.php?x=y
according to the every major browser out there (I'm not quite sure what RFC says though).
Is this is a bug or is there any other function out there which behaves correctly, also what's the best way to fix it without reinventing the wheel?
Yes, it looks like a bug to me. In particular, I would suggest that when you report this on Connect you refer to RFC 1808, in particular section 4 step 5, and section 5.1 with this example:
Base: http://a/b/c/d;p?q#f
Relative: ?y
Absolute: http://a/b/c/d;p?y
Not sure about the best way to fix it, I'm afraid :(
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With