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.
Attachments
For Gerrit Dashboard: QTBUG-94963 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
402529,3 | Resolve status code for http response with failure | dev | qt/qtwebengine | Status: MERGED | +2 | 0 |
402530,4 | Introduce http status code domain for loading info | dev | qt/qtwebengine | Status: MERGED | +2 | 0 |
405370,3 | Resolve status code for http response with failure | 6.3 | qt/qtwebengine | Status: MERGED | +2 | 0 |
405371,3 | Resolve status code for http response with failure | 6.2 | qt/qtwebengine | Status: MERGED | +2 | 0 |