Comment out App type in SpecialConfigRequest.

This commit is contained in:
John Preston 2019-06-07 18:38:02 +03:00
parent 1225c9194a
commit ce760f0534
2 changed files with 9 additions and 9 deletions

View File

@ -217,7 +217,7 @@ SpecialConfigRequest::SpecialConfigRequest(
, _phone(phone) {
_manager.setProxy(QNetworkProxy::NoProxy);
_attempts = {
{ Type::App, qsl("software-download.microsoft.com") },
//{ Type::App, qsl("software-download.microsoft.com") },
};
for (const auto &domain : DnsDomains()) {
_attempts.push_back({ Type::Dns, domain });
@ -247,12 +247,12 @@ void SpecialConfigRequest::performRequest(const Attempt &attempt) {
url.setHost(attempt.domain);
auto request = QNetworkRequest();
switch (type) {
case Type::App: {
url.setPath(cTestMode()
? qsl("/testv2/config.txt")
: qsl("/prodv2/config.txt"));
request.setRawHeader("Host", "tcdnb.azureedge.net");
} break;
//case Type::App: {
// url.setPath(cTestMode()
// ? qsl("/testv2/config.txt")
// : qsl("/prodv2/config.txt"));
// request.setRawHeader("Host", "tcdnb.azureedge.net");
//} break;
case Type::Dns: {
url.setPath(qsl("/resolve"));
url.setQuery(qsl("name=%1&type=ANY&random_padding=%2"
@ -277,7 +277,7 @@ void SpecialConfigRequest::requestFinished(
not_null<QNetworkReply*> reply) {
const auto result = finalizeRequest(reply);
switch (type) {
case Type::App: handleResponse(result); break;
//case Type::App: handleResponse(result); break;
case Type::Dns: {
constexpr auto kTypeRestriction = 16; // TXT
handleResponse(ConcatenateDnsTxtFields(

View File

@ -35,7 +35,7 @@ public:
private:
enum class Type {
App,
//App,
Dns,
};
struct Attempt {