Incorrect new Uri(base, relative) behaviour in .NET
Posted
by dr. evil
on Stack Overflow
See other posts from Stack Overflow
or by dr. evil
Published on 2010-01-08T13:56:18Z
Indexed on
2010/05/08
23:28 UTC
Read the original article
Hit count: 300
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?
© Stack Overflow or respective owner