diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-03-08 17:46:43 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-03-08 17:46:43 +0100 |
commit | f8ebb9374aafc790eb899ebef23f3c8e1e620184 (patch) | |
tree | 4bcfb8194347f192a209849a25b7758f8dde677b /apt-pkg/contrib | |
parent | a536b36571406f1be39a040a25dee4d9cb96bdd6 (diff) | |
parent | b8c42fc0632dbbe0edb0854cd941a8fc5340a94a (diff) |
merged from the mvo branch
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r-- | apt-pkg/contrib/strutl.cc | 12 | ||||
-rw-r--r-- | apt-pkg/contrib/strutl.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index 2913fbf44..8e8820949 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -1323,3 +1323,15 @@ string URI::SiteOnly(const string &URI) return U; } /*}}}*/ +// URI::NoUserPassword - Return the schema, site and path for the URI /*{{{*/ +// --------------------------------------------------------------------- +/* */ +string URI::NoUserPassword(const string &URI) +{ + ::URI U(URI); + U.User.clear(); + U.Password.clear(); + U.Port = 0; + return U; +} + /*}}}*/ diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h index 2b2e147fb..a1e7f3934 100644 --- a/apt-pkg/contrib/strutl.h +++ b/apt-pkg/contrib/strutl.h @@ -120,6 +120,7 @@ class URI inline void operator =(const string &From) {CopyFrom(From);}; inline bool empty() {return Access.empty();}; static string SiteOnly(const string &URI); + static string NoUserPassword(const string &URI); URI(string Path) {CopyFrom(Path);}; URI() : Port(0) {}; |