From 99bafe0aac9ba01bf990de4cbf53b1d970f8bfbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Wed, 14 Nov 2012 09:42:36 +0000 Subject: [PATCH] moved more to qbrowserlib, added download manager functions; refs #167 --- src/browser.hxx | 25 +- src/downloadmanager.hxx | 304 ------------------------- src/errorlog.hxx | 42 ---- src/qbrowserlib/downloadmanager.hxx | 341 ++++++++++++++++++++++++++++ src/qbrowserlib/errorlog.hxx | 59 +++++ src/{ => qbrowserlib}/errorlog.ui | 0 src/qbrowserlib/qbrowserlib_de.ts | 138 ++++++++++- src/qbrowserlib/qbrowserlib_en.ts | 138 ++++++++++- src/qbrowserlib/qbrowserlib_fr.ts | 138 ++++++++++- src/qbrowserlib/qbrowserlib_it.ts | 138 ++++++++++- src/qbrowserlib/qmake.pro.in | 6 +- src/qbrowserlib/swisswebwidget.hxx | 103 ++++++++- src/qmake.pro.in | 6 +- src/swissbrowser_de.ts | 110 --------- src/swissbrowser_en.ts | 110 --------- src/swissbrowser_fr.ts | 110 --------- src/swissbrowser_it.ts | 110 --------- 17 files changed, 1066 insertions(+), 812 deletions(-) delete mode 100644 src/downloadmanager.hxx delete mode 100644 src/errorlog.hxx create mode 100644 src/qbrowserlib/downloadmanager.hxx create mode 100644 src/qbrowserlib/errorlog.hxx rename src/{ => qbrowserlib}/errorlog.ui (100%) diff --git a/src/browser.hxx b/src/browser.hxx index 4b57c66..e2348c0 100644 --- a/src/browser.hxx +++ b/src/browser.hxx @@ -11,8 +11,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -67,8 +67,8 @@ class Browser: public QMainWindow, protected Ui::Browser { QString bookmarkfile=QString()): _url(0), _find(new qbrowserlib::ButtonLineEdit), _kiosk(kiosk), - _downloadManager(new DownloadManager), - _errorLog(this), _logincertificate(this), + _downloadManager(new qbrowserlib::DownloadManager), + _logincertificate(this), _proxy("http://swisssign.com", this), _showErrorLog(0), _startUrl(urls.size()), @@ -77,6 +77,7 @@ class Browser: public QMainWindow, protected Ui::Browser { _bookmarkfile(bookmarkfile) { TRC; LOG<addAction(actionAddBookmark); _toolbar->addAction(actionHome); } - assert(connect(&_errorLog, SIGNAL(reset()), SLOT(errorReset()))); + (*_downloadManager)+=&_networkManager; + assert(connect(&qbrowserlib::ErrorLog::instance(), + SIGNAL(reset()), SLOT(errorReset()))); assert(connect(&_networkManager, SIGNAL(finished(QNetworkReply*)), SLOT(finished(QNetworkReply*)))); - assert(connect(&_networkManager, SIGNAL(created(QNetworkReply*)), - _downloadManager.data(), SLOT(add(QNetworkReply*)))); assert(connect(_downloadManager.data(), SIGNAL(progress(qint64, qint64)), SLOT(progress(qint64, qint64)))); assert(connect(_downloadManager.data(), SIGNAL(started()), @@ -828,7 +829,7 @@ class Browser: public QMainWindow, protected Ui::Browser { } void on_actionErrorLog_triggered() { - _errorLog.show(); + qbrowserlib::ErrorLog::instance().show(); } void on_actionAbout_triggered() { @@ -1445,7 +1446,8 @@ class Browser: public QMainWindow, protected Ui::Browser { TRC; if (r->error()!=QNetworkReply::NoError && r->error()!=QNetworkReply::OperationCanceledError) { - statusBar()->showMessage(DownloadManager::networkError(r->error())); + statusBar()->showMessage + (qbrowserlib::DownloadManager::networkError(r->error())); badUrl(); if (!_showErrorLog) { statusBar()->addPermanentWidget @@ -1484,7 +1486,7 @@ class Browser: public QMainWindow, protected Ui::Browser { } void downloadError(QString error) { - _errorLog.append(error); + qbrowserlib::ErrorLog::instance().append(error); } //@} @@ -1534,8 +1536,7 @@ class Browser: public QMainWindow, protected Ui::Browser { bool _kiosk; QPrinter _printer; SslClientAuthNetworkAccessManager _networkManager; - QSharedPointer _downloadManager; - ErrorLog _errorLog; + QSharedPointer _downloadManager; LoginCertificate _logincertificate; gui::Proxy _proxy; QPushButton* _showErrorLog; diff --git a/src/downloadmanager.hxx b/src/downloadmanager.hxx deleted file mode 100644 index 9516b2d..0000000 --- a/src/downloadmanager.hxx +++ /dev/null @@ -1,304 +0,0 @@ -/*! @file - - @id $Id$ -*/ -// 1 2 3 4 5 6 7 8 -// 45678901234567890123456789012345678901234567890123456789012345678901234567890 - -#ifndef __DOWNLOAD_MANAGER_HXX -#define __DOWNLOAD_MANAGER_HXX - -#include -#include -#include -#include -#include - -#include - -class DownloadManager: public QObject { - Q_OBJECT; - public: - - DownloadManager& operator+=(QNetworkReply* reply) { - TRC; - add(reply); - return *this; - } - - static QString networkError(QNetworkReply::NetworkError err) { - TRC_FN; LOG<url().toString(); - LOG<&)), - SLOT(sslErrors(const QList&)))); - assert(connect(reply, SIGNAL(uploadProgress(qint64, qint64)), - SLOT(uploadProgress(qint64, qint64)))); - if (_downloads.size()==1) started(); - } - - void abort() { - while (_downloads.size()) _downloads.begin()->first->abort(); - } - - private: - - void calcProgress() { - //TRC; - qint64 done(0); - qint64 total(0); - for (Downloads::iterator it(_downloads.begin()); - it!=_downloads.end(); ++it) { - done += it->second.progress.first; - total += it->second.progress.second; - } - progress(done, total); - } - - private Q_SLOTS: - - void downloadProgress(qint64 bytesReceived, qint64 bytesTotal) { - //TRC; LOG<(sender())].progress.first - = bytesReceived; - _downloads[qobject_cast(sender())].progress.second - = bytesTotal; - calcProgress(); - } - void error(QNetworkReply::NetworkError code) { - TRC; LOG<<"Status:"<(sender())); - _downloads[reply].error += - tr("

