Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 521735

Summary: [www] [feed] Enable gzip compression for RSS feeds
Product: Community Reporter: Andreas Sewe <sewe>
Component: ServersAssignee: Eclipse Webmaster <webmaster>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: chris.guindon, denis.roy, webmaster
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 521539    

Description Andreas Sewe CLA 2017-09-01 04:40:17 EDT
At the moment, the RSS feeds (/community/news/2005newsarchive.rss, /community/news/2005inthenewsarchive.rss, /scripts/whatsnew.rss) served by www.eclipse.org are rather large and would very much benefit from gzip compression (savings are about 75%).
Comment 1 Denis Roy CLA 2017-09-01 12:15:10 EDT
On the web server, even if we specify gzip in the headers, we don't get the gzipped payload.

We need to configure mod_deflate for text/rss

$ wget -S --header="Accept-encoding:gzip,deflate" https://www.eclipse.org/community/news/2005newsarchive.rss
Connecting to www.eclipse.org (www.eclipse.org)|198.41.30.198|:443... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 200 OK
  Date: Fri, 01 Sep 2017 16:12:27 GMT
  Server: Apache
  Last-Modified: Fri, 01 Sep 2017 13:40:47 GMT
  ETag: "6e867-55820e88855c0"
  Accept-Ranges: bytes
  Content-Length: 452711
  X-NodeID: www-vm2
  X-Frame-Options: SAMEORIGIN
  Keep-Alive: timeout=3, max=200
  Connection: Keep-Alive
  Content-Type: text/rss
Length: 452711 (442K) [text/rss]
Saving to: ‘2005newsarchive.rss’

2017-09-01 12:12:28 (1.44 MB/s) - ‘2005newsarchive.rss’ saved [452711/452711]
Comment 2 Andreas Sewe CLA 2017-09-01 12:27:55 EDT
(In reply to Denis Roy from comment #1)
> On the web server, even if we specify gzip in the headers, we don't get the
> gzipped payload.
> 
> We need to configure mod_deflate for text/rss

Yes, that's what I meant in comment 0. (But see Bug 521736 why text/rss may not be the best Content-Type for RSS feeds.)
Comment 3 Denis Roy CLA 2017-09-01 13:54:22 EDT
I've created a path to add text/rss and application/rss+xml.
Comment 4 Andreas Sewe CLA 2017-09-04 03:54:07 EDT
FYI, I can confirm (checked using Wireshark) that the News plug-in currently part of the Oxygen.1 RC2 Java EPP package successfully fetches the compressed feed. Here's the exchange:

> GET /home/eclipsenews.rss HTTP/1.1
> Host: www.eclipse.org
> Connection: Keep-Alive
> User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_65)

Note that [1] has since been merged, so the User-Agent in Oxygen.1 RC3 will be "org.eclipse.recommenders.news.rcp/2.4.10".

> Accept-Encoding: gzip,deflate

> HTTP/1.1 302 Found
> Date: Mon, 04 Sep 2017 07:44:10 GMT
> Server: Apache
> Location: http://www.eclipse.org/community/news/2005newsarchive.rss
> Cache-Control: max-age=86400
> Expires: Tue, 05 Sep 2017 07:44:10 GMT
> Vary: Accept-Encoding
> Content-Encoding: gzip
> Content-Length: 212
> Keep-Alive: timeout=3, max=200
> Connection: Keep-Alive
> Content-Type: text/html; charset=iso-8859-1

> ..........-..n.0.D...m.xC.^....."A..=.h..G...v...&.......K..U...>......a..|......R.3)E.X..2#.\'..6.Im.X..%......!#|....}....>....,.....O`u..ol.4......4.#N.$...!.....wn..t....eQ.-B...7.!.\Z.L.. ......x......Q.....

> GET /community/news/2005newsarchive.rss HTTP/1.1
> Host: www.eclipse.org
> Connection: Keep-Alive
> User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_65)
> Accept-Encoding: gzip,deflate

> HTTP/1.1 200 OK
> Date: Mon, 04 Sep 2017 07:44:10 GMT
> Server: Apache
> Last-Modified: Fri, 01 Sep 2017 13:40:47 GMT
> ETag: "6e867-55820e88855c0"
> Accept-Ranges: bytes
> Vary: Accept-Encoding
> Content-Encoding: gzip
> X-NodeID: www-vm2
> X-Frame-Options: SAMEORIGIN
> Keep-Alive: timeout=3, max=199
> Connection: Keep-Alive
> Transfer-Encoding: chunked
> Content-Type: text/rss

> 1faa
> .............n.X..
> ^G>...53#vI.HI>e.s:lG.....agF.ZX0(....H.I.....h....Y@...h4vm.u_..|.z....D..IYr.z.<T.m......?~....:..[?N.(....hn............_./..

*snip*

[1] <https://git.eclipse.org/r/#/c/104012/>
Comment 5 Andreas Sewe CLA 2017-09-08 04:12:48 EDT
I think this can be marked as FIXED. Or am I missing something?
Comment 6 Denis Roy CLA 2017-09-08 08:09:35 EDT
Yup!