summaryrefslogtreecommitdiff
path: root/protocols/Omegle
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2017-08-20 15:09:00 +0200
committerRobert Pösel <robyer@seznam.cz>2017-08-20 15:09:00 +0200
commit1fc547a695b5b8d5a9e6a90554b0a617209a784c (patch)
tree1516c54afdee07c810752c3ef7fb4790f7aadce8 /protocols/Omegle
parent4d113e5efe56850e90ed302244a8803f87e72418 (diff)
Omegle: Fix getting garbage response when server is down
Diffstat (limited to 'protocols/Omegle')
-rw-r--r--protocols/Omegle/src/communication.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/protocols/Omegle/src/communication.cpp b/protocols/Omegle/src/communication.cpp
index efcc37271a..5eaadc8ef5 100644
--- a/protocols/Omegle/src/communication.cpp
+++ b/protocols/Omegle/src/communication.cpp
@@ -107,6 +107,11 @@ http::response Omegle_client::flap(const int request_type, std::string *post_dat
resp.code = pnlhr->resultCode;
resp.data = pnlhr->pData ? pnlhr->pData : "";
+ // This error code gives us some error page, but we don't need that, so clear the response
+ if (pnlhr->resultCode == HTTP_CODE_WEB_SERVER_IS_DOWN) {
+ resp.data = "";
+ }
+
parent->debugLogA("&&&&& Got response: %s", resp.data.c_str());
Netlib_FreeHttpRequest(pnlhr);