Index: Source/modules/fetch/FetchBlobDataConsumerHandle.cpp |
diff --git a/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp b/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp |
index e63492e2d0c5a408f9f5185f4d6aac6cf9d7f952..870ea7703134b7115d5c34e253d757cdd1e41600 100644 |
--- a/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp |
+++ b/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp |
@@ -363,7 +363,7 @@ public: |
return Done; |
m_readerContext->ensureStartLoader(); |
Result r = m_reader->read(data, size, flags, readSize); |
- if (r != ShouldWait) { |
+ if (r != ShouldWait && !(r == Ok && *readSize == 0)) { |
// We read non-empty data, so we cannot use the blob data |
// handle which represents the whole data. |
m_readerContext->clearBlobDataHandleForDrain(); |
@@ -377,7 +377,7 @@ public: |
return Done; |
m_readerContext->ensureStartLoader(); |
Result r = m_reader->beginRead(buffer, flags, available); |
- if (r != ShouldWait) { |
+ if (r != ShouldWait && !(r == Ok && *available == 0)) { |
// We read non-empty data, so we cannot use the blob data |
// handle which represents the whole data. |
m_readerContext->clearBlobDataHandleForDrain(); |