diff options
Diffstat (limited to '')
-rw-r--r-- | src/url.cpp | 29 |
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 | ||
238 | Bu::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 | |||
261 | Bu::FString Bu::Url::getUrl() const | ||
262 | { | ||
263 | Bu::FString sBuf = sProtocol + "://" + sHost + getFullPath(); | ||
264 | return sBuf; | ||
265 | } | ||
266 | |||