[Zope-dev] Re: [Zope] Header information on file upload

Adrian van den Dries adriand@flow.com.au
Mon, 3 Feb 2003 09:54:54 +1100


On February  2, Martin Gebert wrote:
> What brings me directly to the central question: Is this Content-Type 
> header provided reliably by every browser?

Nothing is provided reliably by every browser. (Consider command-line
HTTP tools like wget and LWP.)

Mostly it depends on how the browser or, more likely, the operating
system determines mime types for a file.  Windows, for instance,
determines the mime type based on file extension, so if you upload an
image with the wrong extension (save an image/jpeg as a .gif) IE will
send the wrong mime type.  Not sure how Macs do it, and most UNIX
systems likely use /etc/mime.types.

a.

-- 
 Adrian van den Dries                           adriand@flow.com.au
 Development team                               www.dev.flow.com.au
 FLOW Communications Pty. Ltd.                  www.flow.com.au