annotate tests/test-relink.out @ 12570:a72c5ff1260c stable

Correct Content-Type header values for archive downloads. The content type for both .tar.gz and .tar.bz2 downloads was application/x-tar, which is correct for .tar files when no Content-Encoding is present, but is not correct for .tar.gz and .tar.bz2 files unless Content-Encoding is set to gzip or x-bzip2, respectively. However, setting Content-Encoding causes browsers to undo that encoding during download, when a .gz or .bz2 file is usually the desired artifact. Omitting the Content-Encoding header is preferred to avoid having browsers uncompress non-render-able files. Additionally, the Content-Disposition line indicates a final desired filename with .tar.gz or .tar.bz2 extension which makes providing a Content-Encoding header inappropriate. With the current configuration browsers (Chrome and Firefox thus far) are registering the application/x-tar Content-Type and not .tar extension and appending that extension, yielding filename.tar.gz.tar as a final on-disk artifact. This was originally reported here: http://stackoverflow.com/questions/3753659 I've changed the .tar.gz and .tar.bz2 Content-Type values to application/x-gzip and application/x-bzip2, respectively. Which yields correctly named download artifacts on Firefox, Chrome, and IE.
author Ry4an Brase <ry4an-hg@ry4an.org>
date Mon, 20 Sep 2010 14:56:08 -0500
parents 7914628b4751
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10217
2bbb4c8eb27e Add test for relink extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
1 % create source repository
2bbb4c8eb27e Add test for relink extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
2 adding a
2bbb4c8eb27e Add test for relink extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
3 adding b
2bbb4c8eb27e Add test for relink extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
4 % clone and pull to break links
2bbb4c8eb27e Add test for relink extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
5 requesting all changes
2bbb4c8eb27e Add test for relink extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
6 adding changesets
2bbb4c8eb27e Add test for relink extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
7 adding manifests
2bbb4c8eb27e Add test for relink extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
8 adding file changes
2bbb4c8eb27e Add test for relink extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
9 added 1 changesets with 2 changes to 2 files
2bbb4c8eb27e Add test for relink extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
10 updating to branch default
2bbb4c8eb27e Add test for relink extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
11 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
2bbb4c8eb27e Add test for relink extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
12 created new head
2bbb4c8eb27e Add test for relink extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
13 % relink
2bbb4c8eb27e Add test for relink extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
14 relinking .hg/store
11355
9011036ba79d relink/progress: Adding progress for collecting stage
timeless <timeless@gmail.com>
parents: 11354
diff changeset
15 tip has 2 files, estimated total number of files: 3
9011036ba79d relink/progress: Adding progress for collecting stage
timeless <timeless@gmail.com>
parents: 11354
diff changeset
16 collecting: 00changelog.i 1/3 files (33.33%)
9011036ba79d relink/progress: Adding progress for collecting stage
timeless <timeless@gmail.com>
parents: 11354
diff changeset
17 collecting: 00manifest.i 2/3 files (66.67%)
11357
7914628b4751 relink: ensure deterministic directory walk in collect
Martin Geisler <mg@aragost.com>
parents: 11355
diff changeset
18 collecting: a.i 3/3 files (100.00%)
11355
9011036ba79d relink/progress: Adding progress for collecting stage
timeless <timeless@gmail.com>
parents: 11354
diff changeset
19 collecting: b.i 4/3 files (133.33%)
11357
7914628b4751 relink: ensure deterministic directory walk in collect
Martin Geisler <mg@aragost.com>
parents: 11355
diff changeset
20 collecting: dummy.i 5/3 files (166.67%)
10218
750b7a4f01f6 Add support for relinking on Windows.
Siddharth Agarwal <sid.bugzilla@gmail.com>
parents: 10217
diff changeset
21 collected 5 candidate storage files
10217
2bbb4c8eb27e Add test for relink extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
22 not linkable: 00changelog.i
2bbb4c8eb27e Add test for relink extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
23 not linkable: 00manifest.i
11354
412a6e749f8d relink/progress: Adding progress for pruning stage
timeless <timeless@gmail.com>
parents: 10698
diff changeset
24 pruning: data/a.i 3/5 files (60.00%)
10217
2bbb4c8eb27e Add test for relink extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
25 not linkable: data/b.i
11354
412a6e749f8d relink/progress: Adding progress for pruning stage
timeless <timeless@gmail.com>
parents: 10698
diff changeset
26 pruning: data/dummy.i 5/5 files (100.00%)
10218
750b7a4f01f6 Add support for relinking on Windows.
Siddharth Agarwal <sid.bugzilla@gmail.com>
parents: 10217
diff changeset
27 pruned down to 2 probably relinkable files
10698
e930017f9e2a progress: use a verb (+noun) in present participle
Martin Geisler <mg@lazybytes.net>
parents: 10220
diff changeset
28 relinking: data/a.i 1/2 files (50.00%)
10218
750b7a4f01f6 Add support for relinking on Windows.
Siddharth Agarwal <sid.bugzilla@gmail.com>
parents: 10217
diff changeset
29 not linkable: data/dummy.i
10217
2bbb4c8eb27e Add test for relink extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
30 relinked 1 files (136 bytes reclaimed)
2bbb4c8eb27e Add test for relink extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
31 % check hardlinks
2bbb4c8eb27e Add test for relink extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
32 repo/.hg/store/data/a.i == clone/.hg/store/data/a.i
2bbb4c8eb27e Add test for relink extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
33 repo/.hg/store/data/b.i != clone/.hg/store/data/b.i