Don't error if response results in UnknownContentError
authorBea Lam <bea.lam@nokia.com>
Thu, 21 Jul 2011 05:10:30 +0000 (15:10 +1000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 25 Jul 2011 23:00:09 +0000 (01:00 +0200)
commit38ddc64ec988d3b4668cbbedfc377cab309a08bb
tree5c53d462585f15961fce923e99fbc3a61c60f044
parent087619b4a941e7f64772cc01a6cdf1213b640270
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>
src/declarative/qml/qdeclarativexmlhttprequest.cpp
tests/auto/declarative/qdeclarativexmlhttprequest/data/status.400.reply [new file with mode: 0644]
tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml
tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp