Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
6.2.0 Alpha
-
None
-
4c4ac0df9c (qt/qtwebengine/dev)
Description
The errorCode is used to provide the HTTP Status Code :
src/core/web_contents_delegate_qt.cpp
m_loadingInfo.errorCode = http_statuscode;
However, the error code is always used to find the error domain:
src/core/web_contents_delegate_qt.cpp
void WebContentsDelegateQt::emitLoadFinished(bool isErrorPage) { ... auto errorDomain = static_cast<QWebEngineLoadingInfo::ErrorDomain>(WebEngineError::toQtErrorDomain(m_loadingInfo.errorCode)); ... }
And for some reason WebEngineError::toQtErrorDomain() returns WebEngineError::InternalErrorDomain when the error code does not fit in other domains, which is the case when there is no error and the errorCode is in fact an HTTP status code.
I suggest changing WebEngineError::toQtErrorDomain() so that a positive error code is included in WebEngineError::NoErrorDomain.