Skip to content

Commit 45b8735

Browse files
committed
Merge branch 'rel-10_1' into rel-11_0
2 parents 9b95d70 + 56664b4 commit 45b8735

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

Kernel/GenericInterface/Transport/HTTP/SOAP.pm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ use PerlIO; ## no perlimports, not sure whether this is needed
2828
use HTTP::Status qw(status_message);
2929
use Plack::Response ();
3030
use SOAP::Lite; # for enabling debugging import +trace => 'all'
31+
use Text::Trim qw(rtrim);
3132

3233
# OTOBO modules
3334
use Kernel::System::VariableCheck qw(:all);
@@ -211,6 +212,10 @@ sub ProviderProcessRequest {
211212
Data => $Content,
212213
);
213214

215+
# Normalize Content by removing trailing white space.
216+
# This make SOAP::Lite work with XML::Parser >= 1.48.
217+
rtrim($Content);
218+
214219
# Deserialize data.
215220
my $Deserialized = eval { SOAP::Deserializer->deserialize($Content); };
216221
my $DeserializedFault = $@ || '';

scripts/test/GenericInterface/Transport/HTTP/SOAP/ContentCharset.t

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ plan( scalar @Tests );
110110

111111
for my $Test (@Tests) {
112112

113+
# This test request XML has a trailing newline. There have been problems with that
114+
# when XML::Parser >= 1.48 is used.
115+
# Therefore Kernel::GenericInterface::Transport::HTTP::SOAP::ProviderProcessRequest()
116+
# has been tweaked to trim trailing white space.
113117
my $Request = <<"END_XML";
114118
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tic="http://www.otobo.org/TicketConnector/">
115119
<soapenv:Header/>

0 commit comments

Comments
 (0)