From 5c80b29e6d77f0ebc63832473159f5a39babe21b Mon Sep 17 00:00:00 2001 From: Alberto Mardegan Date: Fri, 23 Jun 2017 23:26:35 +0200 Subject: QQmlXMLHttpRequest: support sending ArrayBuffer data The XMLHttpRequest.send() method should be able to send arbitrary binary data, and not just UTF-8 text: with this change we first attempt to use the parameter to the send() method as an ArrayBuffer, and fall back to a QString if that fails. [ChangeLog][QtQml] Allow sending binary data, encoded as ArrayBuffer objects, via XMLHttpRequest's send() method. Task-number: QTBUG-61599 Change-Id: I25781969ee39b4d168e5c76315ed9853092b322b Reviewed-by: Simon Hausmann --- tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp') diff --git a/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp b/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp index 1ce07ecdab..a8a6456dff 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp +++ b/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp @@ -597,6 +597,7 @@ void tst_qqmlxmlhttprequest::send_withdata_data() QTest::newRow("Incorrect content-type - out of order") << "send_data.4.expect" << "send_data.5.qml"; QTest::newRow("PUT") << "send_data.6.expect" << "send_data.6.qml"; QTest::newRow("Correct content-type - no charset") << "send_data.1.expect" << "send_data.7.qml"; + QTest::newRow("ArrayBuffer") << "send_data.11.expect" << "send_data.11.qml"; } void tst_qqmlxmlhttprequest::send_options() -- cgit v1.2.3