Network Error

" - "
URL:
%1
" - "
Error Code:
%3
" - "
Error Details:
%2
") - .arg(reply->url().toString()) - .arg(networkError(code)) - .arg(code); - } - void slotDestroyed(QObject* obj) { - TRC; LOG<<_downloads.size(); - _downloads.erase((QNetworkReply*)obj); - } - void slotFinished() { - TRC; LOG<<_downloads.size(); - QNetworkReply* reply(qobject_cast(sender())); - if (_downloads[reply].error.size()) - error(_downloads[reply].error); - _downloads.erase(reply); - if (_downloads.size()==0) finished(); - } - void slotMetaDataChanged() { - TRC; - QNetworkReply* reply(qobject_cast(sender())); - if (!reply) return; - LOG<<"Location:"<header(QNetworkRequest::LocationHeader) - .toString(); - LOG<<"Content-Type:"<header(QNetworkRequest::ContentTypeHeader) - .toString(); - LOG<<"Content-Disposition:"<rawHeader("Content-Disposition"); - LOG<<"Status:"<error()); - LOG<<"URL:"<url().toString(); - LOG<<"File:"<url().toLocalFile(); - LOG<<"Path:"<url().path(); - metaDataChanged(reply); - } - void sslErrors(const QList & errors) { - TRC; - QNetworkReply* reply(qobject_cast(sender())); - for (QList::const_iterator err(errors.begin()); - err!=errors.end(); ++err) { - LOG<<"SSL-Error: "<<(int)err->error()<<": "<errorString(); - LOG<<"Certificate Issuer: " - <<"O="<certificate().issuerInfo(QSslCertificate::Organization) - <<"CN="<certificate().issuerInfo(QSslCertificate::CommonName) - <<"L="<certificate().issuerInfo(QSslCertificate::LocalityName) - <<"OU="<certificate().issuerInfo(QSslCertificate::OrganizationalUnitName) - <<"C="<certificate().issuerInfo(QSslCertificate::CountryName) - <<"ST="<certificate().issuerInfo(QSslCertificate::StateOrProvinceName); - LOG<<"Certificate Subject: " - <<"O="<certificate().subjectInfo(QSslCertificate::Organization) - <<"CN="<certificate().subjectInfo(QSslCertificate::CommonName) - <<"L="<certificate().subjectInfo(QSslCertificate::LocalityName) - <<"OU="<certificate().subjectInfo(QSslCertificate::OrganizationalUnitName) - <<"C="<certificate().subjectInfo(QSslCertificate::CountryName) - <<"ST="<certificate().subjectInfo(QSslCertificate::StateOrProvinceName); - LOG<<"Certificate:\n"<certificate().toPem(); - switch (err->error()) { - case QSslError::SelfSignedCertificate: - case QSslError::SelfSignedCertificateInChain: { - QSslConfiguration sslConfig - (QSslConfiguration::defaultConfiguration()); - QList certs(sslConfig.caCertificates()); - for (QList::iterator cert(certs.begin()); - cert!=certs.end(); ++cert) { - if (err->certificate().subjectInfo(QSslCertificate::CommonName) == - cert->subjectInfo(QSslCertificate::CommonName)) { - LOG<<"Found matching CN:" - <subjectInfo(QSslCertificate::CommonName); - if (err->certificate()==*cert) { - LOG<<"QT-BUG! Certificate matches known certificate"; - //! @bug work around qt bug (Qt Mac 4.8.2) - reply->ignoreSslErrors(errors); - } else { - LOG<<"CERTIFICATE ERROR! Certificates are different"; - } - } - } - } break; - default:; // ignore - } - _downloads[reply].error += - tr("

SSL Error

" - "
URL:
%1
" - "
Error Code:
%3
" - "
Error Details:
%2
" - "" - "" - "" - "" - "" - "" - "" - "" - "
Certificate Issuer
Organization:%4
Common Name:%5
Location:%6
Organizational Unit:%7
Country:%8
State or Provive:%9
" - "" - "" - "" - "" - "" - "" - "" - "" - "
Certificate Subject
Organization:%10
Common Name:%11
Location:%12
Organizational Unit:%13
Country:%14
State or Province:%15
") - .arg(reply->url().toString()) - .arg(err->errorString()) - .arg(err->error()) - .arg(err->certificate().issuerInfo(QSslCertificate::Organization)) - .arg(err->certificate().issuerInfo(QSslCertificate::CommonName)) - .arg(err->certificate().issuerInfo(QSslCertificate::LocalityName)) - .arg(err->certificate().issuerInfo(QSslCertificate::OrganizationalUnitName)) - .arg(err->certificate().issuerInfo(QSslCertificate::CountryName)) - .arg(err->certificate().issuerInfo(QSslCertificate::StateOrProvinceName)) - .arg(err->certificate().subjectInfo(QSslCertificate::Organization)) - .arg(err->certificate().subjectInfo(QSslCertificate::CommonName)) - .arg(err->certificate().subjectInfo(QSslCertificate::LocalityName)) - .arg(err->certificate().subjectInfo(QSslCertificate::OrganizationalUnitName)) - .arg(err->certificate().subjectInfo(QSslCertificate::CountryName)) - .arg(err->certificate().subjectInfo(QSslCertificate::StateOrProvinceName)); - } - } - - void uploadProgress(qint64 bytesSent, qint64 bytesTotal) { - //TRC; LOG<(sender())].progress.first - = bytesSent; - _downloads[qobject_cast(sender())].progress.second - = bytesTotal; - calcProgress(); - } - - private: - - typedef std::pair Progress; - struct Download { - Progress progress; - QString error; - }; - typedef std::map Downloads; - - Downloads _downloads; -}; -#endif diff --git a/src/errorlog.hxx b/src/errorlog.hxx deleted file mode 100644 index 99cc94c..0000000 --- a/src/errorlog.hxx +++ /dev/null @@ -1,42 +0,0 @@ -/*! @file - - @id $Id$ -*/ -// 1 2 3 4 5 6 7 8 -// 45678901234567890123456789012345678901234567890123456789012345678901234567890 - -#ifndef ERRORLOG_HXX -#define ERRORLOG_HXX - -#include -#include -#include - -class ErrorLog: public QDialog, protected Ui::ErrorLog { - public: - Q_OBJECT; - Q_SIGNALS: - void reset(); - public: - ErrorLog(QWidget* p): QDialog(p) { - TRC; - setupUi(this); - } - void append(QString text) { - TRC; LOG<append(text); - } - protected Q_SLOTS: - void on__buttons_clicked(QAbstractButton* button) { - TRC; - switch (_buttons->buttonRole(button)) { - case QDialogButtonBox::ResetRole: { - _errors->clear(); - reset(); - } break; - default:; - } - } -}; - -#endif diff --git a/src/qbrowserlib/downloadmanager.hxx b/src/qbrowserlib/downloadmanager.hxx new file mode 100644 index 0000000..bda71c5 --- /dev/null +++ b/src/qbrowserlib/downloadmanager.hxx @@ -0,0 +1,341 @@ +/*! @file + + @id $Id$ +*/ +// 1 2 3 4 5 6 7 8 +// 45678901234567890123456789012345678901234567890123456789012345678901234567890 + +#ifndef __DOWNLOAD_MANAGER_HXX +#define __DOWNLOAD_MANAGER_HXX + +#include +#include +#include +#include +#include + +#include + +//! @addtogroup qbrowserlib +//! @{ +namespace qbrowserlib { + + class DownloadManager: public QObject { + + Q_OBJECT; + + public: + + //! Append a Network Manager + DownloadManager& operator+=(QNetworkAccessManager* n) { + TRC; + assert(connect(n, SIGNAL(created(QNetworkReply*)), + SLOT(add(QNetworkReply*)))); + return *this; + } + + //! Append a Network Reply + DownloadManager& operator+=(QNetworkReply* reply) { + TRC; + add(reply); + return *this; + } + + static QString networkError(QNetworkReply::NetworkError err) { + TRC_FN; LOG<url().toString(); + LOG<&)), + SLOT(sslErrors(const QList&)))); + assert(connect(reply, SIGNAL(uploadProgress(qint64, qint64)), + SLOT(uploadProgress(qint64, qint64)))); + if (_downloads.size()==1) started(); + } + + void abort() { + while (_downloads.size()) _downloads.begin()->first->abort(); + } + + private: + + void calcProgress() { + //TRC; + qint64 done(0); + qint64 total(0); + for (Downloads::iterator it(_downloads.begin()); + it!=_downloads.end(); ++it) { + done += it->second.progress.first; + total += it->second.progress.second; + } + progress(done, total); + } + + private Q_SLOTS: + + void downloadProgress(qint64 bytesReceived, qint64 bytesTotal) { + //TRC; LOG<(sender())].progress.first + = bytesReceived; + _downloads[qobject_cast(sender())].progress.second + = bytesTotal; + calcProgress(); + } + void error(QNetworkReply::NetworkError code) { + TRC; LOG<<"Status:"<(sender())); + _downloads[reply].error += + tr("

