XHR: Server side errors are not network errors
authorJulien Brianceau <jbriance@cisco.com>
Thu, 27 Aug 2015 12:37:50 +0000 (14:37 +0200)
committerJulien Brianceau <jbriance@cisco.com>
Thu, 27 Aug 2015 14:08:00 +0000 (14:08 +0000)
commit1faca908dddb90824d94bed6a1561f4f192328d3
tree76a81962a282d77cf71ec79a511d33113c4c061f
parent8843f9375632fe999b31d16a39e879590d3d9d07
XHR: Server side errors are not network errors

XMLHttpRequest specs state that only 'network errors' should result
in a request error, and a server side error like HTTP 500 Internal
Server Error (which results in QNetworkReply::InternalServerError)
is an indication of the HTTP server response rather than a network
error.

Change-Id: I94bf678a8487e3d31007dc5119d6fb4e87ea3102
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Valery Kotov <kotov.valery@gmail.com>
src/qml/qml/qqmlxmlhttprequest.cpp
tests/auto/qml/qqmlxmlhttprequest/data/status.500.reply [new file with mode: 0644]
tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp