GNOME Bugzilla – Bug 594596
Fails to parse URI with trailing whitespace
Last modified: 2009-12-19 14:43:30 UTC
soup_uri_new will fail parsing "http://192.168.0.1:901 ". Note the space at the end, and the presence of a port. If there's no port ("http://192.168.0.1 ") it will work fine. I guess the obvious fix is to strip all whitespace before parsing...
Created attachment 142764 [details] [review] strip.patch So... like this. dupping the string sucks though, so it might be better to fix the parsing logic to do the right thing. I'd still change all the 'soup_uri_free (uri); return NULL' stuff to just do a goto though :)
*** This bug has been marked as a duplicate of bug 590524 ***