EncodedBodySize not correct
Reported by
sscha...@gmail.com,
Mar 12 2018
|
|||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36
Steps to reproduce the problem:
This is a very weird problem that only happens in a certain combination, namely, when I am setting a header, flushing the response, waiting some time and then sending the rest of the response.
I have attached a java servlet with 5 testcases. When i open the page this servlet provides, I am running
console.log(performance.getEntriesByType("navigation")[0].encodedBodySize);
console.log(performance.getEntriesByType("navigation")[0].decodedBodySize);
To log both of the values. DecodedBodySize always returns 8, but EncodedBodySize returns 0 in a special case(case 3)
What is the expected behavior?
Having encodedBodySize set to 8 in all 5 testcases
What went wrong?
Somehow this combination of sending headers, flushing and sleeping causes this problem. Strangely enough, there is no problem if there is no sleep after flushing the headers.
What puzzles me even more is the fact that decodedBodySize is set to 8 in all 5 cases, but only encodedBodySize is set to 0 in the third case.
Did this work before? N/A
Does this work in other browsers? Yes
Chrome version: 65.0.3325.146 Channel: stable
OS Version: 10.0
Flash Version:
,
Mar 13 2018
,
Mar 13 2018
Thanks for filing the issue!
Checked the issue on reported chrome version 65.0.3325.146 using Windows 10 with the below mentioned steps.
1. Launched Chrome
2. Downloaded the file and renamed it with .java file
3. Opened the file in chrome -> Inspected the page
4. Pasted "console.log(performance.getEntriesByType("navigation")[0].encodedBodySize);
console.log(performance.getEntriesByType("navigation")[0].decodedBodySize);
" in DevTools Console.
We observed that it returned value 0. Attaching the screen cast of the same.
@Reporter: Could you please have a look at the screen cast and let us know the process we followed to test the issue was correct. Any further inputs from your end may help us in triaging the issue in a better way.
,
Mar 19 2018
You don't have to load the file, you have to actually deploy it as a servlet in java. After that you can access the page directly. I have recorded a video what happens then.
,
Mar 19 2018
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Mar 21 2018
,
May 7 2018
What behavior do you see in other browsers?
,
May 7 2018
Seems like it is working now for Chrome 66(all test cases return 8,8, which is expected). To be sure, I retested it with Chrome 65 portable and it was returning the wrong values. Did not try it on FF, as it is not of interest any more.
,
May 7 2018
Thanks for verifying! |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by tdres...@chromium.org
, Mar 12 2018