[Cache API] Add support for overwriting responses with put on an existing record
[WebKit-https.git] / Source / WebKit / NetworkProcess / cache / CacheStorageEngine.cpp
index 6e8b3bc428ac9f0c7663dd5e8eed931d14a730e6..5d5787bf7c98281d0514b4283070220a02b9d442 100644 (file)
@@ -174,6 +174,8 @@ void CacheStorageEngine::putRecords(uint64_t cacheIdentifier, Vector<Record>&& r
                     recordIdentifiers.uncheckedAppend(identifier);
                     existingRecord.responseHeadersGuard = record.responseHeadersGuard;
                     existingRecord.response = WTFMove(record.response);
+                    existingRecord.responseBody = WTFMove(record.responseBody);
+                    ++existingRecord.updateResponseCounter;
                 }
             }
         }