New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 765286 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Oct 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Preview of HTML response is different for XHR vs Fetch

Project Member Reported by jakearchibald@chromium.org, Sep 14 2017

Issue description

Look at the "preview" tab in devtools network, on this page for the following run in the console:

fetch('./');

vs

xhr = new XMLHttpRequest();
xhr.open('GET', './');
xhr.send();

The XHR preview shows rendered HTML, whereas fetch renders text.
 
Screenshots of results attached.
fetch.png
312 KB View Download
xhr.png
232 KB View Download
Owner: allada@chromium.org
Status: Assigned (was: Untriaged)
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2a04495525d82b290a619c4abd62067e9fa79bad

commit 2a04495525d82b290a619c4abd62067e9fa79bad
Author: Nathan Bruer <allada@chromium.org>
Date: Thu Sep 28 23:42:01 2017

[Devtools] Regression: Fixed rendering of HTML and JSON in network

* Fixed bug where network preview would not render JSON if it was
fetched and and had an error code.

* Fixed bug where network preview would try to render as  HTML
agressively if requested via XHR.

R=pfeldman,eostroukhov
BUG= 765286 , 767393 , 763921 

Change-Id: I9a160e50241e406456623469738b0694800ae586
Reviewed-on: https://chromium-review.googlesource.com/687890
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Commit-Queue: Blaise Bruer <allada@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505212}
[modify] https://crrev.com/2a04495525d82b290a619c4abd62067e9fa79bad/third_party/WebKit/LayoutTests/http/tests/devtools/network/network-choose-preview-view-expected.txt
[modify] https://crrev.com/2a04495525d82b290a619c4abd62067e9fa79bad/third_party/WebKit/LayoutTests/http/tests/devtools/network/network-choose-preview-view.html
[modify] https://crrev.com/2a04495525d82b290a619c4abd62067e9fa79bad/third_party/WebKit/Source/devtools/front_end/network/RequestPreviewView.js

Comment 4 Deleted

Comment 5 Deleted

Project Member

Comment 6 by bugdroid1@chromium.org, Oct 3 2017

Labels: merge-merged-3202
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f674b40baf2d44d1b27f33b3ed39e60b2b9169da

commit f674b40baf2d44d1b27f33b3ed39e60b2b9169da
Author: Blaise <allada@chromium.org>
Date: Tue Oct 03 20:17:01 2017

[Devtools] Regression: Fixed rendering of HTML and JSON in network

* Fixed bug where network preview would not render JSON if it was
fetched and and had an error code.

* Fixed bug where network preview would try to render as  HTML
agressively if requested via XHR.

R=pfeldman,eostroukhov
BUG= 765286 , 767393 , 763921 

(cherry picked from commit 2a04495525d82b290a619c4abd62067e9fa79bad)

Change-Id: I9a160e50241e406456623469738b0694800ae586
Reviewed-on: https://chromium-review.googlesource.com/687890
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Commit-Queue: Blaise Bruer <allada@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#505212}
Reviewed-on: https://chromium-review.googlesource.com/698906
Reviewed-by: Blaise Bruer <allada@chromium.org>
Cr-Commit-Position: refs/branch-heads/3202@{#561}
Cr-Branched-From: fa6a5d87adff761bc16afc5498c3f5944c1daa68-refs/heads/master@{#499098}
[modify] https://crrev.com/f674b40baf2d44d1b27f33b3ed39e60b2b9169da/third_party/WebKit/Source/devtools/front_end/network/RequestPreviewView.js

Status: Fixed (was: Assigned)

Sign in to add a comment