From a075dcde45af2b93230a7b8028e4cbd22adf4dbc Mon Sep 17 00:00:00 2001 From: Daniel Larimer Date: Sun, 3 Feb 2013 21:08:42 -0500 Subject: [PATCH] fix url parsing to pickup protocol --- src/url.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/url.cpp b/src/url.cpp index 9fa61ec..54ebf6e 100644 --- a/src/url.cpp +++ b/src/url.cpp @@ -52,10 +52,11 @@ namespace fc { */ url& url::from_string( const string& s ) { fc::stringstream ss(s); - fc::string _proto,skip,_user,_pass,_host,_port,_path,_args; - fc::getline( ss, _proto, ':' ); + fc::string skip,_user,_pass,_host,_port,_path,_args; + fc::getline( ss, proto, ':' ); fc::getline( ss, skip, '/' ); fc::getline( ss, skip, '/' ); + if( s.find('@') != fc::string::npos ) { fc::string user_pass; fc::getline( ss, user_pass, '@' );