Do not cache POST response as Cache is indexed with url.

mRequestHandle is only set from Network. So we can skip checking whether url is Network url if mRequestHandle is not null.

Fix http://b/issue?id=1980031
This commit is contained in:
Grace Kloba
2009-09-08 18:31:26 -07:00
parent bde54df020
commit 273fecc22a

View File

@@ -410,7 +410,8 @@ class LoadListener extends Handler implements EventHandler {
mStatusCode == HTTP_MOVED_PERMANENTLY ||
mStatusCode == HTTP_TEMPORARY_REDIRECT) &&
mNativeLoader != 0) {
if (!mFromCache && URLUtil.isNetworkUrl(mUrl)) {
if (!mFromCache && mRequestHandle != null
&& !mRequestHandle.getMethod().equals("POST")) {
mCacheResult = CacheManager.createCacheFile(mUrl, mStatusCode,
headers, mMimeType, false);
}