Open Bug 1617852 Opened 4 years ago Updated 2 years ago

Wrong document size on 301 redirects

Categories

(DevTools :: Netmonitor, defect, P3)

72 Branch
defect

Tracking

(Not tracked)

People

(Reporter: vechenjivot, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug, )

Details

(Keywords: parity-chrome)

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0

Steps to reproduce:

I have a site that uses 301 redirects, I am usign the following URL to test:
https://shopche.com/дом-и-градина/домашен-майстор/22
which redirects to
https://shopche.com/дом-и-градина/домашен-майстор

Actual results:

When I inspect the request in the Newtwork tab, it shows the document size returned is 28.89kB compressed.

Expected results:

The actual document size is just 216 B (as seen in Chrome)

Has STR: --- → yes
Component: Untriaged → Netmonitor
Keywords: parity-chrome
Product: Firefox → DevTools

The priority flag is not set for this bug.
:Honza, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(odvarko)
Attached image image.png

Thanks for the report!

I can't see the problem. When loading https://shopche.com/дом-и-градина/домашен-майстор/22 I am seeing 404

What exactly should I do to reproduce the issue on my machine?

Honza

Flags: needinfo?(odvarko) → needinfo?(vechenjivot)

Sorry, you can test with this url:
https://shopche.com/65-moda
which will redirect to
https://shopche.com/мода

Flags: needinfo?(vechenjivot)
Attached image image.png

Thanks I can clearly see the problem now.

Chrome shows: 115 B
Firefox shows: 27.51 KB / 156.71 KB

Screenshot attached.

Honza

Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3

Michal, this looks like the first (redirect) request reports the same size as the second one (the slight difference in the transferred size on the screenshot might be because in include HTTP headers size too).

This could be related to the fact that we don't track the response for redirections and thus using the final response's size?

A few links:

https://searchfox.org/mozilla-central/rev/070a000dd49aac4a26147e137efcd91a728d13b8/devtools/server/actors/network-monitor/network-response-listener.js#191

Can you please confirm?

Honza

Flags: needinfo?(michal.novotny)

(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #5)

Michal, this looks like the first (redirect) request reports the same size as the second one (the slight difference in the transferred size on the screenshot might be because in include HTTP headers size too).

This could be related to the fact that we don't track the response for redirections and thus using the final response's size?

Yes, it looks like the transferred size on the final channel in the redirect chain is used for all preceding channels in the chain, which is wrong..

Flags: needinfo?(michal.novotny)
Depends on: 1621569
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: