Closed Bug 601313 Opened 14 years ago Closed 14 years ago

serve .txt.gz logs on FTP with appropriate type (Content-Type:text/plain, Content-Encoding: x-gzip) and Access-Control-Allow-Origin headers

Categories

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

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dbaron, Assigned: justdave)

References

Details

Build logs are now being put on ftp.mozilla.org, primarily in directories such as these: /pub/mozilla.org/firefox/tinderbox-builds /pub/mozilla.org/firefox/tryserver-builds /pub/mozilla.org/mobile/tinderbox-builds There are two problems with the current headers: First, they're being sent as Content-Type: application/x-gzip, which means they lead to a download prompt. They should just be viewable in the browser, which they would be if they were sent as Content-Type: text/plain and Content-Encoding: application/x-gzip. (This is similar to bug 585194.) Second, we may well want cross-site access to these logs from client-side tools like tinderboxpushlog. This means they should be sent with Access-Control-Allow-Origin. Since, as far as I know, everything on the FTP server is public, it should be safe to send everything on the server with that header. Thus, I'd suggest adding the following to the root .htaccess file on ftp.mozilla.org: Header set Access-Control-Allow-Origin "*" <FilesMatch \.txt\.gz$> ForceType text/plain AddDefaultCharset UTF-8 AddEncoding x-gzip gz </FilesMatch> (I've run some cursory tests on this .htaccess chunk on http://people.mozilla.com/~dbaron/htaccess-test/ , except with different values to make sure they were having effects only on what I expected them to (since UTF-8 and x-gzip actually match the default behavior).)
Summary: serve .txt.gz logs on FTP with appropriate type and Cross-Origin headers → serve .txt.gz logs on FTP with appropriate type (Content-Type:text/plain, Content-Encoding: x-gzip) and Access-Control-Allow-Origin headers
Blocks: 586539
(In reply to comment #0) > Second, we may well want cross-site access to these logs from client-side tools > like tinderboxpushlog. This means they should be sent with > Access-Control-Allow-Origin. Since, as far as I know, everything on the FTP > server is public, it should be safe to send everything on the server with that > header. Actually, we have stuff on FTP that's not public and requires HTTP auth, so we need to be more careful with this part.
I think you should probably file a separate bug for the Access-Control-Allow-Origin header...
No longer blocks: 586539
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
I'd like this one to stay open until someone does, though. I'm trying to keep a real dependency list for TBPL-without-tinderbox.
Blocks: 586539
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Assignee: server-ops → justdave
(In reply to comment #1) > Actually, we have stuff on FTP that's not public and requires HTTP auth, so we > need to be more careful with this part. Where? It needs to go away if so. That entire site is supposed to be public, and it the docroot gets shared all over SJC and is available on a number of hostnames from multiple servers. Trying to http auth something on that docroot is a lost cause for actually protecting anything.
(In reply to comment #5) That's moving elsewhere in bug 585615.
OK, that's in the process of going away, there's another bug on that. Sounds like it's not far off from getting implemented, so I'll hold off on doing this until that's gone so we don't have to worry about where it works.
Depends on: 585615
Whiteboard: [blocked]
Whiteboard: [blocked]
OK, this is in place now. It's in httpd.conf (well, the vhost file actually) and not in the .htaccess, because the .htaccess gets synced out to the whole mirror network. :) I'd appreciate if someone can verify it works properly.
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.