wasm: fix network POST data corruption
Emscripten does not like when the post data gets deleted in the local scope. Fixes: QTBUG-84685 Pick-to: 5.15 Change-Id: I17f9d5cc3253c26b42253daa68e2fbaccc48eaf6 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
7d98964815
commit
ce8c33e710
@ -231,11 +231,10 @@ void QNetworkReplyWasmImplPrivate::doSendRequest()
|
||||
|
||||
if (outgoingData) { // data from post request
|
||||
// handle extra data
|
||||
QByteArray extraData;
|
||||
extraData = outgoingData->readAll(); // is there a size restriction here?
|
||||
if (!extraData.isEmpty()) {
|
||||
attr.requestData = extraData.constData();
|
||||
attr.requestDataSize = extraData.size();
|
||||
requestData = outgoingData->readAll(); // is there a size restriction here?
|
||||
if (!requestData.isEmpty()) {
|
||||
attr.requestData = requestData.data();
|
||||
attr.requestDataSize = requestData.size();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -135,6 +135,7 @@ public:
|
||||
|
||||
QIODevice *outgoingData;
|
||||
QSharedPointer<QRingBuffer> outgoingDataBuffer;
|
||||
QByteArray requestData;
|
||||
|
||||
void doAbort() const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user