diff options
| author | 2010-03-11 11:47:22 -0800 | |
|---|---|---|
| committer | 2010-03-11 11:47:22 -0800 | |
| commit | 08e1f21dd4335bc2995fcee8ef8000fadd9f650a (patch) | |
| tree | 24927b487a2083a1a8e3b9aa376f0ff8a12ecf20 | |
| parent | 5acac5f2160287676898d69e4149a30870d08195 (diff) | |
| parent | 5ac85ccabbaa02623152f140b9233c6cefcf3b77 (diff) | |
Merge "Do not send the not-modified response when validating the cache."
| -rw-r--r-- | core/java/android/webkit/LoadListener.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/java/android/webkit/LoadListener.java b/core/java/android/webkit/LoadListener.java index 7da99cad9a66..4bdab0a59bd9 100644 --- a/core/java/android/webkit/LoadListener.java +++ b/core/java/android/webkit/LoadListener.java @@ -1014,8 +1014,12 @@ class LoadListener extends Handler implements EventHandler { // do not call webcore if it is redirect. According to the code in // InspectorController::willSendRequest(), the response is only updated - // when it is not redirect. - if ((mStatusCode >= 301 && mStatusCode <= 303) || mStatusCode == 307) { + // when it is not redirect. If we received a not-modified response from + // the server and mCacheLoader is not null, do not send the response to + // webkit. This is just a validation response for loading from the + // cache. + if ((mStatusCode >= 301 && mStatusCode <= 303) || mStatusCode == 307 || + (mStatusCode == 304 && mCacheLoader != null)) { return; } |