Skip to content

Commit

Permalink
return status code 500 for soap fault per w3c spec
Browse files Browse the repository at this point in the history
  • Loading branch information
wagnerch committed Aug 14, 2021
1 parent 999ac8a commit 6d1e135
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/client-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ var fs = require('fs'),
var baseUrl = 'http://' + hostname + ':' + port;

server = http.createServer(function (req, res) {
res.statusCode = 200;
res.statusCode = 500;
res.write("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"\n xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\"\n xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\">\n<SOAP-ENV:Body><SOAP-ENV:Fault><faultcode xsi:type=\"xsd:string\">Test</faultcode><faultactor xsi:type=\"xsd:string\"></faultactor><faultstring xsi:type=\"xsd:string\">test error</faultstring><detail xsi:type=\"xsd:string\">test detail</detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>");
res.end();
}).listen(port, hostname, function () {
Expand Down Expand Up @@ -1734,4 +1734,4 @@ describe('Client posting complex body', () => {
});
}, baseUrl);
});
});
});

0 comments on commit 6d1e135

Please sign in to comment.