diff options
Diffstat (limited to 'protocols/VKontakte/src/vk_queue.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_queue.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/protocols/VKontakte/src/vk_queue.cpp b/protocols/VKontakte/src/vk_queue.cpp index e81bc61b0c..0e204109f2 100644 --- a/protocols/VKontakte/src/vk_queue.cpp +++ b/protocols/VKontakte/src/vk_queue.cpp @@ -72,21 +72,22 @@ bool CVkProto::PushAsyncHttpRequest(int iRequestType, LPCSTR szUrl, bool bSecure pReq->flags |= NLHRF_SSL;
CMStringA url;
- if (nParams > 0) {
+ if (*szUrl == '/') {
url = VK_API_URL;
url += szUrl;
- for (int i=0; i < nParams; i++) {
- url.AppendChar((i == 0) ? '?' : '&');
- url += pParams[i].szName;
- url.AppendChar('=');
- url += ptrA( mir_urlEncode(pParams[i].szValue));
- }
pReq->nlc = m_hNetlibConn;
}
else {
url = szUrl;
pReq->flags |= NLHRF_REMOVEHOST | NLHRF_SMARTREMOVEHOST;
}
+
+ for (int i=0; i < nParams; i++) {
+ url.AppendChar((i == 0) ? '?' : '&');
+ url += pParams[i].szName;
+ url.AppendChar('=');
+ url += ptrA( mir_urlEncode(pParams[i].szValue));
+ }
pReq->requestType = iRequestType;
pReq->szUrl = mir_strdup(url);
|