I am returning SOAP faults to our clients, but I'm confused as to how these are formatted with HTTP. In the HTTP response, should the content length be specified by a Content-Length header? Right now, I see the length returned as part of the content but it is formatted in hex and is sent after a CR/LF (see below). I have a user who is using a ruby soap library that seems to be ignoring the content returned in the fault message. I'm wondering if this is caused by a malformed HTTP response.
Thu Jun 12 12:32:13 EDT 2008:DEBUG:<< "HTTP/1.1 500 Internal Server Error[\r][\n]"
Thu Jun 12 12:32:13 EDT 2008:DEBUG:<< "Date: Thu, 12 Jun 2008 16:32:11 GMT[\r][\n]"
Thu Jun 12 12:32:13 EDT 2008:DEBUG:<< "Connection: close[\r][\n]"
Thu Jun 12 12:32:13 EDT 2008:DEBUG:<< "Transfer-Encoding: chunked[\r][\n]"
Thu Jun 12 12:32:13 EDT 2008:DEBUG:<< "Content-Type: text/xml; charset="utf-8"[\r][\n]"
Thu Jun 12 12:32:13 EDT 2008:DEBUG:<< "2"
Thu Jun 12 12:32:13 EDT 2008:DEBUG:<< "0"
Thu Jun 12 12:32:13 EDT 2008:DEBUG:<< "c"
Thu Jun 12 12:32:13 EDT 2008:DEBUG:<< "[\r]"
Thu Jun 12 12:32:13 EDT 2008:DEBUG:<< "[\n]"
Thu Jun 12 12:32:13 EDT 2008:DEBUG:<< "<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSche
+ma-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" ><SOAP-ENV:Body><Fault xml
+ns="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>soap:Server</faultcode><faultstring>Unab
+le to submit Shop Request: We have removed following unauthorized data source [LM3] from the reque
+st.<br>Request not submitted. Must select an authorized data source. [LM3] not in [TRV EXP
+GDS EDE ECA][\n]"
Thu Jun 12 12:32:13 EDT 2008:DEBUG:<< "[\n]"
Thu Jun 12 12:32:13 EDT 2008:DEBUG:<< "</faultstring></Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>"
Thu Jun 12 12:32:13 EDT 2008:DEBUG:<< "[\r]"
Thu Jun 12 12:32:13 EDT 2008:DEBUG:<< "[\n]"
Thu Jun 12 12:32:13 EDT 2008:DEBUG:<< "0"
Thu Jun 12 12:32:13 EDT 2008:DEBUG:<< "[\r]"
Thu Jun 12 12:32:13 EDT 2008:DEBUG:<< "[\n]"
Thu Jun 12 12:32:13 EDT 2008:DEBUG:<< "[\r]"
Thu Jun 12 12:32:13 EDT 2008:DEBUG:<< "[\n]"