[darcs-users] darcsweb 0.13

Gaetan Lehmann gaetan.lehmann at jouy.inra.fr
Wed Dec 21 22:28:54 UTC 2005


On Wednesday 21 December 2005 16:04, Alberto Bertogli wrote:
> On Tue, Dec 20, 2005 at 02:44:28PM +0100, Gaetan Lehmann wrote:
> > Is it possible to display an image ?
> > When I click on "plain" for an image, I see a PNG appear in the window,
> > and some garbage below :-(
> > wget tell me the downloaded file is a "text/plain". It surely explain the
> > problem
>
> Yes, but I can't really tell what type of file is it, much less
> identifying it as an image.
>
> What I can do is check if darcs sees the file as a binary one (it matches
> regular expressions at /_darcs/prefs/binaries), and if so offer a download
> instead of displaying it as text/plain, which is a better behaviour, and
> should make wget happier.
>
> I've applied a patch to do this, it's in the current repository. Is this
> useful to you?
>

Sure, that's a lot better !

But I should be possible to do better, with the mimetypes module.
A small patch is attached

Thanks a lot :-)

Gaetan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mime.patch
Type: text/x-diff
Size: 1270 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20051221/85bcece9/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20051221/85bcece9/attachment.pgp 


More information about the darcs-users mailing list