On Fri, 2009-02-13 at 22:39 +1100, George Pollard wrote: > On Fri, 2009-02-13 at 10:58 +0000, Duncan Coutts wrote: > > Hi folks, > > > > Does anyone have any experience with apache configuration, particularly > > mime types and handling browser quirks and would like to help us with an > > issue we have on hackage? > > > > http://hackage.haskell.org/trac/hackage/ticket/498 > > > > The problem is described in the ticket but basically IE6 gets confused > > by the Content-Type and Content-Encoding and ends up saving ".tar.gz" > > files with the wrong name ".tar.tar". > > > > We need help working out how to configure apache to use a workaround and > > with testing that the solution actually works. > > > > Thanks! > > > > Duncan > > Currently the browser receives: > > > HTTP/1.1 200 OK > > Date: Fri, 13 Feb 2009 11:15:22 GMT > > Server: Apache/2.2.3 (Debian) > > Last-Modified: Mon, 09 Feb 2009 07:55:57 GMT > > ETag: "38c010-46d-b361bd40" > > Accept-Ranges: bytes > > Content-Length: 1133 > > Content-Type: application/x-tar > > Content-Encoding: x-gzip > > You could try adding a Content-Disposition header to specify a file name: > > Content-Disposition: attachment; filename=APackage.tar.gz > > In Apache you can (apparently [1],[2]) do it like this: > > RewriteRule "^packages/archive/[^/]+/[^/]+/(.+)$" - [env=pkgname:$1] > Header set Content-Disposition "attachment; filename=\"%{pkgname}e\"" > env=pkgname > > [1]: http://httpd.apache.org/docs/2.0/mod/core.html#files > [2]: > http://www.experts-exchange.com/Software/Server_Software/Web_Servers/Apache/Q_23054616.html
Can we do that just for one user agent? I don't think we want to use non-standard stuff in general. Apparently Content-Disposition is not in the official HTTP spec, but IE is known to follow it. Duncan _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe