Web Inspector: cached permanent redirects don't show redirect code and text in Networ...
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Aug 2011 14:11:32 +0000 (14:11 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Aug 2011 14:11:32 +0000 (14:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=67126

Reviewed by Yury Semikhatsky.

* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForResourceResponse):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkDataGridNode.prototype._refreshStatusCell):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@93974 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorResourceAgent.cpp
Source/WebCore/inspector/front-end/NetworkPanel.js

index bf77692907bae5b62d9264689c2cfa94e513f192..95ea8d5a588561743c0e6695b03cc3d0e9a2d68c 100644 (file)
@@ -1,3 +1,15 @@
+2011-08-29  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Web Inspector: cached permanent redirects don't show redirect code and text in Network panel.
+        https://bugs.webkit.org/show_bug.cgi?id=67126
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/InspectorResourceAgent.cpp:
+        (WebCore::buildObjectForResourceResponse):
+        * inspector/front-end/NetworkPanel.js:
+        (WebInspector.NetworkDataGridNode.prototype._refreshStatusCell):
+
 2011-08-25  Pavel Podivilov  <podivilov@chromium.org>
 
         Web Inspector: extract FormattedContentProvider from RawSourceCode.
index f808ef14a76a5c71b320a8cc02ae103528dbca0c..c76d054a4db70873d52999951251927b546d91ea 100644 (file)
@@ -139,8 +139,13 @@ static PassRefPtr<InspectorObject> buildObjectForResourceResponse(const Resource
 
     RefPtr<InspectorObject> responseObject = InspectorObject::create();
     responseObject->setString("url", response.url().string());
-    responseObject->setNumber("status", response.resourceLoadInfo() ? response.resourceLoadInfo()->httpStatusCode : response.httpStatusCode());
-    responseObject->setString("statusText", response.resourceLoadInfo() ? response.resourceLoadInfo()->httpStatusText : response.httpStatusText());
+    if (response.resourceLoadInfo() && response.resourceLoadInfo()->httpStatusCode) {
+        responseObject->setNumber("status", response.resourceLoadInfo()->httpStatusCode);
+        responseObject->setString("statusText", response.resourceLoadInfo()->httpStatusText);
+    } else {
+        responseObject->setNumber("status", response.httpStatusCode());
+        responseObject->setString("statusText", response.httpStatusText());
+    }
 
     responseObject->setString("mimeType", response.mimeType());
     responseObject->setBoolean("connectionReused", response.connectionReused());
index 8b38545dc70544325bec019ca12fc7883d03d56a..e13bd7923962023bda3d3a64e0a8651783f6057c 100644 (file)
@@ -1911,14 +1911,6 @@ WebInspector.NetworkDataGridNode.prototype = {
             return;
         }
 
-        var fromCache = this._resource.cached;
-        if (fromCache) {
-            this._statusCell.setTextAndTitle(WebInspector.UIString("(from cache)"));
-            this._statusCell.addStyleClass("network-dim-cell");
-            this.element.removeStyleClass("network-error-row");
-            return;
-        }
-
         this._statusCell.removeStyleClass("network-dim-cell");
         this.element.removeStyleClass("network-error-row");