summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-09-17 11:52:40 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-09-17 18:01:27 (GMT)
commitd1aaf7fc9b9da32f04f84eef06bc0ee731e79223 (patch)
tree14ecd64cfd4b44e2664170983a5a0fefc47a03fd /Swiften/Base/URL.h
parent3d6aa3b50090c19b50ae488494f1459bade88da3 (diff)
downloadswift-contrib-d1aaf7fc9b9da32f04f84eef06bc0ee731e79223.zip
swift-contrib-d1aaf7fc9b9da32f04f84eef06bc0ee731e79223.tar.bz2
Fixed URL parsing/serializing.
Resolves: #1157,#1158
Diffstat (limited to 'Swiften/Base/URL.h')
-rw-r--r--Swiften/Base/URL.h22
1 files changed, 1 insertions, 21 deletions
diff --git a/Swiften/Base/URL.h b/Swiften/Base/URL.h
index 00d58f1..75cf1a6 100644
--- a/Swiften/Base/URL.h
+++ b/Swiften/Base/URL.h
@@ -60,27 +60,7 @@ class SWIFTEN_API URL {
return path;
}
- const std::string toString() const {
- if (empty) {
- return "";
- }
- std::string result = scheme + "://";
- if (!user.empty()) {
- result += user;
- if (!password.empty()) {
- result += ":" + password;
- }
- result += "@";
- }
- result += host;
- if (port > 0) {
- result += ":";
- result += boost::lexical_cast<std::string>(port);
- }
- result += "/";
- result += path;
- return result;
- }
+ std::string toString() const;
static int getPortOrDefaultPort(const URL& url);
static URL fromString(const std::string&);