Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(846)

Unified Diff: Source/devtools/front_end/RequestPreviewView.js

Issue 94893003: Support for json media types as (non-image) mime types. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Test via synthetic NetworkRequest Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/inspector/NetworkResourcesData.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/RequestPreviewView.js
diff --git a/Source/devtools/front_end/RequestPreviewView.js b/Source/devtools/front_end/RequestPreviewView.js
index d5237e05bf1d7bebec47a6e31b7b975eea7241fb..c9eb937e40d63464a6dc3be00f46236f3f1fd654 100644
--- a/Source/devtools/front_end/RequestPreviewView.js
+++ b/Source/devtools/front_end/RequestPreviewView.js
@@ -83,7 +83,8 @@ WebInspector.RequestPreviewView.prototype = {
_createPreviewView: function()
{
if (this.request.content) {
- if (this.request.mimeType === "application/json") {
+ var jsonMediaTypeRE = /^application\/[^;]*\+json/;
+ if (this.request.mimeType === "application/json" || jsonMediaTypeRE.test(this.request.mimeType)) {
var jsonView = this._jsonView();
if (jsonView)
return jsonView;
« no previous file with comments | « Source/core/inspector/NetworkResourcesData.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698