Mercurial > hg
view tests/test-rebase-collapse.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 | 7a9cf012dddc |
children |
line wrap: on
line source
@ 7: H | | o 6: G |/| o | 5: F | | | o 4: E |/ | o 3: D | | | o 2: C | | | o 1: B |/ o 0: A % Rebasing B onto H 3 files updated, 0 files merged, 2 files removed, 0 files unresolved saved backup bundle to @ 5: Collapsed revision | * B | * C | * D o 4: H | | o 3: G |/| o | 2: F | | | o 1: E |/ o 0: A Expected A, B, C, D, F, H A B C D F H % Rebasing G onto H saved backup bundle to @ 6: Collapsed revision | * E | * G o 5: H | o 4: F | | o 3: D | | | o 2: C | | | o 1: B |/ o 0: A Expected A, E, F, H A E F H @ 7: H | | o 6: G | |\ | | o 5: F | | | | | o 4: E | | | | o | 3: D | |\| | o | 2: C |/ / | o 1: B |/ o 0: A % Rebase and collapse - more than one external (fail) abort: unable to collapse, there is more than one external parent % Rebase and collapse - E onto H saved backup bundle to @ 5: Collapsed revision |\ * E | | * F | | * G | o 4: H | | o | 3: D |\ \ | o | 2: C | |/ o / 1: B |/ o 0: A Expected A, B, C, E, F, H A B C E F H @ 8: I | | o 7: H | |\ | | o 6: G | | | | | o 5: F | | | | | o 4: E | | | | o | 3: D | |\| | o | 2: C |/ / | o 1: B |/ o 0: A % Rebase and collapse - E onto I merging E saved backup bundle to @ 5: Collapsed revision |\ * E | | * F | | * G | | * H | o 4: I | | o | 3: D |\ \ | o | 2: C | |/ o / 1: B |/ o 0: A Expected A, B, C, E, G, I A B C E G I Cat E: F @ 5: F | | o 4: E | |\ | | o 3: D | | | | o | 2: C | |/ | o 1: B |/ o 0: A % Rebase and collapse - B onto F saved backup bundle to @ 2: Collapsed revision | * B | * C | * D | * E o 1: F | o 0: A Expected A, B, C, D, F A B C D F