mod_spdy, gzip and Firefox

312 views
Skip to first unread message

Tarun Reddy

unread,
Apr 28, 2012, 10:51:13 AM4/28/12
to mod-spdy...@googlegroups.com
So I have this weirdness on my test server. I've installed mod_spdy and enabled spdy in Firefox 12 (and 13 tested) but when I do, mod_spdy doesn't gzip or at least doesn't include the Content-encoding: gzip header in responses to Firefox. Initially I thought it might have been the Firefox, but they are sending the correct request headers. Gzip works fine with spdy turned off and also in Chrome with spdy enabled.

Just to add fuel to the "Firefox broken" theory, gzip doesn't show up on gmail either.... but maybe Google has a reason for it. Any one else see this?

Tarun

Tarun Reddy

unread,
May 23, 2012, 7:07:19 PM5/23/12
to mod-spdy...@googlegroups.com
So after looking at this further, I believe that this is on mod_spdy side. I've updated mod-spdy-beta-0.9.2.1-332.x86_64 and Firefox still doesn't receive gzip'ed content even though it is sending the appropriate headers.

My server is https://rally4rally.rallydev.com/. You will notice a message on the login page stating that "We have detected that your browser is not using page compression" when we don't send content back with gzip enabled.

Firefox seems to be sending the correct headers:
GET /slm/login.op HTTP/1.1
Host: rally4rally.rallydev.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:13.0) Gecko/20100101 Firefox/13.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Tarun

Tarun Reddy

unread,
May 23, 2012, 7:17:05 PM5/23/12
to mod-spdy...@googlegroups.com

Tarun Reddy

unread,
Jun 5, 2012, 11:28:37 AM6/5/12
to mod-spdy...@googlegroups.com
So soon (today, tomorrow) Firefox 13 will be released. Anyone have an idea about why this might be occurring? This could lead to a significant performance decrease for many users, esp. low bandwidth users.

Tarun

Tarun Reddy

unread,
Jun 7, 2012, 11:10:38 PM6/7/12
to Tarun Reddy, mod-spdy...@googlegroups.com

Matthew Steele

unread,
Jun 8, 2012, 1:12:35 PM6/8/12
to mod-spdy...@googlegroups.com
Aha, it seems that Firefox does not send "Accept-Encoding: gzip" for SPDY requests.  The SPDY spec says that servers are free to assume that SPDY clients support gzip even if they don't say so, so Firefox takes that as an invitation to omit the header (which is reasonable).

I'll make a change to mod_spdy to add the header to incoming SPDY requests that lack it, which should hopefully fix the problem for mod_spdy servers.

Ryan Hamilton

unread,
Jun 9, 2012, 12:06:22 AM6/9/12
to mod-spdy...@googlegroups.com
FWIW, Chrome will be implementing the same behavior as Firefox:


Cheers,

Ryan

Tarun Reddy

unread,
Jun 9, 2012, 4:53:17 PM6/9/12
to mod-spdy...@googlegroups.com
That's great! I will say that using Firebug and Live HTTP Headers, I always saw the Accept-Encoding:gzip,deflate header so I'm not sure how to take their report. BUT if this fixes it, I'm not sure I'm all that worried.

Thank you!
Tarun

Tarun Reddy

unread,
Jul 11, 2012, 5:38:10 PM7/11/12
to mod-spdy...@googlegroups.com
Hi Matthew,

Any progress on this? Performance on Firefox is very slow and I can't reasonably roll mod_spdy out to production without this fix. If the fix is long in coming, is there an environment variable set that I can maybe use to force Apache to compress responses for SPDY connections?

Thank you,
Tarun

On Fri, Jun 8, 2012 at 11:12 AM, Matthew Steele <mdst...@google.com> wrote:

Tarun Reddy

unread,
Jul 11, 2012, 6:41:12 PM7/11/12
to mod-spdy...@googlegroups.com
After sending this email, I thought about the second have of my question and started looking for the environment variable and found SPDY_VERSION. I'm using this

# fix gzip for Firefox which neglects gzip headers with spdy
RequestHeader set Accept-Encoding "gzip, deflate" env=SPDY_VERSION

before all of my mod_deflate stuff to force gzip/deflate for all SPDY requests. Works great so far!

Tarun

Matthew Steele

unread,
Jul 11, 2012, 7:07:25 PM7/11/12
to mod-spdy...@googlegroups.com
Ah, great!  Thanks for finding and sharing that workaround.

This issue has already been fixed in trunk, but hasn't made it out to a binary release yet.  Until it does (hopefully soon), this sounds like a great workaround.

Cheers,
-Matthew
Reply all
Reply to author
Forward
0 new messages