Comment 4 for bug 1409995

Revision history for this message
Michi Henning (michihenning) wrote :

I'm not sure whether this is related. But, looking at this:

void HttpClientQtThread::run()
{
    QNetworkAccessManager* manager = new QNetworkAccessManager();

    QNetworkRequest request(url_);
    for (auto const& hdr: headers_)
    {
        request.setRawHeader(QString::fromStdString(hdr.first).toUtf8(), QString::fromStdString(hdr.second).toUtf8());
    }

    QNetworkReply* reply = manager->get(request);
    reply->setReadBufferSize(0); // unlimited buffer

The reply is being used without checking that it was created succesfully. Shouldn't there be a call to error here? Something like

if (reply->error() != QNetworkReply::NoError)