From bdd42287e26666cb9230de0102045ccaa1e29207 Mon Sep 17 00:00:00 2001 From: "jennb@chromium.org" Date: Tue, 22 Dec 2009 18:22:23 +0000 Subject: Make appcache update conditionally include If-Modified-Since and If-None-Match headers when fetching a manifest. TEST=new tests added BUG=none Review URL: http://codereview.chromium.org/500152 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35153 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/appcache/appcache_response.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'webkit/appcache/appcache_response.cc') diff --git a/webkit/appcache/appcache_response.cc b/webkit/appcache/appcache_response.cc index 9ae5b29..09894a2 100644 --- a/webkit/appcache/appcache_response.cc +++ b/webkit/appcache/appcache_response.cc @@ -146,6 +146,11 @@ void AppCacheResponseReader::ReadInfo(HttpResponseInfoIOBuffer* info_buf, } int size = entry_->GetDataSize(kResponseInfoIndex); + if (size <= 0) { + ScheduleIOCompletionCallback(net::ERR_CACHE_MISS); + return; + } + info_buffer_ = info_buf; buffer_ = new net::IOBuffer(size); ReadRaw(kResponseInfoIndex, 0, buffer_.get(), size); -- cgit v1.1