From: mo@ilaven.net Date: Thu, 11 Dec 2008 00:32:00 +0000 (+0000) Subject: Fix mis-parsing of local file:/// IRIs. X-Git-Tag: upstream/1.1~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5a61a852019ea9b6e38dc5eec6692368bcb9d530;p=platform%2Fupstream%2Flibiri.git Fix mis-parsing of local file:/// IRIs. git-svn-id: http://libiri.googlecode.com/svn/trunk@7 68b1170a-6346-0410-b79c-01ab32b2924b --- diff --git a/libiri/parse.c b/libiri/parse.c index 368e841..2213afd 100644 --- a/libiri/parse.c +++ b/libiri/parse.c @@ -146,12 +146,13 @@ iri_parse(const char *src) bufp++; src++; /* src[0-1] SHOULD == '/' */ - for(; *src == '/'; src++); + if(src[0] == '/') src++; + if(src[0] == '/') src++; } else if(colon && at && colon < at) { /* This could be scheme://user[;auth][:password]@host or [scheme:]user[;auth][:password]@host (urgh) */ - if(colon[1] == '/') + if(colon[1] == '/' && colon[2] != '/') { p->iri.scheme = bufp; while(*src && *src != ':')