Fix incorrect SOAP content type in SAML issuer (#2263)
This commit is contained in:
parent
9aa3b9b03f
commit
b2a2575896
|
@ -778,7 +778,7 @@ sub extractFormInfo {
|
|||
$req->response( [
|
||||
200,
|
||||
[
|
||||
'Content-Type' => 'application/xml',
|
||||
'Content-Type' => 'text/xml',
|
||||
'Content-Length' => length($slo_body)
|
||||
],
|
||||
[$slo_body]
|
||||
|
@ -846,7 +846,7 @@ sub extractFormInfo {
|
|||
$req->response( [
|
||||
200,
|
||||
[
|
||||
'Content-Type' => 'application/xml',
|
||||
'Content-Type' => 'text/xml',
|
||||
'Content-Length' => length($art_response)
|
||||
],
|
||||
[$art_response]
|
||||
|
|
|
@ -1054,7 +1054,7 @@ sub artifactServer {
|
|||
return [
|
||||
200,
|
||||
[
|
||||
'Content-Type' => 'application/xml',
|
||||
'Content-Type' => 'text/xml',
|
||||
'Content-Length' => length($art_response)
|
||||
],
|
||||
[$art_response]
|
||||
|
@ -1259,7 +1259,7 @@ sub soapSloServer {
|
|||
return [
|
||||
200,
|
||||
[
|
||||
'Content-Type' => 'application/xml',
|
||||
'Content-Type' => 'text/xml',
|
||||
'Content-Length' => length($slo_body)
|
||||
],
|
||||
[$slo_body]
|
||||
|
@ -2107,7 +2107,7 @@ sub attributeServer {
|
|||
return [
|
||||
200,
|
||||
[
|
||||
'Content-Type' => 'application/xml',
|
||||
'Content-Type' => 'text/xml',
|
||||
'Content-Length' => length($att_response)
|
||||
],
|
||||
[$att_response]
|
||||
|
|
|
@ -1779,8 +1779,8 @@ sub resolveArtifact {
|
|||
}
|
||||
|
||||
my $request = HTTP::Request->new( 'POST' => $profile->msg_url );
|
||||
$request->content_type('application/xml');
|
||||
$request->header( Accept => 'application/xml' );
|
||||
$request->content_type('text/xml');
|
||||
$request->header( Accept => 'text/xml' );
|
||||
$request->content( $profile->msg_body );
|
||||
|
||||
$self->logger->debug(
|
||||
|
@ -2001,8 +2001,8 @@ sub sendSOAPMessage {
|
|||
my $response;
|
||||
|
||||
my $request = HTTP::Request->new( 'POST' => $endpoint );
|
||||
$request->content_type('application/xml');
|
||||
$request->header( Accept => 'application/xml' );
|
||||
$request->content_type('text/xml');
|
||||
$request->header( Accept => 'text/xml' );
|
||||
$request->content($message);
|
||||
|
||||
$self->logger->debug("Send SOAP message $message to $endpoint");
|
||||
|
@ -3088,7 +3088,7 @@ sub sendSLOSoapErrorResponse {
|
|||
return [
|
||||
200,
|
||||
[
|
||||
'Content-Type' => 'application/xml',
|
||||
'Content-Type' => 'text/xml',
|
||||
'Content-Length' => length($slo_body)
|
||||
],
|
||||
[$slo_body]
|
||||
|
|
|
@ -35,9 +35,9 @@ LWP::Protocol::PSGI->register(
|
|||
);
|
||||
ok( ( $res->[0] == 200 or $res->[0] == 400 ), 'Response is 200 or 400' )
|
||||
or explain( $res->[0], "200 or 400" );
|
||||
ok( getHeader( $res, 'Content-Type' ) =~ m#^application/xml#,
|
||||
ok( getHeader( $res, 'Content-Type' ) =~ m#^text/xml#,
|
||||
'Content is XML' )
|
||||
or explain( $res->[1], 'Content-Type => application/xml' );
|
||||
or explain( $res->[1], 'Content-Type => text/xml' );
|
||||
count(4);
|
||||
return $res;
|
||||
}
|
||||
|
|
|
@ -34,9 +34,9 @@ LWP::Protocol::PSGI->register(
|
|||
'Execute request'
|
||||
);
|
||||
expectOK($res);
|
||||
ok( getHeader( $res, 'Content-Type' ) =~ m#^application/xml#,
|
||||
ok( getHeader( $res, 'Content-Type' ) =~ m#^text/xml#,
|
||||
'Content is XML' )
|
||||
or explain( $res->[1], 'Content-Type => application/xml' );
|
||||
or explain( $res->[1], 'Content-Type => text/xml' );
|
||||
count(3);
|
||||
return $res;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue