TUriParser problem
| Wed, 2007-10-10 12:21 | |
|
Hi, I seem to have a problem using TUriParser. When passing a DNS name ie "http://www.example.com" it works correctly, This is what I do: _LIT(KAddress,"http://192.168.1.1");hostName only contains garbage. _LIT(KAddress,"http://www.example.com");hostName contains www.example.com |
|






Forum posts: 1242
I would try what happens with "http://192.168.1.1/" (adding a trailing slash). Maybe the URI parser needs that in case of an IP adress.
I could not find out whether that slash is formally needed, according to URI syntax definition, however.
René Brunner
Forum posts: 68
I found the problem, sorry I was an Idiot.
I didn't post the actual code I used, just something which I thought would reproduce the error. I'm sorry.
Any way the problem was that I used an RBuf which I manipulated and then passed to TUriParser, this worked fine, problem was after I passed it to TUriParser I closed the RBuf. TUriParser doesn't keep any copy of the data passed to it, therefore I got garbage.
It works with or without trailing slash.