aboutsummaryrefslogtreecommitdiff
path: root/src/url.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-02-24 00:06:16 +0000
committerMike Buland <eichlan@xagasoft.com>2009-02-24 00:06:16 +0000
commitef2935347099967cc7092fa7f472d91d51571468 (patch)
treeabf0c041a31610fa7f8fb562c3c36a8277c438d2 /src/url.cpp
parent4309066dff46f52690998bbd1f60ec8b1631f142 (diff)
downloadlibbu++-ef2935347099967cc7092fa7f472d91d51571468.tar.gz
libbu++-ef2935347099967cc7092fa7f472d91d51571468.tar.bz2
libbu++-ef2935347099967cc7092fa7f472d91d51571468.tar.xz
libbu++-ef2935347099967cc7092fa7f472d91d51571468.zip
Whoa, lots of updates. Md5 is more general, nids, cache, cachestore, and
cachestorenids all support synchronizing now. Url is pretty much done.
Diffstat (limited to '')
-rw-r--r--src/url.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/url.cpp b/src/url.cpp
index 7cc4263..e4d2f55 100644
--- a/src/url.cpp
+++ b/src/url.cpp
@@ -235,3 +235,32 @@ void Bu::Url::clear()
235 iPort.clear(); 235 iPort.clear();
236} 236}
237 237
238Bu::FString Bu::Url::getFullPath() const
239{
240 Bu::FString sBuf = sPath;
241 if( !lParam.isEmpty() )
242 {
243 for( ParamList::const_iterator i = lParam.begin(); i; i++ )
244 {
245 if( i == lParam.begin() )
246 sBuf += "?";
247 else
248 sBuf += "&";
249
250 sBuf += encode( (*i).sName );
251 if( !(*i).sValue.isEmpty() )
252 {
253 sBuf += "=" + encode( (*i).sValue );
254 }
255 }
256 }
257
258 return sBuf;
259}
260
261Bu::FString Bu::Url::getUrl() const
262{
263 Bu::FString sBuf = sProtocol + "://" + sHost + getFullPath();
264 return sBuf;
265}
266