6

Requests to a soap server were failing randomly. In order to contact the API provider, I tried to provide an curl example with the same payload and the error response. Yet when sending the payload over curl, the request worked just fine. When my application was building the request, it failed.

What. The. Fuck.

I checked and double-checked the request body and headers. They were identical.

Of course, no error response was returned by the API provider and, of course, they could not tell me how what error I caused in my request.

So I created a basic dummy server, installed wireshark and compared the payload when sending a request from my application and from curl to my dummy server.

It turns out: curl, if called in a certain way, automagically strips out newlines. The soap client kept them.

So that that shitty soap server crashed due to newlines in the message body!

Stripping out the newlines was rather easy.

Shame on you, your house, and entire family for letting it crash due to them!

Comments
Add Comment