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)
mozilla.org Graveyard
Server Operations
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).)
Reporter | ||
Updated•14 years ago
|
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
Reporter | ||
Comment 1•14 years ago
|
||
(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.
Comment 2•14 years ago
|
||
I think you should probably file a separate bug for the Access-Control-Allow-Origin header...
Reporter | ||
Comment 3•14 years ago
|
||
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
Reporter | ||
Updated•14 years ago
|
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Updated•14 years ago
|
Assignee: server-ops → justdave
Assignee | ||
Comment 4•14 years ago
|
||
(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.
Reporter | ||
Comment 5•14 years ago
|
||
This URL triggers HTTP auth for me:
https://ftp.mozilla.org/pub/mozilla.org/firefox/pvt-builds/
Comment 6•14 years ago
|
||
(In reply to comment #5)
That's moving elsewhere in bug 585615.
Assignee | ||
Comment 7•14 years ago
|
||
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.
Updated•14 years ago
|
Whiteboard: [blocked]
Assignee | ||
Updated•14 years ago
|
Whiteboard: [blocked]
Assignee | ||
Comment 9•14 years ago
|
||
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 ago → 14 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Product: mozilla.org → mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•