Bug 1221754 - Include encoding in HAR exported data; r=jryans
authorJan Odvarko <odvarko@gmail.com>
Mon, 09 Nov 2015 13:46:12 +0100
changeset 308692 0788d3d500163670f1a01e02cd0c2e11414bfc33
parent 308691 4efdfcadd82f7022ff9b49555f81294f7b1b0d46
child 308693 69777d63651913688cf28161a4636d983e7b4f72
push id7514
push users.kaspari@gmail.com
push dateFri, 13 Nov 2015 14:12:41 +0000
reviewersjryans
bugs1221754
milestone45.0a1
Bug 1221754 - Include encoding in HAR exported data; r=jryans
devtools/client/netmonitor/har/har-builder.js
devtools/server/actors/webconsole.js
--- a/devtools/client/netmonitor/har/har-builder.js
+++ b/devtools/client/netmonitor/har/har-builder.js
@@ -307,16 +307,17 @@ HarBuilder.prototype = {
     let content = {
       mimeType: file.mimeType,
       size: -1
     };
 
     let responseContent = file.responseContent;
     if (responseContent && responseContent.content) {
       content.size = responseContent.content.size;
+      content.encoding = responseContent.content.encoding;
     }
 
     let includeBodies = this._options.includeResponseBodies;
     let contentDiscarded = responseContent ?
       responseContent.contentDiscarded : false;
 
     // The comment is appended only if the response content
     // is explicitly discarded.
--- a/devtools/server/actors/webconsole.js
+++ b/devtools/server/actors/webconsole.js
@@ -2075,16 +2075,17 @@ NetworkEventActor.prototype =
     }
 
     let packet = {
       from: this.actorID,
       type: "networkEventUpdate",
       updateType: "responseContent",
       mimeType: aContent.mimeType,
       contentSize: aContent.size,
+      encoding: aContent.encoding,
       transferredSize: aContent.transferredSize,
       discardResponseBody: aDiscardedResponseBody,
     };
 
     this.conn.send(packet);
   },
 
   /**