in reply to Re^2: Again on SOAP::Lite, MIME::Entity and SOAP::Packager
in thread Again on SOAP::Lite, MIME::Entity and SOAP::Packager
Looking at the source code of SOAP::Packager::MIME, the meat of it seems to be the sub ->package, which adds some headers to the MIME entity and after that calls $top->stringify_body;. So maybe the main trick is to use your own MIME::Entity subclass which has a better ->stringify_body:
package MIME::Entity::Ray; use strict; use parent 'MIME::Entity'; sub stringify_body { my( $self ) = @_; my $body = $self->SUPER::stringify_body(); $body =~ s!\n!\r\n!g; return $body };
And then instead of creating your own MIME::Entity objects create MIME::Entity::Ray objects instead.
If that still fails, maybe something else is creating MIME::Entity objects. Then either edit the source code or monkey patch MIME::Entity:
use MIME::Entity; my $old_stringify_body = \&MIME::Entity::stringify_body; *MIME::Entity::stringify_body = sub { my( $self ) = @_; my $body = $self->SUPER::stringify_body(); $body =~ s!\n!\r\n!g; return $body };
Update: After looking some more at SOAP::Packager, it even tries to do the Right Thing by setting:
local $MIME::Entity::BOUNDARY_DELIMITER = "\r\n";
except that MIME::Entity does not use that variable.
The real solution would be to make MIME::Entity use that variable.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Again on SOAP::Lite, MIME::Entity and SOAP::Packager
by ray.rick.mini (Sexton) on Dec 28, 2016 at 15:16 UTC | |
by Corion (Patriarch) on Dec 29, 2016 at 09:50 UTC | |
by ray.rick.mini (Sexton) on Dec 29, 2016 at 11:27 UTC | |
by Corion (Patriarch) on Dec 29, 2016 at 12:04 UTC | |
by ray.rick.mini (Sexton) on Dec 29, 2016 at 13:28 UTC | |
|
Re^4: Again on SOAP::Lite, MIME::Entity and SOAP::Packager
by ray.rick.mini (Sexton) on Dec 29, 2016 at 09:42 UTC | |
by Corion (Patriarch) on Dec 29, 2016 at 09:48 UTC | |
by ray.rick.mini (Sexton) on Dec 29, 2016 at 10:50 UTC |