diff options
Diffstat (limited to 'src/unstable/url.cpp')
-rw-r--r-- | src/unstable/url.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/unstable/url.cpp b/src/unstable/url.cpp index f51f381..8106ce7 100644 --- a/src/unstable/url.cpp +++ b/src/unstable/url.cpp | |||
@@ -123,12 +123,14 @@ void Bu::Url::setProtocol( const Bu::String &sNewProto, bool bAutoSetPort ) | |||
123 | 123 | ||
124 | void Bu::Url::parseUserPass( Bu::String::const_iterator &i ) | 124 | void Bu::Url::parseUserPass( Bu::String::const_iterator &i ) |
125 | { | 125 | { |
126 | Bu::String::const_iterator s = i.find('@'); | 126 | Bu::String::const_iterator s; |
127 | if( !s ) | 127 | for( s = i; s && *s != '/' && *s != '@'; s++ ) { } |
128 | if( !s || *s == '/') | ||
128 | return; | 129 | return; |
129 | 130 | ||
130 | Bu::String::const_iterator p = i.find(':'); | 131 | Bu::String::const_iterator p; |
131 | if( p ) | 132 | for( p = i.find(':'); p && *p != '/' && *p != ':'; p++ ) { } |
133 | if( p && *p == ':' ) | ||
132 | { | 134 | { |
133 | sUser.set( i, p ); | 135 | sUser.set( i, p ); |
134 | sPass.set( p+1, s ); | 136 | sPass.set( p+1, s ); |