开发者

Uri.IsWellFormedUriString allows http://http://<url>

This seems strange to me but I am sure there is an explanation

If I use Uri.IsWellFormedUriString passing in "http://http://www.google.com" it r开发者_如何学Goeturns true, I can only assume that this URI conforms to some RFC specification and is valid.

Most of my other tests indicate this method works in the manner in which I expect other than this one

Can anyone advise?


I checked the BNF for a URI in RFC 3296 and it does conform.

It conforms because following the first "http://" is a registry-based naming authority followed by an absolute path. "http:" conforms to the registry-based naming authority, and "//www.google.com" conforms to the absolute path.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