From 7177cd4cc38bb73338631381b802a7f7f6845f62 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sat, 10 Oct 2015 16:13:20 +0000 Subject: SkypeWeb: removed persistent connection flag git-svn-id: http://svn.miranda-ng.org/main/trunk@15529 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/http_request.h | 8 +++----- protocols/SkypeWeb/src/requests/poll.h | 2 -- protocols/SkypeWeb/src/requests/trouter.h | 7 ++----- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/protocols/SkypeWeb/src/http_request.h b/protocols/SkypeWeb/src/http_request.h index a652f6ae90..90d552358c 100644 --- a/protocols/SkypeWeb/src/http_request.h +++ b/protocols/SkypeWeb/src/http_request.h @@ -223,13 +223,9 @@ protected: { va_list args; va_start(args, fmt); - if (url.Find('?') == -1) - url += '?'; - else - url += '&'; + url += (url.Find('?') == -1) ? '?' : '&'; url.AppendFormatV(fmt, args); va_end(args); - szUrl = url.GetBuffer(); } @@ -244,6 +240,7 @@ public: cbSize = sizeof(NETLIBHTTPREQUEST); flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_DUMPASTEXT; requestType = type; + pData = NULL; } HttpRequest(int type, HttpRequestUrlFormat, LPCSTR urlFormat, ...) @@ -253,6 +250,7 @@ public: flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_DUMPASTEXT; requestType = type; va_end(formatArgs); + pData = NULL; } ~HttpRequest() diff --git a/protocols/SkypeWeb/src/requests/poll.h b/protocols/SkypeWeb/src/requests/poll.h index 39e7cbd6c6..c2ae8c7f8d 100644 --- a/protocols/SkypeWeb/src/requests/poll.h +++ b/protocols/SkypeWeb/src/requests/poll.h @@ -25,9 +25,7 @@ public: HttpRequest(REQUEST_POST, FORMAT, "%s/v1/users/ME/endpoints/SELF/subscriptions/0/poll", li.endpoint.szServer) { timeout = 60000; - flags |= NLHRF_PERSISTENT; Headers - << CHAR_VALUE("Connection", "keep-alive") << CHAR_VALUE("Accept", "application/json, text/javascript") << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", li.endpoint.szToken); } diff --git a/protocols/SkypeWeb/src/requests/trouter.h b/protocols/SkypeWeb/src/requests/trouter.h index 0f8cd6e8d2..0a705eeafc 100644 --- a/protocols/SkypeWeb/src/requests/trouter.h +++ b/protocols/SkypeWeb/src/requests/trouter.h @@ -21,9 +21,7 @@ public: CreateTrouterRequest() : HttpRequest(REQUEST_POST, "go.trouter.io/v2/a") { - Headers - << CHAR_VALUE("Accept", "application/json, text/javascript, text/html,application/xhtml+xml, application/xml"); - //{"secure":true,"ccid":"huzHTfsZt3wZ","connId":"AUKRNgA8_eKV0Ibsx037Gbd8GVrsDg8zLQRt1pH8sCyIAile3gtoWmlq2x1yZ_VNZ3tf","healthUrl":"https://go.trouter.io:443/v2/h","id":"QpE2ADz94pXQhuzHTfsZt3wZ","instance":"193.149.88.131","instancePort":443,"socketio":"https://193-149-88-131.drip.trouter.io:443/","surl":"https://193-149-88-131.drip.trouter.io:8443/v2/f/QpE2ADz94pXQhuzHTfsZt3wZ/","url":"https://193-149-88-131.drip.trouter.io:443/v2/f/QpE2ADz94pXQhuzHTfsZt3wZ/"} + Headers << CHAR_VALUE("Accept", "application/json, text/javascript, text/html,application/xhtml+xml, application/xml"); } }; @@ -133,8 +131,7 @@ public: const std::string &instance, const std::string &ccid, const std::string &sessId) : HttpRequest(REQUEST_GET, FORMAT, "%ssocket.io/1/xhr-polling/%s", socketio.c_str(), sessId.c_str()) { - timeout = INFINITE; - flags |= NLHRF_PERSISTENT; + timeout = 60000; Url << CHAR_VALUE("sr", sr.c_str()) << CHAR_VALUE("issuer", "edf") -- cgit v1.2.3