From 1fc547a695b5b8d5a9e6a90554b0a617209a784c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sun, 20 Aug 2017 15:09:00 +0200 Subject: Omegle: Fix getting garbage response when server is down --- protocols/Omegle/src/communication.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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); -- cgit v1.2.3