9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Pjpeg in /sys/lib/mimetype
@ 2014-11-14 12:13 arisawa
  2014-11-16  0:20 ` arisawa
  0 siblings, 1 reply; 4+ messages in thread
From: arisawa @ 2014-11-14 12:13 UTC (permalink / raw)
  To: Bell Labs of the OS Plan 9 from Fans

Hello,

It is curious for me that ".jpg" has two entries in /sys/lib/mimetype.
term% grep jpeg /sys/lib/mimetype
.jfif		image		jpeg		-		y
.jfif-tbnl	image		jpeg		-		y
.jpe		image		jpeg		-		y
.jpeg		image		jpeg		-		y
.jpg		image		jpeg		-		y
.jpg		image		pjpeg		-		y
term%

The file is currently consulted by only two applications: mail and httpd.
I thought that the file provides conventional way to determine mime type from file suffix.
If so, what is the mime type for "foo.jpg"?

Kenji arisawa




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] Pjpeg in /sys/lib/mimetype
  2014-11-14 12:13 [9fans] Pjpeg in /sys/lib/mimetype arisawa
@ 2014-11-16  0:20 ` arisawa
  2014-11-17 13:40   ` Steffen Nurpmeso
  0 siblings, 1 reply; 4+ messages in thread
From: arisawa @ 2014-11-16  0:20 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hello,

I believe the line:
	.jpg		image		pjpeg		-		y
should be removed.

I found another curiosity in the file.
term% grep compress /sys/lib/mimetype
.Z		-		-		compress	m
.taz		application	x-tar		compress	m
.trz		application	x-tar		compress	m
.z		-		-		compress	m
.Z		-		-		compress	m
term% 
Does this mean that file suffixes are case sensitive in determining the mime type?
If so, should files with suffix “.JPG” be renamed to “.jpg” ?

Kenji Arisawa

2014/11/14 21:13、arisawa <arisawa@ar.aichi-u.ac.JP> のメール:

> Hello,
> 
> It is curious for me that ".jpg" has two entries in /sys/lib/mimetype.
> term% grep jpeg /sys/lib/mimetype
> .jfif		image		jpeg		-		y
> .jfif-tbnl	image		jpeg		-		y
> .jpe		image		jpeg		-		y
> .jpeg		image		jpeg		-		y
> .jpg		image		jpeg		-		y
> .jpg		image		pjpeg		-		y
> term%
> 
> The file is currently consulted by only two applications: mail and httpd.
> I thought that the file provides conventional way to determine mime type from file suffix.
> If so, what is the mime type for "foo.jpg"?
> 
> Kenji arisawa
> 
> 




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] Pjpeg in /sys/lib/mimetype
  2014-11-16  0:20 ` arisawa
@ 2014-11-17 13:40   ` Steffen Nurpmeso
  2014-11-17 14:20     ` lucio
  0 siblings, 1 reply; 4+ messages in thread
From: Steffen Nurpmeso @ 2014-11-17 13:40 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hello,

arisawa <arisawa@ar.aichi-u.ac.jp> wrote:
 |Does this mean that file suffixes are case sensitive in determining \
 |the mime type?
 |If so, should files with suffix “.JPG” be renamed to “.jpg” ?

The RFC doesn't say a word on case, which i implicitly read as
case-insensitive (because how could it work otherwise).
(And note that i have forgotten which RFC this actually is, but
i can assure you i've read it before i wrote the code comment that
i've repeated in my first sentence.)
Note also that the pretty comprehensive TIKA database only uses
lowercase definitions [1].

  [1] http://svn.apache.org/viewvc/tika/trunk/tika-core/src/main/resources/\
      org/apache/tika/mime/tika-mimetypes.xml

--steffen



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] Pjpeg in /sys/lib/mimetype
  2014-11-17 13:40   ` Steffen Nurpmeso
@ 2014-11-17 14:20     ` lucio
  0 siblings, 0 replies; 4+ messages in thread
From: lucio @ 2014-11-17 14:20 UTC (permalink / raw)
  To: 9fans

> The RFC doesn't say a word on case, which i implicitly read as
> case-insensitive (because how could it work otherwise).

The .z and .Z extensions were used originally to distinguish "packed"
and "compressed" files, respectively.  MIME came later and seemingly
could not distinguish between these two cases.  The problem is long
gone, no doubt.

Lucio.


-------------------------------------------------------------------------------------
This email has been scanned by the MxScan Email Security System.
-------------------------------------------------------------------------------------




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-11-17 14:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-14 12:13 [9fans] Pjpeg in /sys/lib/mimetype arisawa
2014-11-16  0:20 ` arisawa
2014-11-17 13:40   ` Steffen Nurpmeso
2014-11-17 14:20     ` lucio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).