Bug#856570: apache2: does not send any Content-Type for plaintext files
On Fri, 3 Mar 2017, Dominik George wrote:
> Apache uses /etc/mime.types to translate extensions into mime types,
> which, in my eyes, is a design flaw, because it is a 1:n mapping used by
I believe this system to be horridly flawed anyway… I mean, where
should Apache know the correct MIME type from?
A system based on a registry (mapping files to MIME types in a
database; entry is automatic with a guessed type if none exists
but can be overridden) is better.
> What you are probably looking for is this:
>
> http://serverfault.com/a/88449
Yes… well, almost. I had to quote the MIME type for it to work.
This works now:
[…]
<Directory /var/lib/footool>
Options FollowSymLinks
Require all granted
<FilesMatch "^[^\.]+$">
ForceType "text/plain; charset=UTF-8"
</FilesMatch>
</Directory>
[…]
I am *not* happy with this solution (but thank you anyway) because
globbing like this could be fragile, but at least it works, somewhat,
now. I still consider this a bug in the webserver.
bye,
//mirabilos
--
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg
*************************************************
**Besuchen Sie uns auf der EuroShop 2017!**
**5****. ****–**** ****9****. März 2017, Messe ****Düsseldorf**
The World’s No.1 Retail Trade Fair
tarent präsentiert richtungsweisende und innovative Lösungen für den Handel.
Wir freuen uns auf Ihren Besuch (**Halle 6, Stand I52**) und empfehlen
unsere Vorträge:
**„Wettbewerbsanalyse im Handel: Preisvergleich online und offline“**
Dienstag, 7. März 2017, 16:30 Uhr im Omnichannel Forum (Halle 6 / Stand I09)
„**Smart Cart – Connected Shopping“**
Donnerstag, 9. März 2017, 11:00 Uhr im EuroCIS Forum (Halle 6 / Stand I75)
[www.tarent.de/euroshop](http://Www.tarent.de/euroshop)
**
**
**Besuchen Sie uns auf der Internet ****W****orld 2017**
**7. – 8. März 2017, Messe München**
Die E-Commerce Messe
tarent präsentiert Produkte und Dienstleistungen aus dem E-Commerce und Online
Marketing.
Wir freuen uns auf Ihren Besuch (**Halle A6, Stand C160**) und empfehlen
unsere Vortrag:
**„Wettbewerbsanalyse im Handel: Preisvergleich online und offline“**
Mittwoch, 8. März 2017, 10:20 Uhr, Halle A6, Infoarena II
[www.tarent.de/internetworld](http://www.tarent.de/internetworld)
*************************************************
**Visit us at EuroShop 2017!**
**March ****5****th –**** ****9****th, ****2017, Messe ****Dusseldorf**
The World’s No.1 Retail Trade Fair
tarent presents trendsetting and innovative solutions for retail stores.
We look forward to seeing you (**hall 6, booth I52**), and recommend our
presentations:
**„****Competitor analysis in retail: price comparison online and offline“**
Tuesday, March 7th, 2017, 4:30 pm at the Omnichannel Forum (hall 6 / booth
I09)
„**Smart Cart – Connected Shopping“**
Thursday, March 9th, 2017, at 11 am at the EuroCIS Forum (hall 6 / booth SI75)
w[ww.tarent.de/euroshop](http://Www.tarent.de/euroshop)
**Visit us at ****Internet World ****2017!**
**March 7th –**** 8****th, ****2017, Messe M****unich**
The E-Commerce fair
tarent presents products and services from e-commerce and online marketing.
We look forward to seeing you (**hall ****A****6, booth ****C160**), and
recommend our presentation:
**„****Competitor analysis in retail: price comparison online and offline“**
Wednesday, March 8th, 2017, 10:20 am (hall A6 / Infoarena II)
[www.tarent.de/internetworld](http://www.tarent.de/internetworld)
Reply to: