diff options
author | George Hazan <ghazan@miranda.im> | 2019-09-25 21:05:40 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-09-25 21:05:40 +0300 |
commit | 8d4b9124e2350840c22254b81b4f8a1e3571205a (patch) | |
tree | 04ee6185ce8d7740cbcaf605abba7e1404deb9d1 /protocols/SkypeWeb | |
parent | 484b5c4e8cd2d8591273a06cfde1d73dcdda00d2 (diff) |
fixes #2071 (SkypeWeb: failed file sending)
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r-- | protocols/SkypeWeb/src/requests/asm/files.h | 3 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_events.cpp | 1 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_files.cpp | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/protocols/SkypeWeb/src/requests/asm/files.h b/protocols/SkypeWeb/src/requests/asm/files.h index 6400e2a8db..c5bcf7373a 100644 --- a/protocols/SkypeWeb/src/requests/asm/files.h +++ b/protocols/SkypeWeb/src/requests/asm/files.h @@ -9,7 +9,8 @@ public: flags &= (~NLHRF_DUMPASTEXT);
Headers
<< FORMAT_VALUE("Authorization", "skype_token %s", ppro->m_szApiToken.get())
- << CHAR_VALUE("Content-Type", "text/json");
+ << CHAR_VALUE("Content-Type", "text/json")
+ << CHAR_VALUE("X-Client-Version", "0/0.0.0.0");
JSONNode node, jPermissions, jPermission(JSON_ARRAY);
jPermissions.set_name("permissions");
diff --git a/protocols/SkypeWeb/src/skype_events.cpp b/protocols/SkypeWeb/src/skype_events.cpp index a9547b872e..2b96c87208 100644 --- a/protocols/SkypeWeb/src/skype_events.cpp +++ b/protocols/SkypeWeb/src/skype_events.cpp @@ -99,6 +99,7 @@ INT_PTR CSkypeProto::GetEventText(WPARAM pEvent, LPARAM datatype) if (0 != doc.Parse((char*)dbei->pBlob))
break;
+ szText.Empty();
if (auto *pRoot = doc.FirstChildElement("URIObject"))
if (auto *xmlA = pRoot->FirstChildElement("a"))
szText += xmlA->Attribute("href");
diff --git a/protocols/SkypeWeb/src/skype_files.cpp b/protocols/SkypeWeb/src/skype_files.cpp index 4c35337e6f..c6ad5743d7 100644 --- a/protocols/SkypeWeb/src/skype_files.cpp +++ b/protocols/SkypeWeb/src/skype_files.cpp @@ -38,7 +38,7 @@ LBL_Error: return;
}
- if (response->resultCode != 200) {
+ if (response->resultCode != 200 && response->resultCode != 201) {
debugLogA("Object creation failed with error code %d", response->resultCode);
goto LBL_Error;
}
|