Ruby, Net::HTTP and gSOAP
Par Dam le vendredi 4 septembre 2015, 11:21 - Lien permanent
In case someone stumbles upon the same problem, when using savon as a ruby soap client to access a server backed by gSOAP, do not use the default net::http client.
First, net::http will reformat all your headers, meaning that instead of sending a SOAPAction header, it'll send a Soapaction. I know, http headers are case insensitive but gSOAP apparently doesn't know about that.
Secondly, net::http client will send the request using 2 tcp segments, which seems to break gSOAP which, as it seems, can't really cope with HTTP.
I've switched to curb (libcurl frontend) and it's now working ok. I'm also submitting a bug on the ruby tracker to suggest that Net::HTTP client lib use the TCP CORK or TCP NO PUSH option to improve performance by sending only one tcp segment for request when possible.