Macs do determine MIME type based on information in the resource fork.
BeOS does something very similar. Most Unix systems actually inspect the
file for a magic number to determine type.

Matt Liotta
President & CEO
Montara Software, Inc.
http://www.montarasoftware.com/
888-408-0900 x901

> -----Original Message-----
> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 06, 2003 5:33 PM
> To: CF-Talk
> Subject: RE: CFFILE
> 
> Thanks for the clarification Mosh,
> 
> Now that you mention it, I have a vague memory of someone I knew
> mentioning
> the resource fork in Mac OS before.
> 
> > S. Isaac Dealey wrote:
> >> I'm not especially knowledgeable about mime either, but
> >> my impression (
> > and
> >> I could be entirely wrong ) is that the MIME type is
> >> derived from the
> >> extension, so if I'm right, you wouldn't really be
> >> gaining anything by
> >> referencing MIME info because if they rename the file
> >> extension that info
> >> will change. I'd have to test the theory to know if I'm
> >> right, but that's
> > my
> >> thinking off the top of my head. :)
> 
> > Just to clarify this bit, the Mime-Type is sent by the
> > client/browser but
> > how the client determines the correct type is browser/OS
> > dependant.  All
> > Windows browsers that I know of use the OS to determine
> > the Mime-Type, which
> > uses file extensions.
> 
> > However, this is not necessarily the case for other OSes.
> > Macs, for
> > example, store file information in a resource fork,
> > separate from the file
> > data and the filename. (Note, I'm not a Mac expert by any
> > stretch of the
> > imagination.)  The file's type, I believe, is stored in
> > the resource fork
> > and is not dependant on the filename.  So, technically, a
> > Mac client could
> > send a file named a.gif with a Mime-Type of "Image/JPEG"
> > if the resource
> > fork indicated that the file was really a JPEG.  Whether
> > or not this
> > happens, I don't know.
> 
> >> Yea, I think someone mentioned an cgi variable...
> >> http_content_length
> > iirc,
> >> which indicates file size in a real roundabout fashion --
> >> it's inclusive
> > of
> >> any form field content, like textareas, etc. also iirc...
> >> so, the theory
> >> being that if you check that variable and it says 50000
> >> then you know that
> > a
> >> little less than 50k was transmitted... Now that you
> >> mention it, although
> > no
> >> file is placed on the server until after the <cffile>
> >> call, cancelling out
> >> before that point might not save the user any time
> >> either, since I'm not
> >> sure if this variable is passed to the server by the
> >> browser, or if the
> >> calculation is performed by the server after all the data
> >> is sent. Again,
> > I
> >> haven't tested it, so I'm not sure. :)
> 
> > The content length of a request is sent in the HTTP
> > headers so, technically,
> > you could check the header info before the data was
> > actually passed along.
> > However, this would require a much finer level of control
> > over the web
> > server's processes than CF currently allows.
> 
> > --
> > Mosh Teitelbaum
> > evoch, LLC
> > Tel: (301) 625-9191
> > Fax: (301) 933-3651
> > Email: [EMAIL PROTECTED]
> > WWW: http://www.evoch.com/
> 
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > ~~~~~~~~~~~|
> > Archives:
> > http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
> > Subscription: http://www.houseoffusion.com/cf_lists/index.
> > cfm?method=subscribe&forumid=4
> > FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
> > This list and all House of Fusion resources hosted by
> > CFHosting.com. The place for dependable ColdFusion
> > Hosting.
> 
> >                             Unsubscribe:
> http://www.houseoffusion.com/cf_lists/uns
> >                             ubscribe.cfm?user=633.558.4
> 
> 
> s. isaac dealey                954-776-0046
> 
> new epoch                      http://www.turnkey.to
> 
> lead architect, tapestry cms   http://products.turnkey.to
> 
> certified advanced coldfusion 5 developer
> http://www.macromedia.com/v1/handlers/index.cfm?ID=21816
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to