diff options
author | Bea Lam <bea.lam@nokia.com> | 2011-07-21 15:10:30 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-07-26 01:00:09 +0200 |
commit | 38ddc64ec988d3b4668cbbedfc377cab309a08bb (patch) | |
tree | 5c53d462585f15961fce923e99fbc3a61c60f044 /src/declarative/qml | |
parent | 087619b4a941e7f64772cc01a6cdf1213b640270 (diff) |
Don't error if response results in UnknownContentError
XMLHttpRequest specs state that only 'network errors' should result
in a request error, and a HTTP response like 400 Bad Request (which
results in QNetworkReply::UnknownContentError) is an indication of the
HTTP server response rather than a network error.
Task-number: QTBUG-20146
Change-Id: I10c132788200e15b0362da839689a0bb3c2b4a0d
Reviewed-on: http://codereview.qt.nokia.com/1915
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'src/declarative/qml')
-rw-r--r-- | src/declarative/qml/qdeclarativexmlhttprequest.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativexmlhttprequest.cpp b/src/declarative/qml/qdeclarativexmlhttprequest.cpp index 33875fef88..5a7aa0a003 100644 --- a/src/declarative/qml/qdeclarativexmlhttprequest.cpp +++ b/src/declarative/qml/qdeclarativexmlhttprequest.cpp @@ -1332,7 +1332,8 @@ void QDeclarativeXMLHttpRequest::error(QNetworkReply::NetworkError error) error == QNetworkReply::ContentOperationNotPermittedError || error == QNetworkReply::ContentNotFoundError || error == QNetworkReply::AuthenticationRequiredError || - error == QNetworkReply::ContentReSendError) { + error == QNetworkReply::ContentReSendError || + error == QNetworkReply::UnknownContentError) { m_state = Loading; v8::TryCatch tc; dispatchCallback(m_me); |