6.0.0-alpha14
6/24/25

[#12161] Unable to parse certain multi-part messages
Summary Unable to parse certain multi-part messages
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester stuart.carnie (at) gmail (dot) com
Created 04/05/2013 (4463 days ago)
Due
Updated 04/07/2013 (4461 days ago)
Assigned
Resolved 04/07/2013 (4461 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
04/07/2013 06:43:56 AM Michael Slusarz Comment #7
Assigned to Michael Slusarz
State ⇒ Resolved
Priority ⇒ 1. Low
Reply to this comment
We can't lowercase all parameter name because, even if technically ok, 
this eliminates the ability to format these parameter needs for 
maximum readability (e.g. the DelSp text flowed parameter).

Implemented by instead creating a Case Insensitive Array object in 
Horde_Support to do the necessary lookups.

Horde_Mime 2.1.0
04/07/2013 06:40:41 AM Git Commit Comment #6 Reply to this comment
Changes have been made in Git (master):

commit f86e276c881264539e09ad5e35e5279fbeba788e
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Sun Apr 7 00:37:59 2013 -0600

     [mms] Content-Type parameters are case-insensitive (Bug #12161).

  framework/Mime/lib/Horde/Mime/Part.php             |   46 +++++++++++++++++--
  framework/Mime/package.xml                         |   12 +++--
  framework/Mime/test/Horde/Mime/PartTest.php        |   17 +++++++
  .../Mime/test/Horde/Mime/fixtures/sample_msg2.txt  |   27 +++++++++++
  4 files changed, 93 insertions(+), 9 deletions(-)

http://git.horde.org/horde-git/-/commit/f86e276c881264539e09ad5e35e5279fbeba788e
04/07/2013 06:40:34 AM Git Commit Comment #5 Reply to this comment
Changes have been made in Git (master):

commit 9b0a995a60584543001cbd5dc94a1545a508813c
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Sat Apr 6 23:42:03 2013 -0600

     Use getContentTypeParameter() to retrieve current boundary (Bug #12161).

  framework/Mime/lib/Horde/Mime/Part.php |    7 +++----
  1 files changed, 3 insertions(+), 4 deletions(-)

http://git.horde.org/horde-git/-/commit/9b0a995a60584543001cbd5dc94a1545a508813c
04/06/2013 12:01:35 AM stuart (dot) carnie (at) gmail (dot) com Comment #4 Reply to this comment

[Show Quoted Text - 15 lines]
Correct, the issue (see my pull request) was that the parameter names 
were not normalized, so a message with a parameter of Boundary (note 
case) was not found.  I created unit tests to demonstrate the issue?

04/05/2013 11:47:22 PM Michael Slusarz Comment #3 Reply to this comment
  However, parameter
    values are case-sensitive unless otherwise specified for the specific
    parameter.
What you have quoted is for parameter **values**, not names.  E.g.:

boundary=abc
is not the same as
boundary=ABC

Conversely:

BoUnDaRy=abc
is the same as
BOUNDARy=abc
04/05/2013 11:45:04 PM Michael Slusarz Comment #2 Reply to this comment

[Show Quoted Text - 9 lines]
1) The message sample that your provided was from H4 (with a 2009) 
date, which is old unsupported software.
2) We don't set the phrase 'Boundary' anywhere in the current code.
3) You are incorrect in your reading of the RFC.  Content-Type 
parameter names are NOT case-sensitive.  RFC 2045 [5.1]:

"The type, subtype, and **parameter names** are not case sensitive." 
(emphasis added).

IIRC, Pine would always send its Content-Type parameter names in 
uppercase, for example.
04/05/2013 09:45:44 PM stuart (dot) carnie (at) gmail (dot) com Comment #1
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ Unable to parse certain multi-part messages
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
New Attachment: sample_msg2.txt Download
State ⇒ Unconfirmed
Reply to this comment
The Boundary parameter of the Content-Type header has an uppercase B, 
however per section 2 of RFC 2045 
(http://tools.ietf.org/html/rfc2045#section-2):

    All numeric and octet values are given in decimal notation in this
    set of documents. All media type values, subtype values, and
    parameter names as defined are case-insensitive.  However, parameter
    values are case-sensitive unless otherwise specified for the specific
    parameter.

Will provide unit tests and a patch on Github to resolve this issue

Saved Queries