'From Squeak3.8gamma of ''24 November 2004'' [latest update: #6548] on 30 April 2005 at 5:08:06 pm'! "Change Set: MimeTypeFix Date: 30 April 2005 Author: Adam Franco FileUrl was not getting the MimeType set when querying MimeDocument to guess the type. This was due to the type temp-variable not being set with the result of MIMEDocument guessTypeFromName:"! !FileUrl methodsFor: 'downloading' stamp: 'ASF 4/30/2005 16:37'! retrieveContents | file pathString s type entries | pathString _ self pathForFile. file _ [FileStream readOnlyFileNamed: pathString] on: FileDoesNotExistException do:[:ex| ex return: nil]. file ifNotNil: [ type _ file mimeTypes. type ifNotNil:[type _ type first]. type ifNil:[type _ MIMEDocument guessTypeFromName: self path last]. ^MIMELocalFileDocument contentType: type contentStream: file]. "see if it's a directory..." entries _ [(FileDirectory on: pathString) entries] on: InvalidDirectoryError do:[:ex| ex return: nil]. entries ifNil:[^nil]. s _ WriteStream on: String new. (pathString endsWith: '/') ifFalse: [ pathString _ pathString, '/' ]. s nextPutAll: '