[bugs] [Bug 953] Changed - Mime type of files with filenames containing spaces incorrectly identified

bugs@bugs.horde.org bugs@bugs.horde.org
Thu, 16 May 2002 15:21:39 -0300


http://bugs.horde.org/show_bug.cgi?id=953

*** shadow/953	Thu May 16 14:34:09 2002
--- shadow/953.tmp.28039	Thu May 16 15:21:39 2002
***************
*** 29,31 ****
--- 29,90 ----
  Horde 2.1, Imp 3.1 RC2
  Sorry, I thought I listed that information in the bug report.
  Of course, all clients are effected as this error is generated on the server.
+ 
+ ------- Additional Comments From dau@diala.greenpeace.org  05/16/02 15:21 -------
+ I believe I have found the problem.
+ My manager sends mail from Pegasus Mail for Win32 (v3.12c), and after looking at
+ some message sources it seems like Pegasus doesn't handle mime types very well.
+ (See example below.)
+ It seems that Pegasus likes to set the mime-type for MSWord, acrobat, and other
+ documents as "Application/Octet-stream", so when the attachment shows up on
+ message.php it is not associated with the correct type of viewer.
+ I don't know how many other mailers are guilty of this, but maybe you could add
+ code to check filename extensions if the mime-type is not defined, or not
+ well-defined.
+ 
+ For instance (some lines removed):
+ 
+ Return-Path: <eschaefer@ams.greenpeace.org>
+ Delivered-To: derek.au@diala.greenpeace.org
+ From: eschaefer@ams.greenpeace.org
+ Received: from ...
+ Organization: Greenpeace
+ To: ...
+ Date: Thu, 4 Apr 2002 18:08:57 +0200
+ MIME-Version: 1.0
+ Content-type: Multipart/Mixed; boundary=Message-Boundary-29886
+ Subject: evaluation site visit and team meeting
+ Cc: ...
+ Message-ID: ...
+ Priority: normal
+ X-mailer: Pegasus Mail for Win32 (v3.12c)
+ 
+ --Message-Boundary-29886
+ Content-type: text/plain; charset=US-ASCII
+ Content-transfer-encoding: 7BIT
+ Content-description: Mail message body
+ 
+ Ser attachement
+ 
+ --Message-Boundary-29886
+ Content-type: text/plain; charset=US-ASCII
+ Content-disposition: inline
+ Content-description: Attachment information.
+ 
+ The following section of this message contains a file attachment
+ prepared for transmission using the Internet MIME message format.
+ If you are using Pegasus Mail, or any another MIME-compliant system,
+ you should be able to save it or view it from within your mailer.
+ If you cannot, please ask your system administrator for assistance.
+ 
+    ---- File information -----------
+      File:  Check up after site visit X.doc
+      Date:  4 Apr 2002, 18:01
+      Size:  20992 bytes.
+      Type:  Unknown
+ 
+ --Message-Boundary-29886
+ Content-type: Application/Octet-stream; name="Check up after site visit X.doc";
+ type=Unknown
+ Content-disposition: attachment; filename="Check up after site visit X.doc"
+ Content-transfer-encoding: BASE64