Closed Bug 597497 Opened 14 years ago Closed 14 years ago

serve compressed logs on ftp.mozilla.org with content-type: text/plain

Categories

(mozilla.org Graveyard :: Server Operations, task)

x86_64
Linux
task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sfink, Assigned: fox2mike)

References

Details

Now that we're getting the logs in the build directory, thanks to bug 511749 (yay!), it would be nice if they could be served in a way that they would be recognized as .txt by the browser and automatically uncompressed client-side if I'm not downloading them.

mod_gunzip looks like it does more or less the right thing. I've never used it myself. http://www.innerjoin.org/apache-compression/howto.html

I played around with this a little, serving up a static response with nc, and it looks like all you really want to have happen is that a request for something.txt.gz should return

  Content-Encoding: gzip
  Content-Type: text/plain

and the raw gzipped output (assuming Accept-Encoding: gzip is present.) Optimally, if Accept-Encoding: gzip is *not* present, it should either decompress server-side (mod_gunzip does this) or maybe just return Content-Type: application/x-gzip as it does now.

Whoever would handle this is probably already far more familiar with this than I am, so the above is unlikely to be helpful. I was just surprised that there wasn't already a built-in way to properly serve up compressed files. mod_gzip and mod_deflate get it backwards, in my view.
Assignee: nobody → server-ops
Component: Release Engineering → Server Operations
QA Contact: release → mrz
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
(In reply to comment #1)
> 
> *** This bug has been marked as a duplicate of bug 585194 ***

Oops, this is about FTP logs not Tinderbox. Re-opening.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
On which host do you need this?
Links refer to .txt.gz files under
http://stage.mozilla.org/pub/
mozilla.org/firefox/tryserver-builds/
I don't have an example email, but this bug was intended for all the log files that are stored alongside the builds that are generated when pushing to mercurial (try server, mozilla-central, etc.)

Sample URL: http://stage.mozilla.org/pub/mozilla.org/firefox/tryserver-builds/azakai@mozilla.com-a7e3ae9e4102/tryserver-linux64/tryserver-linux64-build3228.txt.gz

Currently, that sends back

  Content-Type: application/x-gzip
  Content-Encoding: x-gzip
...so I think this bug really is a dupe of bug 585194 except the logs are no longer being served up by the tinderbox server. (For all I know, it might actually be the same server in the end.)
Assignee: server-ops → justdave
Blocks: 586539
Summary: Serve compressed logs with content-type: text/plain → serve compressed logs on ftp.mozilla.org with content-type: text/plain
Bug 601313 has a tested .htaccess snippet.
When can we expect this fixed? It's rather annoying.
I've also filed bug 606290 about adding access-control headers.
Fixed. Look at http://stage.mozilla.org/pub/mozilla.org/firefox/tryserver-builds/azakai@mozilla.com-5dc627b7a85f/tryserver-win32-debug/tryserver-win32-debug-build4466.txt.gz for an example (should open in your browser).

 <FilesMatch \.txt\.gz$>
  AddType text/plain gz
  AddCharset UTF-8 gz
  AddEncoding x-gzip gz
 </FilesMatch>

was what was added to the apache config.
Assignee: justdave → shyam
Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → FIXED
Product: mozilla.org → mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.