From: Martin Waitz <tali@admingilde.org>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] gitweb: use correct mime type even if filename has multiple dots.
Date: Sun, 17 Sep 2006 09:51:57 +0200 [thread overview]
Message-ID: <20060917075157.GY17042@admingilde.org> (raw)
In-Reply-To: <eehr7e$5i0$1@sea.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1051 bytes --]
hoi :)
On Sat, Sep 16, 2006 at 11:44:52PM +0200, Jakub Narebski wrote:
> Martin Waitz wrote:
>
> > Match the last part of the filename agains the extention from the
> > mime database instead of insisting that it starts at the first dot.
> [...]
> > - $filename =~ /\.(.*?)$/;
> > - return $mimemap{$1};
>
> Actually, that is non-greedy match, so the above code insist that
> extension starts at the _last_ dot.
hmm, but it didn't work for me.
I had filenames like "man/program.8.html" which got served as
"text/html" with the old code.
Besides, the new code would cope with extentions that contain a
dot itself.
Looking at /etc/mime.types, it only contains pcf.Z but perhaps
it should also contain tar.gz or similiar.
>
> --
> Jakub Narebski
> Warsaw, Poland
> ShadeHawk on #git
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Martin Waitz
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-09-17 7:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-16 21:09 [PATCH] gitweb: use correct mime type even if filename has multiple dots Martin Waitz
2006-09-16 21:44 ` Jakub Narebski
2006-09-17 7:51 ` Martin Waitz [this message]
2006-09-17 8:23 ` Jakub Narebski
2006-09-19 8:29 ` Martin Waitz
2006-09-19 11:57 ` [PATCH] gitweb: Fix mimetype_guess_file for files with multiple extensions Jakub Narebski
2006-09-17 8:41 ` [PATCH] gitweb: use correct mime type even if filename has multiple dots Junio C Hamano
2006-09-17 8:56 ` Jakub Narebski
2006-09-17 9:07 ` Junio C Hamano
2006-09-19 9:23 ` Martin Waitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060917075157.GY17042@admingilde.org \
--to=tali@admingilde.org \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.