Network Error

" + "
URL:
%1
" + "
Error Code:
%3
" + "
Error Details:
%2
") + .arg(reply->url().toString()) + .arg(networkError(code)) + .arg(code); + } + void slotDestroyed(QObject* obj) { + TRC; LOG<<_downloads.size(); + _downloads.erase((QNetworkReply*)obj); + } + void slotFinished() { + TRC; LOG<<_downloads.size(); + QNetworkReply* reply(qobject_cast(sender())); + if (_downloads[reply].error.size()) + error(_downloads[reply].error); + _downloads.erase(reply); + if (_downloads.size()==0) finished(); + } + void slotMetaDataChanged() { + TRC; + QNetworkReply* reply(qobject_cast(sender())); + if (!reply) return; + LOG<<"Location:"<header(QNetworkRequest::LocationHeader) + .toString(); + LOG<<"Content-Type:"<header(QNetworkRequest::ContentTypeHeader) + .toString(); + LOG<<"Content-Disposition:"<rawHeader("Content-Disposition"); + LOG<<"Status:"<error()); + LOG<<"URL:"<url().toString(); + LOG<<"File:"<url().toLocalFile(); + LOG<<"Path:"<url().path(); + metaDataChanged(reply); + } + void sslErrors(const QList & errors) { + TRC; + QNetworkReply* reply(qobject_cast(sender())); + for (QList::const_iterator err(errors.begin()); + err!=errors.end(); ++err) { + LOG<<"SSL-Error: "<<(int)err->error()<<": "<errorString(); + LOG<<"Certificate Issuer: " + <<"O=" + <certificate().issuerInfo(QSslCertificate::Organization) + <<"CN="<certificate().issuerInfo(QSslCertificate::CommonName) + <<"L=" + <certificate().issuerInfo(QSslCertificate::LocalityName) + <<"OU=" + <certificate() + .issuerInfo(QSslCertificate::OrganizationalUnitName) + <<"C="<certificate().issuerInfo(QSslCertificate::CountryName) + <<"ST=" + <certificate() + .issuerInfo(QSslCertificate::StateOrProvinceName); + LOG<<"Certificate Subject: " + <<"O=" + <certificate().subjectInfo(QSslCertificate::Organization) + <<"CN=" + <certificate().subjectInfo(QSslCertificate::CommonName) + <<"L=" + <certificate().subjectInfo(QSslCertificate::LocalityName) + <<"OU=" + <certificate() + .subjectInfo(QSslCertificate::OrganizationalUnitName) + <<"C=" + <certificate().subjectInfo(QSslCertificate::CountryName) + <<"ST=" + <certificate() + .subjectInfo(QSslCertificate::StateOrProvinceName); + LOG<<"Certificate:\n"<certificate().toPem(); + switch (err->error()) { + case QSslError::SelfSignedCertificate: + case QSslError::SelfSignedCertificateInChain: { + QSslConfiguration sslConfig + (QSslConfiguration::defaultConfiguration()); + QList certs(sslConfig.caCertificates()); + for (QList::iterator cert(certs.begin()); + cert!=certs.end(); ++cert) { + if (err->certificate().subjectInfo(QSslCertificate::CommonName) + == cert->subjectInfo(QSslCertificate::CommonName)) { + LOG<<"Found matching CN:" + <subjectInfo(QSslCertificate::CommonName); + if (err->certificate()==*cert) { + LOG<<"QT-BUG! Certificate matches known certificate"; + //! @bug work around qt bug (Qt Mac 4.8.2) + reply->ignoreSslErrors(errors); + } else { + LOG<<"CERTIFICATE ERROR! Certificates are different"; + } + } + } + } break; + default:; // ignore + } + _downloads[reply].error += + tr("

SSL Error

