From 127e6cc9077bb7ba328f5b71c0748bd0ef71508d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Mon, 2 Oct 2023 12:43:38 +0200 Subject: [PATCH] QNonContiguousByteDeviceThreadForwardImpl: reset m_atEnd during reset() Because otherwise the atEnd() function will return true if we finished an upload, and then we reset due to an error and try to upload again. In a future patch we rely on atEnd() returning true only if the data has actually been consumed, so re-uploads will not work correctly. Pick-to: 6.6 6.5 Change-Id: Id914648f2509dd112b6bfc71231caa59cbe8ae68 Reviewed-by: Edward Welbourne --- src/network/access/qhttpthreaddelegate_p.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/network/access/qhttpthreaddelegate_p.h b/src/network/access/qhttpthreaddelegate_p.h index 0eff043d0b..0d052e2450 100644 --- a/src/network/access/qhttpthreaddelegate_p.h +++ b/src/network/access/qhttpthreaddelegate_p.h @@ -248,6 +248,7 @@ public: if (b) { // the reset succeeded, we're at pos 0 again m_pos = 0; + m_atEnd = false; // the HTTP code will anyway abort the request if !b. } return b;