[Webkit-unassigned] [Bug 155112] Web Inspector: Doesn't show size of compressed content correctly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 13 19:41:49 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=155112

Matt Baker <mattbaker at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mattbaker at apple.com

--- Comment #16 from Matt Baker <mattbaker at apple.com> ---
Comment on attachment 307071
  --> https://bugs.webkit.org/attachment.cgi?id=307071
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=307071&action=review

> Source/WebInspectorUI/UserInterface/Models/Resource.js:489
> +        // for estimatedTransferSize.  So prefer the "Content-Length" property

Comment style: only need one space after period.

> Source/WebInspectorUI/UserInterface/Models/Resource.js:532
> +        return !!(contentEncoding && /\b(?:gzip|deflate)\b/.test(contentEncoding));

Good catch, looks like we previously returned undefined or true.

> Source/WebInspectorUI/UserInterface/Models/Resource.js:616
> +        this._estimatedResponseHeadersSize = String(this._statusCode).length + this._statusText.length + 12; // Extra length is for "HTTP/1.1 ", " ", and "\r\n".

What about:

const headerBaseSize = 12; // Length of "HTTP/1.1 ", " ", and "\r\n";
this._estimatedResponseHeadersSize = String(this._statusCode).length + this._statusText.length + headerBaseSize;

> Source/WebInspectorUI/UserInterface/Models/Resource.js:618
> +            this._estimatedResponseHeadersSize += name.length + this._responseHeaders[name].length + 4; // Extra length is for ": ", and "\r\n".

Ditto.

> Source/WebInspectorUI/UserInterface/Models/Resource.js:720
> +        var previousSize = this._estimatedSize;

let

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170414/8303beeb/attachment-0001.html>


More information about the webkit-unassigned mailing list