Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erroneously reporting compression is missing #3604

Closed
piehei opened this issue Oct 18, 2017 · 5 comments · Fixed by #3606
Closed

Erroneously reporting compression is missing #3604

piehei opened this issue Oct 18, 2017 · 5 comments · Fixed by #3606

Comments

@piehei
Copy link

piehei commented Oct 18, 2017

Hi
I think I've found a bug. My Chrome version is: 63.0.3236.7 (Official Build) dev (64-bit)

screenshot at 2017-10-18 10-59-43

The image is from an audit. It says that compression should be enabled even though gzip compression is enabled.

Dev Tool's Network panel reports gzip being enabled correctly. I've also verified it with

curl -H "Accept-Encoding: gzip" -I https://nyssetutka.fi/api/blob
HTTP/1.1 200 OK
Date: Wed, 18 Oct 2017 08:00:06 GMT
Content-Type: application/json; charset=utf-8
Connection: keep-alive
Set-Cookie: __cfduid=d85ab03be4c3499d78940038b9c8eb6611508313606; expires=Thu, 18-Oct-18 08:00:06 GMT; path=/; domain=.nyssetutka.fi; HttpOnly
X-Powered-By: Express
Access-Control-Allow-Origin: *
ETag: W/"70b6-M6AXRaPQy1OI9n/vJZqaoySw0Pw"
Strict-Transport-Security: max-age=2592000; preload
X-Content-Type-Options: nosniff
Server: cloudflare-nginx
CF-RAY: 3af9f649bbc55b6f-HEL
Content-Encoding: gzip

Is there something I'm missing?
Thanks a million!

@patrickhulce
Copy link
Collaborator

Indeed you have discovered a bug thanks very much for filing @piehei! To explain what's going on here, the audit is erroneously flagging the 304 Not Modified requests as lacking the content-encoding header even though it's obviously not necessary since there is no content to return.

To fix this we should probably ignore:

  • status codes 3xx
  • records with transferSize <= gzip size

@googleanalyticsresoneo
Copy link

I'm seeing the same issue today for example on gtm.js (google tag manager) on https://www.resoneo.com/

@googleanalyticsresoneo
Copy link

Sorry, seems to be ok in another Chrome on another machine. I have a Chrome instance where every profile shows that issue, but can't figure out why...

@patrickhulce
Copy link
Collaborator

I have a Chrome instance where every profile shows that issue, but can't figure out why...

@googleanalyticsresoneo if you figure out what environment bit is causing this issue so we can repro, definitely file a fresh bug for us to take a look! :) (off the top of my head, try disabling all your extensions, trying in incognito, etc)

@googleanalyticsresoneo
Copy link

@patrickhulce , thanks,
I have the same issue in Opera on the same machine. Looks like a WinHTTP setting issue ? https://msdn.microsoft.com/en-us/library/windows/desktop/aa384066(v=vs.85).aspx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants