| Index: Source/devtools/front_end/NetworkRequest.js
|
| diff --git a/Source/devtools/front_end/NetworkRequest.js b/Source/devtools/front_end/NetworkRequest.js
|
| index 066e6d2b5660c4ff0bbfab0230efbb9c8e389e67..4301d75264d69154d793ddf6972a41c64fdb76f8 100644
|
| --- a/Source/devtools/front_end/NetworkRequest.js
|
| +++ b/Source/devtools/front_end/NetworkRequest.js
|
| @@ -250,24 +250,7 @@ WebInspector.NetworkRequest.prototype = {
|
| */
|
| get transferSize()
|
| {
|
| - if (typeof this._transferSize === "number")
|
| - return this._transferSize;
|
| - if (this.statusCode === 304) // Not modified
|
| - return this.responseHeadersSize;
|
| - if (this._cached)
|
| - return 0;
|
| - // If we did not receive actual transfer size from network
|
| - // stack, we prefer using Content-Length over resourceSize as
|
| - // resourceSize may differ from actual transfer size if platform's
|
| - // network stack performed decoding (e.g. gzip decompression).
|
| - // The Content-Length, though, is expected to come from raw
|
| - // response headers and will reflect actual transfer length.
|
| - // This won't work for chunked content encoding, so fall back to
|
| - // resourceSize when we don't have Content-Length. This still won't
|
| - // work for chunks with non-trivial encodings. We need a way to
|
| - // get actual transfer size from the network stack.
|
| - var bodySize = Number(this.responseHeaderValue("Content-Length") || this.resourceSize);
|
| - return this.responseHeadersSize + bodySize;
|
| + return this._transferSize || 0;
|
| },
|
|
|
| /**
|
| @@ -279,6 +262,14 @@ WebInspector.NetworkRequest.prototype = {
|
| },
|
|
|
| /**
|
| + * @param {number} x
|
| + */
|
| + setTransferSize: function(x)
|
| + {
|
| + this._transferSize = x;
|
| + },
|
| +
|
| + /**
|
| * @return {boolean}
|
| */
|
| get finished()
|
|
|