" + "
URL:
%1
" + "
Error Code:
%3
" + "
Error Details:
%2
" + "" + "" + "" + "" + "" + "" + "" + "" + "
Certificate Issuer
Organization:%4
Common Name:%5
Location:%6
Organizational Unit:%7
Country:%8
State or Provive:%9
" + "" + "" + "" + "" + "" + "" + "" + "" + "
Certificate Subject
Organization:%10
Common Name:%11
Location:%12
Organizational Unit:%13
Country:%14
State or Province:%15
") + .arg(reply->url().toString()) + .arg(err->errorString()) + .arg(err->error()) + .arg(err->certificate().issuerInfo(QSslCertificate::Organization)) + .arg(err->certificate().issuerInfo(QSslCertificate::CommonName)) + .arg(err->certificate().issuerInfo(QSslCertificate::LocalityName)) + .arg(err->certificate() + .issuerInfo(QSslCertificate::OrganizationalUnitName)) + .arg(err->certificate().issuerInfo(QSslCertificate::CountryName)) + .arg(err->certificate() + .issuerInfo(QSslCertificate::StateOrProvinceName)) + .arg(err->certificate().subjectInfo(QSslCertificate::Organization)) + .arg(err->certificate().subjectInfo(QSslCertificate::CommonName)) + .arg(err->certificate().subjectInfo(QSslCertificate::LocalityName)) + .arg(err->certificate() + .subjectInfo(QSslCertificate::OrganizationalUnitName)) + .arg(err->certificate().subjectInfo(QSslCertificate::CountryName)) + .arg(err->certificate() + .subjectInfo(QSslCertificate::StateOrProvinceName)); + } + } + + void uploadProgress(qint64 bytesSent, qint64 bytesTotal) { + //TRC; LOG<(sender())].progress.first + = bytesSent; + _downloads[qobject_cast(sender())].progress.second + = bytesTotal; + calcProgress(); + } + + private: + + typedef std::pair Progress; + struct Download { + Progress progress; + QString error; + }; + typedef std::map Downloads; + + Downloads _downloads; + }; + +} +//! @} + +#endif diff --git a/src/qbrowserlib/errorlog.hxx b/src/qbrowserlib/errorlog.hxx new file mode 100644 index 0000000..f93aed5 --- /dev/null +++ b/src/qbrowserlib/errorlog.hxx @@ -0,0 +1,59 @@ +/*! @file + + @id $Id$ +*/ +// 1 2 3 4 5 6 7 8 +// 45678901234567890123456789012345678901234567890123456789012345678901234567890 + +#ifndef ERRORLOG_HXX +#define ERRORLOG_HXX + +#include +#include +#include + +//! @addtogroup qbrowserlib +//! @{ + +namespace qbrowserlib { + + //! Collect and Show Errors + /*! Singleton */ + class ErrorLog: public QDialog, protected Ui::ErrorLog { + Q_OBJECT; + Q_SIGNALS: + void reset(); + public: + //! Singleton + static ErrorLog& instance(QWidget* p=0) { + static ErrorLog _instance(p); + return _instance; + } + private: // singleton + ErrorLog(const ErrorLog&); + ErrorLog(QWidget* p): QDialog(p) { + TRC; + setupUi(this); + } + public: + void append(QString text) { + TRC; LOG<append(text); + } + protected Q_SLOTS: + void on__buttons_clicked(QAbstractButton* button) { + TRC; + switch (_buttons->buttonRole(button)) { + case QDialogButtonBox::ResetRole: { + _errors->clear(); + reset(); + } break; + default:; + } + } + }; +} + +//! @} + +#endif diff --git a/src/errorlog.ui b/src/qbrowserlib/errorlog.ui similarity index 100% rename from src/errorlog.ui rename to src/qbrowserlib/errorlog.ui diff --git a/src/qbrowserlib/qbrowserlib_de.ts b/src/qbrowserlib/qbrowserlib_de.ts index 36677f8..cc3e453 100644 --- a/src/qbrowserlib/qbrowserlib_de.ts +++ b/src/qbrowserlib/qbrowserlib_de.ts @@ -2,6 +2,14 @@ UTF-8 + + ErrorLog + + + Error Log + + + LogDialog @@ -629,6 +637,134 @@ p, li { white-space: pre-wrap; } + + qbrowserlib::DownloadManager + + + Network connection successful, remote host can be reached. + + + + + The remote server refused the connection (the server is not accepting requests). + + + + + The remote server closed the connection prematurely, before the entire reply was received and processed. + + + + + The remote host name was not found (invalid hostname). + + + + + The connection to the remote server timed out. + + + + + The operation was canceled via calls to abort() or close() before it was finished. + + + + + The SSL/TLS handshake failed and the encrypted channel could not be established. See SSL-Errors above. + + + + + The connection to the proxy server was refused (the proxy server is not accepting requests). + + + + + The proxy server closed the connection prematurely, before the entire reply was received and processed. + + + + + The proxy host name was not found (invalid proxy hostname). + + + + + The connection to the proxy timed out or the proxy did not reply in time to the request sent. + + + + + The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). + + + + + The access to the remote content was denied (similar to HTTP error 401). + + + + + The operation requested on the remote content is not permitted. + + + + + The remote content was not found at the server (similar to HTTP error 404). + + + + + The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). + + + + + The Network Access API cannot honor the request because the protocol is not known. + + + + + The requested operation is invalid for this protocol. + + + + + An unknown network-related error was detected. + + + + + An unknown proxy-related error was detected. + + + + + An unknonwn error related to the remote content was detected. + + + + + A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). + + + + + Unknown network error (code: %1). + + + + + <h1>Network Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl> + + + + + <h1>SSL Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl><table><caption>Certificate Issuer</caption><tr><th>Organization:</th><td>%4</td></tr><tr><th>Common Name:</th><td>%5</td></tr><tr><th>Location:</th><td>%6</td></tr><tr><th>Organizational Unit:</th><td>%7</td></tr><tr><th>Country:</th><td>%8</td></tr><tr><th>State or Provive:</th><td>%9</td></tr></table><table><caption>Certificate Subject</caption><tr><th>Organization:</th><td>%10</td></tr><tr><th>Common Name:</th><td>%11</td></tr><tr><th>Location:</th><td>%12</td></tr><tr><th>Organizational Unit:</th><td>%13</td></tr><tr><th>Country:</th><td>%14</td></tr><tr><th>State or Province:</th><td>%15</td></tr></table> + + + qbrowserlib::SaveOrRun @@ -695,7 +831,7 @@ Specify full path to executable program qbrowserlib::SwissWebWidget - + Browser Tools name of the browser's toolbar diff --git a/src/qbrowserlib/qbrowserlib_en.ts b/src/qbrowserlib/qbrowserlib_en.ts index 61b18c2..84fdf13 100644 --- a/src/qbrowserlib/qbrowserlib_en.ts +++ b/src/qbrowserlib/qbrowserlib_en.ts @@ -2,6 +2,14 @@ UTF-8 + + ErrorLog + + + Error Log + + + LogDialog @@ -629,6 +637,134 @@ p, li { white-space: pre-wrap; } + + qbrowserlib::DownloadManager + + + Network connection successful, remote host can be reached. + + + + + The remote server refused the connection (the server is not accepting requests). + + + + + The remote server closed the connection prematurely, before the entire reply was received and processed. + + + + + The remote host name was not found (invalid hostname). + + + + + The connection to the remote server timed out. + + + + + The operation was canceled via calls to abort() or close() before it was finished. + + + + + The SSL/TLS handshake failed and the encrypted channel could not be established. See SSL-Errors above. + + + + + The connection to the proxy server was refused (the proxy server is not accepting requests). + + + + + The proxy server closed the connection prematurely, before the entire reply was received and processed. + + + + + The proxy host name was not found (invalid proxy hostname). + + + + + The connection to the proxy timed out or the proxy did not reply in time to the request sent. + + + + + The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). + + + + + The access to the remote content was denied (similar to HTTP error 401). + + + + + The operation requested on the remote content is not permitted. + + + + + The remote content was not found at the server (similar to HTTP error 404). + + + + + The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). + + + + + The Network Access API cannot honor the request because the protocol is not known. + + + + + The requested operation is invalid for this protocol. + + + + + An unknown network-related error was detected. + + + + + An unknown proxy-related error was detected. + + + + + An unknonwn error related to the remote content was detected. + + + + + A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). + + + + + Unknown network error (code: %1). + + + + + <h1>Network Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl> + + + + + <h1>SSL Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl><table><caption>Certificate Issuer</caption><tr><th>Organization:</th><td>%4</td></tr><tr><th>Common Name:</th><td>%5</td></tr><tr><th>Location:</th><td>%6</td></tr><tr><th>Organizational Unit:</th><td>%7</td></tr><tr><th>Country:</th><td>%8</td></tr><tr><th>State or Provive:</th><td>%9</td></tr></table><table><caption>Certificate Subject</caption><tr><th>Organization:</th><td>%10</td></tr><tr><th>Common Name:</th><td>%11</td></tr><tr><th>Location:</th><td>%12</td></tr><tr><th>Organizational Unit:</th><td>%13</td></tr><tr><th>Country:</th><td>%14</td></tr><tr><th>State or Province:</th><td>%15</td></tr></table> + + + qbrowserlib::SaveOrRun @@ -695,7 +831,7 @@ Specify full path to executable program qbrowserlib::SwissWebWidget - + Browser Tools name of the browser's toolbar diff --git a/src/qbrowserlib/qbrowserlib_fr.ts b/src/qbrowserlib/qbrowserlib_fr.ts index 0587906..1112a0f 100644 --- a/src/qbrowserlib/qbrowserlib_fr.ts +++ b/src/qbrowserlib/qbrowserlib_fr.ts @@ -2,6 +2,14 @@ UTF-8 + + ErrorLog + + + Error Log + + + LogDialog @@ -629,6 +637,134 @@ p, li { white-space: pre-wrap; } + + qbrowserlib::DownloadManager + + + Network connection successful, remote host can be reached. + + + + + The remote server refused the connection (the server is not accepting requests). + + + + + The remote server closed the connection prematurely, before the entire reply was received and processed. + + + + + The remote host name was not found (invalid hostname). + + + + + The connection to the remote server timed out. + + + + + The operation was canceled via calls to abort() or close() before it was finished. + + + + + The SSL/TLS handshake failed and the encrypted channel could not be established. See SSL-Errors above. + + + + + The connection to the proxy server was refused (the proxy server is not accepting requests). + + + + + The proxy server closed the connection prematurely, before the entire reply was received and processed. + + + + + The proxy host name was not found (invalid proxy hostname). + + + + + The connection to the proxy timed out or the proxy did not reply in time to the request sent. + + + + + The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). + + + + + The access to the remote content was denied (similar to HTTP error 401). + + + + + The operation requested on the remote content is not permitted. + + + + + The remote content was not found at the server (similar to HTTP error 404). + + + + + The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). + + + + + The Network Access API cannot honor the request because the protocol is not known. + + + + + The requested operation is invalid for this protocol. + + + + + An unknown network-related error was detected. + + + + + An unknown proxy-related error was detected. + + + + + An unknonwn error related to the remote content was detected. + + + + + A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). + + + + + Unknown network error (code: %1). + + + + + <h1>Network Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl> + + + + + <h1>SSL Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl><table><caption>Certificate Issuer</caption><tr><th>Organization:</th><td>%4</td></tr><tr><th>Common Name:</th><td>%5</td></tr><tr><th>Location:</th><td>%6</td></tr><tr><th>Organizational Unit:</th><td>%7</td></tr><tr><th>Country:</th><td>%8</td></tr><tr><th>State or Provive:</th><td>%9</td></tr></table><table><caption>Certificate Subject</caption><tr><th>Organization:</th><td>%10</td></tr><tr><th>Common Name:</th><td>%11</td></tr><tr><th>Location:</th><td>%12</td></tr><tr><th>Organizational Unit:</th><td>%13</td></tr><tr><th>Country:</th><td>%14</td></tr><tr><th>State or Province:</th><td>%15</td></tr></table> + + + qbrowserlib::SaveOrRun @@ -695,7 +831,7 @@ Specify full path to executable program qbrowserlib::SwissWebWidget - + Browser Tools name of the browser's toolbar diff --git a/src/qbrowserlib/qbrowserlib_it.ts b/src/qbrowserlib/qbrowserlib_it.ts index e2166da..2e91351 100644 --- a/src/qbrowserlib/qbrowserlib_it.ts +++ b/src/qbrowserlib/qbrowserlib_it.ts @@ -2,6 +2,14 @@ UTF-8 + + ErrorLog + + + Error Log + + + LogDialog @@ -629,6 +637,134 @@ p, li { white-space: pre-wrap; } + + qbrowserlib::DownloadManager + + + Network connection successful, remote host can be reached. + + + + + The remote server refused the connection (the server is not accepting requests). + + + + + The remote server closed the connection prematurely, before the entire reply was received and processed. + + + + + The remote host name was not found (invalid hostname). + + + + + The connection to the remote server timed out. + + + + + The operation was canceled via calls to abort() or close() before it was finished. + + + + + The SSL/TLS handshake failed and the encrypted channel could not be established. See SSL-Errors above. + + + + + The connection to the proxy server was refused (the proxy server is not accepting requests). + + + + + The proxy server closed the connection prematurely, before the entire reply was received and processed. + + + + + The proxy host name was not found (invalid proxy hostname). + + + + + The connection to the proxy timed out or the proxy did not reply in time to the request sent. + + + + + The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). + + + + + The access to the remote content was denied (similar to HTTP error 401). + + + + + The operation requested on the remote content is not permitted. + + + + + The remote content was not found at the server (similar to HTTP error 404). + + + + + The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). + + + + + The Network Access API cannot honor the request because the protocol is not known. + + + + + The requested operation is invalid for this protocol. + + + + + An unknown network-related error was detected. + + + + + An unknown proxy-related error was detected. + + + + + An unknonwn error related to the remote content was detected. + + + + + A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). + + + + + Unknown network error (code: %1). + + + + + <h1>Network Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl> + + + + + <h1>SSL Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl><table><caption>Certificate Issuer</caption><tr><th>Organization:</th><td>%4</td></tr><tr><th>Common Name:</th><td>%5</td></tr><tr><th>Location:</th><td>%6</td></tr><tr><th>Organizational Unit:</th><td>%7</td></tr><tr><th>Country:</th><td>%8</td></tr><tr><th>State or Provive:</th><td>%9</td></tr></table><table><caption>Certificate Subject</caption><tr><th>Organization:</th><td>%10</td></tr><tr><th>Common Name:</th><td>%11</td></tr><tr><th>Location:</th><td>%12</td></tr><tr><th>Organizational Unit:</th><td>%13</td></tr><tr><th>Country:</th><td>%14</td></tr><tr><th>State or Province:</th><td>%15</td></tr></table> + + + qbrowserlib::SaveOrRun @@ -695,7 +831,7 @@ Specify full path to executable program qbrowserlib::SwissWebWidget - + Browser Tools name of the browser's toolbar diff --git a/src/qbrowserlib/qmake.pro.in b/src/qbrowserlib/qmake.pro.in index d78825f..4e0a80f 100644 --- a/src/qbrowserlib/qmake.pro.in +++ b/src/qbrowserlib/qmake.pro.in @@ -34,18 +34,18 @@ TRANSLATIONS = @srcdir@/qbrowserlib_en.ts \ SOURCES = @srcdir@/log.cxx @srcdir@/certs.cxx -HEADERS = @srcdir@/log.hxx \ +HEADERS = @srcdir@/log.hxx @srcdir@/downloadmanager.hxx \ @srcdir@/swisswebview.hxx @srcdir@/swisswebpage.hxx \ @srcdir@/swisswebwidget.hxx \ @srcdir@/pluginfactory.hxx @srcdir@/saveorrun.hxx \ - @srcdir@/settings.hxx \ + @srcdir@/settings.hxx @srcdir@/errorlog.hxx \ @srcdir@/buttonlineedit.hxx \ @srcdir@/filestorage.hxx @srcdir@/certs.hxx \ @srcdir@/executor.hxx \ @srcdir@/temporaryfile.hxx FORMS = @srcdir@/saveorrun.ui @srcdir@/settings.ui @srcdir@/log.ui \ - @srcdir@/swisswebwidget.ui + @srcdir@/swisswebwidget.ui @srcdir@/errorlog.ui RESOURCES = languages.qrc diff --git a/src/qbrowserlib/swisswebwidget.hxx b/src/qbrowserlib/swisswebwidget.hxx index 3b9f4b0..e5388bc 100644 --- a/src/qbrowserlib/swisswebwidget.hxx +++ b/src/qbrowserlib/swisswebwidget.hxx @@ -9,6 +9,8 @@ #define __SWISSWEBWIDGET_HXX__ #include +#include +#include #include #include @@ -43,9 +45,11 @@ namespace qbrowserlib { class SwissWebWidget: public QWidget, private Ui::SwissWebWidget { Q_OBJECT; - + + //..............................................................properties CREATE_QT_PROPERTY(QUrl, homeUrl); + //................................................................methods public: SwissWebWidget(QWidget* p=0): QWidget(p) { @@ -87,13 +91,104 @@ namespace qbrowserlib { _webview->load(_homeUrl); } - protected: + void progress(qint64 total, qint64 done) { + TRC; + _progress->setMaximum(total); + _progress->setValue(done); + } + + void started() { + TRC; + _abort->setVisible(true); + _reload->setVisible(false); + _progress->setRange(0, 0); + _progress->setValue(0); + _progress->setEnabled(true); + _progress->show(); + } + + void finished() { + TRC; + _abort->setVisible(false); + _reload->setVisible(true); + _progress->setRange(0, 1); + _progress->setValue(1); + _progress->setEnabled(false); + } + + void finished(QNetworkReply *r) { + TRC; + if (r->error()!=QNetworkReply::NoError && + r->error()!=QNetworkReply::OperationCanceledError) { + // statusBar()->showMessage + // (qbrowserlib::DownloadManager::networkError(r->error())); + // badUrl(); + // if (!_showErrorLog) { + // statusBar()->addPermanentWidget + // ((_showErrorLog = new QPushButton(QIcon(":/icons/error"), + // tr("errors", "show error log")))); + // assert(connect(_showErrorLog, SIGNAL(clicked(bool)), + // actionErrorLog, SLOT(trigger()))); + // } + // _showErrorLog->show(); + } + } + void metaDataChanged(QNetworkReply* reply) { + TRC; + QString filename + (QString::fromUtf8(reply->rawHeader("Content-Disposition"))); + if (filename.contains + (QRegExp("^\\s*attachment\\s*;\\s*filename\\s*=\\s*\"[^\"]+\""))) { + LOG<<"From Content-Disposition"; + filename = filename.replace + (QRegExp("^\\s*attachment\\s*;\\s*filename\\s*=\\s*\"([^\"]+)\".*"), + "\\1"); + } else { + LOG<<"From path"; + filename = + QFileInfo(!reply->url().toLocalFile().isEmpty() + ?reply->url().toLocalFile() + :reply->url().path()).fileName(); + } + LOG<<"Filename:"<header(QNetworkRequest::ContentTypeHeader).toString(), + filename)); + } + + protected: + void connects() { - connect(_url, SIGNAL(returnPressed()), SLOT(load())); - connect(_home, SIGNAL(pressed()), SLOT(goHome())); + _downloadmanager+=_webview->page()->networkAccessManager(); + assert(connect(_webview->page()->networkAccessManager(), + SIGNAL(finished(QNetworkReply*)), + SLOT(finished(QNetworkReply*)))); + assert(connect(_url, SIGNAL(returnPressed()), SLOT(load()))); + assert(connect(_home, SIGNAL(pressed()), SLOT(goHome()))); + assert(connect(_abort, SIGNAL(pressed()), + &_downloadmanager, SLOT(abort()))); + assert(connect(&_downloadmanager, SIGNAL(progress(qint64, qint64)), + SLOT(progress(qint64, qint64)))); + assert(connect(&_downloadmanager, SIGNAL(started()), + SLOT(started()))); + assert(connect(&_downloadmanager, SIGNAL(finished()), + SLOT(finished()))); + assert(connect(&_downloadmanager, SIGNAL(error(QString)), + &qbrowserlib::ErrorLog::instance(), + SLOT(append(QString)))); + assert(connect(&_downloadmanager, + SIGNAL(metaDataChanged(QNetworkReply*)), + SLOT(metaDataChanged(QNetworkReply*)))); } + //..............................................................variables + protected: + + qbrowserlib::DownloadManager _downloadmanager; + QPushButton _showErrorLog; + }; } diff --git a/src/qmake.pro.in b/src/qmake.pro.in index 3d700de..c65f5e1 100644 --- a/src/qmake.pro.in +++ b/src/qmake.pro.in @@ -39,16 +39,16 @@ TRANSLATIONS = @PACKAGENAME@_en.ts \ SOURCES = @srcdir@/main.cxx HEADERS = @srcdir@/browser.hxx @srcdir@/smartcardauth.hxx \ - @srcdir@/pinentry.hxx @srcdir@/downloadmanager.hxx \ + @srcdir@/pinentry.hxx \ @srcdir@/sslclientnetworkmanager.hxx \ - @srcdir@/authentication.hxx @srcdir@/errorlog.hxx \ + @srcdir@/authentication.hxx \ @srcdir@/certificate.hxx \ @srcdir@/logincertificate.hxx \ @srcdir@/editbookmarks.hxx @srcdir@/pdfdisplay.hpp FORMS = @srcdir@/browser.ui \ @srcdir@/pinentry.ui @srcdir@/authentication.ui \ - @srcdir@/errorlog.ui @srcdir@/certificate.ui \ + @srcdir@/certificate.ui \ @srcdir@/logincertificate.ui \ @srcdir@/editbookmarks.ui diff --git a/src/swissbrowser_de.ts b/src/swissbrowser_de.ts index 5a1c118..aef1502 100644 --- a/src/swissbrowser_de.ts +++ b/src/swissbrowser_de.ts @@ -499,109 +499,6 @@ openssl-%7 (%9) %10 - - DownloadManager - - Network connection successful, remote host can be reached. - - - - The remote server refused the connection (the server is not accepting requests). - - - - The remote server closed the connection prematurely, before the entire reply was received and processed. - - - - The remote host name was not found (invalid hostname). - - - - The connection to the remote server timed out. - - - - The operation was canceled via calls to abort() or close() before it was finished. - - - - The SSL/TLS handshake failed and the encrypted channel could not be established. See SSL-Errors above. - - - - The connection to the proxy server was refused (the proxy server is not accepting requests). - - - - The proxy server closed the connection prematurely, before the entire reply was received and processed. - - - - The proxy host name was not found (invalid proxy hostname). - - - - The connection to the proxy timed out or the proxy did not reply in time to the request sent. - - - - The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). - - - - The access to the remote content was denied (similar to HTTP error 401). - - - - The operation requested on the remote content is not permitted. - - - - The remote content was not found at the server (similar to HTTP error 404). - - - - The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). - - - - The Network Access API cannot honor the request because the protocol is not known. - - - - The requested operation is invalid for this protocol. - - - - An unknown network-related error was detected. - - - - An unknown proxy-related error was detected. - - - - An unknonwn error related to the remote content was detected. - - - - A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). - - - - <h1>Network Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl> - - - - <h1>SSL Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl><table><caption>Certificate Issuer</caption><tr><th>Organization:</th><td>%4</td></tr><tr><th>Common Name:</th><td>%5</td></tr><tr><th>Location:</th><td>%6</td></tr><tr><th>Organizational Unit:</th><td>%7</td></tr><tr><th>Country:</th><td>%8</td></tr><tr><th>State or Provive:</th><td>%9</td></tr></table><table><caption>Certificate Subject</caption><tr><th>Organization:</th><td>%10</td></tr><tr><th>Common Name:</th><td>%11</td></tr><tr><th>Location:</th><td>%12</td></tr><tr><th>Organizational Unit:</th><td>%13</td></tr><tr><th>Country:</th><td>%14</td></tr><tr><th>State or Province:</th><td>%15</td></tr></table> - - - - Unknown network error (code: %1). - - - EditBookmarks @@ -621,13 +518,6 @@ openssl-%7 (%9) %10 - - ErrorLog - - Error Log - - - LoginCertificate diff --git a/src/swissbrowser_en.ts b/src/swissbrowser_en.ts index 611493c..c69759e 100644 --- a/src/swissbrowser_en.ts +++ b/src/swissbrowser_en.ts @@ -499,109 +499,6 @@ openssl-%7 (%9) %10 - - DownloadManager - - Network connection successful, remote host can be reached. - - - - The remote server refused the connection (the server is not accepting requests). - - - - The remote server closed the connection prematurely, before the entire reply was received and processed. - - - - The remote host name was not found (invalid hostname). - - - - The connection to the remote server timed out. - - - - The operation was canceled via calls to abort() or close() before it was finished. - - - - The SSL/TLS handshake failed and the encrypted channel could not be established. See SSL-Errors above. - - - - The connection to the proxy server was refused (the proxy server is not accepting requests). - - - - The proxy server closed the connection prematurely, before the entire reply was received and processed. - - - - The proxy host name was not found (invalid proxy hostname). - - - - The connection to the proxy timed out or the proxy did not reply in time to the request sent. - - - - The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). - - - - The access to the remote content was denied (similar to HTTP error 401). - - - - The operation requested on the remote content is not permitted. - - - - The remote content was not found at the server (similar to HTTP error 404). - - - - The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). - - - - The Network Access API cannot honor the request because the protocol is not known. - - - - The requested operation is invalid for this protocol. - - - - An unknown network-related error was detected. - - - - An unknown proxy-related error was detected. - - - - An unknonwn error related to the remote content was detected. - - - - A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). - - - - <h1>Network Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl> - - - - <h1>SSL Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl><table><caption>Certificate Issuer</caption><tr><th>Organization:</th><td>%4</td></tr><tr><th>Common Name:</th><td>%5</td></tr><tr><th>Location:</th><td>%6</td></tr><tr><th>Organizational Unit:</th><td>%7</td></tr><tr><th>Country:</th><td>%8</td></tr><tr><th>State or Provive:</th><td>%9</td></tr></table><table><caption>Certificate Subject</caption><tr><th>Organization:</th><td>%10</td></tr><tr><th>Common Name:</th><td>%11</td></tr><tr><th>Location:</th><td>%12</td></tr><tr><th>Organizational Unit:</th><td>%13</td></tr><tr><th>Country:</th><td>%14</td></tr><tr><th>State or Province:</th><td>%15</td></tr></table> - - - - Unknown network error (code: %1). - - - EditBookmarks @@ -621,13 +518,6 @@ openssl-%7 (%9) %10 - - ErrorLog - - Error Log - - - LoginCertificate diff --git a/src/swissbrowser_fr.ts b/src/swissbrowser_fr.ts index 5a1c118..aef1502 100644 --- a/src/swissbrowser_fr.ts +++ b/src/swissbrowser_fr.ts @@ -499,109 +499,6 @@ openssl-%7 (%9) %10 - - DownloadManager - - Network connection successful, remote host can be reached. - - - - The remote server refused the connection (the server is not accepting requests). - - - - The remote server closed the connection prematurely, before the entire reply was received and processed. - - - - The remote host name was not found (invalid hostname). - - - - The connection to the remote server timed out. - - - - The operation was canceled via calls to abort() or close() before it was finished. - - - - The SSL/TLS handshake failed and the encrypted channel could not be established. See SSL-Errors above. - - - - The connection to the proxy server was refused (the proxy server is not accepting requests). - - - - The proxy server closed the connection prematurely, before the entire reply was received and processed. - - - - The proxy host name was not found (invalid proxy hostname). - - - - The connection to the proxy timed out or the proxy did not reply in time to the request sent. - - - - The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). - - - - The access to the remote content was denied (similar to HTTP error 401). - - - - The operation requested on the remote content is not permitted. - - - - The remote content was not found at the server (similar to HTTP error 404). - - - - The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). - - - - The Network Access API cannot honor the request because the protocol is not known. - - - - The requested operation is invalid for this protocol. - - - - An unknown network-related error was detected. - - - - An unknown proxy-related error was detected. - - - - An unknonwn error related to the remote content was detected. - - - - A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). - - - - <h1>Network Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl> - - - - <h1>SSL Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl><table><caption>Certificate Issuer</caption><tr><th>Organization:</th><td>%4</td></tr><tr><th>Common Name:</th><td>%5</td></tr><tr><th>Location:</th><td>%6</td></tr><tr><th>Organizational Unit:</th><td>%7</td></tr><tr><th>Country:</th><td>%8</td></tr><tr><th>State or Provive:</th><td>%9</td></tr></table><table><caption>Certificate Subject</caption><tr><th>Organization:</th><td>%10</td></tr><tr><th>Common Name:</th><td>%11</td></tr><tr><th>Location:</th><td>%12</td></tr><tr><th>Organizational Unit:</th><td>%13</td></tr><tr><th>Country:</th><td>%14</td></tr><tr><th>State or Province:</th><td>%15</td></tr></table> - - - - Unknown network error (code: %1). - - - EditBookmarks @@ -621,13 +518,6 @@ openssl-%7 (%9) %10 - - ErrorLog - - Error Log - - - LoginCertificate diff --git a/src/swissbrowser_it.ts b/src/swissbrowser_it.ts index 49e32ae..bc2c6c4 100644 --- a/src/swissbrowser_it.ts +++ b/src/swissbrowser_it.ts @@ -499,109 +499,6 @@ openssl-%7 (%9) %10 - - DownloadManager - - Network connection successful, remote host can be reached. - - - - The remote server refused the connection (the server is not accepting requests). - - - - The remote server closed the connection prematurely, before the entire reply was received and processed. - - - - The remote host name was not found (invalid hostname). - - - - The connection to the remote server timed out. - - - - The operation was canceled via calls to abort() or close() before it was finished. - - - - The SSL/TLS handshake failed and the encrypted channel could not be established. See SSL-Errors above. - - - - The connection to the proxy server was refused (the proxy server is not accepting requests). - - - - The proxy server closed the connection prematurely, before the entire reply was received and processed. - - - - The proxy host name was not found (invalid proxy hostname). - - - - The connection to the proxy timed out or the proxy did not reply in time to the request sent. - - - - The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). - - - - The access to the remote content was denied (similar to HTTP error 401). - - - - The operation requested on the remote content is not permitted. - - - - The remote content was not found at the server (similar to HTTP error 404). - - - - The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). - - - - The Network Access API cannot honor the request because the protocol is not known. - - - - The requested operation is invalid for this protocol. - - - - An unknown network-related error was detected. - - - - An unknown proxy-related error was detected. - - - - An unknonwn error related to the remote content was detected. - - - - A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). - - - - <h1>Network Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl> - - - - <h1>SSL Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl><table><caption>Certificate Issuer</caption><tr><th>Organization:</th><td>%4</td></tr><tr><th>Common Name:</th><td>%5</td></tr><tr><th>Location:</th><td>%6</td></tr><tr><th>Organizational Unit:</th><td>%7</td></tr><tr><th>Country:</th><td>%8</td></tr><tr><th>State or Provive:</th><td>%9</td></tr></table><table><caption>Certificate Subject</caption><tr><th>Organization:</th><td>%10</td></tr><tr><th>Common Name:</th><td>%11</td></tr><tr><th>Location:</th><td>%12</td></tr><tr><th>Organizational Unit:</th><td>%13</td></tr><tr><th>Country:</th><td>%14</td></tr><tr><th>State or Province:</th><td>%15</td></tr></table> - - - - Unknown network error (code: %1). - - - EditBookmarks @@ -621,13 +518,6 @@ openssl-%7 (%9) %10 - - ErrorLog - - Error Log - - - LoginCertificate