Skip to content

Commit

Permalink
bugfix: "error 0" is shown sometimes instead of the actual HTTP statu…
Browse files Browse the repository at this point in the history
…s code
  • Loading branch information
tim-lebedkov committed Feb 3, 2016
1 parent 89c3d61 commit c044509
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions wpmcpp/src/downloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,14 @@ int64_t Downloader::downloadWin(Job* job, const Request& request,
//qDebug() << callNumber << r << dwStatus << url.toString();

if (r == ERROR_SUCCESS) {
QString errMsg;
WPMUtils::formatMessage(sendRequestError, &errMsg);
job->setErrorMessage(errMsg);
if (sendRequestError) {
QString errMsg;
WPMUtils::formatMessage(sendRequestError, &errMsg);
job->setErrorMessage(errMsg);
} else {
job->setErrorMessage(QString(
QObject::tr("HTTP status code %1")).arg(dwStatus));
}
} else if (r == ERROR_INTERNET_FORCE_RETRY) {
// nothing
} else if (r == ERROR_CANCELLED) {
Expand Down

0 comments on commit c044509

Please sign in to comment.