WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
19793
Web Inspector should show compressed size for network resources
https://bugs.webkit.org/show_bug.cgi?id=19793
Summary
Web Inspector should show compressed size for network resources
Haris Pobric
Reported
2008-06-27 11:29:33 PDT
One thing I noticed is that the Web Inspector gives different results for the same page when used on Tiger and Leopard. Specifically, when analyzing resources, Web Inspector indicates the size of Prototype.js as ~31 KB when used on Tiger but ~123 KB when the same page is analyzed on a Leopard machine. The script is served via Google Ajax API. The behavior is persistent across different machines and web sites and servers. I have noticed this behavior with the nightly builds for the past couple of weeks.
Attachments
Patch enabling inspector support for showing transfer size without Content-Length headers.
(28.02 KB, patch)
2011-03-17 07:39 PDT
,
Vsevolod Vlasov
no flags
Details
Formatted Diff
Diff
Patch follow-up
(27.99 KB, patch)
2011-03-17 11:10 PDT
,
Vsevolod Vlasov
pfeldman
: review-
Details
Formatted Diff
Diff
Patch with fixes
(31.58 KB, patch)
2011-03-17 16:27 PDT
,
Vsevolod Vlasov
no flags
Details
Formatted Diff
Diff
Patch with fixes2
(31.60 KB, patch)
2011-03-17 16:46 PDT
,
Vsevolod Vlasov
no flags
Details
Formatted Diff
Diff
Patch + changelogs update forgotten earlier
(1.79 KB, patch)
2011-03-18 04:21 PDT
,
Vsevolod Vlasov
pfeldman
: review-
Details
Formatted Diff
Diff
Patch with fixes
(31.74 KB, patch)
2011-03-18 05:49 PDT
,
Vsevolod Vlasov
no flags
Details
Formatted Diff
Diff
Patch
(33.59 KB, patch)
2011-03-18 08:08 PDT
,
Vsevolod Vlasov
no flags
Details
Formatted Diff
Diff
Show Obsolete
(7)
View All
Add attachment
proposed patch, testcase, etc.
Mark Rowe (bdash)
Comment 1
2008-06-27 12:35:51 PDT
I suspect that CFNetwork on Tiger is giving us the compressed size (eg, size over the wire) while Leopard is giving us the uncompressed size (after any gzip compression has been reversed).
Mark Rowe (bdash)
Comment 2
2008-06-27 21:38:26 PDT
<
rdar://problem/6041709
>
Alexey Proskuryakov
Comment 3
2008-06-28 01:37:31 PDT
I'm pretty sure we have a duplicate in Bugzilla, but I cannot find it now.
Mark Janssen
Comment 4
2008-12-24 06:46:58 PST
(In reply to
comment #1
)
> I suspect that CFNetwork on Tiger is giving us the compressed size (eg, size > over the wire) while Leopard is giving us the uncompressed size (after any gzip > compression has been reversed).
I came across this bug when enabling gzip on a web server didn't make any difference to the size shown in the Web Inspector on the latest Nightly on Leopard. I haven't got a copy of Tiger so I can't confirm the original bug report. Maybe the best thing to do is to take the 'Content-Length' header and base reports on that.
Robert Blaut
Comment 5
2008-12-29 04:01:08 PST
(In reply to
comment #3
)
> I'm pretty sure we have a duplicate in Bugzilla, but I cannot find it now. >
Is it a
bug 14279
?
Alexey Proskuryakov
Comment 6
2008-12-29 04:21:41 PST
That's probably not what I was thinking of, but it is certainly related.
Alexey Proskuryakov
Comment 7
2009-10-27 20:09:05 PDT
***
Bug 30795
has been marked as a duplicate of this bug. ***
Alexey Proskuryakov
Comment 8
2010-04-27 13:39:18 PDT
***
Bug 38181
has been marked as a duplicate of this bug. ***
Alexey Proskuryakov
Comment 9
2011-03-16 14:27:18 PDT
See also:
bug 31019
.
Vsevolod Vlasov
Comment 10
2011-03-17 07:39:46 PDT
Created
attachment 86054
[details]
Patch enabling inspector support for showing transfer size without Content-Length headers. This patch enables inspector support for showing transfer size without Content-Length headers. It is still responsibility of each port to provide valid transfer size data to ResourceLoader/ResourceHandleClient. This bug should probably be renamed (if possible) to something more general, like "Web Inspector does not always show correct transfer size (for compressed/chunked data)", and then separate bugs could be created for each port.
Vsevolod Vlasov
Comment 11
2011-03-17 11:10:35 PDT
Created
attachment 86073
[details]
Patch follow-up Some fixes added
Pavel Feldman
Comment 12
2011-03-17 12:19:11 PDT
Comment on
attachment 86073
[details]
Patch follow-up View in context:
https://bugs.webkit.org/attachment.cgi?id=86073&action=review
> LayoutTests/http/tests/inspector/network/network-size-chunked.html:16 > + if (++loadedResourceCount === 1) {
I don't think you need a counter here.
> LayoutTests/http/tests/inspector/network/network-size-chunked.html:25 > + InspectorTest.evaluateInPage("loadPages()");
Where is loadPages?
> LayoutTests/platform/chromium/test_expectations.txt:3190 > +BUG_VSEVIK SKIP : http/tests/inspector/network/network-size-chunked.html = FAIL
Could you please file a bug for all of these?
> Source/WebCore/inspector/front-end/Resource.js:244 > + if (this._transferSize)
What about 0?
> Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp:561 > + InspectorInstrumentation::didReceiveContentLength(m_frame, m_currentResourceIdentifier, length, -1);
No traffic here.
> Source/WebCore/platform/network/mac/ResourceHandleMac.mm:926 > + m_handle->client()->didReceiveData(m_handle, (const char*)[data bytes], [data length], -1);
Put a FIXME and a bug reference here.
Vsevolod Vlasov
Comment 13
2011-03-17 16:27:32 PDT
Created
attachment 86109
[details]
Patch with fixes All done. Added fixes for QT, GTK, Win.
Alexey Proskuryakov
Comment 14
2011-03-17 16:35:36 PDT
Could you please write down what is being fixed in this patch? Will it fully work in Safari on Leopard and later?
Vsevolod Vlasov
Comment 15
2011-03-17 16:46:53 PDT
Created
attachment 86113
[details]
Patch with fixes2 I have uploaded my path again to resolve merge conflicts. No, it will not make it fully work in any port. This particular patch just makes it possible to pass actual transfer size to inspector. Each port should be changed accordingly to pass this value in ResourceHandleClient. I am not sure but it could probably require some changes outside of WebKit. I created separate bug for chromium port which I am currently working on:
https://bugs.webkit.org/show_bug.cgi?id=56602
I suggest we create separate bugs for other ports.
Vsevolod Vlasov
Comment 16
2011-03-18 04:21:36 PDT
Created
attachment 86155
[details]
Patch + changelogs update forgotten earlier
Pavel Feldman
Comment 17
2011-03-18 04:25:16 PDT
Comment on
attachment 86155
[details]
Patch + changelogs update forgotten earlier View in context:
https://bugs.webkit.org/attachment.cgi?id=86155&action=review
Please send complete patch.
> LayoutTests/ChangeLog:5 > + Added transfer size support in inspector for compressed data
Needs "Web Inspector:" prefix and the bug href.
> LayoutTests/ChangeLog:7 > + Need a short description and bug URL (OOPS!)
OOPS breaks presubmit checks.
Vsevolod Vlasov
Comment 18
2011-03-18 05:49:42 PDT
Created
attachment 86157
[details]
Patch with fixes
Vsevolod Vlasov
Comment 19
2011-03-18 08:08:42 PDT
Created
attachment 86165
[details]
Patch
Build Bot
Comment 20
2011-03-18 08:32:57 PDT
Attachment 86165
[details]
did not build on win: Build output:
http://queues.webkit.org/results/8199301
Alexey Proskuryakov
Comment 21
2011-03-18 09:06:08 PDT
> No, it will not make it fully work in any port.
Note that this bug is asking to make it work in Safari.
Pavel Feldman
Comment 22
2011-03-18 09:15:36 PDT
Comment on
attachment 86165
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=86165&action=review
> LayoutTests/ChangeLog:7 > + Web Inspector: Web Inspector Gives Different Results on Tiger and Leopard (should show compressed size)
ChangeLog structure: Reviewed By Title href Description * files
Pavel Feldman
Comment 23
2011-03-18 09:23:54 PDT
(In reply to
comment #21
)
> > No, it will not make it fully work in any port. > > Note that this bug is asking to make it work in Safari.
Yeah, we should move this patch to a different bug and make this one depend on it.
Ilya Tikhonovsky
Comment 24
2011-06-18 00:21:18 PDT
Comment on
attachment 86165
[details]
Patch was landed as
r81580
Alexey Proskuryakov
Comment 25
2011-06-18 09:28:42 PDT
Ilya, why did you close this bug? Are you saying that Web Inspector now displays a correct size in Safari?
Pavel Feldman
Comment 26
2011-06-18 09:47:17 PDT
Comment on
attachment 86165
[details]
Patch I think this is an oversight. As I mentioned in the
comment #23
, we should have moved the last patch to a new bug and fixed it there. In fact, I think that is what has happened. It is just that the reviewed patch here added confusion. Let me obsolete it and reopen the bug.
Pavel Feldman
Comment 27
2011-06-18 09:48:00 PDT
Reopening the original issue.
Timothy Hatcher
Comment 28
2012-03-17 09:02:50 PDT
We show both sizes in the Network panel if you have large rows enabled.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug