| Index: chrome/browser/resources/net_internals/log_view_painter.js
|
| ===================================================================
|
| --- chrome/browser/resources/net_internals/log_view_painter.js (revision 154235)
|
| +++ chrome/browser/resources/net_internals/log_view_painter.js (working copy)
|
| @@ -442,12 +442,20 @@
|
| * If |entry| has headers, returns a copy of |entry| with all cookie and
|
| * unencrypted login text removed. Otherwise, returns original |entry| object.
|
| * This is needed so that JSON log dumps can be made without affecting the
|
| - * source data.
|
| + * source data. Also, if the input entry's headers are an object, the resulting
|
| + * object will have its headers in a list.
|
| */
|
| stripCookiesAndLoginInfo = function(entry) {
|
| - if (!entry.params || !entry.params.headers ||
|
| - !(entry.params.headers instanceof Array)) {
|
| + if (!entry.params || !entry.params.headers)
|
| return entry;
|
| + var headers = entry.params.headers;
|
| + if (!(headers instanceof Object) && !(headers instanceof Array))
|
| + return;
|
| +
|
| + if (headers instanceof Object) {
|
| + headers = [];
|
| + for (var key in entry.params.headers)
|
| + headers.push(key + ': ' + entry.params.headers[key]);
|
| }
|
|
|
| // Duplicate the top level object, and |entry.params|. All other fields are
|
| @@ -456,7 +464,7 @@
|
| entry = shallowCloneObject(entry);
|
| entry.params = shallowCloneObject(entry.params);
|
|
|
| - entry.params.headers = entry.params.headers.map(stripCookieOrLoginInfo);
|
| + entry.params.headers = headers.map(stripCookieOrLoginInfo);
|
| return entry;
|
| }
|
|
|
|
|