Skip Menu |

This queue is for tickets about the MIME-tools CPAN distribution.

Report information
The Basics
Id: 119568
Status: resolved
Priority: 0/
Queue: MIME-tools

People
Owner: Nobody in particular
Requestors: ray.rick.mini [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: MIME::Entity: Multipart boundaries newlines not compatible with apache axis
Date: Thu, 29 Dec 2016 11:08:06 +0100
To: bug-MIME-tools [...] rt.cpan.org
From: rayrick <ray.rick.mini [...] gmail.com>
Problem raised while trying to build a SOAP client sending attachments using SOAP::Packager and SOAP::Lite to a remote apache axis service that is expecting CRLFs. Discussion here: http://www.perlmonks.org/?node_id=806606 http://www.perlmonks.org/?node_id=1178606 Perl version: This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi (with 29 registered patches, see perl -V for more detail) Module: D/DS/DSKOLL/MIME-tools-5.508.tar.gz /usr/local/share/perl5/MIME/Entity.pm Installed: 5.508 CPAN: 5.508 up to date Dianne Skoll (DSKOLL) dfs+pause@roaringpenguin.com Linux ver: Linux xxxxxx3.10.0-327.el7.x86_64 #1 SMP Thu Oct 29 17:29:29 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux Demo patch used to fix the behaviour @@ -1828,9 +1828,9 @@ sub print_body { ### Parts: my $part; foreach $part ($self->parts) { - $out->print("--$boundary\n"); + $out->print("--$boundary\r\n"); $part->print($out); - $out->print("\n"); ### needed for next delim/close + $out->print("\r\n"); ### needed for next delim/close } $out->print("--$boundary--\n"); Thanks for looking at it
Hi, I don't like this patch. The problem is that a lot of other software wants (or is happy with) "\n" and the patch also doesn't convert "\n" to "\r\n" within the body itself... only the delimiters are affected. Better is to get the body as a string and then transform it yourself as desired, converting \n to \r\n everywhere. Regards, Dianne.
Subject: Re: [rt.cpan.org #119568] MIME::Entity: Multipart boundaries newlines not compatible with apache axis
Date: Wed, 4 Jan 2017 17:35:13 +0100
To: bug-MIME-tools [...] rt.cpan.org
From: rayrick <ray.rick.mini [...] gmail.com>
Hello Diane, thanks for looking at the case. My attached patch, wasn't mean to be THE solution but only to show where the error raised with apache axis2. Instead, with Corion we discussed a good way to definively fix the issue here http://www.perlmonks.org/?node_id=1178606 Would be cool to implement the use of the $MIME::Entity::BOUNDARY_DELIMITER variable in your module, note that the variable is actually been implemented in SOAP::Packager. Thanks for a reply 2017-01-03 21:46 GMT+01:00 Dianne Skoll via RT <bug-MIME-tools@rt.cpan.org>: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=119568 > > > Hi, > > I don't like this patch. The problem is that a lot of other software > wants (or is happy with) "\n" and the patch also doesn't convert "\n" to > "\r\n" within the body itself... only the delimiters are affected. > > Better is to get the body as a string and then transform it yourself as > desired, converting \n to \r\n everywhere. > > Regards, > > Dianne. > >
Subject: Re: [rt.cpan.org #119568] MIME::Entity: Multipart boundaries newlines not compatible with apache axis
Date: Wed, 4 Jan 2017 11:45:55 -0500
To: bug-MIME-tools [...] rt.cpan.org
From: Dianne Skoll <dfs [...] roaringpenguin.com>
On Wed, 4 Jan 2017 11:35:40 -0500 "rayrick via RT" <bug-MIME-tools@rt.cpan.org> wrote: Show quoted text
> Would be cool to implement the use of the > $MIME::Entity::BOUNDARY_DELIMITER variable in your module, note that > the variable is actually been implemented in SOAP::Packager.
Yes, that's a better way to do it. I'll make a patch for you to look at. Regards, Dianne.
Hi, I've released version 5.509 of MIME::tools at http://search.cpan.org/~dskoll/MIME-tools-5.509/ I believe it fixes this bug. Regards, Dianne.